@major-tech/ui 0.0.0-stage → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +107 -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 +159 -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 +284 -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,233 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Tabs
|
|
3
|
+
slug: tabs
|
|
4
|
+
description: "One of a few mutually exclusive options set in place, always one selected: Monthly · Annual, Production · Staging."
|
|
5
|
+
group: Navigation
|
|
6
|
+
layer: primitive
|
|
7
|
+
status: stable
|
|
8
|
+
since: 0.1.0
|
|
9
|
+
primitive: Tabs
|
|
10
|
+
import: import { Tabs, TabsList, TabsTrigger, TabsContent, TABS_LIST_VARIANTS, TABS_LIST_SIZES } from "@major-tech/ui/tabs";
|
|
11
|
+
source: packages/ui/src/components/tabs.tsx
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Tabs
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
### Values set in place
|
|
19
|
+
|
|
20
|
+
Two to four short, mutually exclusive values, always one selected. The track is secondary with a 3px inset and 28px segments; the selected segment is the white surface with shadow-card, never green. A count goes in `<b>` and renders faint.
|
|
21
|
+
|
|
22
|
+
Example: `basic`
|
|
23
|
+
|
|
24
|
+
```tsx
|
|
25
|
+
import { Tabs, TabsList, TabsTrigger } from "@major-tech/ui/tabs";
|
|
26
|
+
|
|
27
|
+
export default function TabsBasic() {
|
|
28
|
+
return (
|
|
29
|
+
<>
|
|
30
|
+
<Tabs defaultValue="production">
|
|
31
|
+
<TabsList aria-label="Environment">
|
|
32
|
+
<TabsTrigger value="production">Production</TabsTrigger>
|
|
33
|
+
<TabsTrigger value="staging">Staging</TabsTrigger>
|
|
34
|
+
</TabsList>
|
|
35
|
+
</Tabs>
|
|
36
|
+
<Tabs defaultValue="active">
|
|
37
|
+
<TabsList aria-label="Member status">
|
|
38
|
+
<TabsTrigger value="active">
|
|
39
|
+
Active <b>12</b>
|
|
40
|
+
</TabsTrigger>
|
|
41
|
+
<TabsTrigger value="pending">
|
|
42
|
+
Pending <b>3</b>
|
|
43
|
+
</TabsTrigger>
|
|
44
|
+
<TabsTrigger value="external">
|
|
45
|
+
External <b>2</b>
|
|
46
|
+
</TabsTrigger>
|
|
47
|
+
<TabsTrigger value="removed" disabled>
|
|
48
|
+
Removed
|
|
49
|
+
</TabsTrigger>
|
|
50
|
+
</TabsList>
|
|
51
|
+
</Tabs>
|
|
52
|
+
</>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### With content
|
|
58
|
+
|
|
59
|
+
Each `TabsTrigger` value matches a `TabsContent`; the list and the content sit 8px apart. A Badge after a label explains the difference between values.
|
|
60
|
+
|
|
61
|
+
Example: `billing`
|
|
62
|
+
|
|
63
|
+
```tsx
|
|
64
|
+
"use client";
|
|
65
|
+
|
|
66
|
+
import { BADGE_VARIANTS, Badge } from "@major-tech/ui/badge";
|
|
67
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@major-tech/ui/tabs";
|
|
68
|
+
|
|
69
|
+
export default function TabsBilling() {
|
|
70
|
+
return (
|
|
71
|
+
<Tabs defaultValue="annual" className="w-80">
|
|
72
|
+
<TabsList aria-label="Billing period">
|
|
73
|
+
<TabsTrigger value="monthly">Monthly</TabsTrigger>
|
|
74
|
+
<TabsTrigger value="annual">
|
|
75
|
+
Annual
|
|
76
|
+
<Badge variant={BADGE_VARIANTS.LIVE}>+20% credits</Badge>
|
|
77
|
+
</TabsTrigger>
|
|
78
|
+
</TabsList>
|
|
79
|
+
<TabsContent value="monthly" className="text-ui text-muted">
|
|
80
|
+
$25 billed every month.
|
|
81
|
+
</TabsContent>
|
|
82
|
+
<TabsContent value="annual" className="text-ui text-muted">
|
|
83
|
+
$240 billed once a year.
|
|
84
|
+
</TabsContent>
|
|
85
|
+
</Tabs>
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Small
|
|
91
|
+
|
|
92
|
+
24px segments in 12px type: a view switch tucked under a page title, such as a connector's views.
|
|
93
|
+
|
|
94
|
+
Example: `small`
|
|
95
|
+
|
|
96
|
+
```tsx
|
|
97
|
+
"use client";
|
|
98
|
+
|
|
99
|
+
import { TABS_LIST_SIZES, Tabs, TabsList, TabsTrigger } from "@major-tech/ui/tabs";
|
|
100
|
+
|
|
101
|
+
export default function TabsSmall() {
|
|
102
|
+
return (
|
|
103
|
+
<div className="flex flex-col gap-space-8">
|
|
104
|
+
<h2 className="m-0 text-editor-title text-ink">HubSpot</h2>
|
|
105
|
+
<Tabs defaultValue="overview">
|
|
106
|
+
<TabsList size={TABS_LIST_SIZES.SM} aria-label="Connector views">
|
|
107
|
+
<TabsTrigger value="overview">Overview</TabsTrigger>
|
|
108
|
+
<TabsTrigger value="tools">
|
|
109
|
+
Tools <b>24</b>
|
|
110
|
+
</TabsTrigger>
|
|
111
|
+
<TabsTrigger value="activity">Activity</TabsTrigger>
|
|
112
|
+
</TabsList>
|
|
113
|
+
</Tabs>
|
|
114
|
+
</div>
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Icons
|
|
120
|
+
|
|
121
|
+
An icon is 14px at either size. Alone, it names its tab with `aria-label` and shows the name in a Tooltip: a preview mode, a permission decision.
|
|
122
|
+
|
|
123
|
+
Example: `icons`
|
|
124
|
+
|
|
125
|
+
```tsx
|
|
126
|
+
"use client";
|
|
127
|
+
|
|
128
|
+
import { Columns2, Eye, FileCode2 } from "lucide-react";
|
|
129
|
+
import { TABS_LIST_SIZES, Tabs, TabsList, TabsTrigger } from "@major-tech/ui/tabs";
|
|
130
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from "@major-tech/ui/tooltip";
|
|
131
|
+
|
|
132
|
+
const MODES = [
|
|
133
|
+
{ value: "code", label: "Code", icon: <FileCode2 /> },
|
|
134
|
+
{ value: "split", label: "Split", icon: <Columns2 /> },
|
|
135
|
+
{ value: "preview", label: "Preview", icon: <Eye /> },
|
|
136
|
+
];
|
|
137
|
+
|
|
138
|
+
export default function TabsIcons() {
|
|
139
|
+
return (
|
|
140
|
+
<Tabs defaultValue="split">
|
|
141
|
+
<TabsList size={TABS_LIST_SIZES.SM} aria-label="Preview mode">
|
|
142
|
+
{MODES.map((mode) => (
|
|
143
|
+
<Tooltip key={mode.value}>
|
|
144
|
+
<TooltipTrigger render={<TabsTrigger value={mode.value} aria-label={mode.label} />}>
|
|
145
|
+
{mode.icon}
|
|
146
|
+
</TooltipTrigger>
|
|
147
|
+
<TooltipContent>{mode.label}</TooltipContent>
|
|
148
|
+
</Tooltip>
|
|
149
|
+
))}
|
|
150
|
+
</TabsList>
|
|
151
|
+
</Tabs>
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Underline
|
|
157
|
+
|
|
158
|
+
Text tabs over a full-width rule, the selected one underlined in the accent: the categories of a gallery.
|
|
159
|
+
|
|
160
|
+
Example: `underline`
|
|
161
|
+
|
|
162
|
+
```tsx
|
|
163
|
+
"use client";
|
|
164
|
+
|
|
165
|
+
import { TABS_LIST_VARIANTS, Tabs, TabsList, TabsTrigger } from "@major-tech/ui/tabs";
|
|
166
|
+
|
|
167
|
+
const CATEGORIES = ["Comms", "Operations", "Admin", "Growth", "Insights"];
|
|
168
|
+
|
|
169
|
+
export default function TabsUnderline() {
|
|
170
|
+
return (
|
|
171
|
+
<Tabs defaultValue={CATEGORIES[0]} className="w-full max-w-160">
|
|
172
|
+
<TabsList variant={TABS_LIST_VARIANTS.UNDERLINE} aria-label="Template categories">
|
|
173
|
+
{CATEGORIES.map((category) => (
|
|
174
|
+
<TabsTrigger key={category} value={category}>
|
|
175
|
+
{category}
|
|
176
|
+
</TabsTrigger>
|
|
177
|
+
))}
|
|
178
|
+
</TabsList>
|
|
179
|
+
</Tabs>
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### Guidelines
|
|
185
|
+
|
|
186
|
+
Do:
|
|
187
|
+
|
|
188
|
+
- Use it for a value set in place: Monthly · Annual, Production · Staging.
|
|
189
|
+
- Keep labels to one or two words, or an icon with its name in a Tooltip.
|
|
190
|
+
- Name the list with `aria-label`: “Billing period”.
|
|
191
|
+
|
|
192
|
+
Don't:
|
|
193
|
+
|
|
194
|
+
- Switching an editor's views: that's the ViewSwitcher. The strip above the editor is EditorTabs.
|
|
195
|
+
- More than four segments: use a Select.
|
|
196
|
+
- A green selected segment.
|
|
197
|
+
|
|
198
|
+
## API
|
|
199
|
+
|
|
200
|
+
```tsx
|
|
201
|
+
import { Tabs, TabsList, TabsTrigger, TabsContent, TABS_LIST_VARIANTS, TABS_LIST_SIZES } from "@major-tech/ui/tabs";
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### `<Tabs />`
|
|
205
|
+
|
|
206
|
+
Base UI Tabs.Root props pass through (orientation…); `activateOnFocus` on TabsList selects a tab as the arrows reach it.
|
|
207
|
+
|
|
208
|
+
| Prop | Type | Default | Description |
|
|
209
|
+
| --- | --- | --- | --- |
|
|
210
|
+
| `value · onValueChange` | `string · (value, eventDetails) => void` | — | Controlled. |
|
|
211
|
+
| `defaultValue` | `string` | — | The tab selected on first render. With neither it nor `value`, the first enabled tab is selected and `onValueChange` fires once on mount. |
|
|
212
|
+
|
|
213
|
+
### `<TabsList />`
|
|
214
|
+
|
|
215
|
+
| Prop | Type | Default | Description |
|
|
216
|
+
| --- | --- | --- | --- |
|
|
217
|
+
| `variant` | `"default" \| "underline"` | `"default"` | Segments on a track, or text tabs over a rule. `TABS_LIST_VARIANTS` holds the values. |
|
|
218
|
+
| `size` | `"default" \| "sm"` | `"default"` | 28px segments in 13px type, or 24px in 12px. `TABS_LIST_SIZES` holds the values. |
|
|
219
|
+
|
|
220
|
+
### `<TabsTrigger /> · <TabsContent />`
|
|
221
|
+
|
|
222
|
+
| Prop | Type | Default | Description |
|
|
223
|
+
| --- | --- | --- | --- |
|
|
224
|
+
| `value`* | `string` | — | Pairs a trigger with its content. |
|
|
225
|
+
| `disabled` | `boolean` | `false` | On `TabsTrigger` only: 50% opacity and can't be picked; arrow keys still reach it. |
|
|
226
|
+
|
|
227
|
+
`*` marks a required prop.
|
|
228
|
+
|
|
229
|
+
### Accessibility
|
|
230
|
+
|
|
231
|
+
- The WAI-ARIA tabs pattern from Base UI: arrow keys move between tabs and Enter or Space selects; the selected one is `aria-selected`.
|
|
232
|
+
- Selection is styled off `aria-selected` as well as `data-active`, so a trigger passed to `TooltipTrigger` as `render` still looks selected.
|
|
233
|
+
- Focus shows a 2px faint ring.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Textarea
|
|
3
|
+
slug: textarea
|
|
4
|
+
description: "The multi-line field: 76px tall at least, resizable vertically."
|
|
5
|
+
group: Inputs
|
|
6
|
+
layer: primitive
|
|
7
|
+
status: stable
|
|
8
|
+
since: 0.3.0
|
|
9
|
+
import: import { Textarea } from "@major-tech/ui/textarea";
|
|
10
|
+
source: packages/ui/src/components/textarea.tsx
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Textarea
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
### Longer text
|
|
18
|
+
|
|
19
|
+
The Input's frame with an 8px × 10px inset and 13px/1.55 text. It starts at 76px and people drag it taller; set `rows` only when the usual answer is longer.
|
|
20
|
+
|
|
21
|
+
Example: `basic`
|
|
22
|
+
|
|
23
|
+
```tsx
|
|
24
|
+
import { Field, FieldDescription, FieldLabel } from "@major-tech/ui/field";
|
|
25
|
+
import { Textarea } from "@major-tech/ui/textarea";
|
|
26
|
+
|
|
27
|
+
export default function TextareaBasic() {
|
|
28
|
+
return (
|
|
29
|
+
<Field className="w-140 max-w-full">
|
|
30
|
+
<FieldLabel htmlFor="connector-description">Description</FieldLabel>
|
|
31
|
+
<Textarea
|
|
32
|
+
id="connector-description"
|
|
33
|
+
placeholder="Help builders and Major AI know how to use this connector."
|
|
34
|
+
aria-describedby="connector-description-hint"
|
|
35
|
+
/>
|
|
36
|
+
<FieldDescription id="connector-description-hint">Shown to builders and to Major AI.</FieldDescription>
|
|
37
|
+
</Field>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### States
|
|
43
|
+
|
|
44
|
+
The same focus, error and disabled states as Input.
|
|
45
|
+
|
|
46
|
+
Example: `states`
|
|
47
|
+
|
|
48
|
+
```tsx
|
|
49
|
+
import { Textarea } from "@major-tech/ui/textarea";
|
|
50
|
+
|
|
51
|
+
export default function TextareaStates() {
|
|
52
|
+
return (
|
|
53
|
+
<div className="flex w-96 max-w-full flex-col gap-space-12">
|
|
54
|
+
<Textarea
|
|
55
|
+
aria-label="Instructions"
|
|
56
|
+
defaultValue={"Write exactly one original, work-friendly joke.\nPut the punchline on its own line."}
|
|
57
|
+
/>
|
|
58
|
+
<Textarea aria-label="Instructions" aria-invalid defaultValue="Too short" />
|
|
59
|
+
<Textarea aria-label="Instructions" disabled defaultValue="Managed by your admin." />
|
|
60
|
+
</div>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Guidelines
|
|
66
|
+
|
|
67
|
+
- Use it for descriptions, instructions and notes: anything that can run past one line.
|
|
68
|
+
- Put it in a Field with a label; say in the hint who reads the text.
|
|
69
|
+
- A one-line value is an Input, even when it can be long (a URL).
|
|
70
|
+
|
|
71
|
+
## API
|
|
72
|
+
|
|
73
|
+
```tsx
|
|
74
|
+
import { Textarea } from "@major-tech/ui/textarea";
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### `<Textarea />`
|
|
78
|
+
|
|
79
|
+
Accepts every native `<textarea>` attribute; `ref` goes to the textarea.
|
|
80
|
+
|
|
81
|
+
| Prop | Type | Default | Description |
|
|
82
|
+
| --- | --- | --- | --- |
|
|
83
|
+
| `rows` | `number` | — | Not set by default: the minimum height is 76px. |
|
|
84
|
+
| `aria-invalid` | `boolean` | — | Danger border and halo. |
|
|
85
|
+
|
|
86
|
+
### Accessibility
|
|
87
|
+
|
|
88
|
+
- A native `<textarea>`: label it with FieldLabel `htmlFor`, and link hints with `aria-describedby`.
|
|
89
|
+
- It resizes vertically only, so it never breaks the form's columns.
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ThinkingIndicator
|
|
3
|
+
slug: thinking-indicator
|
|
4
|
+
description: "Major at work in the chat: its mark as glass cubes turning in 3D, beside what it is doing now, each label rolling into the next."
|
|
5
|
+
group: AI
|
|
6
|
+
layer: composed
|
|
7
|
+
status: beta
|
|
8
|
+
since: 0.4.0
|
|
9
|
+
import: import { ThinkingIndicator, ThinkingMark } from "@major-tech/ui/thinking-indicator";
|
|
10
|
+
source: packages/ui/src/components/thinking-indicator.tsx
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# ThinkingIndicator
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
### While Major works
|
|
18
|
+
|
|
19
|
+
At the end of the turn Major is working on: the ThinkingMark beside a 13px shimmering label of what it is doing now. It rises in as it mounts; a new label rolls up into the old one's place.
|
|
20
|
+
|
|
21
|
+
Example: `turn`
|
|
22
|
+
|
|
23
|
+
```tsx
|
|
24
|
+
"use client";
|
|
25
|
+
|
|
26
|
+
import { useEffect, useState } from "react";
|
|
27
|
+
import { ThinkingIndicator } from "@major-tech/ui/thinking-indicator";
|
|
28
|
+
|
|
29
|
+
/** What a real turn reports, in order; null is the turn's end. */
|
|
30
|
+
const TURN_STATUSES = [
|
|
31
|
+
"Understanding your request",
|
|
32
|
+
"Writing a response",
|
|
33
|
+
"Searching",
|
|
34
|
+
"Reading",
|
|
35
|
+
"Writing",
|
|
36
|
+
"Waiting for your approval",
|
|
37
|
+
"Executing",
|
|
38
|
+
"Deploying",
|
|
39
|
+
"Summarizing the conversation",
|
|
40
|
+
null,
|
|
41
|
+
];
|
|
42
|
+
|
|
43
|
+
const STEP_DURATION_MS = 2200;
|
|
44
|
+
|
|
45
|
+
export default function ThinkingIndicatorTurn() {
|
|
46
|
+
const [stepIndex, setStepIndex] = useState(0);
|
|
47
|
+
const label = TURN_STATUSES[stepIndex];
|
|
48
|
+
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
const interval = setInterval(() => setStepIndex((index) => (index + 1) % TURN_STATUSES.length), STEP_DURATION_MS);
|
|
51
|
+
|
|
52
|
+
return () => clearInterval(interval);
|
|
53
|
+
}, []);
|
|
54
|
+
|
|
55
|
+
return <div className="h-12 w-full max-w-96">{label && <ThinkingIndicator label={label} />}</div>;
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
- Mount it while the turn runs and unmount it when it ends. When is the product's call: the web shows it 250ms after a turn starts, so a quick reply never flashes it, and keeps it 500ms after the turn ends.
|
|
60
|
+
- Change `label` as the turn moves on. Each label stays at least 700ms, so a tool that finishes in a few hundred ms never rolls a label in and straight back out.
|
|
61
|
+
- One indicator per chat, under the turn's last message.
|
|
62
|
+
- A 48px row: the 22px mark, 12px, then the label on one line, truncated.
|
|
63
|
+
|
|
64
|
+
### Labels
|
|
65
|
+
|
|
66
|
+
A word or two of present tense, by what Major is doing now. The web derives it from the turn's latest activity.
|
|
67
|
+
|
|
68
|
+
- **Understanding your request**: the turn started, nothing happened yet.
|
|
69
|
+
- **Writing a response**: Major is thinking or writing.
|
|
70
|
+
- **Searching · Reading · Writing · Executing · Querying**: the tool it runs, by what the tool does (search, read, edit, run a command, query a database).
|
|
71
|
+
- **Validating · Deploying · Checking access · Setting things up · Delegating · Planning**: a check or test, a deploy, a permission, a setup, a subagent, a plan.
|
|
72
|
+
- **Waiting for your approval**: a permission request waits for the person.
|
|
73
|
+
- **Summarizing the conversation**: the context is being compacted.
|
|
74
|
+
- **Working on your request**: anything else.
|
|
75
|
+
|
|
76
|
+
### The mark
|
|
77
|
+
|
|
78
|
+
ThinkingMark: the Major mark at 22px as seven bottle-green glass cubes, in CSS 3D. It sways, turns about the vertical, then turns about the diagonal it is symmetric about, every 7.2s, for as long as it is shown.
|
|
79
|
+
|
|
80
|
+
Example: `mark`
|
|
81
|
+
|
|
82
|
+
```tsx
|
|
83
|
+
import { ThinkingMark } from "@major-tech/ui/thinking-indicator";
|
|
84
|
+
|
|
85
|
+
export default function ThinkingIndicatorMark() {
|
|
86
|
+
return <ThinkingMark />;
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
- Its glass mixes the mark's own colours, `brand-deep` and `brand-mint`, the same in both themes.
|
|
91
|
+
- With reduced motion it holds its first frame.
|
|
92
|
+
- It means Major is working. Use the logo files for the brand everywhere else.
|
|
93
|
+
|
|
94
|
+
### Another mark
|
|
95
|
+
|
|
96
|
+
A surface with a character of its own puts it in the mark's place with `mark`, in the same 22px slot: Pepper's chat shows Pepper keeping busy.
|
|
97
|
+
|
|
98
|
+
Example: `custom-mark`
|
|
99
|
+
|
|
100
|
+
```tsx
|
|
101
|
+
"use client";
|
|
102
|
+
|
|
103
|
+
import { AVATAR_SIZES, Avatar, AvatarFallback } from "@major-tech/ui/avatar";
|
|
104
|
+
import { ThinkingIndicator } from "@major-tech/ui/thinking-indicator";
|
|
105
|
+
|
|
106
|
+
export default function ThinkingIndicatorCustomMark() {
|
|
107
|
+
return (
|
|
108
|
+
<ThinkingIndicator
|
|
109
|
+
label="Reading"
|
|
110
|
+
className="w-full max-w-96"
|
|
111
|
+
mark={
|
|
112
|
+
<Avatar size={AVATAR_SIZES.SM}>
|
|
113
|
+
<AvatarFallback>DJ</AvatarFallback>
|
|
114
|
+
</Avatar>
|
|
115
|
+
}
|
|
116
|
+
/>
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Guidelines
|
|
122
|
+
|
|
123
|
+
Do:
|
|
124
|
+
|
|
125
|
+
- Say what Major is doing now, in present tense: “Searching”, “Writing a response”.
|
|
126
|
+
- Keep the indicator to the turn that is running.
|
|
127
|
+
- Show the turn's steps in a Trace above it; the indicator is the live line under them.
|
|
128
|
+
|
|
129
|
+
Don't:
|
|
130
|
+
|
|
131
|
+
- Name tools or internal ids in the label (“mcp__workspace__deploy_app”).
|
|
132
|
+
- Add a Spinner or a second working line next to it.
|
|
133
|
+
- Recolour the mark or use it as a logo.
|
|
134
|
+
|
|
135
|
+
## API
|
|
136
|
+
|
|
137
|
+
```tsx
|
|
138
|
+
import { ThinkingIndicator, ThinkingMark } from "@major-tech/ui/thinking-indicator";
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### `<ThinkingIndicator />`
|
|
142
|
+
|
|
143
|
+
Also accepts native `<div>` attributes.
|
|
144
|
+
|
|
145
|
+
| Prop | Type | Default | Description |
|
|
146
|
+
| --- | --- | --- | --- |
|
|
147
|
+
| `label`* | `string` | — | What Major is doing now. Each label stays at least 700ms. |
|
|
148
|
+
| `mark` | `ReactNode` | `<ThinkingMark />` | Stands in for the ThinkingMark, for a surface with a character of its own. |
|
|
149
|
+
|
|
150
|
+
`*` marks a required prop.
|
|
151
|
+
|
|
152
|
+
### `<ThinkingMark />`
|
|
153
|
+
|
|
154
|
+
Renders a 22px `<span>`; accepts native `<span>` attributes.
|
|
155
|
+
|
|
156
|
+
| Prop | Type | Default | Description |
|
|
157
|
+
| --- | --- | --- | --- |
|
|
158
|
+
| `className` | `string` | — | Placement only; the mark keeps its size. |
|
|
159
|
+
|
|
160
|
+
### Accessibility
|
|
161
|
+
|
|
162
|
+
- The indicator is a polite live region (`role="status"`): screen readers read each new label once it settles, never the one rolling out.
|
|
163
|
+
- The mark and the rolling labels are decorative (`aria-hidden`); a hidden copy of the label is what is read.
|
|
164
|
+
- With reduced motion the mark holds still, the shimmer stops, and the indicator and its labels fade instead of rising and rolling.
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ThreadStatus
|
|
3
|
+
slug: thread-status
|
|
4
|
+
description: "A conversation's state at the start of its row: three pulsing dots while Major works, a green dot when it waits for you or has news."
|
|
5
|
+
group: AI
|
|
6
|
+
layer: composed
|
|
7
|
+
status: beta
|
|
8
|
+
since: 0.4.0
|
|
9
|
+
import: import { ThreadStatus, THREAD_STATUSES } from "@major-tech/ui/thread-status";
|
|
10
|
+
source: packages/ui/src/components/thread-status.tsx
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# ThreadStatus
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
### States
|
|
18
|
+
|
|
19
|
+
The mark at the start of a conversation's row. Every state takes the same 10px slot, so titles line up whatever it shows.
|
|
20
|
+
|
|
21
|
+
Example: `states`
|
|
22
|
+
|
|
23
|
+
```tsx
|
|
24
|
+
import { ThreadStatus, type ThreadStatusValue } from "@major-tech/ui/thread-status";
|
|
25
|
+
|
|
26
|
+
interface StateRow {
|
|
27
|
+
status: ThreadStatusValue;
|
|
28
|
+
label: string;
|
|
29
|
+
isActive?: boolean;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const STATES: StateRow[] = [
|
|
33
|
+
{ status: "working", label: "Working" },
|
|
34
|
+
{ status: "waiting", label: "Waiting for your input" },
|
|
35
|
+
{ status: "unread", label: "Unread" },
|
|
36
|
+
{ status: "idle", label: "Idle" },
|
|
37
|
+
{ status: "idle", label: "Idle, open on screen", isActive: true },
|
|
38
|
+
];
|
|
39
|
+
|
|
40
|
+
export default function ThreadStatusStates() {
|
|
41
|
+
return (
|
|
42
|
+
<div className="flex flex-col gap-space-12">
|
|
43
|
+
{STATES.map((state) => (
|
|
44
|
+
<div key={state.label} className="flex items-center gap-2.5 text-ui text-ink-2">
|
|
45
|
+
<ThreadStatus status={state.status} isActive={state.isActive} />
|
|
46
|
+
{state.label}
|
|
47
|
+
</div>
|
|
48
|
+
))}
|
|
49
|
+
</div>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
- **working**: Major is working in the conversation. Three `link` dots in a 12px mark turn and pulse one after another.
|
|
55
|
+
- **waiting**: something in it waits for the person, a question, a permission or a connector. A 6px `link` dot.
|
|
56
|
+
- **unread**: Major replied since the person last opened it. The same 6px dot.
|
|
57
|
+
- **idle**: nothing new. A 4px dot in `ink` at 16%.
|
|
58
|
+
- **isActive**: the conversation open on screen never shows the waiting or unread dot, it has nothing new to tell; its idle dot is `chart-1`.
|
|
59
|
+
|
|
60
|
+
### Beside a title
|
|
61
|
+
|
|
62
|
+
The sidebar's Pinned and Recent conversations: the mark, 10px, then the 13.5px title on one line.
|
|
63
|
+
|
|
64
|
+
Example: `in-a-list`
|
|
65
|
+
|
|
66
|
+
```tsx
|
|
67
|
+
import { ThreadStatus, type ThreadStatusValue } from "@major-tech/ui/thread-status";
|
|
68
|
+
import { cn } from "@major-tech/ui/lib/cn";
|
|
69
|
+
|
|
70
|
+
interface Conversation {
|
|
71
|
+
id: string;
|
|
72
|
+
title: string;
|
|
73
|
+
status: ThreadStatusValue;
|
|
74
|
+
isActive?: boolean;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const CONVERSATIONS: Conversation[] = [
|
|
78
|
+
{ id: "close", title: "Weekly finance close", status: "working" },
|
|
79
|
+
{ id: "hubspot", title: "Sync HubSpot deals to Sheets", status: "waiting" },
|
|
80
|
+
{ id: "standup", title: "Standup digest for #eng", status: "unread" },
|
|
81
|
+
{ id: "support", title: "Draft support replies", status: "idle", isActive: true },
|
|
82
|
+
{ id: "joke", title: "Daily joke in Slack", status: "idle" },
|
|
83
|
+
];
|
|
84
|
+
|
|
85
|
+
export default function ThreadStatusInAList() {
|
|
86
|
+
return (
|
|
87
|
+
<div className="flex w-full max-w-60 flex-col gap-px rounded-lg bg-app-bg p-space-8">
|
|
88
|
+
{CONVERSATIONS.map((conversation) => (
|
|
89
|
+
<div key={conversation.id} className="flex min-w-0 items-center gap-2.5 py-1.5 pr-space-6 pl-space-8">
|
|
90
|
+
<ThreadStatus status={conversation.status} isActive={conversation.isActive} />
|
|
91
|
+
<span
|
|
92
|
+
className={cn(
|
|
93
|
+
"min-w-0 flex-1 truncate text-nav leading-5",
|
|
94
|
+
conversation.isActive ? "text-ink-strong" : "text-ink-nav",
|
|
95
|
+
)}
|
|
96
|
+
>
|
|
97
|
+
{conversation.title}
|
|
98
|
+
</span>
|
|
99
|
+
</div>
|
|
100
|
+
))}
|
|
101
|
+
</div>
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
- Waiting and unread look the same at the start of the row; a waiting row also counts its open questions at its end, where the time goes (a `COUNT_DESTRUCTIVE` Badge).
|
|
107
|
+
- A working row's time turns `link`, as the dots.
|
|
108
|
+
- The whole conversation row (the mark, the title, the agent under it, the time that gives way to Pin and a menu on hover) is not in the system yet: it is the Conversation row part on the playground's To review page.
|
|
109
|
+
|
|
110
|
+
### Guidelines
|
|
111
|
+
|
|
112
|
+
Do:
|
|
113
|
+
|
|
114
|
+
- Give every row the mark, idle too, so the titles line up.
|
|
115
|
+
- Pass `isActive` for the conversation on screen, so it never flickers green at the end of a turn.
|
|
116
|
+
- Count a waiting row's open questions at its end, so the state isn't the dot alone.
|
|
117
|
+
|
|
118
|
+
Don't:
|
|
119
|
+
|
|
120
|
+
- Use it for anything but a conversation's state: a status is a StatusDot.
|
|
121
|
+
- Add a Spinner next to the working dots.
|
|
122
|
+
- Colour a row's title by its state.
|
|
123
|
+
|
|
124
|
+
## API
|
|
125
|
+
|
|
126
|
+
```tsx
|
|
127
|
+
import { ThreadStatus, THREAD_STATUSES } from "@major-tech/ui/thread-status";
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### `<ThreadStatus />`
|
|
131
|
+
|
|
132
|
+
Renders a 10px `<span>`; accepts native `<span>` attributes. `THREAD_STATUSES` holds the states as constants.
|
|
133
|
+
|
|
134
|
+
| Prop | Type | Default | Description |
|
|
135
|
+
| --- | --- | --- | --- |
|
|
136
|
+
| `status` | `"working" \| "waiting" \| "unread" \| "idle"` | `"idle"` | The conversation's state. |
|
|
137
|
+
| `isActive` | `boolean` | `false` | The conversation is open on screen: no waiting or unread dot, a `chart-1` idle dot. |
|
|
138
|
+
|
|
139
|
+
### Accessibility
|
|
140
|
+
|
|
141
|
+
- The working dots are an image labelled “Working”, and the waiting and unread dots “Waiting for your input” and “Unread” (`role="img"`). The idle dot is silent.
|
|
142
|
+
- With reduced motion the working dots hold still.
|
|
143
|
+
- Colour is never the only signal: the row's title and count say the rest.
|