@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
package/dist/forms/_chassis.js
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
|
+
import { REST_SHADE_CLASS } from "../system/_paint-rest-shade.js";
|
|
2
|
+
import { DATA_DISABLED_OPACITY, DISABLED_OPACITY, FIELD_DISABLED_FILL } from "../system/_style-disabled.js";
|
|
1
3
|
import { cva } from "../lib/cva.js";
|
|
4
|
+
import { FOCUS_RING_FIELD, FOCUS_RING_GROUP_FIELD } from "../system/_focus-ring-field.js";
|
|
5
|
+
import { CONTROL_STEP_SIZE_BODY, CONTROL_STEP_SIZE_SM } from "../system/_style-control-step.js";
|
|
2
6
|
import { STROKE_SUNKEN } from "../system/_paint-stroke-sunken.js";
|
|
7
|
+
import { BODY_WEIGHT } from "../system/_style-body-weight.js";
|
|
8
|
+
import { FIELD_HOVER_EDGE, FIELD_PAD_LG, FIELD_PAD_MD, FIELD_PAD_SM, INVALID_EDGE } from "../system/_style-field-chassis.js";
|
|
9
|
+
import { INPUT_FACE } from "../system/_style-input-face.js";
|
|
3
10
|
//#region src/forms/_chassis.ts
|
|
4
11
|
/**
|
|
5
12
|
* Everything the recessed control chassis paints except the box itself.
|
|
@@ -83,14 +90,34 @@ import { STROKE_SUNKEN } from "../system/_paint-stroke-sunken.js";
|
|
|
83
90
|
*
|
|
84
91
|
* The compound modifier outranks the plain one on specificity — an attribute
|
|
85
92
|
* selector and a pseudo-class against one pseudo-class — so its position in
|
|
86
|
-
* Tailwind's utility order cannot decide it.
|
|
87
|
-
*
|
|
88
|
-
*
|
|
93
|
+
* Tailwind's utility order cannot decide it. {@link FOCUS_RING_FIELD} still
|
|
94
|
+
* supplies the style and the width in both cases, which is why only the
|
|
95
|
+
* colour is restated.
|
|
89
96
|
*
|
|
90
97
|
* `focus-visible:outline-solid` re-declares the outline style the sibling
|
|
91
98
|
* `outline-none` switched off — see the note on `buttonChassis`.
|
|
99
|
+
*
|
|
100
|
+
* The width is {@link FOCUS_RING_FIELD}'s, read from `--cue-style-focus-width`
|
|
101
|
+
* (`_focus-ring.ts` says why every ring in this system shares one module); the
|
|
102
|
+
* border it is pulled back over reads `--cue-style-focus-edge` for the same
|
|
103
|
+
* reason a Look needs to move it — tender's dark band and kiln both do.
|
|
104
|
+
*
|
|
105
|
+
* The face (mono, unless a style set names another — `INPUT_FACE` says why) is
|
|
106
|
+
* what a person's typing renders in, at the body weight (`BODY_WEIGHT`:
|
|
107
|
+
* inherited, as it was before the name existed, unless a style set names one);
|
|
108
|
+
* a call site that deliberately keeps a typed value in mono regardless of the
|
|
109
|
+
* set (a hex colour code, a DMX value) restates `font-mono` on top, as
|
|
110
|
+
* `color-picker.tsx`'s hex field does.
|
|
111
|
+
*
|
|
112
|
+
* **The resting shade** ({@link REST_SHADE_CLASS}, spec §3.10) is the one
|
|
113
|
+
* shadow this recipe draws: the stroke paints a border and a ground and no
|
|
114
|
+
* shadow, so the shade is added as a utility of its own rather than composed
|
|
115
|
+
* into a list. It paints nothing until a pack tints `paint-rest-shade` —
|
|
116
|
+
* measured in `tests/browser/paint-elevation-noop.spec.ts` — and a caller's
|
|
117
|
+
* own `shadow-` utility replaces it through `twMerge`, as it would have
|
|
118
|
+
* replaced nothing before.
|
|
92
119
|
*/
|
|
93
|
-
const controlSurface = `w-full rounded-
|
|
120
|
+
const controlSurface = `w-full rounded-control ${STROKE_SUNKEN} ${REST_SHADE_CLASS} ${INPUT_FACE} ${BODY_WEIGHT} text-fg placeholder:text-fg-subtle outline-none ${FIELD_HOVER_EDGE} focus:border-[color:var(--cue-style-focus-edge,var(--cue-border-strong))] ${FOCUS_RING_FIELD} ${DISABLED_OPACITY} ${DATA_DISABLED_OPACITY} ${FIELD_DISABLED_FILL} ${INVALID_EDGE} data-[invalid]:focus-visible:outline-danger`;
|
|
94
121
|
/**
|
|
95
122
|
* The full recessed-control recipe, one variant per rung of the control ladder.
|
|
96
123
|
*
|
|
@@ -103,9 +130,9 @@ const controlSurface = `w-full rounded-(--radius-control) ${STROKE_SUNKEN} font-
|
|
|
103
130
|
*/
|
|
104
131
|
const controlVariants = cva(controlSurface, {
|
|
105
132
|
variants: { size: {
|
|
106
|
-
sm:
|
|
107
|
-
md:
|
|
108
|
-
lg:
|
|
133
|
+
sm: `h-control-sm ${FIELD_PAD_SM} ${CONTROL_STEP_SIZE_SM}`,
|
|
134
|
+
md: `h-control-md ${FIELD_PAD_MD} text-(length:--cue-text-ui)`,
|
|
135
|
+
lg: `h-control-lg ${FIELD_PAD_LG} ${CONTROL_STEP_SIZE_BODY}`
|
|
109
136
|
} },
|
|
110
137
|
defaultVariants: { size: "md" }
|
|
111
138
|
});
|
|
@@ -123,7 +150,7 @@ const controlClasses = controlVariants();
|
|
|
123
150
|
* inherits the font size from the wrapper so the two never disagree about which
|
|
124
151
|
* density rung they are on.
|
|
125
152
|
*/
|
|
126
|
-
const bareControlClasses =
|
|
153
|
+
const bareControlClasses = `min-w-0 flex-1 border-0 bg-transparent p-0 ${INPUT_FACE} ${BODY_WEIGHT} text-[length:inherit] text-fg placeholder:text-fg-subtle outline-none disabled:opacity-40`;
|
|
127
154
|
/**
|
|
128
155
|
* Focus feedback for a wrapper that owns the rim on behalf of an inner control.
|
|
129
156
|
*
|
|
@@ -154,7 +181,15 @@ const bareControlClasses = "min-w-0 flex-1 border-0 bg-transparent p-0 font-mono
|
|
|
154
181
|
* still visible. `data-invalid` is read off the wrapper, which is where Base
|
|
155
182
|
* UI's `Field` stamps it and where the group already takes
|
|
156
183
|
* `data-[invalid]:border-danger` from {@link controlVariants}.
|
|
184
|
+
*
|
|
185
|
+
* The rim is `has-focus:`, not `focus-within:`, for the order Tailwind emits
|
|
186
|
+
* them in: `focus-within:` comes before `hover:` and `has-focus:` after it, both
|
|
187
|
+
* before `data-[invalid]:`. Round 6 gave the chassis a hover edge
|
|
188
|
+
* (`FIELD_HOVER_EDGE`, `transparent` unless a set names one), and under the
|
|
189
|
+
* pointer it painted over a focused group's rim in every Look; the closing
|
|
190
|
+
* pass's browser run caught it (`form-focus.spec.ts`, a grouped field). The
|
|
191
|
+
* wrapper never takes focus itself, so `:has(:focus)` is the same test.
|
|
157
192
|
*/
|
|
158
|
-
const controlGroupFocusClasses =
|
|
193
|
+
const controlGroupFocusClasses = `has-focus:border-border-strong ${FOCUS_RING_GROUP_FIELD} data-[invalid]:has-focus-visible:outline-danger`;
|
|
159
194
|
//#endregion
|
|
160
195
|
export { bareControlClasses, controlClasses, controlGroupFocusClasses, controlSurface, controlVariants };
|
package/dist/forms/_listbox.js
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
|
+
import { FOCUS_RING } from "../system/_focus-ring.js";
|
|
2
|
+
import { CONTROL_FACE } from "../system/_style-control-face.js";
|
|
3
|
+
import { GLYPH_INK_SUBTLE } from "../system/_style-glyph-ink.js";
|
|
4
|
+
import { GLYPH_OPACITY_SVG } from "../system/_style-glyph-opacity.js";
|
|
5
|
+
import { CHIP_HEIGHT, CHIP_INK_NEUTRAL, CHIP_RADIUS, CHIP_SIZE } from "../system/_style-chip.js";
|
|
6
|
+
import { LABEL_FACE } from "../system/_style-label-face.js";
|
|
7
|
+
import { ROW_DISABLED_OPACITY } from "../system/_style-row-disabled.js";
|
|
1
8
|
import { overlayPopupTransitionClasses, overlayPositionerClasses, overlaySurfaceClasses } from "../overlays/_surface.js";
|
|
9
|
+
import { LISTBOX_PAD, OPTION_HEIGHT, OPTION_LEADING, OPTION_PAD, OPTION_ROW, OPTION_SELECTED_GROUND, OPTION_SELECTED_HIGHLIGHT_GROUND, OPTION_SELECTED_POINTER_GROUND } from "../system/_style-option.js";
|
|
2
10
|
//#region src/forms/_listbox.ts
|
|
3
11
|
/**
|
|
4
12
|
* The shared skin of every filterable list in this group — `Combobox`,
|
|
@@ -18,7 +26,7 @@ const listboxPositionerClasses = overlayPositionerClasses;
|
|
|
18
26
|
* space the positioner reports so a long list scrolls instead of overflowing the
|
|
19
27
|
* viewport.
|
|
20
28
|
*/
|
|
21
|
-
const listboxPopupClasses = `${overlaySurfaceClasses} ${overlayPopupTransitionClasses} w-(--anchor-width) max-w-(--available-width) overflow-hidden
|
|
29
|
+
const listboxPopupClasses = `${overlaySurfaceClasses} ${overlayPopupTransitionClasses} w-(--anchor-width) max-w-(--available-width) overflow-hidden ${LISTBOX_PAD} outline-none`;
|
|
22
30
|
/** The scroll container inside the popup. */
|
|
23
31
|
const listboxListClasses = "max-h-[min(var(--available-height),18rem)] overflow-y-auto overscroll-contain outline-none";
|
|
24
32
|
/**
|
|
@@ -26,9 +34,9 @@ const listboxListClasses = "max-h-[min(var(--available-height),18rem)] overflow-
|
|
|
26
34
|
* navigation and the pointer agree on which row is active, and the tint is
|
|
27
35
|
* `accent-soft` rather than a solid fill (the luma defect ruling).
|
|
28
36
|
*/
|
|
29
|
-
const listboxItemClasses =
|
|
37
|
+
const listboxItemClasses = `flex ${OPTION_HEIGHT} cursor-default items-center gap-(--cue-space-2) ${OPTION_PAD} ${CONTROL_FACE} text-(length:--cue-text-ui) ${OPTION_LEADING} ${OPTION_ROW} ${OPTION_SELECTED_GROUND} ${OPTION_SELECTED_HIGHLIGHT_GROUND} ${OPTION_SELECTED_POINTER_GROUND} outline-none select-none data-[disabled]:pointer-events-none ${ROW_DISABLED_OPACITY}`;
|
|
30
38
|
/** The "nothing matched" line: same rhythm as a row, but muted and unreachable. */
|
|
31
|
-
const listboxEmptyClasses =
|
|
39
|
+
const listboxEmptyClasses = `flex h-control-sm items-center px-(--cue-space-3) ${CONTROL_FACE} text-(length:--cue-text-ui) text-fg-subtle select-none`;
|
|
32
40
|
/** The tick gutter, always reserved so labels never jog sideways. */
|
|
33
41
|
const listboxIndicatorClasses = "flex size-icon-sm shrink-0 items-center justify-center";
|
|
34
42
|
/**
|
|
@@ -38,18 +46,18 @@ const listboxIndicatorClasses = "flex size-icon-sm shrink-0 items-center justify
|
|
|
38
46
|
*/
|
|
39
47
|
const chipFieldClasses = "flex w-full cursor-text flex-wrap items-center gap-(--cue-space-1) py-(--cue-space-1)";
|
|
40
48
|
/**
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* palette, ordinary casing.
|
|
49
|
+
* The typing input inside a chip field: one line tall, so a row of chips and
|
|
50
|
+
* the input fit the field's `min-h-control-*` and the field stands on the
|
|
51
|
+
* control ladder beside an `Input` of its size. It was `h-control-sm`, which
|
|
52
|
+
* with the row's padding made an `md` field 38px beside a 32px input, chips or
|
|
53
|
+
* none (P188.field: coss.com/ui's is 32px, 36px on a phone, like its inputs).
|
|
54
|
+
* A second row of chips still grows the field.
|
|
48
55
|
*/
|
|
49
|
-
const
|
|
56
|
+
const chipInputClasses = "h-auto w-auto min-w-[6ch]";
|
|
57
|
+
const valueChipClasses = `group/chip inline-flex ${CHIP_HEIGHT} max-w-full min-w-0 cursor-default items-center gap-(--cue-space-1) ${CHIP_RADIUS} border border-[color:var(--cue-style-tag-edge,var(--cue-border))] bg-surface-2 py-0 pr-(--cue-space-1) pl-[var(--cue-style-tag-pad,var(--cue-space-2))] ${LABEL_FACE} ${CHIP_SIZE} leading-none ${CHIP_INK_NEUTRAL} outline-none select-none data-[highlighted]:border-accent/60 data-[highlighted]:text-fg focus-within:border-accent/60 focus-within:text-fg`;
|
|
50
58
|
/** The chip's remove affordance. */
|
|
51
|
-
const chipRemoveClasses =
|
|
59
|
+
const chipRemoveClasses = `flex size-icon-sm shrink-0 cursor-pointer items-center justify-center rounded-control border-0 bg-transparent p-0 text-fg-subtle outline-none transition-colors hover:text-fg ${FOCUS_RING}`;
|
|
52
60
|
/** The trailing caret / clear affordance beside a filterable input. */
|
|
53
|
-
const listboxAdornmentClasses =
|
|
61
|
+
const listboxAdornmentClasses = `flex shrink-0 cursor-pointer items-center justify-center rounded-control border-0 bg-transparent p-0 ${GLYPH_INK_SUBTLE} ${GLYPH_OPACITY_SVG} outline-none transition-colors hover:text-fg ${FOCUS_RING}`;
|
|
54
62
|
//#endregion
|
|
55
|
-
export { chipFieldClasses, chipRemoveClasses, listboxAdornmentClasses, listboxEmptyClasses, listboxIndicatorClasses, listboxItemClasses, listboxListClasses, listboxPopupClasses, listboxPositionerClasses, valueChipClasses };
|
|
63
|
+
export { chipFieldClasses, chipInputClasses, chipRemoveClasses, listboxAdornmentClasses, listboxEmptyClasses, listboxIndicatorClasses, listboxItemClasses, listboxListClasses, listboxPopupClasses, listboxPositionerClasses, valueChipClasses };
|
package/dist/forms/checkbox.js
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { FOCUS_RING } from "../system/_focus-ring.js";
|
|
4
|
+
import { CONTROL_FACE } from "../system/_style-control-face.js";
|
|
5
|
+
import { LABEL_INK } from "../system/_style-label-ink.js";
|
|
6
|
+
import { REST_SHADE_CLASS } from "../system/_paint-rest-shade.js";
|
|
7
|
+
import { CHECK_EDGE, CHECK_HOVER_EDGE, CHECK_RADIUS, CHECK_SIZE_MD } from "../system/_style-check.js";
|
|
8
|
+
import { CHECK_GLYPH_SIZE } from "../system/_style-check-glyph.js";
|
|
9
|
+
import { CHOICE_GAP } from "../system/_style-choice-gap.js";
|
|
10
|
+
import { CONTROL_LABEL_LEADING, CONTROL_LABEL_WEIGHT } from "../system/_style-control-label.js";
|
|
11
|
+
import { CHECK_DISABLED, DATA_DISABLED_OPACITY, LABEL_DISABLED_INK, LABEL_DISABLED_OPACITY } from "../system/_style-disabled.js";
|
|
3
12
|
import * as React from "react";
|
|
4
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
14
|
import { Checkbox } from "@base-ui/react/checkbox";
|
|
@@ -53,20 +62,20 @@ const Checkbox$1 = React.forwardRef(function Checkbox$2({ className, label, size
|
|
|
53
62
|
ref,
|
|
54
63
|
"data-slot": "checkbox",
|
|
55
64
|
"aria-labelledby": hasLabel ? labelId : void 0,
|
|
56
|
-
className: cn(
|
|
65
|
+
className: cn(`flex shrink-0 items-center justify-center ${CHECK_RADIUS} border ${CHECK_EDGE} bg-sunken text-accent-fg outline-none transition-colors ${REST_SHADE_CLASS}`, size === "sm" ? "size-icon-sm" : CHECK_SIZE_MD, CHECK_HOVER_EDGE, "data-[checked]:border-accent data-[checked]:bg-accent", "data-[indeterminate]:border-accent data-[indeterminate]:bg-accent", `${FOCUS_RING}`, `data-[disabled]:pointer-events-none ${DATA_DISABLED_OPACITY} ${CHECK_DISABLED}`, "data-[invalid]:border-danger", className),
|
|
57
66
|
...elementProps,
|
|
58
67
|
children: /* @__PURE__ */ jsx(Checkbox.Indicator, {
|
|
59
68
|
className: "flex size-full items-center justify-center data-[unchecked]:hidden",
|
|
60
69
|
render: (indicatorProps, state) => /* @__PURE__ */ jsx("span", {
|
|
61
70
|
...indicatorProps,
|
|
62
|
-
children: state.indeterminate ? /* @__PURE__ */ jsx(DashGlyph, { className:
|
|
71
|
+
children: state.indeterminate ? /* @__PURE__ */ jsx(DashGlyph, { className: CHECK_GLYPH_SIZE }) : /* @__PURE__ */ jsx(CheckGlyph, { className: CHECK_GLYPH_SIZE })
|
|
63
72
|
})
|
|
64
73
|
})
|
|
65
74
|
});
|
|
66
75
|
if (!hasLabel) return box;
|
|
67
76
|
return /* @__PURE__ */ jsxs("label", {
|
|
68
77
|
"data-slot": "checkbox-label",
|
|
69
|
-
className: "inline-flex cursor-pointer items-center gap-(--cue-space-3)
|
|
78
|
+
className: cn("inline-flex cursor-pointer items-center gap-(--cue-space-3) text-(length:--cue-text-ui) select-none has-[[data-disabled]]:cursor-default", LABEL_DISABLED_OPACITY, LABEL_INK, LABEL_DISABLED_INK, CONTROL_LABEL_WEIGHT, CONTROL_LABEL_LEADING, CONTROL_FACE),
|
|
70
79
|
children: [box, /* @__PURE__ */ jsx("span", {
|
|
71
80
|
id: labelId,
|
|
72
81
|
children: label
|
|
@@ -90,7 +99,7 @@ const CheckboxGroup$1 = React.forwardRef(function CheckboxGroup$2({ className, .
|
|
|
90
99
|
return /* @__PURE__ */ jsx(CheckboxGroup, {
|
|
91
100
|
ref,
|
|
92
101
|
"data-slot": "checkbox-group",
|
|
93
|
-
className: cn(
|
|
102
|
+
className: cn(`flex flex-col ${CHOICE_GAP}`, className),
|
|
94
103
|
...elementProps
|
|
95
104
|
});
|
|
96
105
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { FOCUS_RING } from "../system/_focus-ring.js";
|
|
3
4
|
import { Input } from "./input.js";
|
|
4
5
|
import { CrossGlyph, VariableGlyph } from "./_glyphs.js";
|
|
5
6
|
import { PasswordInput } from "./password-input.js";
|
|
@@ -89,7 +90,7 @@ const EnvVarInput = React.forwardRef(function EnvVarInput({ className, value: va
|
|
|
89
90
|
...elementProps,
|
|
90
91
|
children: variable === null ? secret ? /* @__PURE__ */ jsx(PasswordInput, { ...controlProps }) : /* @__PURE__ */ jsx(Input, { ...controlProps }) : /* @__PURE__ */ jsxs("div", {
|
|
91
92
|
"data-slot": "env-var-pill",
|
|
92
|
-
className: cn("flex w-full items-center gap-(--cue-space-2) rounded-
|
|
93
|
+
className: cn("flex w-full items-center gap-(--cue-space-2) rounded-control border border-warn/35 bg-warn/10 font-mono text-warn", PILL_SIZES[size], disabled === true && "opacity-40"),
|
|
93
94
|
children: [
|
|
94
95
|
/* @__PURE__ */ jsx(VariableGlyph, {
|
|
95
96
|
"aria-hidden": "true",
|
|
@@ -105,7 +106,7 @@ const EnvVarInput = React.forwardRef(function EnvVarInput({ className, value: va
|
|
|
105
106
|
"aria-label": clearLabel,
|
|
106
107
|
disabled,
|
|
107
108
|
onClick: () => commit(""),
|
|
108
|
-
className:
|
|
109
|
+
className: `ml-auto flex size-icon-md shrink-0 cursor-pointer items-center justify-center rounded-control border-0 bg-transparent p-0 text-warn outline-none transition-colors hover:bg-warn/20 ${FOCUS_RING} disabled:pointer-events-none`,
|
|
109
110
|
children: /* @__PURE__ */ jsx(CrossGlyph, { className: "size-icon-sm" })
|
|
110
111
|
})
|
|
111
112
|
]
|
package/dist/forms/field.d.ts
CHANGED
|
@@ -29,7 +29,8 @@ interface FieldLabelProps extends Omit<Field.Label.Props, "className"> {
|
|
|
29
29
|
className?: string;
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
|
-
* The name of a field: mono, uppercase, tracked out, one rung below body
|
|
32
|
+
* The name of a field: mono, uppercase, tracked out, one rung below body
|
|
33
|
+
* text — by default, the style set's choice inside one.
|
|
33
34
|
*
|
|
34
35
|
* Renders a real `<label>` wired to the field's control, so clicking it focuses
|
|
35
36
|
* (or toggles) that control.
|
package/dist/forms/field.js
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { LABEL_INK } from "../system/_style-label-ink.js";
|
|
4
|
+
import { BODY_WEIGHT } from "../system/_style-body-weight.js";
|
|
5
|
+
import { LABEL_FACE } from "../system/_style-label-face.js";
|
|
6
|
+
import { LABEL_WEIGHT } from "../system/_style-label-weight.js";
|
|
7
|
+
import { LABEL_CASE } from "../system/_style-label-case.js";
|
|
8
|
+
import { LABEL_TRACKING_TIGHT } from "../system/_style-label-tracking.js";
|
|
9
|
+
import { LABEL_SIZE } from "../system/_style-label-size.js";
|
|
10
|
+
import { FIELD_GAP } from "../system/_style-field-gap.js";
|
|
11
|
+
import { HELP_INK, HELP_LEADING, HELP_LEADING_ERROR, HELP_SIZE } from "../system/_style-help.js";
|
|
12
|
+
import { LABEL_LEADING } from "../system/_style-label-leading.js";
|
|
3
13
|
import * as React from "react";
|
|
4
14
|
import { jsx } from "react/jsx-runtime";
|
|
5
15
|
import { Field } from "@base-ui/react/field";
|
|
@@ -26,12 +36,13 @@ const Field$1 = React.forwardRef(function Field$2({ className, ...elementProps }
|
|
|
26
36
|
return /* @__PURE__ */ jsx(Field.Root, {
|
|
27
37
|
ref,
|
|
28
38
|
"data-slot": "field",
|
|
29
|
-
className: cn("flex w-full flex-col
|
|
39
|
+
className: cn("flex w-full flex-col", FIELD_GAP, className),
|
|
30
40
|
...elementProps
|
|
31
41
|
});
|
|
32
42
|
});
|
|
33
43
|
/**
|
|
34
|
-
* The name of a field: mono, uppercase, tracked out, one rung below body
|
|
44
|
+
* The name of a field: mono, uppercase, tracked out, one rung below body
|
|
45
|
+
* text — by default, the style set's choice inside one.
|
|
35
46
|
*
|
|
36
47
|
* Renders a real `<label>` wired to the field's control, so clicking it focuses
|
|
37
48
|
* (or toggles) that control.
|
|
@@ -43,7 +54,7 @@ const FieldLabel = React.forwardRef(function FieldLabel({ className, ...elementP
|
|
|
43
54
|
return /* @__PURE__ */ jsx(Field.Label, {
|
|
44
55
|
ref,
|
|
45
56
|
"data-slot": "field-label",
|
|
46
|
-
className: cn(
|
|
57
|
+
className: cn(LABEL_SIZE, LABEL_LEADING, "select-none data-[disabled]:opacity-40", LABEL_INK, LABEL_WEIGHT, LABEL_FACE, LABEL_TRACKING_TIGHT, LABEL_CASE, className),
|
|
47
58
|
...elementProps
|
|
48
59
|
});
|
|
49
60
|
});
|
|
@@ -58,7 +69,7 @@ const FieldDescription = React.forwardRef(function FieldDescription({ className,
|
|
|
58
69
|
return /* @__PURE__ */ jsx(Field.Description, {
|
|
59
70
|
ref,
|
|
60
71
|
"data-slot": "field-description",
|
|
61
|
-
className: cn(
|
|
72
|
+
className: cn(LABEL_FACE, HELP_SIZE, HELP_LEADING, HELP_INK, BODY_WEIGHT, className),
|
|
62
73
|
...elementProps
|
|
63
74
|
});
|
|
64
75
|
});
|
|
@@ -77,7 +88,7 @@ const FieldDescription = React.forwardRef(function FieldDescription({ className,
|
|
|
77
88
|
*/
|
|
78
89
|
const FieldError = React.forwardRef(function FieldError({ className, issues, match, children, ...elementProps }, ref) {
|
|
79
90
|
if (issues !== void 0 && issues.length === 0) return null;
|
|
80
|
-
const classes = cn(
|
|
91
|
+
const classes = cn(LABEL_FACE, HELP_SIZE, HELP_LEADING_ERROR, "text-danger", BODY_WEIGHT, className);
|
|
81
92
|
if (issues === void 0) return /* @__PURE__ */ jsx(Field.Error, {
|
|
82
93
|
ref,
|
|
83
94
|
"data-slot": "field-error",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { FOCUS_RING } from "../system/_focus-ring.js";
|
|
3
4
|
import { CrossGlyph } from "./_glyphs.js";
|
|
4
5
|
import * as React from "react";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -143,7 +144,7 @@ const FileUpload = React.forwardRef(function FileUpload({ className, zoneClassNa
|
|
|
143
144
|
setDragging(false);
|
|
144
145
|
intake(event.dataTransfer?.files ?? null);
|
|
145
146
|
},
|
|
146
|
-
className: cn(
|
|
147
|
+
className: cn(`flex w-full cursor-pointer flex-col items-center justify-center gap-(--cue-space-1) rounded-control border border-dashed border-border bg-sunken px-(--cue-space-4) py-(--cue-space-5) font-mono text-(length:--cue-text-ui) text-fg-muted outline-none transition-colors duration-150 hover:border-border-strong hover:text-fg ${FOCUS_RING} disabled:pointer-events-none disabled:opacity-40 data-[dragging=true]:border-accent data-[dragging=true]:bg-accent-soft data-[dragging=true]:text-fg motion-reduce:transition-none`, zoneClassName),
|
|
147
148
|
children: [/* @__PURE__ */ jsx("span", { children: label }), hint === void 0 ? null : /* @__PURE__ */ jsx("span", {
|
|
148
149
|
className: "text-(length:--cue-text-label) text-fg-subtle",
|
|
149
150
|
children: hint
|
|
@@ -222,7 +223,7 @@ function FileUploadRow({ file, onRemove, removeLabel }) {
|
|
|
222
223
|
"aria-label": removeLabel(file),
|
|
223
224
|
"data-slot": "file-upload-remove",
|
|
224
225
|
onClick: () => onRemove(file.id),
|
|
225
|
-
className:
|
|
226
|
+
className: `flex size-icon-sm shrink-0 cursor-pointer items-center justify-center rounded-control border-0 bg-transparent p-0 text-fg-subtle outline-none transition-colors hover:text-fg ${FOCUS_RING} motion-reduce:transition-none`,
|
|
226
227
|
children: /* @__PURE__ */ jsx(CrossGlyph, { className: "size-full" })
|
|
227
228
|
})
|
|
228
229
|
]
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
3
|
import { controlGroupFocusClasses, controlVariants } from "./_chassis.js";
|
|
4
|
+
import { GLYPH_INK_SUBTLE } from "../system/_style-glyph-ink.js";
|
|
5
|
+
import { GLYPH_OPACITY_SVG } from "../system/_style-glyph-opacity.js";
|
|
4
6
|
import * as React from "react";
|
|
5
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
8
|
//#region src/forms/input-group.tsx
|
|
@@ -12,6 +14,13 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
12
14
|
*/
|
|
13
15
|
const InputGroupContext = React.createContext(false);
|
|
14
16
|
/**
|
|
17
|
+
* A gutter: the glyph ink and opacity a set gives a control's glyphs
|
|
18
|
+
* (`style-glyph-ink`, `style-glyph-opacity`), falling back to the `fg-subtle`
|
|
19
|
+
* it drew. The opacity reaches only a glyph, not the text or `Kbd` a gutter
|
|
20
|
+
* may hold: coss.com/ui fades its addon's icons alone (P161.addon).
|
|
21
|
+
*/
|
|
22
|
+
const GUTTER_CLASSES = `flex shrink-0 items-center ${GLYPH_INK_SUBTLE} ${GLYPH_OPACITY_SVG}`;
|
|
23
|
+
/**
|
|
15
24
|
* A control and its adornments, drawn as a single field.
|
|
16
25
|
*
|
|
17
26
|
* The group — not the input — owns the chassis, so there is exactly one rim and
|
|
@@ -40,7 +49,7 @@ const InputGroup = React.forwardRef(function InputGroup({ className, leading, tr
|
|
|
40
49
|
children: [
|
|
41
50
|
leading === void 0 ? null : /* @__PURE__ */ jsx("span", {
|
|
42
51
|
"data-slot": "input-group-leading",
|
|
43
|
-
className:
|
|
52
|
+
className: GUTTER_CLASSES,
|
|
44
53
|
children: leading
|
|
45
54
|
}),
|
|
46
55
|
/* @__PURE__ */ jsx(InputGroupContext.Provider, {
|
|
@@ -49,7 +58,7 @@ const InputGroup = React.forwardRef(function InputGroup({ className, leading, tr
|
|
|
49
58
|
}),
|
|
50
59
|
trailing === void 0 ? null : /* @__PURE__ */ jsx("span", {
|
|
51
60
|
"data-slot": "input-group-trailing",
|
|
52
|
-
className:
|
|
61
|
+
className: GUTTER_CLASSES,
|
|
53
62
|
children: trailing
|
|
54
63
|
})
|
|
55
64
|
]
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
3
|
import { bareControlClasses, controlGroupFocusClasses, controlSurface } from "./_chassis.js";
|
|
4
|
+
import { GLYPH_SIZE } from "../system/_style-glyph-size.js";
|
|
4
5
|
import { useCuePortalProps } from "../system/portal.js";
|
|
5
6
|
import { CrossGlyph, TickGlyph } from "./_glyphs.js";
|
|
6
|
-
import { chipFieldClasses, chipRemoveClasses, listboxEmptyClasses, listboxIndicatorClasses, listboxItemClasses, listboxListClasses, listboxPopupClasses, listboxPositionerClasses, valueChipClasses } from "./_listbox.js";
|
|
7
|
+
import { chipFieldClasses, chipInputClasses, chipRemoveClasses, listboxEmptyClasses, listboxIndicatorClasses, listboxItemClasses, listboxListClasses, listboxPopupClasses, listboxPositionerClasses, valueChipClasses } from "./_listbox.js";
|
|
7
8
|
import * as React from "react";
|
|
8
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
10
|
import { Combobox } from "@base-ui/react/combobox";
|
|
@@ -59,7 +60,7 @@ const MultiSelect = React.forwardRef(function MultiSelect({ items, value, defaul
|
|
|
59
60
|
}), /* @__PURE__ */ jsx(Combobox.ChipRemove, {
|
|
60
61
|
"aria-label": removeLabel(item.label),
|
|
61
62
|
className: chipRemoveClasses,
|
|
62
|
-
children: /* @__PURE__ */ jsx(CrossGlyph, { className:
|
|
63
|
+
children: /* @__PURE__ */ jsx(CrossGlyph, { className: GLYPH_SIZE })
|
|
63
64
|
})]
|
|
64
65
|
}, item.value)), /* @__PURE__ */ jsx(Combobox.Input, {
|
|
65
66
|
ref,
|
|
@@ -68,7 +69,7 @@ const MultiSelect = React.forwardRef(function MultiSelect({ items, value, defaul
|
|
|
68
69
|
placeholder: selected.length > 0 ? "" : placeholder,
|
|
69
70
|
"aria-label": ariaLabel,
|
|
70
71
|
"aria-labelledby": ariaLabelledBy,
|
|
71
|
-
className: cn(bareControlClasses,
|
|
72
|
+
className: cn(bareControlClasses, chipInputClasses)
|
|
72
73
|
})] }) })
|
|
73
74
|
})
|
|
74
75
|
}), /* @__PURE__ */ jsx(Combobox.Portal, {
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { FOCUS_RING_INSET } from "../system/_focus-ring.js";
|
|
3
4
|
import { bareControlClasses, controlGroupFocusClasses, controlSurface } from "./_chassis.js";
|
|
5
|
+
import { GLYPH_INK_MUTED } from "../system/_style-glyph-ink.js";
|
|
6
|
+
import { STEPPER_WIDTH } from "../system/_style-stepper.js";
|
|
7
|
+
import { GLYPH_TEXT_SIZE } from "../system/_style-glyph-size.js";
|
|
4
8
|
import * as React from "react";
|
|
5
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
10
|
import { NumberField } from "@base-ui/react/number-field";
|
|
7
11
|
//#region src/forms/number-field.tsx
|
|
8
12
|
/** The − and + affordances: square, borderless, and quiet until hovered. */
|
|
9
|
-
const stepperClasses =
|
|
13
|
+
const stepperClasses = `flex shrink-0 items-center justify-center border-0 bg-transparent p-0 font-mono ${GLYPH_TEXT_SIZE} ${GLYPH_INK_MUTED} leading-none select-none outline-none transition-colors hover:bg-surface-2 hover:text-fg ${FOCUS_RING_INSET} data-[disabled]:pointer-events-none data-[disabled]:opacity-40`;
|
|
10
14
|
/**
|
|
11
15
|
* A numeric control with explicit − / + affordances and no native spinners.
|
|
12
16
|
*
|
|
@@ -38,7 +42,7 @@ const NumberField$1 = React.forwardRef(function NumberField$2({ className, size
|
|
|
38
42
|
children: [
|
|
39
43
|
/* @__PURE__ */ jsx(NumberField.Decrement, {
|
|
40
44
|
"aria-label": decrementLabel,
|
|
41
|
-
className: cn(stepperClasses, rung === "sm" ? "w-control-sm" :
|
|
45
|
+
className: cn(stepperClasses, rung === "sm" ? "w-control-sm" : STEPPER_WIDTH),
|
|
42
46
|
children: /* @__PURE__ */ jsx("span", {
|
|
43
47
|
"aria-hidden": "true",
|
|
44
48
|
children: "−"
|
|
@@ -51,7 +55,7 @@ const NumberField$1 = React.forwardRef(function NumberField$2({ className, size
|
|
|
51
55
|
}),
|
|
52
56
|
/* @__PURE__ */ jsx(NumberField.Increment, {
|
|
53
57
|
"aria-label": incrementLabel,
|
|
54
|
-
className: cn(stepperClasses, rung === "sm" ? "w-control-sm" :
|
|
58
|
+
className: cn(stepperClasses, rung === "sm" ? "w-control-sm" : STEPPER_WIDTH),
|
|
55
59
|
children: /* @__PURE__ */ jsx("span", {
|
|
56
60
|
"aria-hidden": "true",
|
|
57
61
|
children: "+"
|
package/dist/forms/otp-field.js
CHANGED
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { CONTROL_STEP_SIZE_BODY } from "../system/_style-control-step.js";
|
|
3
4
|
import { controlSurface } from "./_chassis.js";
|
|
5
|
+
import { OTP_GAP } from "../system/_style-otp.js";
|
|
4
6
|
import * as React from "react";
|
|
5
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
8
|
import { OTPField } from "@base-ui/react/otp-field";
|
|
7
9
|
//#region src/forms/otp-field.tsx
|
|
8
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* One square slot per rung of the control ladder. The width is spelt as the
|
|
12
|
+
* ladder's own variable, `w-(--cue-control-*)`, which `tailwind-merge` knows is a
|
|
13
|
+
* width and so drops the chassis's `w-full` for: it does not know the theme's
|
|
14
|
+
* `control-*` scale, so `size-control-*` beside the `w-auto` this used to add
|
|
15
|
+
* kept both, `w-auto` won the cascade, and every slot drew as wide as an empty
|
|
16
|
+
* input (round 6, P166.width).
|
|
17
|
+
*/
|
|
9
18
|
const SLOT_SIZES = {
|
|
10
|
-
sm: "
|
|
11
|
-
md:
|
|
12
|
-
lg: "
|
|
19
|
+
sm: "w-(--cue-control-sm) h-control-sm text-(length:--cue-text-ui)",
|
|
20
|
+
md: `w-(--cue-control-md) h-control-md ${CONTROL_STEP_SIZE_BODY}`,
|
|
21
|
+
lg: "w-(--cue-control-lg) h-control-lg text-(length:--cue-text-emphasis)"
|
|
13
22
|
};
|
|
14
23
|
/**
|
|
15
24
|
* A one-time code, one character per box.
|
|
@@ -30,14 +39,14 @@ const SLOT_SIZES = {
|
|
|
30
39
|
const OTPField$1 = React.forwardRef(function OTPField$2({ length = 6, size = "md", groupSize, separator = "–", "aria-label": ariaLabel, id, slotLabel = (index, total) => `Character ${index + 1} of ${total}`, className, slotClassName, ...elementProps }, ref) {
|
|
31
40
|
const generatedId = React.useId();
|
|
32
41
|
const fieldId = id ?? generatedId;
|
|
33
|
-
const slotClasses = cn(controlSurface, "
|
|
42
|
+
const slotClasses = cn(controlSurface, "p-0 text-center tabular-nums", SLOT_SIZES[size], slotClassName);
|
|
34
43
|
return /* @__PURE__ */ jsxs(OTPField.Root, {
|
|
35
44
|
ref,
|
|
36
45
|
id: fieldId,
|
|
37
46
|
length,
|
|
38
47
|
"aria-label": ariaLabel,
|
|
39
48
|
"data-slot": "otp-field",
|
|
40
|
-
className: cn(
|
|
49
|
+
className: cn(`relative flex items-center ${OTP_GAP}`, className),
|
|
41
50
|
...elementProps,
|
|
42
51
|
children: [ariaLabel === void 0 ? null : /* @__PURE__ */ jsx("label", {
|
|
43
52
|
htmlFor: fieldId,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { FOCUS_RING } from "../system/_focus-ring.js";
|
|
3
4
|
import { InputGroup } from "./input-group.js";
|
|
4
5
|
import { Input } from "./input.js";
|
|
5
6
|
import { EyeGlyph, EyeOffGlyph } from "./_glyphs.js";
|
|
@@ -35,6 +36,7 @@ const PasswordInput = React.forwardRef(function PasswordInput({ className, revea
|
|
|
35
36
|
revealed,
|
|
36
37
|
revealedProp
|
|
37
38
|
]);
|
|
39
|
+
const RevealGlyph = revealed ? EyeOffGlyph : EyeGlyph;
|
|
38
40
|
return /* @__PURE__ */ jsx(InputGroup, {
|
|
39
41
|
size,
|
|
40
42
|
className,
|
|
@@ -44,8 +46,8 @@ const PasswordInput = React.forwardRef(function PasswordInput({ className, revea
|
|
|
44
46
|
"aria-label": revealed ? hideLabel : revealLabel,
|
|
45
47
|
disabled,
|
|
46
48
|
onClick: toggle,
|
|
47
|
-
className:
|
|
48
|
-
children: /* @__PURE__ */ jsx(
|
|
49
|
+
className: `flex shrink-0 cursor-pointer items-center justify-center rounded-control text-fg-subtle outline-none transition-colors hover:text-fg ${FOCUS_RING} disabled:pointer-events-none disabled:opacity-40 aria-pressed:text-fg`,
|
|
50
|
+
children: /* @__PURE__ */ jsx(RevealGlyph, { className: "size-icon-md" })
|
|
49
51
|
}) : void 0,
|
|
50
52
|
children: /* @__PURE__ */ jsx(Input, {
|
|
51
53
|
ref,
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { FOCUS_RING } from "../system/_focus-ring.js";
|
|
4
|
+
import { CONTROL_FACE } from "../system/_style-control-face.js";
|
|
5
|
+
import { LABEL_INK } from "../system/_style-label-ink.js";
|
|
6
|
+
import { CHOICE_GAP } from "../system/_style-choice-gap.js";
|
|
7
|
+
import { CONTROL_LABEL_LEADING, CONTROL_LABEL_WEIGHT } from "../system/_style-control-label.js";
|
|
8
|
+
import { RADIO_CHECKED_GROUND, RADIO_DOT } from "../system/_style-radio.js";
|
|
3
9
|
import * as React from "react";
|
|
4
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
11
|
import { Radio } from "@base-ui/react/radio";
|
|
@@ -24,7 +30,7 @@ const RadioGroup$1 = React.forwardRef(function RadioGroup$2({ className, orienta
|
|
|
24
30
|
ref,
|
|
25
31
|
"data-slot": "radio-group",
|
|
26
32
|
"data-orientation": orientation,
|
|
27
|
-
className: cn("flex", orientation === "horizontal" ? "flex-row flex-wrap items-center gap-(--cue-space-5)" :
|
|
33
|
+
className: cn("flex", orientation === "horizontal" ? "flex-row flex-wrap items-center gap-(--cue-space-5)" : `flex-col ${CHOICE_GAP}`, className),
|
|
28
34
|
...elementProps
|
|
29
35
|
});
|
|
30
36
|
});
|
|
@@ -46,14 +52,14 @@ const Radio$1 = React.forwardRef(function Radio$2({ className, label, size = "md
|
|
|
46
52
|
ref,
|
|
47
53
|
"data-slot": "radio",
|
|
48
54
|
"aria-labelledby": hasLabel ? labelId : void 0,
|
|
49
|
-
className: cn("flex shrink-0 items-center justify-center rounded-full border border-border bg-sunken text-accent outline-none transition-colors", size === "sm" ? "size-icon-sm" : "size-icon-md", "hover:border-border-strong", "data-[checked]:border-accent",
|
|
55
|
+
className: cn("flex shrink-0 items-center justify-center rounded-full border border-border bg-sunken text-accent outline-none transition-colors", size === "sm" ? "size-icon-sm" : "size-[var(--cue-style-check-size,var(--cue-icon-md))]", "hover:border-border-strong", "data-[checked]:border-accent", RADIO_CHECKED_GROUND, `${FOCUS_RING}`, "data-[disabled]:pointer-events-none data-[disabled]:opacity-40", "data-[invalid]:border-danger", className),
|
|
50
56
|
...elementProps,
|
|
51
|
-
children: /* @__PURE__ */ jsx(Radio.Indicator, { className:
|
|
57
|
+
children: /* @__PURE__ */ jsx(Radio.Indicator, { className: `block ${RADIO_DOT} rounded-full data-[unchecked]:hidden` })
|
|
52
58
|
});
|
|
53
59
|
if (!hasLabel) return dot;
|
|
54
60
|
return /* @__PURE__ */ jsxs("label", {
|
|
55
61
|
"data-slot": "radio-label",
|
|
56
|
-
className: "inline-flex cursor-pointer items-center gap-(--cue-space-3)
|
|
62
|
+
className: cn("inline-flex cursor-pointer items-center gap-(--cue-space-3) text-(length:--cue-text-ui) select-none has-[[data-disabled]]:cursor-default has-[[data-disabled]]:opacity-40", LABEL_INK, CONTROL_LABEL_WEIGHT, CONTROL_LABEL_LEADING, CONTROL_FACE),
|
|
57
63
|
children: [dot, /* @__PURE__ */ jsx("span", {
|
|
58
64
|
id: labelId,
|
|
59
65
|
children: label
|
package/dist/forms/rating.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 { StarGlyph } from "./_glyphs.js";
|
|
4
5
|
import * as React from "react";
|
|
5
6
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -10,7 +11,7 @@ const MARK_SIZES = {
|
|
|
10
11
|
md: "size-icon-md",
|
|
11
12
|
lg: "size-[calc(var(--cue-icon-md)*1.35)]"
|
|
12
13
|
};
|
|
13
|
-
const MARK_CLASSES =
|
|
14
|
+
const MARK_CLASSES = `flex cursor-pointer items-center justify-center border-0 bg-transparent p-0 text-fg-subtle transition-colors duration-150 outline-none hover:text-accent ${FOCUS_RING_OFFSET_2} disabled:pointer-events-none disabled:opacity-40 aria-checked:text-accent`;
|
|
14
15
|
/**
|
|
15
16
|
* A 0–N rating, drawn as marks.
|
|
16
17
|
*
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { FOCUS_RING } from "../system/_focus-ring.js";
|
|
3
4
|
import { bareControlClasses, controlGroupFocusClasses, controlVariants } from "./_chassis.js";
|
|
4
5
|
import * as React from "react";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -240,7 +241,7 @@ const ScrubInput = React.forwardRef(function ScrubInput({ className, value, onCh
|
|
|
240
241
|
disabled,
|
|
241
242
|
onPointerDown: (event) => event.stopPropagation(),
|
|
242
243
|
onClick: cycleUnit,
|
|
243
|
-
className:
|
|
244
|
+
className: `shrink-0 cursor-pointer rounded-control border-0 bg-transparent p-0 font-mono text-[length:inherit] text-fg-subtle outline-none transition-colors hover:text-fg ${FOCUS_RING} disabled:pointer-events-none`,
|
|
244
245
|
children: unit
|
|
245
246
|
})]
|
|
246
247
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { FOCUS_RING } from "../system/_focus-ring.js";
|
|
3
4
|
import { InputGroup } from "./input-group.js";
|
|
4
5
|
import { Input } from "./input.js";
|
|
5
6
|
import { CrossGlyph, SearchGlyph } from "./_glyphs.js";
|
|
@@ -93,7 +94,7 @@ const SearchInput = React.forwardRef(function SearchInput({ className, value, de
|
|
|
93
94
|
type: "button",
|
|
94
95
|
"aria-label": clearLabel,
|
|
95
96
|
onClick: clear,
|
|
96
|
-
className:
|
|
97
|
+
className: `flex shrink-0 cursor-pointer items-center justify-center rounded-control text-fg-subtle outline-none transition-colors hover:text-fg ${FOCUS_RING}`,
|
|
97
98
|
children: /* @__PURE__ */ jsx(CrossGlyph, { className: "size-icon-sm" })
|
|
98
99
|
}),
|
|
99
100
|
children: /* @__PURE__ */ jsx(Input, {
|