@major-tech/ui 0.0.0-stage → 1.0.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 +101 -0
- package/THIRD_PARTY_NOTICES.md +27 -0
- package/dist/components/accordion.d.ts +33 -0
- package/dist/components/accordion.d.ts.map +1 -0
- package/dist/components/accordion.js +51 -0
- package/dist/components/accordion.js.map +1 -0
- package/dist/components/activity-chart.d.ts +26 -0
- package/dist/components/activity-chart.d.ts.map +1 -0
- package/dist/components/activity-chart.js +56 -0
- package/dist/components/activity-chart.js.map +1 -0
- package/dist/components/alert-dialog.d.ts +28 -0
- package/dist/components/alert-dialog.d.ts.map +1 -0
- package/dist/components/alert-dialog.js +51 -0
- package/dist/components/alert-dialog.js.map +1 -0
- package/dist/components/alert.d.ts +34 -0
- package/dist/components/alert.d.ts.map +1 -0
- package/dist/components/alert.js +59 -0
- package/dist/components/alert.js.map +1 -0
- package/dist/components/ask-user-question.d.ts +103 -0
- package/dist/components/ask-user-question.d.ts.map +1 -0
- package/dist/components/ask-user-question.js +401 -0
- package/dist/components/ask-user-question.js.map +1 -0
- package/dist/components/attachment-gallery.d.ts +137 -0
- package/dist/components/attachment-gallery.d.ts.map +1 -0
- package/dist/components/attachment-gallery.js +317 -0
- package/dist/components/attachment-gallery.js.map +1 -0
- package/dist/components/avatar.d.ts +37 -0
- package/dist/components/avatar.d.ts.map +1 -0
- package/dist/components/avatar.js +62 -0
- package/dist/components/avatar.js.map +1 -0
- package/dist/components/badge.d.ts +29 -0
- package/dist/components/badge.d.ts.map +1 -0
- package/dist/components/badge.js +50 -0
- package/dist/components/badge.js.map +1 -0
- package/dist/components/brand-tile.d.ts +33 -0
- package/dist/components/brand-tile.d.ts.map +1 -0
- package/dist/components/brand-tile.js +36 -0
- package/dist/components/brand-tile.js.map +1 -0
- package/dist/components/button.d.ts +51 -0
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +90 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/calendar.d.ts +18 -0
- package/dist/components/calendar.d.ts.map +1 -0
- package/dist/components/calendar.js +78 -0
- package/dist/components/calendar.js.map +1 -0
- package/dist/components/card.d.ts +18 -0
- package/dist/components/card.d.ts.map +1 -0
- package/dist/components/card.js +34 -0
- package/dist/components/card.js.map +1 -0
- package/dist/components/carousel.d.ts +48 -0
- package/dist/components/carousel.d.ts.map +1 -0
- package/dist/components/carousel.js +227 -0
- package/dist/components/carousel.js.map +1 -0
- package/dist/components/catalog-card.d.ts +29 -0
- package/dist/components/catalog-card.d.ts.map +1 -0
- package/dist/components/catalog-card.js +20 -0
- package/dist/components/catalog-card.js.map +1 -0
- package/dist/components/chart.d.ts +118 -0
- package/dist/components/chart.d.ts.map +1 -0
- package/dist/components/chart.js +209 -0
- package/dist/components/chart.js.map +1 -0
- package/dist/components/checkbox.d.ts +8 -0
- package/dist/components/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox.js +14 -0
- package/dist/components/checkbox.js.map +1 -0
- package/dist/components/chip.d.ts +68 -0
- package/dist/components/chip.d.ts.map +1 -0
- package/dist/components/chip.js +100 -0
- package/dist/components/chip.js.map +1 -0
- package/dist/components/code-block.d.ts +99 -0
- package/dist/components/code-block.d.ts.map +1 -0
- package/dist/components/code-block.js +144 -0
- package/dist/components/code-block.js.map +1 -0
- package/dist/components/collapsible.d.ts +17 -0
- package/dist/components/collapsible.d.ts.map +1 -0
- package/dist/components/collapsible.js +25 -0
- package/dist/components/collapsible.js.map +1 -0
- package/dist/components/command.d.ts +51 -0
- package/dist/components/command.d.ts.map +1 -0
- package/dist/components/command.js +120 -0
- package/dist/components/command.js.map +1 -0
- package/dist/components/composer.d.ts +211 -0
- package/dist/components/composer.d.ts.map +1 -0
- package/dist/components/composer.js +605 -0
- package/dist/components/composer.js.map +1 -0
- package/dist/components/connector-request.d.ts +63 -0
- package/dist/components/connector-request.d.ts.map +1 -0
- package/dist/components/connector-request.js +57 -0
- package/dist/components/connector-request.js.map +1 -0
- package/dist/components/context-menu.d.ts +26 -0
- package/dist/components/context-menu.d.ts.map +1 -0
- package/dist/components/context-menu.js +33 -0
- package/dist/components/context-menu.js.map +1 -0
- package/dist/components/data-table.d.ts +61 -0
- package/dist/components/data-table.d.ts.map +1 -0
- package/dist/components/data-table.js +79 -0
- package/dist/components/data-table.js.map +1 -0
- package/dist/components/date-range-picker.d.ts +54 -0
- package/dist/components/date-range-picker.d.ts.map +1 -0
- package/dist/components/date-range-picker.js +451 -0
- package/dist/components/date-range-picker.js.map +1 -0
- package/dist/components/dialog.d.ts +46 -0
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.js +75 -0
- package/dist/components/dialog.js.map +1 -0
- package/dist/components/drawer.d.ts +85 -0
- package/dist/components/drawer.d.ts.map +1 -0
- package/dist/components/drawer.js +166 -0
- package/dist/components/drawer.js.map +1 -0
- package/dist/components/dropdown-menu.d.ts +77 -0
- package/dist/components/dropdown-menu.d.ts.map +1 -0
- package/dist/components/dropdown-menu.js +112 -0
- package/dist/components/dropdown-menu.js.map +1 -0
- package/dist/components/editor-tabs.d.ts +49 -0
- package/dist/components/editor-tabs.d.ts.map +1 -0
- package/dist/components/editor-tabs.js +157 -0
- package/dist/components/editor-tabs.js.map +1 -0
- package/dist/components/empty-state.d.ts +21 -0
- package/dist/components/empty-state.d.ts.map +1 -0
- package/dist/components/empty-state.js +14 -0
- package/dist/components/empty-state.js.map +1 -0
- package/dist/components/entity-card.d.ts +301 -0
- package/dist/components/entity-card.d.ts.map +1 -0
- package/dist/components/entity-card.js +392 -0
- package/dist/components/entity-card.js.map +1 -0
- package/dist/components/entity-row.d.ts +37 -0
- package/dist/components/entity-row.d.ts.map +1 -0
- package/dist/components/entity-row.js +65 -0
- package/dist/components/entity-row.js.map +1 -0
- package/dist/components/env-var-request.d.ts +51 -0
- package/dist/components/env-var-request.d.ts.map +1 -0
- package/dist/components/env-var-request.js +50 -0
- package/dist/components/env-var-request.js.map +1 -0
- package/dist/components/field.d.ts +30 -0
- package/dist/components/field.d.ts.map +1 -0
- package/dist/components/field.js +48 -0
- package/dist/components/field.js.map +1 -0
- package/dist/components/file-upload.d.ts +108 -0
- package/dist/components/file-upload.d.ts.map +1 -0
- package/dist/components/file-upload.js +217 -0
- package/dist/components/file-upload.js.map +1 -0
- package/dist/components/hover-card.d.ts +18 -0
- package/dist/components/hover-card.d.ts.map +1 -0
- package/dist/components/hover-card.js +84 -0
- package/dist/components/hover-card.js.map +1 -0
- package/dist/components/input-group.d.ts +29 -0
- package/dist/components/input-group.d.ts.map +1 -0
- package/dist/components/input-group.js +61 -0
- package/dist/components/input-group.js.map +1 -0
- package/dist/components/input.d.ts +9 -0
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.js +13 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/island.d.ts +18 -0
- package/dist/components/island.d.ts.map +1 -0
- package/dist/components/island.js +30 -0
- package/dist/components/island.js.map +1 -0
- package/dist/components/kbd.d.ts +7 -0
- package/dist/components/kbd.d.ts.map +1 -0
- package/dist/components/kbd.js +11 -0
- package/dist/components/kbd.js.map +1 -0
- package/dist/components/label.d.ts +8 -0
- package/dist/components/label.d.ts.map +1 -0
- package/dist/components/label.js +12 -0
- package/dist/components/label.js.map +1 -0
- package/dist/components/markdown.d.ts +24 -0
- package/dist/components/markdown.d.ts.map +1 -0
- package/dist/components/markdown.js +38 -0
- package/dist/components/markdown.js.map +1 -0
- package/dist/components/message.d.ts +38 -0
- package/dist/components/message.d.ts.map +1 -0
- package/dist/components/message.js +25 -0
- package/dist/components/message.js.map +1 -0
- package/dist/components/page-header.d.ts +31 -0
- package/dist/components/page-header.d.ts.map +1 -0
- package/dist/components/page-header.js +94 -0
- package/dist/components/page-header.js.map +1 -0
- package/dist/components/pagination.d.ts +22 -0
- package/dist/components/pagination.d.ts.map +1 -0
- package/dist/components/pagination.js +36 -0
- package/dist/components/pagination.js.map +1 -0
- package/dist/components/password-input.d.ts +5 -0
- package/dist/components/password-input.d.ts.map +1 -0
- package/dist/components/password-input.js +12 -0
- package/dist/components/password-input.js.map +1 -0
- package/dist/components/pepper.d.ts +92 -0
- package/dist/components/pepper.d.ts.map +1 -0
- package/dist/components/pepper.js +1279 -0
- package/dist/components/pepper.js.map +1 -0
- package/dist/components/permission-request.d.ts +53 -0
- package/dist/components/permission-request.d.ts.map +1 -0
- package/dist/components/permission-request.js +54 -0
- package/dist/components/permission-request.js.map +1 -0
- package/dist/components/popover.d.ts +42 -0
- package/dist/components/popover.d.ts.map +1 -0
- package/dist/components/popover.js +76 -0
- package/dist/components/popover.js.map +1 -0
- package/dist/components/progress.d.ts +9 -0
- package/dist/components/progress.d.ts.map +1 -0
- package/dist/components/progress.js +12 -0
- package/dist/components/progress.js.map +1 -0
- package/dist/components/progressive-blur.d.ts +31 -0
- package/dist/components/progressive-blur.d.ts.map +1 -0
- package/dist/components/progressive-blur.js +44 -0
- package/dist/components/progressive-blur.js.map +1 -0
- package/dist/components/radio-group.d.ts +8 -0
- package/dist/components/radio-group.d.ts.map +1 -0
- package/dist/components/radio-group.js +15 -0
- package/dist/components/radio-group.js.map +1 -0
- package/dist/components/request-card.d.ts +34 -0
- package/dist/components/request-card.d.ts.map +1 -0
- package/dist/components/request-card.js +50 -0
- package/dist/components/request-card.js.map +1 -0
- package/dist/components/resizable.d.ts +24 -0
- package/dist/components/resizable.d.ts.map +1 -0
- package/dist/components/resizable.js +40 -0
- package/dist/components/resizable.js.map +1 -0
- package/dist/components/responsive-overlay.d.ts +136 -0
- package/dist/components/responsive-overlay.d.ts.map +1 -0
- package/dist/components/responsive-overlay.js +302 -0
- package/dist/components/responsive-overlay.js.map +1 -0
- package/dist/components/scroll-shadows.d.ts +11 -0
- package/dist/components/scroll-shadows.d.ts.map +1 -0
- package/dist/components/scroll-shadows.js +53 -0
- package/dist/components/scroll-shadows.js.map +1 -0
- package/dist/components/search-field.d.ts +16 -0
- package/dist/components/search-field.d.ts.map +1 -0
- package/dist/components/search-field.js +50 -0
- package/dist/components/search-field.js.map +1 -0
- package/dist/components/searchable-select.d.ts +43 -0
- package/dist/components/searchable-select.d.ts.map +1 -0
- package/dist/components/searchable-select.js +39 -0
- package/dist/components/searchable-select.js.map +1 -0
- package/dist/components/select.d.ts +60 -0
- package/dist/components/select.d.ts.map +1 -0
- package/dist/components/select.js +94 -0
- package/dist/components/select.js.map +1 -0
- package/dist/components/separator.d.ts +7 -0
- package/dist/components/separator.d.ts.map +1 -0
- package/dist/components/separator.js +12 -0
- package/dist/components/separator.js.map +1 -0
- package/dist/components/settings-section.d.ts +41 -0
- package/dist/components/settings-section.d.ts.map +1 -0
- package/dist/components/settings-section.js +50 -0
- package/dist/components/settings-section.js.map +1 -0
- package/dist/components/sidebar-item.d.ts +41 -0
- package/dist/components/sidebar-item.d.ts.map +1 -0
- package/dist/components/sidebar-item.js +59 -0
- package/dist/components/sidebar-item.js.map +1 -0
- package/dist/components/skeleton.d.ts +7 -0
- package/dist/components/skeleton.d.ts.map +1 -0
- package/dist/components/skeleton.js +11 -0
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/slider.d.ts +10 -0
- package/dist/components/slider.d.ts.map +1 -0
- package/dist/components/slider.js +36 -0
- package/dist/components/slider.js.map +1 -0
- package/dist/components/sonner.d.ts +8 -0
- package/dist/components/sonner.d.ts.map +1 -0
- package/dist/components/sonner.js +21 -0
- package/dist/components/sonner.js.map +1 -0
- package/dist/components/spinner.d.ts +7 -0
- package/dist/components/spinner.d.ts.map +1 -0
- package/dist/components/spinner.js +12 -0
- package/dist/components/spinner.js.map +1 -0
- package/dist/components/stat-strip.d.ts +20 -0
- package/dist/components/stat-strip.d.ts.map +1 -0
- package/dist/components/stat-strip.js +11 -0
- package/dist/components/stat-strip.js.map +1 -0
- package/dist/components/status-dot.d.ts +25 -0
- package/dist/components/status-dot.d.ts.map +1 -0
- package/dist/components/status-dot.js +31 -0
- package/dist/components/status-dot.js.map +1 -0
- package/dist/components/subagent-run.d.ts +27 -0
- package/dist/components/subagent-run.d.ts.map +1 -0
- package/dist/components/subagent-run.js +38 -0
- package/dist/components/subagent-run.js.map +1 -0
- package/dist/components/switch.d.ts +8 -0
- package/dist/components/switch.d.ts.map +1 -0
- package/dist/components/switch.js +13 -0
- package/dist/components/switch.js.map +1 -0
- package/dist/components/system-notice.d.ts +34 -0
- package/dist/components/system-notice.d.ts.map +1 -0
- package/dist/components/system-notice.js +52 -0
- package/dist/components/system-notice.js.map +1 -0
- package/dist/components/table.d.ts +27 -0
- package/dist/components/table.d.ts.map +1 -0
- package/dist/components/table.js +37 -0
- package/dist/components/table.js.map +1 -0
- package/dist/components/tabs.d.ts +40 -0
- package/dist/components/tabs.d.ts.map +1 -0
- package/dist/components/tabs.js +52 -0
- package/dist/components/tabs.js.map +1 -0
- package/dist/components/textarea.d.ts +5 -0
- package/dist/components/textarea.d.ts.map +1 -0
- package/dist/components/textarea.js +9 -0
- package/dist/components/textarea.js.map +1 -0
- package/dist/components/thinking-indicator.d.ts +21 -0
- package/dist/components/thinking-indicator.d.ts.map +1 -0
- package/dist/components/thinking-indicator.js +136 -0
- package/dist/components/thinking-indicator.js.map +1 -0
- package/dist/components/thread-status.d.ts +25 -0
- package/dist/components/thread-status.d.ts.map +1 -0
- package/dist/components/thread-status.js +41 -0
- package/dist/components/thread-status.js.map +1 -0
- package/dist/components/todo-list.d.ts +52 -0
- package/dist/components/todo-list.d.ts.map +1 -0
- package/dist/components/todo-list.js +137 -0
- package/dist/components/todo-list.js.map +1 -0
- package/dist/components/toggle-group.d.ts +17 -0
- package/dist/components/toggle-group.d.ts.map +1 -0
- package/dist/components/toggle-group.js +26 -0
- package/dist/components/toggle-group.js.map +1 -0
- package/dist/components/toggle.d.ts +27 -0
- package/dist/components/toggle.d.ts.map +1 -0
- package/dist/components/toggle.js +44 -0
- package/dist/components/toggle.js.map +1 -0
- package/dist/components/tool-call.d.ts +60 -0
- package/dist/components/tool-call.d.ts.map +1 -0
- package/dist/components/tool-call.js +94 -0
- package/dist/components/tool-call.js.map +1 -0
- package/dist/components/tool-result.d.ts +127 -0
- package/dist/components/tool-result.d.ts.map +1 -0
- package/dist/components/tool-result.js +155 -0
- package/dist/components/tool-result.js.map +1 -0
- package/dist/components/tooltip.d.ts +18 -0
- package/dist/components/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip.js +38 -0
- package/dist/components/tooltip.js.map +1 -0
- package/dist/components/trace.d.ts +38 -0
- package/dist/components/trace.d.ts.map +1 -0
- package/dist/components/trace.js +52 -0
- package/dist/components/trace.js.map +1 -0
- package/dist/components/turn-summary.d.ts +17 -0
- package/dist/components/turn-summary.d.ts.map +1 -0
- package/dist/components/turn-summary.js +19 -0
- package/dist/components/turn-summary.js.map +1 -0
- package/dist/components/usage-meter.d.ts +16 -0
- package/dist/components/usage-meter.d.ts.map +1 -0
- package/dist/components/usage-meter.js +10 -0
- package/dist/components/usage-meter.js.map +1 -0
- package/dist/components/view-switcher.d.ts +25 -0
- package/dist/components/view-switcher.d.ts.map +1 -0
- package/dist/components/view-switcher.js +196 -0
- package/dist/components/view-switcher.js.map +1 -0
- package/dist/docs/components/accordion.md +151 -0
- package/dist/docs/components/activity-chart.md +104 -0
- package/dist/docs/components/alert-dialog.md +216 -0
- package/dist/docs/components/alert.md +203 -0
- package/dist/docs/components/ask-user-question.md +429 -0
- package/dist/docs/components/attachment-gallery.md +377 -0
- package/dist/docs/components/avatar.md +197 -0
- package/dist/docs/components/badge.md +162 -0
- package/dist/docs/components/brand-tile.md +138 -0
- package/dist/docs/components/button.md +392 -0
- package/dist/docs/components/calendar.md +113 -0
- package/dist/docs/components/card.md +157 -0
- package/dist/docs/components/carousel.md +144 -0
- package/dist/docs/components/catalog-card.md +136 -0
- package/dist/docs/components/chart.md +608 -0
- package/dist/docs/components/checkbox.md +164 -0
- package/dist/docs/components/chip.md +411 -0
- package/dist/docs/components/code-block.md +389 -0
- package/dist/docs/components/collapsible.md +93 -0
- package/dist/docs/components/command.md +276 -0
- package/dist/docs/components/composer.md +1092 -0
- package/dist/docs/components/connector-request.md +497 -0
- package/dist/docs/components/context-menu.md +127 -0
- package/dist/docs/components/data-table.md +462 -0
- package/dist/docs/components/date-range-picker.md +425 -0
- package/dist/docs/components/dialog.md +263 -0
- package/dist/docs/components/drawer.md +505 -0
- package/dist/docs/components/dropdown-menu.md +336 -0
- package/dist/docs/components/editor-tabs.md +283 -0
- package/dist/docs/components/empty-state.md +134 -0
- package/dist/docs/components/entity-card.md +640 -0
- package/dist/docs/components/entity-row.md +291 -0
- package/dist/docs/components/env-var-request.md +223 -0
- package/dist/docs/components/field.md +272 -0
- package/dist/docs/components/file-upload.md +255 -0
- package/dist/docs/components/hover-card.md +335 -0
- package/dist/docs/components/input-group.md +134 -0
- package/dist/docs/components/input.md +97 -0
- package/dist/docs/components/island.md +97 -0
- package/dist/docs/components/kbd.md +91 -0
- package/dist/docs/components/markdown.md +180 -0
- package/dist/docs/components/message.md +336 -0
- package/dist/docs/components/page-header.md +203 -0
- package/dist/docs/components/pagination.md +211 -0
- package/dist/docs/components/password-input.md +68 -0
- package/dist/docs/components/pepper.md +238 -0
- package/dist/docs/components/permission-request.md +265 -0
- package/dist/docs/components/popover.md +206 -0
- package/dist/docs/components/progress.md +142 -0
- package/dist/docs/components/progressive-blur.md +195 -0
- package/dist/docs/components/radio-group.md +129 -0
- package/dist/docs/components/request-card.md +305 -0
- package/dist/docs/components/resizable.md +318 -0
- package/dist/docs/components/responsive-overlay.md +449 -0
- package/dist/docs/components/scroll-shadows.md +161 -0
- package/dist/docs/components/search-field.md +86 -0
- package/dist/docs/components/searchable-select.md +144 -0
- package/dist/docs/components/select.md +331 -0
- package/dist/docs/components/separator.md +80 -0
- package/dist/docs/components/settings-section.md +246 -0
- package/dist/docs/components/sidebar-item.md +307 -0
- package/dist/docs/components/skeleton.md +107 -0
- package/dist/docs/components/slider.md +171 -0
- package/dist/docs/components/sonner.md +122 -0
- package/dist/docs/components/spinner.md +112 -0
- package/dist/docs/components/stat-strip.md +85 -0
- package/dist/docs/components/status-dot.md +190 -0
- package/dist/docs/components/subagent-run.md +196 -0
- package/dist/docs/components/switch.md +91 -0
- package/dist/docs/components/system-notice.md +144 -0
- package/dist/docs/components/table.md +201 -0
- package/dist/docs/components/tabs.md +233 -0
- package/dist/docs/components/textarea.md +89 -0
- package/dist/docs/components/thinking-indicator.md +164 -0
- package/dist/docs/components/thread-status.md +143 -0
- package/dist/docs/components/todo-list.md +225 -0
- package/dist/docs/components/toggle-group.md +117 -0
- package/dist/docs/components/toggle.md +132 -0
- package/dist/docs/components/tool-call.md +237 -0
- package/dist/docs/components/tool-result.md +418 -0
- package/dist/docs/components/tooltip.md +136 -0
- package/dist/docs/components/trace.md +319 -0
- package/dist/docs/components/turn-summary.md +218 -0
- package/dist/docs/components/usage-meter.md +69 -0
- package/dist/docs/components/view-switcher.md +193 -0
- package/dist/docs/foundations/colors.md +83 -0
- package/dist/docs/foundations/elevation.md +19 -0
- package/dist/docs/foundations/iconography.md +34 -0
- package/dist/docs/foundations/layout.md +42 -0
- package/dist/docs/foundations/logo.md +111 -0
- package/dist/docs/foundations/motion.md +91 -0
- package/dist/docs/foundations/radius.md +13 -0
- package/dist/docs/foundations/spacing.md +23 -0
- package/dist/docs/foundations/typography.md +42 -0
- package/dist/docs/getting-started/installation.md +116 -0
- package/dist/docs/getting-started/releases.md +59 -0
- package/dist/docs/getting-started/theming.md +58 -0
- package/dist/docs/guidelines/accessibility.md +28 -0
- package/dist/docs/guidelines/content.md +36 -0
- package/dist/docs/guidelines/forms.md +36 -0
- package/dist/docs/guidelines/principles.md +30 -0
- package/dist/docs/hooks/use-is-mobile.md +134 -0
- package/dist/docs/index.md +182 -0
- package/dist/docs/overview.md +35 -0
- package/dist/docs/patterns/chat.md +477 -0
- package/dist/docs/patterns/index.md +13 -0
- package/dist/docs/patterns/login.md +311 -0
- package/dist/docs/patterns/share.md +415 -0
- package/dist/hooks/use-is-mobile.d.ts +9 -0
- package/dist/hooks/use-is-mobile.d.ts.map +1 -0
- package/dist/hooks/use-is-mobile.js +26 -0
- package/dist/hooks/use-is-mobile.js.map +1 -0
- package/dist/lib/cn.d.ts +4 -0
- package/dist/lib/cn.d.ts.map +1 -0
- package/dist/lib/cn.js +31 -0
- package/dist/lib/cn.js.map +1 -0
- package/dist/lib/code-language.d.ts +8 -0
- package/dist/lib/code-language.d.ts.map +1 -0
- package/dist/lib/code-language.js +48 -0
- package/dist/lib/code-language.js.map +1 -0
- package/dist/lib/date-range.d.ts +122 -0
- package/dist/lib/date-range.d.ts.map +1 -0
- package/dist/lib/date-range.js +281 -0
- package/dist/lib/date-range.js.map +1 -0
- package/dist/lib/major-tokens.d.ts +40 -0
- package/dist/lib/major-tokens.d.ts.map +1 -0
- package/dist/lib/major-tokens.js +602 -0
- package/dist/lib/major-tokens.js.map +1 -0
- package/dist/lib/markdown.d.ts +25 -0
- package/dist/lib/markdown.d.ts.map +1 -0
- package/dist/lib/markdown.js +87 -0
- package/dist/lib/markdown.js.map +1 -0
- package/dist/lib/overlay-portal-branch.d.ts +6 -0
- package/dist/lib/overlay-portal-branch.d.ts.map +1 -0
- package/dist/lib/overlay-portal-branch.js +15 -0
- package/dist/lib/overlay-portal-branch.js.map +1 -0
- package/dist/lib/pepper-matcap.d.ts +2 -0
- package/dist/lib/pepper-matcap.d.ts.map +1 -0
- package/dist/lib/pepper-matcap.js +4 -0
- package/dist/lib/pepper-matcap.js.map +1 -0
- package/dist/lib/scroll-fade.d.ts +28 -0
- package/dist/lib/scroll-fade.d.ts.map +1 -0
- package/dist/lib/scroll-fade.js +57 -0
- package/dist/lib/scroll-fade.js.map +1 -0
- package/dist/tailwind.css +7 -0
- package/dist/theme.css +428 -0
- package/package.json +145 -3
- package/tokens.json +841 -0
- package/README.md +0 -3
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Slider as SliderPrimitive } from "@base-ui/react/slider";
|
|
4
|
+
import { cn } from "../lib/cn.js";
|
|
5
|
+
/** Names a range's thumb by its place, as Radix did: "Minimum" and "Maximum", or "Value 2 of 3" past two. */
|
|
6
|
+
function getRangeThumbLabel(index, count, sliderLabel) {
|
|
7
|
+
const place = count === 2 ? ["Minimum", "Maximum"][index] : `Value ${index + 1} of ${count}`;
|
|
8
|
+
return sliderLabel ? `${sliderLabel}, ${place.toLowerCase()}` : place;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* A range where the rough value matters more than the exact one (temperature, retention, rate limits).
|
|
12
|
+
* Values are arrays, one thumb per entry; show the exact value beside it. With one thumb, `aria-label`
|
|
13
|
+
* or `aria-labelledby` names the thumb, which is what assistive tech reads as the slider. `onValueChange` fires while
|
|
14
|
+
* dragging, `onValueCommitted` once on release. Page Up/Down and Shift+arrow move ten steps.
|
|
15
|
+
*/
|
|
16
|
+
function Slider({ className, defaultValue, value, min = 0, max = 100, step = 1, largeStep = step * 10, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...props }) {
|
|
17
|
+
const thumbCount = (value ?? defaultValue ?? [min]).length;
|
|
18
|
+
const isRange = thumbCount > 1;
|
|
19
|
+
// One thumb takes the slider's name. With several, the root keeps it: aria-labelledby reaches each thumb (read
|
|
20
|
+
// with its "start range" / "end range" value), and without it each thumb is named by its place.
|
|
21
|
+
const thumbLabelProps = isRange
|
|
22
|
+
? { getAriaLabel: ariaLabelledBy ? undefined : (index) => getRangeThumbLabel(index, thumbCount, ariaLabel) }
|
|
23
|
+
: { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy };
|
|
24
|
+
const rootLabelProps = isRange ? { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy } : {};
|
|
25
|
+
return (_jsx(SliderPrimitive.Root, { "data-slot": "slider",
|
|
26
|
+
// Without either, Base UI would hold a bare number and hand callbacks a number, not an array.
|
|
27
|
+
defaultValue: value === undefined ? (defaultValue ?? [min]) : undefined, value: value, min: min, max: max, step: step,
|
|
28
|
+
// Base UI's large step is a fixed 10; Radix's was ten steps, which keeps fine scales (0.1) on their grid.
|
|
29
|
+
largeStep: largeStep,
|
|
30
|
+
// The thumbs stay inside the track at both ends, as before the move to Base UI.
|
|
31
|
+
thumbAlignment: "edge", ...rootLabelProps, className: cn("w-full data-disabled:opacity-50", className), ...props, children: _jsxs(SliderPrimitive.Control, { className: "relative flex w-full touch-none select-none items-center", children: [_jsx(SliderPrimitive.Track, { "data-slot": "slider-track", className: "relative h-1 w-full grow overflow-hidden rounded-full bg-secondary", children: _jsx(SliderPrimitive.Indicator, { "data-slot": "slider-range", className: "h-full bg-link" }) }), Array.from({ length: thumbCount }, (_, index) => (_jsx(SliderPrimitive.Thumb, { index: index, "data-slot": "slider-thumb", ...thumbLabelProps,
|
|
32
|
+
// Focus lands on the range input inside the thumb, so the ring follows it.
|
|
33
|
+
className: "block size-4 cursor-grab rounded-full bg-surface shadow-card outline-none ring-1 ring-line has-focus-visible:ring-2 has-focus-visible:ring-faint" }, index)))] }) }));
|
|
34
|
+
}
|
|
35
|
+
export { Slider };
|
|
36
|
+
//# sourceMappingURL=slider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slider.js","sourceRoot":"","sources":["../../src/components/slider.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC,6GAA6G;AAC7G,SAAS,kBAAkB,CAAC,KAAa,EAAE,KAAa,EAAE,WAA+B;IACvF,MAAM,KAAK,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,KAAK,GAAG,CAAC,OAAO,KAAK,EAAE,CAAC;IAC7F,OAAO,WAAW,CAAC,CAAC,CAAC,GAAG,WAAW,KAAK,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;AACxE,CAAC;AAED;;;;;GAKG;AACH,SAAS,MAAM,CAAC,EACd,SAAS,EACT,YAAY,EACZ,KAAK,EACL,GAAG,GAAG,CAAC,EACP,GAAG,GAAG,GAAG,EACT,IAAI,GAAG,CAAC,EACR,SAAS,GAAG,IAAI,GAAG,EAAE,EACrB,YAAY,EAAE,SAAS,EACvB,iBAAiB,EAAE,cAAc,EACjC,GAAG,KAAK,EAC6B;IACrC,MAAM,UAAU,GAAG,CAAC,KAAK,IAAI,YAAY,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC;IAC3D,MAAM,OAAO,GAAG,UAAU,GAAG,CAAC,CAAC;IAC/B,+GAA+G;IAC/G,gGAAgG;IAChG,MAAM,eAAe,GAAG,OAAO;QAC7B,CAAC,CAAC,EAAE,YAAY,EAAE,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,KAAa,EAAE,EAAE,CAAC,kBAAkB,CAAC,KAAK,EAAE,UAAU,EAAE,SAAS,CAAC,EAAE;QACpH,CAAC,CAAC,EAAE,YAAY,EAAE,SAAS,EAAE,iBAAiB,EAAE,cAAc,EAAE,CAAC;IACnE,MAAM,cAAc,GAAG,OAAO,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,SAAS,EAAE,iBAAiB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAErG,OAAO,CACL,KAAC,eAAe,CAAC,IAAI,iBACT,QAAQ;QAClB,8FAA8F;QAC9F,YAAY,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,YAAY,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EACvE,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,IAAI;QACV,0GAA0G;QAC1G,SAAS,EAAE,SAAS;QACpB,gFAAgF;QAChF,cAAc,EAAC,MAAM,KACjB,cAAc,EAClB,SAAS,EAAE,EAAE,CAAC,iCAAiC,EAAE,SAAS,CAAC,KACvD,KAAK,YAET,MAAC,eAAe,CAAC,OAAO,IAAC,SAAS,EAAC,0DAA0D,aAC3F,KAAC,eAAe,CAAC,KAAK,iBAAW,cAAc,EAAC,SAAS,EAAC,oEAAoE,YAC5H,KAAC,eAAe,CAAC,SAAS,iBAAW,cAAc,EAAC,SAAS,EAAC,gBAAgB,GAAG,GAC3D,EACvB,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CAChD,KAAC,eAAe,CAAC,KAAK,IAEpB,KAAK,EAAE,KAAK,eACF,cAAc,KACpB,eAAe;oBACnB,2EAA2E;oBAC3E,SAAS,EAAC,kJAAkJ,IALvJ,KAAK,CAMV,CACH,CAAC,IACsB,GACL,CACxB,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,MAAM,EAAE,CAAC","sourcesContent":["\"use client\";\n\nimport { Slider as SliderPrimitive } from \"@base-ui/react/slider\";\nimport { cn } from \"../lib/cn.ts\";\n\n/** Names a range's thumb by its place, as Radix did: \"Minimum\" and \"Maximum\", or \"Value 2 of 3\" past two. */\nfunction getRangeThumbLabel(index: number, count: number, sliderLabel: string | undefined) {\n const place = count === 2 ? [\"Minimum\", \"Maximum\"][index] : `Value ${index + 1} of ${count}`;\n return sliderLabel ? `${sliderLabel}, ${place.toLowerCase()}` : place;\n}\n\n/**\n * A range where the rough value matters more than the exact one (temperature, retention, rate limits).\n * Values are arrays, one thumb per entry; show the exact value beside it. With one thumb, `aria-label`\n * or `aria-labelledby` names the thumb, which is what assistive tech reads as the slider. `onValueChange` fires while\n * dragging, `onValueCommitted` once on release. Page Up/Down and Shift+arrow move ten steps.\n */\nfunction Slider({\n className,\n defaultValue,\n value,\n min = 0,\n max = 100,\n step = 1,\n largeStep = step * 10,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n ...props\n}: SliderPrimitive.Root.Props<number[]>) {\n const thumbCount = (value ?? defaultValue ?? [min]).length;\n const isRange = thumbCount > 1;\n // One thumb takes the slider's name. With several, the root keeps it: aria-labelledby reaches each thumb (read\n // with its \"start range\" / \"end range\" value), and without it each thumb is named by its place.\n const thumbLabelProps = isRange\n ? { getAriaLabel: ariaLabelledBy ? undefined : (index: number) => getRangeThumbLabel(index, thumbCount, ariaLabel) }\n : { \"aria-label\": ariaLabel, \"aria-labelledby\": ariaLabelledBy };\n const rootLabelProps = isRange ? { \"aria-label\": ariaLabel, \"aria-labelledby\": ariaLabelledBy } : {};\n\n return (\n <SliderPrimitive.Root\n data-slot=\"slider\"\n // Without either, Base UI would hold a bare number and hand callbacks a number, not an array.\n defaultValue={value === undefined ? (defaultValue ?? [min]) : undefined}\n value={value}\n min={min}\n max={max}\n step={step}\n // Base UI's large step is a fixed 10; Radix's was ten steps, which keeps fine scales (0.1) on their grid.\n largeStep={largeStep}\n // The thumbs stay inside the track at both ends, as before the move to Base UI.\n thumbAlignment=\"edge\"\n {...rootLabelProps}\n className={cn(\"w-full data-disabled:opacity-50\", className)}\n {...props}\n >\n <SliderPrimitive.Control className=\"relative flex w-full touch-none select-none items-center\">\n <SliderPrimitive.Track data-slot=\"slider-track\" className=\"relative h-1 w-full grow overflow-hidden rounded-full bg-secondary\">\n <SliderPrimitive.Indicator data-slot=\"slider-range\" className=\"h-full bg-link\" />\n </SliderPrimitive.Track>\n {Array.from({ length: thumbCount }, (_, index) => (\n <SliderPrimitive.Thumb\n key={index}\n index={index}\n data-slot=\"slider-thumb\"\n {...thumbLabelProps}\n // Focus lands on the range input inside the thumb, so the ring follows it.\n className=\"block size-4 cursor-grab rounded-full bg-surface shadow-card outline-none ring-1 ring-line has-focus-visible:ring-2 has-focus-visible:ring-faint\"\n />\n ))}\n </SliderPrimitive.Control>\n </SliderPrimitive.Root>\n );\n}\n\nexport { Slider };\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ToasterProps } from "sonner";
|
|
2
|
+
export { toast } from "sonner";
|
|
3
|
+
/**
|
|
4
|
+
* Mount once near the root of the app. Toasts appear at the bottom centre, inverted, for 2.8s; up to three stack.
|
|
5
|
+
* Call `toast()` (re-exported from sonner) in the past tense: `toast("Saved as v5")`. An undo goes in `action`.
|
|
6
|
+
*/
|
|
7
|
+
export declare function Toaster(props: ToasterProps): import("react").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=sonner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sonner.d.ts","sourceRoot":"","sources":["../../src/components/sonner.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA4B,KAAK,YAAY,EAAE,MAAM,QAAQ,CAAC;AAErE,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAI/B;;;GAGG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,+BAmB1C"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Toaster as SonnerToaster } from "sonner";
|
|
4
|
+
export { toast } from "sonner";
|
|
5
|
+
const TOAST_DURATION_MS = 2800;
|
|
6
|
+
/**
|
|
7
|
+
* Mount once near the root of the app. Toasts appear at the bottom centre, inverted, for 2.8s; up to three stack.
|
|
8
|
+
* Call `toast()` (re-exported from sonner) in the past tense: `toast("Saved as v5")`. An undo goes in `action`.
|
|
9
|
+
*/
|
|
10
|
+
export function Toaster(props) {
|
|
11
|
+
return (_jsx(SonnerToaster, { position: "bottom-center", duration: TOAST_DURATION_MS, toastOptions: {
|
|
12
|
+
unstyled: true,
|
|
13
|
+
classNames: {
|
|
14
|
+
// Unstyled sonner toasts sit at the left of its 356px column (--width); w-max + mx-auto centre each one, and a
|
|
15
|
+
// long one wraps at the column's width instead of running past it (off the screen, in a corner position).
|
|
16
|
+
toast: "left-0 right-0 mx-auto flex w-max max-w-[min(var(--width),calc(100vw-2rem))] items-center gap-space-8 rounded-row bg-tooltip px-space-14 py-space-8 font-sans text-ui text-panel shadow-pop [&_svg]:size-3.5",
|
|
17
|
+
actionButton: "ml-space-6 cursor-pointer border-0 bg-transparent p-0 font-semibold text-inherit underline underline-offset-3 opacity-85",
|
|
18
|
+
},
|
|
19
|
+
}, ...props }));
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=sonner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sonner.js","sourceRoot":"","sources":["../../src/components/sonner.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,OAAO,IAAI,aAAa,EAAqB,MAAM,QAAQ,CAAC;AAErE,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAE/B,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAE/B;;;GAGG;AACH,MAAM,UAAU,OAAO,CAAC,KAAmB;IACzC,OAAO,CACL,KAAC,aAAa,IACZ,QAAQ,EAAC,eAAe,EACxB,QAAQ,EAAE,iBAAiB,EAC3B,YAAY,EAAE;YACZ,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE;gBACV,+GAA+G;gBAC/G,0GAA0G;gBAC1G,KAAK,EACH,8MAA8M;gBAChN,YAAY,EACV,0HAA0H;aAC7H;SACF,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC","sourcesContent":["\"use client\";\n\nimport { Toaster as SonnerToaster, type ToasterProps } from \"sonner\";\n\nexport { toast } from \"sonner\";\n\nconst TOAST_DURATION_MS = 2800;\n\n/**\n * Mount once near the root of the app. Toasts appear at the bottom centre, inverted, for 2.8s; up to three stack.\n * Call `toast()` (re-exported from sonner) in the past tense: `toast(\"Saved as v5\")`. An undo goes in `action`.\n */\nexport function Toaster(props: ToasterProps) {\n return (\n <SonnerToaster\n position=\"bottom-center\"\n duration={TOAST_DURATION_MS}\n toastOptions={{\n unstyled: true,\n classNames: {\n // Unstyled sonner toasts sit at the left of its 356px column (--width); w-max + mx-auto centre each one, and a\n // long one wraps at the column's width instead of running past it (off the screen, in a corner position).\n toast:\n \"left-0 right-0 mx-auto flex w-max max-w-[min(var(--width),calc(100vw-2rem))] items-center gap-space-8 rounded-row bg-tooltip px-space-14 py-space-8 font-sans text-ui text-panel shadow-pop [&_svg]:size-3.5\",\n actionButton:\n \"ml-space-6 cursor-pointer border-0 bg-transparent p-0 font-semibold text-inherit underline underline-offset-3 opacity-85\",\n },\n }}\n {...props}\n />\n );\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Work in progress: the `loader-circle`, 14px at a 1.5 stroke, one turn every 0.9s; it holds still with reduced
|
|
4
|
+
* motion. Put it inside the control that started the work, with a present-tense label. Size it with `size-*`.
|
|
5
|
+
*/
|
|
6
|
+
export declare function Spinner({ className, ...props }: ComponentProps<"svg">): import("react").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=spinner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../src/components/spinner.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C;;;GAGG;AACH,wBAAgB,OAAO,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,+BAUrE"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { LoaderCircle } from "lucide-react";
|
|
4
|
+
import { cn } from "../lib/cn.js";
|
|
5
|
+
/**
|
|
6
|
+
* Work in progress: the `loader-circle`, 14px at a 1.5 stroke, one turn every 0.9s; it holds still with reduced
|
|
7
|
+
* motion. Put it inside the control that started the work, with a present-tense label. Size it with `size-*`.
|
|
8
|
+
*/
|
|
9
|
+
export function Spinner({ className, ...props }) {
|
|
10
|
+
return (_jsx(LoaderCircle, { role: "status", "aria-label": "Loading", "data-slot": "spinner", className: cn("size-3.5 animate-spinner motion-reduce:animate-none", className), ...props }));
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=spinner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinner.js","sourceRoot":"","sources":["../../src/components/spinner.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC;;;GAGG;AACH,MAAM,UAAU,OAAO,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAyB;IACpE,OAAO,CACL,KAAC,YAAY,IACX,IAAI,EAAC,QAAQ,gBACF,SAAS,eACV,SAAS,EACnB,SAAS,EAAE,EAAE,CAAC,qDAAqD,EAAE,SAAS,CAAC,KAC3E,KAAK,GACT,CACH,CAAC;AACJ,CAAC","sourcesContent":["\"use client\";\n\nimport type { ComponentProps } from \"react\";\nimport { LoaderCircle } from \"lucide-react\";\nimport { cn } from \"../lib/cn.ts\";\n\n/**\n * Work in progress: the `loader-circle`, 14px at a 1.5 stroke, one turn every 0.9s; it holds still with reduced\n * motion. Put it inside the control that started the work, with a present-tense label. Size it with `size-*`.\n */\nexport function Spinner({ className, ...props }: ComponentProps<\"svg\">) {\n return (\n <LoaderCircle\n role=\"status\"\n aria-label=\"Loading\"\n data-slot=\"spinner\"\n className={cn(\"size-3.5 animate-spinner motion-reduce:animate-none\", className)}\n {...props}\n />\n );\n}\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
/** One number in a StatStrip. */
|
|
3
|
+
export interface Stat {
|
|
4
|
+
/** 12px `muted`: "Storage used". */
|
|
5
|
+
label: string;
|
|
6
|
+
/** "1.4 GB", "$22.34". */
|
|
7
|
+
value: ReactNode;
|
|
8
|
+
/** After the value, smaller: "runs", "of 10 GB". */
|
|
9
|
+
unit?: ReactNode;
|
|
10
|
+
/** What the number means, behind an info icon. */
|
|
11
|
+
hint?: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export interface StatStripProps {
|
|
14
|
+
stats: Stat[];
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
/** A row of key numbers at the top of a page or chart: one card, cells split by `line` rules. Two columns on phones. */
|
|
18
|
+
declare function StatStrip({ stats, className }: StatStripProps): import("react").JSX.Element;
|
|
19
|
+
export { StatStrip };
|
|
20
|
+
//# sourceMappingURL=stat-strip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stat-strip.d.ts","sourceRoot":"","sources":["../../src/components/stat-strip.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,iCAAiC;AACjC,MAAM,WAAW,IAAI;IACnB,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,0BAA0B;IAC1B,KAAK,EAAE,SAAS,CAAC;IACjB,oDAAoD;IACpD,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,kDAAkD;IAClD,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wHAAwH;AACxH,iBAAS,SAAS,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,cAAc,+BAsCtD;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Info } from "lucide-react";
|
|
4
|
+
import { cn } from "../lib/cn.js";
|
|
5
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from "./tooltip.js";
|
|
6
|
+
/** A row of key numbers at the top of a page or chart: one card, cells split by `line` rules. Two columns on phones. */
|
|
7
|
+
function StatStrip({ stats, className }) {
|
|
8
|
+
return (_jsx("div", { "data-slot": "stat-strip", className: cn("grid grid-cols-2 overflow-hidden rounded-xl border border-panel-edge bg-surface shadow-card md:auto-cols-fr md:grid-flow-col md:grid-cols-none", className), children: stats.map((stat) => (_jsxs("div", { className: "flex flex-col gap-space-6 border-line px-space-14 pb-space-12 pt-space-10 max-md:-mb-px max-md:border-b max-md:[&:nth-child(odd):not(:last-child)]:border-r md:border-l md:first:border-l-0", children: [_jsxs("span", { className: "inline-flex items-center gap-space-4 text-small text-muted", children: [stat.label, stat.hint && (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { render: _jsx("button", { type: "button", "aria-label": `About ${stat.label}`, className: "text-faint outline-none" }), children: _jsx(Info, { className: "size-3.25" }) }), _jsx(TooltipContent, { className: "max-w-64 whitespace-normal", children: stat.hint })] }))] }), _jsxs("b", { className: "flex min-h-8 items-center gap-space-4 whitespace-nowrap text-editor-title text-ink", children: [stat.value, stat.unit && _jsx("small", { className: "text-ui font-normal text-muted", children: stat.unit })] })] }, stat.label))) }));
|
|
9
|
+
}
|
|
10
|
+
export { StatStrip };
|
|
11
|
+
//# sourceMappingURL=stat-strip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stat-strip.js","sourceRoot":"","sources":["../../src/components/stat-strip.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,cAAe,CAAC;AAmBxE,wHAAwH;AACxH,SAAS,SAAS,CAAC,EAAE,KAAK,EAAE,SAAS,EAAkB;IACrD,OAAO,CACL,2BACY,YAAY,EACtB,SAAS,EAAE,EAAE,CACX,gJAAgJ,EAChJ,SAAS,CACV,YAEA,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACnB,eAEE,SAAS,EAAC,6LAA6L,aAEvM,gBAAM,SAAS,EAAC,4DAA4D,aACzE,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,IAAI,IAAI,CACZ,MAAC,OAAO,eACN,KAAC,cAAc,IACb,MAAM,EACJ,iBAAQ,IAAI,EAAC,QAAQ,gBAAa,SAAS,IAAI,CAAC,KAAK,EAAE,EAAE,SAAS,EAAC,yBAAyB,GAAG,YAGjG,KAAC,IAAI,IAAC,SAAS,EAAC,WAAW,GAAG,GACf,EACjB,KAAC,cAAc,IAAC,SAAS,EAAC,4BAA4B,YAAE,IAAI,CAAC,IAAI,GAAkB,IAC3E,CACX,IACI,EAEP,aAAG,SAAS,EAAC,oFAAoF,aAC9F,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,IAAI,IAAI,gBAAO,SAAS,EAAC,gCAAgC,YAAE,IAAI,CAAC,IAAI,GAAS,IACjF,KAtBC,IAAI,CAAC,KAAK,CAuBX,CACP,CAAC,GACE,CACP,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,SAAS,EAAE,CAAC","sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { Info } from \"lucide-react\";\nimport { cn } from \"../lib/cn.ts\";\nimport { Tooltip, TooltipContent, TooltipTrigger } from \"./tooltip.tsx\";\n\n/** One number in a StatStrip. */\nexport interface Stat {\n /** 12px `muted`: \"Storage used\". */\n label: string;\n /** \"1.4 GB\", \"$22.34\". */\n value: ReactNode;\n /** After the value, smaller: \"runs\", \"of 10 GB\". */\n unit?: ReactNode;\n /** What the number means, behind an info icon. */\n hint?: ReactNode;\n}\n\nexport interface StatStripProps {\n stats: Stat[];\n className?: string;\n}\n\n/** A row of key numbers at the top of a page or chart: one card, cells split by `line` rules. Two columns on phones. */\nfunction StatStrip({ stats, className }: StatStripProps) {\n return (\n <div\n data-slot=\"stat-strip\"\n className={cn(\n \"grid grid-cols-2 overflow-hidden rounded-xl border border-panel-edge bg-surface shadow-card md:auto-cols-fr md:grid-flow-col md:grid-cols-none\",\n className\n )}\n >\n {stats.map((stat) => (\n <div\n key={stat.label}\n className=\"flex flex-col gap-space-6 border-line px-space-14 pb-space-12 pt-space-10 max-md:-mb-px max-md:border-b max-md:[&:nth-child(odd):not(:last-child)]:border-r md:border-l md:first:border-l-0\"\n >\n <span className=\"inline-flex items-center gap-space-4 text-small text-muted\">\n {stat.label}\n {stat.hint && (\n <Tooltip>\n <TooltipTrigger\n render={\n <button type=\"button\" aria-label={`About ${stat.label}`} className=\"text-faint outline-none\" />\n }\n >\n <Info className=\"size-3.25\" />\n </TooltipTrigger>\n <TooltipContent className=\"max-w-64 whitespace-normal\">{stat.hint}</TooltipContent>\n </Tooltip>\n )}\n </span>\n {/* A fixed row height: animated numbers (NumberFlow) draw taller than plain text. */}\n <b className=\"flex min-h-8 items-center gap-space-4 whitespace-nowrap text-editor-title text-ink\">\n {stat.value}\n {stat.unit && <small className=\"text-ui font-normal text-muted\">{stat.unit}</small>}\n </b>\n </div>\n ))}\n </div>\n );\n}\n\nexport { StatStrip };\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
export declare const STATUS_DOT_TONES: {
|
|
3
|
+
/** Healthy, Live. */
|
|
4
|
+
readonly OK: "ok";
|
|
5
|
+
/** Needs attention. */
|
|
6
|
+
readonly WARN: "warn";
|
|
7
|
+
/** Failing. */
|
|
8
|
+
readonly DANGER: "danger";
|
|
9
|
+
/** Paused. */
|
|
10
|
+
readonly OFF: "off";
|
|
11
|
+
};
|
|
12
|
+
export type StatusDotTone = (typeof STATUS_DOT_TONES)[keyof typeof STATUS_DOT_TONES];
|
|
13
|
+
export type StatusDotProps = ComponentProps<"span"> & {
|
|
14
|
+
/** `ok` Healthy / Live, `warn` Needs attention, `danger` Failing, `off` Paused. */
|
|
15
|
+
tone?: StatusDotTone;
|
|
16
|
+
/** A ring pings out of the dot while the state is happening right now: Live, Running. */
|
|
17
|
+
isPulsing?: boolean;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* A 7px dot and a short label. The label carries the meaning; colour is never the only signal. `isPulsing` adds the
|
|
21
|
+
* web's live ping: a ring of the dot's colour grows to twice its size and fades, once a second; it holds still with
|
|
22
|
+
* reduced motion.
|
|
23
|
+
*/
|
|
24
|
+
export declare function StatusDot({ tone, isPulsing, className, children, ...props }: StatusDotProps): import("react").JSX.Element;
|
|
25
|
+
//# sourceMappingURL=status-dot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-dot.d.ts","sourceRoot":"","sources":["../../src/components/status-dot.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,eAAO,MAAM,gBAAgB;IAC3B,qBAAqB;;IAErB,uBAAuB;;IAEvB,eAAe;;IAEf,cAAc;;CAEN,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AASrF,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC,MAAM,CAAC,GAAG;IACpD,mFAAmF;IACnF,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,yFAAyF;IACzF,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,EAAE,IAA0B,EAAE,SAAiB,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,+BAoBzH"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "../lib/cn.js";
|
|
4
|
+
export const STATUS_DOT_TONES = {
|
|
5
|
+
/** Healthy, Live. */
|
|
6
|
+
OK: "ok",
|
|
7
|
+
/** Needs attention. */
|
|
8
|
+
WARN: "warn",
|
|
9
|
+
/** Failing. */
|
|
10
|
+
DANGER: "danger",
|
|
11
|
+
/** Paused. */
|
|
12
|
+
OFF: "off",
|
|
13
|
+
};
|
|
14
|
+
const TONE_CLASSES = {
|
|
15
|
+
[STATUS_DOT_TONES.OK]: "bg-ok",
|
|
16
|
+
[STATUS_DOT_TONES.WARN]: "bg-warn",
|
|
17
|
+
[STATUS_DOT_TONES.DANGER]: "bg-danger",
|
|
18
|
+
[STATUS_DOT_TONES.OFF]: "bg-faint",
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* A 7px dot and a short label. The label carries the meaning; colour is never the only signal. `isPulsing` adds the
|
|
22
|
+
* web's live ping: a ring of the dot's colour grows to twice its size and fades, once a second; it holds still with
|
|
23
|
+
* reduced motion.
|
|
24
|
+
*/
|
|
25
|
+
export function StatusDot({ tone = STATUS_DOT_TONES.OK, isPulsing = false, className, children, ...props }) {
|
|
26
|
+
return (_jsxs("span", { "data-slot": "status-dot", "data-pulsing": isPulsing || undefined, className: cn("inline-flex items-center gap-space-6 text-ui text-ink-2", className), ...props, children: [_jsx("i", { className: cn("relative size-1.75 shrink-0 rounded-full",
|
|
27
|
+
// The ring is the dot's own ::before, so it takes the tone's colour and never shifts the label.
|
|
28
|
+
isPulsing &&
|
|
29
|
+
"before:absolute before:inset-0 before:animate-ping before:rounded-full before:bg-inherit before:opacity-75 motion-reduce:before:animate-none", TONE_CLASSES[tone]) }), children] }));
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=status-dot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-dot.js","sourceRoot":"","sources":["../../src/components/status-dot.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,qBAAqB;IACrB,EAAE,EAAE,IAAI;IACR,uBAAuB;IACvB,IAAI,EAAE,MAAM;IACZ,eAAe;IACf,MAAM,EAAE,QAAQ;IAChB,cAAc;IACd,GAAG,EAAE,KAAK;CACF,CAAC;AAIX,MAAM,YAAY,GAAG;IACnB,CAAC,gBAAgB,CAAC,EAAE,CAAC,EAAE,OAAO;IAC9B,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,SAAS;IAClC,CAAC,gBAAgB,CAAC,MAAM,CAAC,EAAE,WAAW;IACtC,CAAC,gBAAgB,CAAC,GAAG,CAAC,EAAE,UAAU;CACK,CAAC;AAS1C;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,EAAE,IAAI,GAAG,gBAAgB,CAAC,EAAE,EAAE,SAAS,GAAG,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAkB;IACxH,OAAO,CACL,6BACY,YAAY,kBACR,SAAS,IAAI,SAAS,EACpC,SAAS,EAAE,EAAE,CAAC,yDAAyD,EAAE,SAAS,CAAC,KAC/E,KAAK,aAET,YACE,SAAS,EAAE,EAAE,CACX,0CAA0C;gBAC1C,gGAAgG;gBAChG,SAAS;oBACP,8IAA8I,EAChJ,YAAY,CAAC,IAAI,CAAC,CACnB,GACD,EACD,QAAQ,IACJ,CACR,CAAC;AACJ,CAAC","sourcesContent":["\"use client\";\n\nimport type { ComponentProps } from \"react\";\nimport { cn } from \"../lib/cn.ts\";\n\nexport const STATUS_DOT_TONES = {\n /** Healthy, Live. */\n OK: \"ok\",\n /** Needs attention. */\n WARN: \"warn\",\n /** Failing. */\n DANGER: \"danger\",\n /** Paused. */\n OFF: \"off\",\n} as const;\n\nexport type StatusDotTone = (typeof STATUS_DOT_TONES)[keyof typeof STATUS_DOT_TONES];\n\nconst TONE_CLASSES = {\n [STATUS_DOT_TONES.OK]: \"bg-ok\",\n [STATUS_DOT_TONES.WARN]: \"bg-warn\",\n [STATUS_DOT_TONES.DANGER]: \"bg-danger\",\n [STATUS_DOT_TONES.OFF]: \"bg-faint\",\n} satisfies Record<StatusDotTone, string>;\n\nexport type StatusDotProps = ComponentProps<\"span\"> & {\n /** `ok` Healthy / Live, `warn` Needs attention, `danger` Failing, `off` Paused. */\n tone?: StatusDotTone;\n /** A ring pings out of the dot while the state is happening right now: Live, Running. */\n isPulsing?: boolean;\n};\n\n/**\n * A 7px dot and a short label. The label carries the meaning; colour is never the only signal. `isPulsing` adds the\n * web's live ping: a ring of the dot's colour grows to twice its size and fades, once a second; it holds still with\n * reduced motion.\n */\nexport function StatusDot({ tone = STATUS_DOT_TONES.OK, isPulsing = false, className, children, ...props }: StatusDotProps) {\n return (\n <span\n data-slot=\"status-dot\"\n data-pulsing={isPulsing || undefined}\n className={cn(\"inline-flex items-center gap-space-6 text-ui text-ink-2\", className)}\n {...props}\n >\n <i\n className={cn(\n \"relative size-1.75 shrink-0 rounded-full\",\n // The ring is the dot's own ::before, so it takes the tone's colour and never shifts the label.\n isPulsing &&\n \"before:absolute before:inset-0 before:animate-ping before:rounded-full before:bg-inherit before:opacity-75 motion-reduce:before:animate-none\",\n TONE_CLASSES[tone]\n )}\n />\n {children}\n </span>\n );\n}\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
|
+
export declare const SUBAGENT_RUN_STATUSES: {
|
|
3
|
+
/** The subagent is working: a Spinner, the name shimmers, its latest line shows under it. */
|
|
4
|
+
readonly RUNNING: "running";
|
|
5
|
+
/** It failed: a CircleX, the line in danger. */
|
|
6
|
+
readonly ERROR: "error";
|
|
7
|
+
};
|
|
8
|
+
export type SubagentRunStatus = (typeof SUBAGENT_RUN_STATUSES)[keyof typeof SUBAGENT_RUN_STATUSES];
|
|
9
|
+
export type SubagentRunProps = ComponentProps<"div"> & {
|
|
10
|
+
/** What the subagent was sent to do: “Analyzing codebase structure”. */
|
|
11
|
+
label: string;
|
|
12
|
+
/** No status means done: a CircleCheck in `success`. */
|
|
13
|
+
status?: SubagentRunStatus;
|
|
14
|
+
/** Its tool calls so far, after the label as “4 steps”. */
|
|
15
|
+
stepCount: number;
|
|
16
|
+
/** How long it ran, already formatted (“8s”), after the steps (alone when there are none). */
|
|
17
|
+
duration?: string;
|
|
18
|
+
/** The running subagent's latest line, under its name. */
|
|
19
|
+
progress?: string;
|
|
20
|
+
defaultOpen?: boolean;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* A subagent's run as one step line that opens into the subagent's own steps, behind a `line` rule. Its icon is its
|
|
24
|
+
* state: a Spinner while it runs, a check once it's done, a cross when it failed.
|
|
25
|
+
*/
|
|
26
|
+
export declare function SubagentRun({ label, status, stepCount, duration, progress, defaultOpen, className, children, ...props }: SubagentRunProps): import("react").JSX.Element;
|
|
27
|
+
//# sourceMappingURL=subagent-run.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subagent-run.d.ts","sourceRoot":"","sources":["../../src/components/subagent-run.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAetD,eAAO,MAAM,qBAAqB;IAChC,6FAA6F;;IAE7F,gDAAgD;;CAExC,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,OAAO,qBAAqB,CAAC,CAAC;AAQnG,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IACrD,wEAAwE;IACxE,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,2DAA2D;IAC3D,SAAS,EAAE,MAAM,CAAC;IAClB,8FAA8F;IAC9F,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,MAAM,EACN,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,WAAmB,EACnB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,gBAAgB,+BA+ClB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Children } from "react";
|
|
4
|
+
import { CircleCheck, CircleX } from "lucide-react";
|
|
5
|
+
import { Spinner } from "./spinner.js";
|
|
6
|
+
import { Trace, TraceCollapsible, TraceCollapsibleContent, TraceCollapsibleTrigger, TraceDescription, TraceIcon, TraceLine, TraceSteps, TraceTitle, } from "./trace.js";
|
|
7
|
+
export const SUBAGENT_RUN_STATUSES = {
|
|
8
|
+
/** The subagent is working: a Spinner, the name shimmers, its latest line shows under it. */
|
|
9
|
+
RUNNING: "running",
|
|
10
|
+
/** It failed: a CircleX, the line in danger. */
|
|
11
|
+
ERROR: "error",
|
|
12
|
+
};
|
|
13
|
+
/** What assistive tech hears after the label: the icon is decorative. */
|
|
14
|
+
const STATUS_ANNOUNCEMENTS = {
|
|
15
|
+
[SUBAGENT_RUN_STATUSES.RUNNING]: ", running",
|
|
16
|
+
[SUBAGENT_RUN_STATUSES.ERROR]: ", failed",
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* A subagent's run as one step line that opens into the subagent's own steps, behind a `line` rule. Its icon is its
|
|
20
|
+
* state: a Spinner while it runs, a check once it's done, a cross when it failed.
|
|
21
|
+
*/
|
|
22
|
+
export function SubagentRun({ label, status, stepCount, duration, progress, defaultOpen = false, className, children, ...props }) {
|
|
23
|
+
const isRunning = status === SUBAGENT_RUN_STATUSES.RUNNING;
|
|
24
|
+
const isError = status === SUBAGENT_RUN_STATUSES.ERROR;
|
|
25
|
+
const stepLabel = stepCount > 0 ? `${stepCount} step${stepCount === 1 ? "" : "s"}` : null;
|
|
26
|
+
const detail = [stepLabel, duration].filter(Boolean).join(" · ");
|
|
27
|
+
const isProgressVisible = isRunning && Boolean(progress);
|
|
28
|
+
const hasSteps = Children.toArray(children).length > 0;
|
|
29
|
+
const line = (_jsxs(TraceLine, { status: status, children: [_jsx(TraceIcon, { children: isRunning ? _jsx(Spinner, { "aria-hidden": true }) : isError ? _jsx(CircleX, {}) : _jsx(CircleCheck, { className: "text-success" }) }), _jsx(TraceTitle, { children: label }), detail && _jsx(TraceDescription, { children: detail }), status && _jsx("span", { className: "sr-only", children: STATUS_ANNOUNCEMENTS[status] })] }));
|
|
30
|
+
// Under the name, aligned with it (icon width + gap), so a long status never crowds the line.
|
|
31
|
+
const progressLine = isProgressVisible && (_jsx("p", { className: "m-0 ml-5.25 truncate text-small text-muted animate-fade-in motion-reduce:animate-none", children: progress }, progress));
|
|
32
|
+
// No steps yet: nothing to open.
|
|
33
|
+
if (!hasSteps) {
|
|
34
|
+
return (_jsxs(Trace, { "data-slot": "subagent-run", className: className, ...props, children: [line, progressLine] }));
|
|
35
|
+
}
|
|
36
|
+
return (_jsx(Trace, { "data-slot": "subagent-run", className: className, ...props, children: _jsxs(TraceCollapsible, { defaultOpen: defaultOpen, children: [_jsx(TraceCollapsibleTrigger, { children: line }), progressLine, _jsx(TraceCollapsibleContent, { children: _jsx(TraceSteps, { children: children }) })] }) }));
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=subagent-run.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subagent-run.js","sourceRoot":"","sources":["../../src/components/subagent-run.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,QAAQ,EAAuB,MAAM,OAAO,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAe,CAAC;AACxC,OAAO,EACL,KAAK,EACL,gBAAgB,EAChB,uBAAuB,EACvB,uBAAuB,EACvB,gBAAgB,EAChB,SAAS,EACT,SAAS,EACT,UAAU,EACV,UAAU,GACX,MAAM,YAAa,CAAC;AAErB,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,6FAA6F;IAC7F,OAAO,EAAE,SAAS;IAClB,gDAAgD;IAChD,KAAK,EAAE,OAAO;CACN,CAAC;AAIX,yEAAyE;AACzE,MAAM,oBAAoB,GAAG;IAC3B,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,WAAW;IAC5C,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,UAAU;CACE,CAAC;AAgB9C;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,EAC1B,KAAK,EACL,MAAM,EACN,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,WAAW,GAAG,KAAK,EACnB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACS;IACjB,MAAM,SAAS,GAAG,MAAM,KAAK,qBAAqB,CAAC,OAAO,CAAC;IAC3D,MAAM,OAAO,GAAG,MAAM,KAAK,qBAAqB,CAAC,KAAK,CAAC;IACvD,MAAM,SAAS,GAAG,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,QAAQ,SAAS,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IAC1F,MAAM,MAAM,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACjE,MAAM,iBAAiB,GAAG,SAAS,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC;IACzD,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;IAEvD,MAAM,IAAI,GAAG,CACX,MAAC,SAAS,IAAC,MAAM,EAAE,MAAM,aACvB,KAAC,SAAS,cACP,SAAS,CAAC,CAAC,CAAC,KAAC,OAAO,0BAAe,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAC,OAAO,KAAG,CAAC,CAAC,CAAC,KAAC,WAAW,IAAC,SAAS,EAAC,cAAc,GAAG,GAC7F,EACZ,KAAC,UAAU,cAAE,KAAK,GAAc,EAC/B,MAAM,IAAI,KAAC,gBAAgB,cAAE,MAAM,GAAoB,EACvD,MAAM,IAAI,eAAM,SAAS,EAAC,SAAS,YAAE,oBAAoB,CAAC,MAAM,CAAC,GAAQ,IAChE,CACb,CAAC;IAEF,8FAA8F;IAC9F,MAAM,YAAY,GAAG,iBAAiB,IAAI,CACxC,YAAkB,SAAS,EAAC,uFAAuF,YAChH,QAAQ,IADH,QAAQ,CAEZ,CACL,CAAC;IAEF,iCAAiC;IACjC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO,CACL,MAAC,KAAK,iBAAW,cAAc,EAAC,SAAS,EAAE,SAAS,KAAM,KAAK,aAC5D,IAAI,EACJ,YAAY,IACP,CACT,CAAC;IACJ,CAAC;IAED,OAAO,CACL,KAAC,KAAK,iBAAW,cAAc,EAAC,SAAS,EAAE,SAAS,KAAM,KAAK,YAC7D,MAAC,gBAAgB,IAAC,WAAW,EAAE,WAAW,aACxC,KAAC,uBAAuB,cAAE,IAAI,GAA2B,EACxD,YAAY,EACb,KAAC,uBAAuB,cACtB,KAAC,UAAU,cAAE,QAAQ,GAAc,GACX,IACT,GACb,CACT,CAAC;AACJ,CAAC","sourcesContent":["\"use client\";\n\nimport { Children, type ComponentProps } from \"react\";\nimport { CircleCheck, CircleX } from \"lucide-react\";\nimport { Spinner } from \"./spinner.tsx\";\nimport {\n Trace,\n TraceCollapsible,\n TraceCollapsibleContent,\n TraceCollapsibleTrigger,\n TraceDescription,\n TraceIcon,\n TraceLine,\n TraceSteps,\n TraceTitle,\n} from \"./trace.tsx\";\n\nexport const SUBAGENT_RUN_STATUSES = {\n /** The subagent is working: a Spinner, the name shimmers, its latest line shows under it. */\n RUNNING: \"running\",\n /** It failed: a CircleX, the line in danger. */\n ERROR: \"error\",\n} as const;\n\nexport type SubagentRunStatus = (typeof SUBAGENT_RUN_STATUSES)[keyof typeof SUBAGENT_RUN_STATUSES];\n\n/** What assistive tech hears after the label: the icon is decorative. */\nconst STATUS_ANNOUNCEMENTS = {\n [SUBAGENT_RUN_STATUSES.RUNNING]: \", running\",\n [SUBAGENT_RUN_STATUSES.ERROR]: \", failed\",\n} satisfies Record<SubagentRunStatus, string>;\n\nexport type SubagentRunProps = ComponentProps<\"div\"> & {\n /** What the subagent was sent to do: “Analyzing codebase structure”. */\n label: string;\n /** No status means done: a CircleCheck in `success`. */\n status?: SubagentRunStatus;\n /** Its tool calls so far, after the label as “4 steps”. */\n stepCount: number;\n /** How long it ran, already formatted (“8s”), after the steps (alone when there are none). */\n duration?: string;\n /** The running subagent's latest line, under its name. */\n progress?: string;\n defaultOpen?: boolean;\n};\n\n/**\n * A subagent's run as one step line that opens into the subagent's own steps, behind a `line` rule. Its icon is its\n * state: a Spinner while it runs, a check once it's done, a cross when it failed.\n */\nexport function SubagentRun({\n label,\n status,\n stepCount,\n duration,\n progress,\n defaultOpen = false,\n className,\n children,\n ...props\n}: SubagentRunProps) {\n const isRunning = status === SUBAGENT_RUN_STATUSES.RUNNING;\n const isError = status === SUBAGENT_RUN_STATUSES.ERROR;\n const stepLabel = stepCount > 0 ? `${stepCount} step${stepCount === 1 ? \"\" : \"s\"}` : null;\n const detail = [stepLabel, duration].filter(Boolean).join(\" · \");\n const isProgressVisible = isRunning && Boolean(progress);\n const hasSteps = Children.toArray(children).length > 0;\n\n const line = (\n <TraceLine status={status}>\n <TraceIcon>\n {isRunning ? <Spinner aria-hidden /> : isError ? <CircleX /> : <CircleCheck className=\"text-success\" />}\n </TraceIcon>\n <TraceTitle>{label}</TraceTitle>\n {detail && <TraceDescription>{detail}</TraceDescription>}\n {status && <span className=\"sr-only\">{STATUS_ANNOUNCEMENTS[status]}</span>}\n </TraceLine>\n );\n\n // Under the name, aligned with it (icon width + gap), so a long status never crowds the line.\n const progressLine = isProgressVisible && (\n <p key={progress} className=\"m-0 ml-5.25 truncate text-small text-muted animate-fade-in motion-reduce:animate-none\">\n {progress}\n </p>\n );\n\n // No steps yet: nothing to open.\n if (!hasSteps) {\n return (\n <Trace data-slot=\"subagent-run\" className={className} {...props}>\n {line}\n {progressLine}\n </Trace>\n );\n }\n\n return (\n <Trace data-slot=\"subagent-run\" className={className} {...props}>\n <TraceCollapsible defaultOpen={defaultOpen}>\n <TraceCollapsibleTrigger>{line}</TraceCollapsibleTrigger>\n {progressLine}\n <TraceCollapsibleContent>\n <TraceSteps>{children}</TraceSteps>\n </TraceCollapsibleContent>\n </TraceCollapsible>\n </Trace>\n );\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Switch as SwitchPrimitive } from "@base-ui/react/switch";
|
|
2
|
+
/**
|
|
3
|
+
* A 26×15 on/off toggle for a setting that applies immediately; on is the accent green.
|
|
4
|
+
* Just the track: label it with a horizontal `Field`, or put it on the right of a settings row.
|
|
5
|
+
*/
|
|
6
|
+
declare function Switch({ className, ...props }: SwitchPrimitive.Root.Props): import("react").JSX.Element;
|
|
7
|
+
export { Switch };
|
|
8
|
+
//# sourceMappingURL=switch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../src/components/switch.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAGlE;;;GAGG;AACH,iBAAS,MAAM,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,IAAI,CAAC,KAAK,+BAkBlE;AAED,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Switch as SwitchPrimitive } from "@base-ui/react/switch";
|
|
4
|
+
import { cn } from "../lib/cn.js";
|
|
5
|
+
/**
|
|
6
|
+
* A 26×15 on/off toggle for a setting that applies immediately; on is the accent green.
|
|
7
|
+
* Just the track: label it with a horizontal `Field`, or put it on the right of a settings row.
|
|
8
|
+
*/
|
|
9
|
+
function Switch({ className, ...props }) {
|
|
10
|
+
return (_jsx(SwitchPrimitive.Root, { "data-slot": "switch", className: cn("peer inline-flex h-3.75 w-6.5 shrink-0 cursor-pointer items-center rounded-full bg-line outline-none transition-colors duration-150", "focus-visible:ring-2 focus-visible:ring-faint focus-visible:ring-offset-2 focus-visible:ring-offset-panel", "data-checked:bg-accent data-disabled:cursor-not-allowed data-disabled:opacity-50", className), ...props, children: _jsx(SwitchPrimitive.Thumb, { "data-slot": "switch-thumb", className: "pointer-events-none block size-2.75 translate-x-0.5 rounded-full bg-white shadow-[0_1px_2px_rgba(0,0,0,.25)] transition-transform duration-150 data-checked:translate-x-3.25" }) }));
|
|
11
|
+
}
|
|
12
|
+
export { Switch };
|
|
13
|
+
//# sourceMappingURL=switch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.js","sourceRoot":"","sources":["../../src/components/switch.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC;;;GAGG;AACH,SAAS,MAAM,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA8B;IACjE,OAAO,CACL,KAAC,eAAe,CAAC,IAAI,iBACT,QAAQ,EAClB,SAAS,EAAE,EAAE,CACX,qIAAqI,EACrI,2GAA2G,EAC3G,kFAAkF,EAClF,SAAS,CACV,KACG,KAAK,YAET,KAAC,eAAe,CAAC,KAAK,iBACV,cAAc,EACxB,SAAS,EAAC,8KAA8K,GACxL,GACmB,CACxB,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,MAAM,EAAE,CAAC","sourcesContent":["\"use client\";\n\nimport { Switch as SwitchPrimitive } from \"@base-ui/react/switch\";\nimport { cn } from \"../lib/cn.ts\";\n\n/**\n * A 26×15 on/off toggle for a setting that applies immediately; on is the accent green.\n * Just the track: label it with a horizontal `Field`, or put it on the right of a settings row.\n */\nfunction Switch({ className, ...props }: SwitchPrimitive.Root.Props) {\n return (\n <SwitchPrimitive.Root\n data-slot=\"switch\"\n className={cn(\n \"peer inline-flex h-3.75 w-6.5 shrink-0 cursor-pointer items-center rounded-full bg-line outline-none transition-colors duration-150\",\n \"focus-visible:ring-2 focus-visible:ring-faint focus-visible:ring-offset-2 focus-visible:ring-offset-panel\",\n \"data-checked:bg-accent data-disabled:cursor-not-allowed data-disabled:opacity-50\",\n className\n )}\n {...props}\n >\n <SwitchPrimitive.Thumb\n data-slot=\"switch-thumb\"\n className=\"pointer-events-none block size-2.75 translate-x-0.5 rounded-full bg-white shadow-[0_1px_2px_rgba(0,0,0,.25)] transition-transform duration-150 data-checked:translate-x-3.25\"\n />\n </SwitchPrimitive.Root>\n );\n}\n\nexport { Switch };\n"]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
export declare const SYSTEM_NOTICE_VARIANTS: {
|
|
3
|
+
/** How a turn ended, centred between turns: out of turns, failed, stopped. */
|
|
4
|
+
readonly PILL: "pill";
|
|
5
|
+
/** A step's outcome, set where the step would sit: a theme applied, a connector set up or declined. */
|
|
6
|
+
readonly LINE: "line";
|
|
7
|
+
};
|
|
8
|
+
export type SystemNoticeVariant = (typeof SYSTEM_NOTICE_VARIANTS)[keyof typeof SYSTEM_NOTICE_VARIANTS];
|
|
9
|
+
export declare const SYSTEM_NOTICE_TONES: {
|
|
10
|
+
/** A pill on `secondary` in `muted` (Interrupted by user); a line's icon in `muted`, like its text. */
|
|
11
|
+
readonly NEUTRAL: "neutral";
|
|
12
|
+
/** A pill on `warn-soft` (Maximum turns reached); a line's icon in `warn`. */
|
|
13
|
+
readonly WARN: "warn";
|
|
14
|
+
/** A pill on `danger-soft` (Error during execution); a line's icon in `danger`. */
|
|
15
|
+
readonly DANGER: "danger";
|
|
16
|
+
/** A pill on `success-soft`; a line's icon in `success` (Resource connector configured). */
|
|
17
|
+
readonly SUCCESS: "success";
|
|
18
|
+
/** A pill on `secondary` in `faint`; a line's icon in `faint` (Resource setup declined). */
|
|
19
|
+
readonly OFF: "off";
|
|
20
|
+
};
|
|
21
|
+
export type SystemNoticeTone = (typeof SYSTEM_NOTICE_TONES)[keyof typeof SYSTEM_NOTICE_TONES];
|
|
22
|
+
export type SystemNoticeProps = ComponentProps<"div"> & {
|
|
23
|
+
variant?: SystemNoticeVariant;
|
|
24
|
+
tone?: SystemNoticeTone;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* A notice the system puts in the chat's stream, a 14px icon and a short sentence as children. A `pill` (12px, on the
|
|
28
|
+
* tone's soft fill) sits centred between turns and says how a turn ended; a `line` (13px `muted`, 24px tall, 7px from
|
|
29
|
+
* icon to text, like a Trace step) sits where the step it reports on would, its icon in the tone's colour.
|
|
30
|
+
*/
|
|
31
|
+
export declare function SystemNotice({ variant, tone, className, ...props }: SystemNoticeProps): import("react").JSX.Element;
|
|
32
|
+
/** One error under a failed turn's pill, centred in 12px `danger`, up to 420px wide: what failed. One per error. */
|
|
33
|
+
export declare function SystemNoticeError({ className, ...props }: ComponentProps<"p">): import("react").JSX.Element;
|
|
34
|
+
//# sourceMappingURL=system-notice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system-notice.d.ts","sourceRoot":"","sources":["../../src/components/system-notice.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,eAAO,MAAM,sBAAsB;IACjC,8EAA8E;;IAE9E,uGAAuG;;CAE/F,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,OAAO,sBAAsB,CAAC,CAAC;AAEvG,eAAO,MAAM,mBAAmB;IAC9B,uGAAuG;;IAEvG,8EAA8E;;IAE9E,mFAAmF;;IAEnF,4FAA4F;;IAE5F,4FAA4F;;CAEpF,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAuB9F,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IACtD,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,IAAI,CAAC,EAAE,gBAAgB,CAAC;CACzB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,EAC3B,OAAqC,EACrC,IAAkC,EAClC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,iBAAiB,+BAenB;AAED,oHAAoH;AACpH,wBAAgB,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,GAAG,CAAC,+BAQ7E"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "../lib/cn.js";
|
|
4
|
+
export const SYSTEM_NOTICE_VARIANTS = {
|
|
5
|
+
/** How a turn ended, centred between turns: out of turns, failed, stopped. */
|
|
6
|
+
PILL: "pill",
|
|
7
|
+
/** A step's outcome, set where the step would sit: a theme applied, a connector set up or declined. */
|
|
8
|
+
LINE: "line",
|
|
9
|
+
};
|
|
10
|
+
export const SYSTEM_NOTICE_TONES = {
|
|
11
|
+
/** A pill on `secondary` in `muted` (Interrupted by user); a line's icon in `muted`, like its text. */
|
|
12
|
+
NEUTRAL: "neutral",
|
|
13
|
+
/** A pill on `warn-soft` (Maximum turns reached); a line's icon in `warn`. */
|
|
14
|
+
WARN: "warn",
|
|
15
|
+
/** A pill on `danger-soft` (Error during execution); a line's icon in `danger`. */
|
|
16
|
+
DANGER: "danger",
|
|
17
|
+
/** A pill on `success-soft`; a line's icon in `success` (Resource connector configured). */
|
|
18
|
+
SUCCESS: "success",
|
|
19
|
+
/** A pill on `secondary` in `faint`; a line's icon in `faint` (Resource setup declined). */
|
|
20
|
+
OFF: "off",
|
|
21
|
+
};
|
|
22
|
+
const VARIANT_CLASSES = {
|
|
23
|
+
[SYSTEM_NOTICE_VARIANTS.PILL]: "mx-auto w-fit gap-1.5 rounded-full px-2.5 py-0.75 text-small",
|
|
24
|
+
[SYSTEM_NOTICE_VARIANTS.LINE]: "min-h-6 gap-1.75 text-ui text-muted",
|
|
25
|
+
};
|
|
26
|
+
const PILL_TONE_CLASSES = {
|
|
27
|
+
[SYSTEM_NOTICE_TONES.NEUTRAL]: "bg-secondary text-muted",
|
|
28
|
+
[SYSTEM_NOTICE_TONES.WARN]: "bg-warn-soft text-warn",
|
|
29
|
+
[SYSTEM_NOTICE_TONES.DANGER]: "bg-danger-soft text-danger",
|
|
30
|
+
[SYSTEM_NOTICE_TONES.SUCCESS]: "bg-success-soft text-success",
|
|
31
|
+
[SYSTEM_NOTICE_TONES.OFF]: "bg-secondary text-faint",
|
|
32
|
+
};
|
|
33
|
+
const LINE_TONE_CLASSES = {
|
|
34
|
+
[SYSTEM_NOTICE_TONES.NEUTRAL]: "",
|
|
35
|
+
[SYSTEM_NOTICE_TONES.WARN]: "[&>svg]:text-warn",
|
|
36
|
+
[SYSTEM_NOTICE_TONES.DANGER]: "[&>svg]:text-danger",
|
|
37
|
+
[SYSTEM_NOTICE_TONES.SUCCESS]: "[&>svg]:text-success",
|
|
38
|
+
[SYSTEM_NOTICE_TONES.OFF]: "[&>svg]:text-faint",
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* A notice the system puts in the chat's stream, a 14px icon and a short sentence as children. A `pill` (12px, on the
|
|
42
|
+
* tone's soft fill) sits centred between turns and says how a turn ended; a `line` (13px `muted`, 24px tall, 7px from
|
|
43
|
+
* icon to text, like a Trace step) sits where the step it reports on would, its icon in the tone's colour.
|
|
44
|
+
*/
|
|
45
|
+
export function SystemNotice({ variant = SYSTEM_NOTICE_VARIANTS.PILL, tone = SYSTEM_NOTICE_TONES.NEUTRAL, className, ...props }) {
|
|
46
|
+
return (_jsx("div", { "data-slot": "system-notice", "data-variant": variant, "data-tone": tone, className: cn("flex items-center font-sans [&>svg]:size-3.5 [&>svg]:shrink-0", VARIANT_CLASSES[variant], variant === SYSTEM_NOTICE_VARIANTS.PILL ? PILL_TONE_CLASSES[tone] : LINE_TONE_CLASSES[tone], className), ...props }));
|
|
47
|
+
}
|
|
48
|
+
/** One error under a failed turn's pill, centred in 12px `danger`, up to 420px wide: what failed. One per error. */
|
|
49
|
+
export function SystemNoticeError({ className, ...props }) {
|
|
50
|
+
return (_jsx("p", { "data-slot": "system-notice-error", className: cn("mx-auto mt-space-4 mb-0 max-w-105 text-center font-sans text-small wrap-break-word text-danger", className), ...props }));
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=system-notice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system-notice.js","sourceRoot":"","sources":["../../src/components/system-notice.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,8EAA8E;IAC9E,IAAI,EAAE,MAAM;IACZ,uGAAuG;IACvG,IAAI,EAAE,MAAM;CACJ,CAAC;AAIX,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,uGAAuG;IACvG,OAAO,EAAE,SAAS;IAClB,8EAA8E;IAC9E,IAAI,EAAE,MAAM;IACZ,mFAAmF;IACnF,MAAM,EAAE,QAAQ;IAChB,4FAA4F;IAC5F,OAAO,EAAE,SAAS;IAClB,4FAA4F;IAC5F,GAAG,EAAE,KAAK;CACF,CAAC;AAIX,MAAM,eAAe,GAAG;IACtB,CAAC,sBAAsB,CAAC,IAAI,CAAC,EAAE,8DAA8D;IAC7F,CAAC,sBAAsB,CAAC,IAAI,CAAC,EAAE,qCAAqC;CACvB,CAAC;AAEhD,MAAM,iBAAiB,GAAG;IACxB,CAAC,mBAAmB,CAAC,OAAO,CAAC,EAAE,yBAAyB;IACxD,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAAE,wBAAwB;IACpD,CAAC,mBAAmB,CAAC,MAAM,CAAC,EAAE,4BAA4B;IAC1D,CAAC,mBAAmB,CAAC,OAAO,CAAC,EAAE,8BAA8B;IAC7D,CAAC,mBAAmB,CAAC,GAAG,CAAC,EAAE,yBAAyB;CACV,CAAC;AAE7C,MAAM,iBAAiB,GAAG;IACxB,CAAC,mBAAmB,CAAC,OAAO,CAAC,EAAE,EAAE;IACjC,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAAE,mBAAmB;IAC/C,CAAC,mBAAmB,CAAC,MAAM,CAAC,EAAE,qBAAqB;IACnD,CAAC,mBAAmB,CAAC,OAAO,CAAC,EAAE,sBAAsB;IACrD,CAAC,mBAAmB,CAAC,GAAG,CAAC,EAAE,oBAAoB;CACL,CAAC;AAO7C;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,EAC3B,OAAO,GAAG,sBAAsB,CAAC,IAAI,EACrC,IAAI,GAAG,mBAAmB,CAAC,OAAO,EAClC,SAAS,EACT,GAAG,KAAK,EACU;IAClB,OAAO,CACL,2BACY,eAAe,kBACX,OAAO,eACV,IAAI,EACf,SAAS,EAAE,EAAE,CACX,+DAA+D,EAC/D,eAAe,CAAC,OAAO,CAAC,EACxB,OAAO,KAAK,sBAAsB,CAAC,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAC3F,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,oHAAoH;AACpH,MAAM,UAAU,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAuB;IAC5E,OAAO,CACL,yBACY,qBAAqB,EAC/B,SAAS,EAAE,EAAE,CAAC,gGAAgG,EAAE,SAAS,CAAC,KACtH,KAAK,GACT,CACH,CAAC;AACJ,CAAC","sourcesContent":["\"use client\";\n\nimport type { ComponentProps } from \"react\";\nimport { cn } from \"../lib/cn.ts\";\n\nexport const SYSTEM_NOTICE_VARIANTS = {\n /** How a turn ended, centred between turns: out of turns, failed, stopped. */\n PILL: \"pill\",\n /** A step's outcome, set where the step would sit: a theme applied, a connector set up or declined. */\n LINE: \"line\",\n} as const;\n\nexport type SystemNoticeVariant = (typeof SYSTEM_NOTICE_VARIANTS)[keyof typeof SYSTEM_NOTICE_VARIANTS];\n\nexport const SYSTEM_NOTICE_TONES = {\n /** A pill on `secondary` in `muted` (Interrupted by user); a line's icon in `muted`, like its text. */\n NEUTRAL: \"neutral\",\n /** A pill on `warn-soft` (Maximum turns reached); a line's icon in `warn`. */\n WARN: \"warn\",\n /** A pill on `danger-soft` (Error during execution); a line's icon in `danger`. */\n DANGER: \"danger\",\n /** A pill on `success-soft`; a line's icon in `success` (Resource connector configured). */\n SUCCESS: \"success\",\n /** A pill on `secondary` in `faint`; a line's icon in `faint` (Resource setup declined). */\n OFF: \"off\",\n} as const;\n\nexport type SystemNoticeTone = (typeof SYSTEM_NOTICE_TONES)[keyof typeof SYSTEM_NOTICE_TONES];\n\nconst VARIANT_CLASSES = {\n [SYSTEM_NOTICE_VARIANTS.PILL]: \"mx-auto w-fit gap-1.5 rounded-full px-2.5 py-0.75 text-small\",\n [SYSTEM_NOTICE_VARIANTS.LINE]: \"min-h-6 gap-1.75 text-ui text-muted\",\n} satisfies Record<SystemNoticeVariant, string>;\n\nconst PILL_TONE_CLASSES = {\n [SYSTEM_NOTICE_TONES.NEUTRAL]: \"bg-secondary text-muted\",\n [SYSTEM_NOTICE_TONES.WARN]: \"bg-warn-soft text-warn\",\n [SYSTEM_NOTICE_TONES.DANGER]: \"bg-danger-soft text-danger\",\n [SYSTEM_NOTICE_TONES.SUCCESS]: \"bg-success-soft text-success\",\n [SYSTEM_NOTICE_TONES.OFF]: \"bg-secondary text-faint\",\n} satisfies Record<SystemNoticeTone, string>;\n\nconst LINE_TONE_CLASSES = {\n [SYSTEM_NOTICE_TONES.NEUTRAL]: \"\",\n [SYSTEM_NOTICE_TONES.WARN]: \"[&>svg]:text-warn\",\n [SYSTEM_NOTICE_TONES.DANGER]: \"[&>svg]:text-danger\",\n [SYSTEM_NOTICE_TONES.SUCCESS]: \"[&>svg]:text-success\",\n [SYSTEM_NOTICE_TONES.OFF]: \"[&>svg]:text-faint\",\n} satisfies Record<SystemNoticeTone, string>;\n\nexport type SystemNoticeProps = ComponentProps<\"div\"> & {\n variant?: SystemNoticeVariant;\n tone?: SystemNoticeTone;\n};\n\n/**\n * A notice the system puts in the chat's stream, a 14px icon and a short sentence as children. A `pill` (12px, on the\n * tone's soft fill) sits centred between turns and says how a turn ended; a `line` (13px `muted`, 24px tall, 7px from\n * icon to text, like a Trace step) sits where the step it reports on would, its icon in the tone's colour.\n */\nexport function SystemNotice({\n variant = SYSTEM_NOTICE_VARIANTS.PILL,\n tone = SYSTEM_NOTICE_TONES.NEUTRAL,\n className,\n ...props\n}: SystemNoticeProps) {\n return (\n <div\n data-slot=\"system-notice\"\n data-variant={variant}\n data-tone={tone}\n className={cn(\n \"flex items-center font-sans [&>svg]:size-3.5 [&>svg]:shrink-0\",\n VARIANT_CLASSES[variant],\n variant === SYSTEM_NOTICE_VARIANTS.PILL ? PILL_TONE_CLASSES[tone] : LINE_TONE_CLASSES[tone],\n className\n )}\n {...props}\n />\n );\n}\n\n/** One error under a failed turn's pill, centred in 12px `danger`, up to 420px wide: what failed. One per error. */\nexport function SystemNoticeError({ className, ...props }: ComponentProps<\"p\">) {\n return (\n <p\n data-slot=\"system-notice-error\"\n className={cn(\"mx-auto mt-space-4 mb-0 max-w-105 text-center font-sans text-small wrap-break-word text-danger\", className)}\n {...props}\n />\n );\n}\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ComponentProps, CSSProperties, Ref } from "react";
|
|
2
|
+
export type TableProps = ComponentProps<"table"> & {
|
|
3
|
+
/** Classes for the scroll container: a card frame, a max height. */
|
|
4
|
+
containerClassName?: string;
|
|
5
|
+
/** Styles for the scroll container, e.g. a maxHeight for a sticky header. */
|
|
6
|
+
containerStyle?: CSSProperties;
|
|
7
|
+
/** The scroll container, for virtualizers. */
|
|
8
|
+
containerRef?: Ref<HTMLDivElement>;
|
|
9
|
+
};
|
|
10
|
+
/** A semantic table in its own horizontal scroll container. */
|
|
11
|
+
declare function Table({ className, containerClassName, containerStyle, containerRef, ...props }: TableProps): import("react").JSX.Element;
|
|
12
|
+
/** The header rows: a `line` under them and no hover fill. */
|
|
13
|
+
declare function TableHeader({ className, ...props }: ComponentProps<"thead">): import("react").JSX.Element;
|
|
14
|
+
/** The body rows. */
|
|
15
|
+
declare function TableBody({ className, ...props }: ComponentProps<"tbody">): import("react").JSX.Element;
|
|
16
|
+
/** Totals under the body, above a `line`. */
|
|
17
|
+
declare function TableFooter({ className, ...props }: ComponentProps<"tfoot">): import("react").JSX.Element;
|
|
18
|
+
/** A row with a `line` above it and the hover fill; `data-state="selected"` keeps the fill. */
|
|
19
|
+
declare function TableRow({ className, ...props }: ComponentProps<"tr">): import("react").JSX.Element;
|
|
20
|
+
/** A 36px header cell: 12px `muted` label, 12px side padding. */
|
|
21
|
+
declare function TableHead({ className, ...props }: ComponentProps<"th">): import("react").JSX.Element;
|
|
22
|
+
/** A body cell: the 56px row height, 12px side padding, no vertical padding. */
|
|
23
|
+
declare function TableCell({ className, ...props }: ComponentProps<"td">): import("react").JSX.Element;
|
|
24
|
+
/** A caption under the table. */
|
|
25
|
+
declare function TableCaption({ className, ...props }: ComponentProps<"caption">): import("react").JSX.Element;
|
|
26
|
+
export { Table, TableHeader, TableBody, TableFooter, TableRow, TableHead, TableCell, TableCaption };
|
|
27
|
+
//# sourceMappingURL=table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/components/table.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAGhE,MAAM,MAAM,UAAU,GAAG,cAAc,CAAC,OAAO,CAAC,GAAG;IACjD,oEAAoE;IACpE,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,6EAA6E;IAC7E,cAAc,CAAC,EAAE,aAAa,CAAC;IAC/B,8CAA8C;IAC9C,YAAY,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CACpC,CAAC;AAEF,+DAA+D;AAC/D,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,cAAc,EAAE,YAAY,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,+BAenG;AAED,8DAA8D;AAC9D,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,OAAO,CAAC,+BAQpE;AAED,qBAAqB;AACrB,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,OAAO,CAAC,+BAElE;AAED,6CAA6C;AAC7C,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,OAAO,CAAC,+BAEpE;AAED,+FAA+F;AAC/F,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,IAAI,CAAC,+BAW9D;AAED,iEAAiE;AACjE,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,IAAI,CAAC,+BAW/D;AAED,gFAAgF;AAChF,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,IAAI,CAAC,+BAE/D;AAED,iCAAiC;AACjC,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,SAAS,CAAC,+BAEvE;AAED,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "../lib/cn.js";
|
|
4
|
+
/** A semantic table in its own horizontal scroll container. */
|
|
5
|
+
function Table({ className, containerClassName, containerStyle, containerRef, ...props }) {
|
|
6
|
+
return (_jsx("div", { ref: containerRef, "data-slot": "table-container", className: cn("relative w-full overflow-x-auto", containerClassName), style: containerStyle, children: _jsx("table", { "data-slot": "table", className: cn("w-full caption-bottom border-collapse font-sans text-ui", className), ...props }) }));
|
|
7
|
+
}
|
|
8
|
+
/** The header rows: a `line` under them and no hover fill. */
|
|
9
|
+
function TableHeader({ className, ...props }) {
|
|
10
|
+
return (_jsx("thead", { "data-slot": "table-header", className: cn("[&_tr]:border-t-0 [&_tr]:border-b [&_tr]:hover:bg-transparent", className), ...props }));
|
|
11
|
+
}
|
|
12
|
+
/** The body rows. */
|
|
13
|
+
function TableBody({ className, ...props }) {
|
|
14
|
+
return _jsx("tbody", { "data-slot": "table-body", className: className, ...props });
|
|
15
|
+
}
|
|
16
|
+
/** Totals under the body, above a `line`. */
|
|
17
|
+
function TableFooter({ className, ...props }) {
|
|
18
|
+
return _jsx("tfoot", { "data-slot": "table-footer", className: cn("border-t border-line font-medium", className), ...props });
|
|
19
|
+
}
|
|
20
|
+
/** A row with a `line` above it and the hover fill; `data-state="selected"` keeps the fill. */
|
|
21
|
+
function TableRow({ className, ...props }) {
|
|
22
|
+
return (_jsx("tr", { "data-slot": "table-row", className: cn("border-t border-line transition-colors duration-120 hover:bg-hover data-[state=selected]:bg-hover", className), ...props }));
|
|
23
|
+
}
|
|
24
|
+
/** A 36px header cell: 12px `muted` label, 12px side padding. */
|
|
25
|
+
function TableHead({ className, ...props }) {
|
|
26
|
+
return (_jsx("th", { "data-slot": "table-head", className: cn("h-9 whitespace-nowrap px-space-12 text-left align-middle text-small font-normal text-muted", className), ...props }));
|
|
27
|
+
}
|
|
28
|
+
/** A body cell: the 56px row height, 12px side padding, no vertical padding. */
|
|
29
|
+
function TableCell({ className, ...props }) {
|
|
30
|
+
return _jsx("td", { "data-slot": "table-cell", className: cn("h-14 px-space-12 align-middle", className), ...props });
|
|
31
|
+
}
|
|
32
|
+
/** A caption under the table. */
|
|
33
|
+
function TableCaption({ className, ...props }) {
|
|
34
|
+
return _jsx("caption", { "data-slot": "table-caption", className: cn("mt-space-16 text-ui text-muted", className), ...props });
|
|
35
|
+
}
|
|
36
|
+
export { Table, TableHeader, TableBody, TableFooter, TableRow, TableHead, TableCell, TableCaption };
|
|
37
|
+
//# sourceMappingURL=table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.js","sourceRoot":"","sources":["../../src/components/table.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAWlC,+DAA+D;AAC/D,SAAS,KAAK,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,cAAc,EAAE,YAAY,EAAE,GAAG,KAAK,EAAc;IAClG,OAAO,CACL,cACE,GAAG,EAAE,YAAY,eACP,iBAAiB,EAC3B,SAAS,EAAE,EAAE,CAAC,iCAAiC,EAAE,kBAAkB,CAAC,EACpE,KAAK,EAAE,cAAc,YAErB,6BACY,OAAO,EACjB,SAAS,EAAE,EAAE,CAAC,yDAAyD,EAAE,SAAS,CAAC,KAC/E,KAAK,GACT,GACE,CACP,CAAC;AACJ,CAAC;AAED,8DAA8D;AAC9D,SAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA2B;IACnE,OAAO,CACL,6BACY,cAAc,EACxB,SAAS,EAAE,EAAE,CAAC,+DAA+D,EAAE,SAAS,CAAC,KACrF,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,qBAAqB;AACrB,SAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA2B;IACjE,OAAO,6BAAiB,YAAY,EAAC,SAAS,EAAE,SAAS,KAAM,KAAK,GAAI,CAAC;AAC3E,CAAC;AAED,6CAA6C;AAC7C,SAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA2B;IACnE,OAAO,6BAAiB,cAAc,EAAC,SAAS,EAAE,EAAE,CAAC,kCAAkC,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CAAC;AACrH,CAAC;AAED,+FAA+F;AAC/F,SAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAwB;IAC7D,OAAO,CACL,0BACY,WAAW,EACrB,SAAS,EAAE,EAAE,CACX,mGAAmG,EACnG,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,iEAAiE;AACjE,SAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAwB;IAC9D,OAAO,CACL,0BACY,YAAY,EACtB,SAAS,EAAE,EAAE,CACX,4FAA4F,EAC5F,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,gFAAgF;AAChF,SAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAwB;IAC9D,OAAO,0BAAc,YAAY,EAAC,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CAAC;AAC7G,CAAC;AAED,iCAAiC;AACjC,SAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA6B;IACtE,OAAO,+BAAmB,eAAe,EAAC,SAAS,EAAE,EAAE,CAAC,gCAAgC,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CAAC;AACtH,CAAC;AAED,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC","sourcesContent":["\"use client\";\n\nimport type { ComponentProps, CSSProperties, Ref } from \"react\";\nimport { cn } from \"../lib/cn.ts\";\n\nexport type TableProps = ComponentProps<\"table\"> & {\n /** Classes for the scroll container: a card frame, a max height. */\n containerClassName?: string;\n /** Styles for the scroll container, e.g. a maxHeight for a sticky header. */\n containerStyle?: CSSProperties;\n /** The scroll container, for virtualizers. */\n containerRef?: Ref<HTMLDivElement>;\n};\n\n/** A semantic table in its own horizontal scroll container. */\nfunction Table({ className, containerClassName, containerStyle, containerRef, ...props }: TableProps) {\n return (\n <div\n ref={containerRef}\n data-slot=\"table-container\"\n className={cn(\"relative w-full overflow-x-auto\", containerClassName)}\n style={containerStyle}\n >\n <table\n data-slot=\"table\"\n className={cn(\"w-full caption-bottom border-collapse font-sans text-ui\", className)}\n {...props}\n />\n </div>\n );\n}\n\n/** The header rows: a `line` under them and no hover fill. */\nfunction TableHeader({ className, ...props }: ComponentProps<\"thead\">) {\n return (\n <thead\n data-slot=\"table-header\"\n className={cn(\"[&_tr]:border-t-0 [&_tr]:border-b [&_tr]:hover:bg-transparent\", className)}\n {...props}\n />\n );\n}\n\n/** The body rows. */\nfunction TableBody({ className, ...props }: ComponentProps<\"tbody\">) {\n return <tbody data-slot=\"table-body\" className={className} {...props} />;\n}\n\n/** Totals under the body, above a `line`. */\nfunction TableFooter({ className, ...props }: ComponentProps<\"tfoot\">) {\n return <tfoot data-slot=\"table-footer\" className={cn(\"border-t border-line font-medium\", className)} {...props} />;\n}\n\n/** A row with a `line` above it and the hover fill; `data-state=\"selected\"` keeps the fill. */\nfunction TableRow({ className, ...props }: ComponentProps<\"tr\">) {\n return (\n <tr\n data-slot=\"table-row\"\n className={cn(\n \"border-t border-line transition-colors duration-120 hover:bg-hover data-[state=selected]:bg-hover\",\n className\n )}\n {...props}\n />\n );\n}\n\n/** A 36px header cell: 12px `muted` label, 12px side padding. */\nfunction TableHead({ className, ...props }: ComponentProps<\"th\">) {\n return (\n <th\n data-slot=\"table-head\"\n className={cn(\n \"h-9 whitespace-nowrap px-space-12 text-left align-middle text-small font-normal text-muted\",\n className\n )}\n {...props}\n />\n );\n}\n\n/** A body cell: the 56px row height, 12px side padding, no vertical padding. */\nfunction TableCell({ className, ...props }: ComponentProps<\"td\">) {\n return <td data-slot=\"table-cell\" className={cn(\"h-14 px-space-12 align-middle\", className)} {...props} />;\n}\n\n/** A caption under the table. */\nfunction TableCaption({ className, ...props }: ComponentProps<\"caption\">) {\n return <caption data-slot=\"table-caption\" className={cn(\"mt-space-16 text-ui text-muted\", className)} {...props} />;\n}\n\nexport { Table, TableHeader, TableBody, TableFooter, TableRow, TableHead, TableCell, TableCaption };\n"]}
|