@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,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Spacing
|
|
3
|
+
description: A 2px-step scale for a dense, calm interface. Every step maps onto Tailwind's 4px spacing unit, so the token and the utility always agree.
|
|
4
|
+
section: Foundations
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Spacing
|
|
8
|
+
|
|
9
|
+
A 2px-step scale for a dense, calm interface. Every step maps onto Tailwind's 4px spacing unit, so the token and the utility always agree.
|
|
10
|
+
|
|
11
|
+
## Scale
|
|
12
|
+
|
|
13
|
+
The scale is the `spacing` group of `packages/ui/tokens.json` (via `@major-tech/ui/lib/major-tokens`): per step, its name, its value and Tailwind step, a bar, and its usage. Values are not copied here.
|
|
14
|
+
|
|
15
|
+
The second column is the Tailwind step: `gap-3` = 12px, `p-3.5` = 14px, `pt-14` = 56px.
|
|
16
|
+
|
|
17
|
+
## Rules
|
|
18
|
+
|
|
19
|
+
- Lay out siblings with `gap`, never margins.
|
|
20
|
+
- Cards: 14px 14px 12px inside, 10px between rows, 12px between cards in a grid.
|
|
21
|
+
- Pages start 56px from the top of the panel; the Config page 48px above the name.
|
|
22
|
+
- Inside menus and sidebars rows have 8px side padding and 2px between rows.
|
|
23
|
+
- Don't invent in-between values: if 14px feels wrong, it's 12 or 16.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Typography
|
|
3
|
+
description: "Two families: DM Sans for everything, JetBrains Mono for code, file names, variables and action names. Eighteen named styles, and 12px is the floor."
|
|
4
|
+
section: Foundations
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Typography
|
|
8
|
+
|
|
9
|
+
Two families: DM Sans for everything, JetBrains Mono for code, file names, variables and action names. Eighteen named styles, and 12px is the floor.
|
|
10
|
+
|
|
11
|
+
## Families
|
|
12
|
+
|
|
13
|
+
- **DM Sans** (`font-sans`): Every word of the interface. Weights 400, 500, 600.
|
|
14
|
+
- **JetBrains Mono** (`font-mono`): Code, hosts, URLs, keys, variables (`{} RECIPIENT_EMAIL`) and action names (`slack.send_direct_message`).
|
|
15
|
+
|
|
16
|
+
The family stacks come from `fontFamily` in `@major-tech/ui/lib/major-tokens` (generated from `packages/ui/tokens.json`).
|
|
17
|
+
|
|
18
|
+
## Text styles
|
|
19
|
+
|
|
20
|
+
The page then shows one section per style group (its name is the section title), each listing every named style as `text-<name>` with a sample, its size, line height and weight, and its usage. The groups and styles come from `type.groups` in `packages/ui/tokens.json`; values are not copied here.
|
|
21
|
+
|
|
22
|
+
## Rules
|
|
23
|
+
|
|
24
|
+
- **12px is the floor.** Nothing a person reads is smaller. The only exceptions are avatar initials and logo letters, which are icons.
|
|
25
|
+
- Sentence case everywhere. Uppercase only for the small section labels set in `text-label` (DETAILS, INSTRUCTIONS).
|
|
26
|
+
- Weight carries hierarchy, not colour: titles 600, controls 500, text 400.
|
|
27
|
+
- Long-form text (instructions, docs) uses `text-editor-body` at 15/24; interface text uses `text-body` at 14/21.
|
|
28
|
+
|
|
29
|
+
## In code
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
<h1 className="text-page-title">Agents</h1>
|
|
33
|
+
<p className="text-body text-ink-2">I've set up Daily Joke on the right.</p>
|
|
34
|
+
<span className="text-label uppercase text-muted">Details</span>
|
|
35
|
+
<code className="text-code font-mono">slack.send_direct_message</code>
|
|
36
|
+
|
|
37
|
+
/* without Tailwind */
|
|
38
|
+
<h1 class="type-page-title">Agents</h1>
|
|
39
|
+
.title { font-size: var(--text-card-title); line-height: var(--text-card-title--line-height); }
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Load the fonts yourself: in Next.js use `next/font/google` (DM_Sans, JetBrains_Mono) and set `--font-sans` / `--font-mono`; elsewhere use the Google Fonts stylesheet.
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Installation
|
|
3
|
+
description: "Major is one package, @major-tech/ui: the components and the tokens they are built on, versioned together. Works with Next.js (App Router and Server Components), Vite and any Tailwind v4 setup."
|
|
4
|
+
section: Getting started
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Installation
|
|
8
|
+
|
|
9
|
+
Major is one package, @major-tech/ui: the components and the tokens they are built on, versioned together. Works with Next.js (App Router and Server Components), Vite and any Tailwind v4 setup.
|
|
10
|
+
|
|
11
|
+
## 1. Install the package
|
|
12
|
+
|
|
13
|
+
It is published on npm in the major-tech organization: no registry setup, no token.
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
yarn add @major-tech/ui lucide-react
|
|
17
|
+
# or: pnpm add @major-tech/ui lucide-react
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
- Needs React 19 and Tailwind v4. `lucide-react` is for your own icons: components take icons as elements.
|
|
21
|
+
- Pepper also needs `three` (0.182 or later): add it only in a product that shows Pepper. The package doesn't install it for everyone else.
|
|
22
|
+
|
|
23
|
+
## 2. Load the styles
|
|
24
|
+
|
|
25
|
+
One import: the tokens (light and dark), the Tailwind theme, and a `@source` that lets your Tailwind generate the classes the components use.
|
|
26
|
+
|
|
27
|
+
`app/globals.css`
|
|
28
|
+
|
|
29
|
+
```css
|
|
30
|
+
@import "tailwindcss";
|
|
31
|
+
@import "@major-tech/ui/tailwind.css";
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
The theme resets Tailwind's palette and text sizes: only Major values exist (`bg-surface`, `text-ink`, `text-body`, `rounded-xl`…), in the components and in your own markup.
|
|
35
|
+
|
|
36
|
+
## 3. Load the fonts
|
|
37
|
+
|
|
38
|
+
DM Sans and JetBrains Mono, from Google Fonts. In Next.js let `next/font` self-host them and point the tokens at them.
|
|
39
|
+
|
|
40
|
+
`app/layout.tsx`
|
|
41
|
+
|
|
42
|
+
```tsx
|
|
43
|
+
import { DM_Sans, JetBrains_Mono } from "next/font/google";
|
|
44
|
+
import type { PropsWithChildren } from "react";
|
|
45
|
+
import { Toaster } from "@major-tech/ui/sonner";
|
|
46
|
+
import { TooltipProvider } from "@major-tech/ui/tooltip";
|
|
47
|
+
|
|
48
|
+
const sans = DM_Sans({ subsets: ["latin"], variable: "--font-dm-sans" });
|
|
49
|
+
const mono = JetBrains_Mono({ subsets: ["latin"], variable: "--font-jetbrains-mono" });
|
|
50
|
+
|
|
51
|
+
export default function RootLayout({ children }: PropsWithChildren) {
|
|
52
|
+
return (
|
|
53
|
+
<html lang="en" className={`${sans.variable} ${mono.variable}`}>
|
|
54
|
+
<body>
|
|
55
|
+
<TooltipProvider>
|
|
56
|
+
{children}
|
|
57
|
+
<Toaster />
|
|
58
|
+
</TooltipProvider>
|
|
59
|
+
</body>
|
|
60
|
+
</html>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
`app/globals.css`
|
|
66
|
+
|
|
67
|
+
```css
|
|
68
|
+
@theme inline {
|
|
69
|
+
--font-sans: var(--font-dm-sans, "DM Sans"), ui-sans-serif, system-ui, sans-serif;
|
|
70
|
+
--font-mono: var(--font-jetbrains-mono, "JetBrains Mono"), ui-monospace, monospace;
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Keep the fallback inside `var()`. Without it the whole value is invalid wherever the `next/font` variable isn't set (on `:root`, when the variables sit on `<body>`), and every text falls back to the system font. `inline` reads the variable where the text is, so it works with the variables on `<html>` or `<body>`.
|
|
75
|
+
|
|
76
|
+
## 4. Use a component
|
|
77
|
+
|
|
78
|
+
Every component has its own entry point; each page starts its API section with the import.
|
|
79
|
+
|
|
80
|
+
```tsx
|
|
81
|
+
import { Button } from "@major-tech/ui/button";
|
|
82
|
+
import { Plus } from "lucide-react";
|
|
83
|
+
|
|
84
|
+
export function AgentsHeader() {
|
|
85
|
+
return (
|
|
86
|
+
<Button>
|
|
87
|
+
<Plus />
|
|
88
|
+
Create agent
|
|
89
|
+
</Button>
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
- Components are client components (`"use client"` is in each file), so you can render them from Server Components. `cn()` and the tokens are not: use them on the server too.
|
|
95
|
+
- Components are composed from parts, as in shadcn/ui: `Dialog` + `DialogContent` + `DialogTitle`, `Field` + `FieldLabel` + `Input`. Icons go in `children` like any other content.
|
|
96
|
+
- **Primitives** (Button, Dialog, Select…) carry no product meaning; **composed** components (PageHeader, DataTable, Trace…) are built from them for one recurring Major need. Each component's page says which it is; the sidebar groups them by the job they do.
|
|
97
|
+
- Compose with `cn()` from `@major-tech/ui/lib/cn` to merge your classes; it knows Major's theme (it won't drop `text-ink` when you add `text-ui`).
|
|
98
|
+
- "Go to definition" opens the component's TypeScript source: the package ships declaration maps and sourcemaps with the sources inside.
|
|
99
|
+
|
|
100
|
+
## When a component doesn't fit
|
|
101
|
+
|
|
102
|
+
A component that doesn't fit is either a bug in the system or a use it wasn't made for. Both are fixed in the system.
|
|
103
|
+
|
|
104
|
+
- First compose: `className`, `render` and the exported variants (`buttonVariants`) cover most cases without changing the component.
|
|
105
|
+
- If it is a bug, open an issue on the design system. To ship before the fix is released, patch the package with `yarn patch @major-tech/ui` (or `pnpm patch`) and link the issue in the patch commit. The patch stays visible in review and fails loudly when an upgrade changes the same lines.
|
|
106
|
+
- Never copy a component into a product to change it.
|
|
107
|
+
|
|
108
|
+
## Adding a stock shadcn/ui component
|
|
109
|
+
|
|
110
|
+
The theme defines shadcn's variable names (background, primary, border, ring…) mapped onto Major tokens, so components from the shadcn registry pick up Major's look. If a product needs one long term, propose it for `@major-tech/ui`.
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
pnpm dlx shadcn@latest add hover-card
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Note: in Major, `accent` is the call-to-action green and `muted` is a text colour. Replace shadcn's `bg-accent` (hover) with `bg-hover` and `bg-muted` with `bg-secondary`.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Versioning and releases
|
|
3
|
+
description: "@major-tech/ui is released with semantic versioning, via Changesets. The components and the tokens share one version. This site is not versioned — it always shows the latest components, rendered from source."
|
|
4
|
+
section: Getting started
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Versioning and releases
|
|
8
|
+
|
|
9
|
+
@major-tech/ui is released with semantic versioning, via Changesets. The components and the tokens share one version. This site is not versioned — it always shows the latest components, rendered from source.
|
|
10
|
+
|
|
11
|
+
## What counts as what
|
|
12
|
+
|
|
13
|
+
| Bump | Example | What |
|
|
14
|
+
| --- | --- | --- |
|
|
15
|
+
| `patch` | `1.2.0 → 1.2.1` | Bug fixes, visual corrections that match the spec, docs-only types. |
|
|
16
|
+
| `minor` | `1.2.0 → 1.3.0` | A new component, prop, variant or token. Deprecations (old name still works). |
|
|
17
|
+
| `major` | `1.x → 2.0.0` | Removing or renaming an export, prop or token; changing a default; changing DOM structure consumers style. |
|
|
18
|
+
|
|
19
|
+
## Making a change
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pnpm changeset # pick the bump, write one sentence-case line
|
|
23
|
+
git commit -am "Add Slider"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
A release is a pull request of its own
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pnpm version-packages # the changesets become the version and CHANGELOG.md
|
|
30
|
+
# merge it, then on main, logged in to npm as a member of major-tech:
|
|
31
|
+
pnpm release # builds @major-tech/ui and publishes it to npm (changeset publish)
|
|
32
|
+
git push --follow-tags
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
- Tokens change in `packages/ui/tokens.json` only; the theme CSS and `lib/major-tokens` are generated.
|
|
36
|
+
- A new component lands with its catalogue entry (`packages/ui/catalog.ts`) and its docs page (usage rules, examples, API) in the same pull request. The package build fails on a component without one.
|
|
37
|
+
- Write the changeset the way it should read in Latest updates: “Add Slider”, “Fix Select focus ring in dark”.
|
|
38
|
+
- Every change people will notice (a component, prop, token, fix or guideline) adds a line to Latest updates in the same pull request: under Next release for the package, or a Guidelines entry when only guidance changes. Write it the way the changeset reads.
|
|
39
|
+
- A published version is never changed: npm doesn't allow it, and products that installed it must get the same code tomorrow.
|
|
40
|
+
|
|
41
|
+
## Updating a product
|
|
42
|
+
|
|
43
|
+
Products depend on a caret range and take updates as reviewed pull requests, at their own pace.
|
|
44
|
+
|
|
45
|
+
`package.json`
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"@major-tech/ui": "^1.0.0"
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
yarn upgrade @major-tech/ui # or let Renovate open the pull request
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
- Read Latest updates between your version and the new one. Breaking changes come only in a major version, called out there.
|
|
58
|
+
- A product patched around a bug (`yarn patch` / `pnpm patch`)? Drop the patch in the update that brings the fix.
|
|
59
|
+
- Never copy a component into a product to change it. If it doesn't fit, open an issue: the fix belongs in the package.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Theming and dark mode
|
|
3
|
+
description: Every colour and shadow is a CSS variable with a light and a dark value. Switching theme is one attribute — on the page or on any subtree.
|
|
4
|
+
section: Getting started
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Theming and dark mode
|
|
8
|
+
|
|
9
|
+
Every colour and shadow is a CSS variable with a light and a dark value. Switching theme is one attribute — on the page or on any subtree.
|
|
10
|
+
|
|
11
|
+
## Switching theme
|
|
12
|
+
|
|
13
|
+
```html
|
|
14
|
+
<html data-theme="dark"> <!-- or class="dark" -->
|
|
15
|
+
…
|
|
16
|
+
<section data-theme="light"> <!-- a light island inside a dark page -->
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
With next-themes
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
import { ThemeProvider } from "next-themes";
|
|
23
|
+
|
|
24
|
+
<ThemeProvider attribute="data-theme" defaultTheme="system" enableSystem>
|
|
25
|
+
{children}
|
|
26
|
+
</ThemeProvider>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
- Tailwind's `dark:` variant follows `[data-theme=dark]` and `.dark`.
|
|
30
|
+
- Dark greys are blue-green tinted (panel #080D0D, surface #0C1112), never neutral. Don't hand-pick dark colours — use the tokens.
|
|
31
|
+
- Dark text: `ink` for content, `ink-nav` (80% white) for unselected navigation, `ink-strong` (pure white) only for the one selected item.
|
|
32
|
+
|
|
33
|
+
## Products, not themes
|
|
34
|
+
|
|
35
|
+
Major is one brand. Products don't re-theme colours; they choose layouts and components. If a product needs a new value, propose a token.
|
|
36
|
+
|
|
37
|
+
Allowed: product-level font loading and layout variables
|
|
38
|
+
|
|
39
|
+
```css
|
|
40
|
+
@theme inline {
|
|
41
|
+
--font-sans: var(--font-dm-sans, "DM Sans"), sans-serif;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* Not allowed: overriding --color-accent or other colour tokens in a product */
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Token formats
|
|
48
|
+
|
|
49
|
+
All generated from `tokens.json` and versioned with the components.
|
|
50
|
+
|
|
51
|
+
```tsx
|
|
52
|
+
@import "@major-tech/ui/tailwind.css"; /* the theme + lets Tailwind see the components' classes */
|
|
53
|
+
@import "@major-tech/ui/theme.css"; /* only the theme: CSS variables (--color-surface, --text-body…) and utilities */
|
|
54
|
+
import { tokens } from "@major-tech/ui/lib/major-tokens"; // typed values for charts, canvas, email
|
|
55
|
+
import source from "@major-tech/ui/tokens.json"; // the source, for Figma or Style Dictionary
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Change tokens in `packages/ui/tokens.json` in the design-system repository; everything above is regenerated from it.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Accessibility
|
|
3
|
+
description: "Components are built on Base UI primitives, so focus management, keyboard support and ARIA come with them. What's left is on us: contrast, labels and motion."
|
|
4
|
+
section: Guidelines
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Accessibility
|
|
8
|
+
|
|
9
|
+
Components are built on Base UI primitives, so focus management, keyboard support and ARIA come with them. What's left is on us: contrast, labels and motion.
|
|
10
|
+
|
|
11
|
+
## Contrast
|
|
12
|
+
|
|
13
|
+
- Text is 4.5:1 on its background in every theme (3:1 at 24px and above, for control borders, focus rings and icons). The Colors page measures every text token.
|
|
14
|
+
- `faint` is below 4.5:1 in both themes: use it only for 12px secondary text that is never the only carrier of meaning.
|
|
15
|
+
- Colours that must be told apart differ in lightness, not hue alone; blue/orange beats red/green.
|
|
16
|
+
|
|
17
|
+
## Names and roles
|
|
18
|
+
|
|
19
|
+
- Every icon-only control has an `aria-label`: an icon-size Button takes `aria-label` and a Tooltip with the same name.
|
|
20
|
+
- Never put actions or anything essential in a tooltip.
|
|
21
|
+
- Status that changes (toasts, Alert, Progress) is announced with `role=status` or `role=alert`.
|
|
22
|
+
- Selection is never shown by colour alone: location uses surface and shadow, choices add a check.
|
|
23
|
+
|
|
24
|
+
## Keyboard and motion
|
|
25
|
+
|
|
26
|
+
- Everything reachable with Tab; menus, selects and tabs move with arrow keys; Esc closes overlays and focus returns to the opener.
|
|
27
|
+
- Focus is always visible: a 2px accent-tinted ring.
|
|
28
|
+
- `prefers-reduced-motion` turns animation off globally (the theme handles it).
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Content and voice
|
|
3
|
+
description: "Write the way a person talks to a colleague: plain words, short sentences, no exclamation marks, no emoji in UI copy."
|
|
4
|
+
section: Guidelines
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Content and voice
|
|
8
|
+
|
|
9
|
+
Write the way a person talks to a colleague: plain words, short sentences, no exclamation marks, no emoji in UI copy.
|
|
10
|
+
|
|
11
|
+
## Rules
|
|
12
|
+
|
|
13
|
+
Do:
|
|
14
|
+
|
|
15
|
+
- Sentence case everywhere: “Create agent”, “Recently used”.
|
|
16
|
+
- Name things by what people recognise: Connectors, Skills, Runs.
|
|
17
|
+
- Agents' and skills' own content is theirs: agent names in Title Case (Daily Joke), skill names as slugs (standup-spinner-order), actions as connector.action.
|
|
18
|
+
- Uppercase only for small section labels (DETAILS, INSTRUCTIONS).
|
|
19
|
+
|
|
20
|
+
Don't:
|
|
21
|
+
|
|
22
|
+
- Internal terms, codes or IDs in UI copy.
|
|
23
|
+
- Exclamation marks and emoji.
|
|
24
|
+
- Title Case For Interface Labels.
|
|
25
|
+
- Describing what went wrong without saying what to do.
|
|
26
|
+
|
|
27
|
+
## Examples
|
|
28
|
+
|
|
29
|
+
| Where | Write | Not |
|
|
30
|
+
| --- | --- | --- |
|
|
31
|
+
| Buttons | Save changes · Publish · Delete skill | Submit · OK · Click here |
|
|
32
|
+
| Toasts | Saved as v5 · lead-scoring pinned to the top | Success! · Your changes have been saved successfully |
|
|
33
|
+
| Status | Used yesterday at 16:40 · Last run 4 min ago | STATUS_IDLE · Last execution: 2026-11-10T16:40Z |
|
|
34
|
+
| Confirmations | Delete lead-scoring? Agents that use it stop following it. | Are you sure? This action cannot be undone. |
|
|
35
|
+
| Errors | This subdomain is already taken · Fill in username first | Invalid input · Error 409 |
|
|
36
|
+
| Progress | Connecting… → GitHub connected · Building v10 → Built v10 | Please wait… → Done |
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Forms
|
|
3
|
+
description: Labels above, 34px fields, hints and errors below. Validate when it helps people choose; otherwise on leaving the field or on the action.
|
|
4
|
+
section: Guidelines
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Forms
|
|
8
|
+
|
|
9
|
+
Labels above, 34px fields, hints and errors below. Validate when it helps people choose; otherwise on leaving the field or on the action.
|
|
10
|
+
|
|
11
|
+
## Layout
|
|
12
|
+
|
|
13
|
+
- Each field is a [Field](../components/field.md): its FieldLabel sits above in 12px medium `ink-2` (`text-small font-medium`); required fields add a `danger` asterisk.
|
|
14
|
+
- FieldDescription and FieldError sit below in 12px (`muted` / `danger` with an icon).
|
|
15
|
+
- Short fields pair in the two columns of a FieldGroup (Host + Port, Username + Password); long ones span both.
|
|
16
|
+
- Hosts, URLs and keys are set in mono. Fixed parts of a value (“.major.app”) are InputGroup affixes, not placeholder text.
|
|
17
|
+
- Passwords use PasswordInput: masked, with a show/hide button inside the field.
|
|
18
|
+
- Optional settings go in a collapsed Accordion (“Advanced settings”), with a summary of what's on when collapsed.
|
|
19
|
+
|
|
20
|
+
## Choosing a control
|
|
21
|
+
|
|
22
|
+
| Control | Use it for |
|
|
23
|
+
| --- | --- |
|
|
24
|
+
| [Switch](../components/switch.md) | A single setting that applies immediately. |
|
|
25
|
+
| [Checkbox](../components/checkbox.md) | Several choices confirmed together. |
|
|
26
|
+
| [RadioGroup](../components/radio-group.md) | One of a few (2–5), all visible. |
|
|
27
|
+
| [Tabs](../components/tabs.md) | One of a few set in place, as segments: Monthly · Annual, Production · Staging. |
|
|
28
|
+
| [Select](../components/select.md) | One of many. Always the Major menu sheet, never the browser's native list. |
|
|
29
|
+
| [ToggleGroup](../components/toggle-group.md) | Answers and filters, as choice chips. |
|
|
30
|
+
| [Slider](../components/slider.md) | A number where the rough value matters more than the exact one. |
|
|
31
|
+
|
|
32
|
+
## Saving
|
|
33
|
+
|
|
34
|
+
- Editors collect changes: Cancel + Save changes replace Share + Publish while there are unsaved changes.
|
|
35
|
+
- Settings and configuration pages save as you go, confirmed by a toast (“Saved”, “Saved for Staging”).
|
|
36
|
+
- “Test connection” validates on the action and reports in place: “Connected in 217 ms”.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Principles
|
|
3
|
+
description: Six ideas behind every decision in the system. When a rule elsewhere doesn't cover your case, decide with these.
|
|
4
|
+
section: Guidelines
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Principles
|
|
8
|
+
|
|
9
|
+
Six ideas behind every decision in the system. When a rule elsewhere doesn't cover your case, decide with these.
|
|
10
|
+
|
|
11
|
+
1. **Calm, dense and quiet**: Major is where teams build apps, agents, skills and workflows that run inside their own organization. The interface stays out of the way of that work: greys on greys, small type, short motion.
|
|
12
|
+
2. **One green action per view**: Solid accent marks the single action the view exists for — Create agent, Publish, Connect. Everything else is a secondary button. If two things feel equally important, the view is doing two jobs.
|
|
13
|
+
3. **Colour means something**: Colour marks a tool type, a state, or the call to action. Never decoration, never a gradient (the Major mark is the one exception).
|
|
14
|
+
4. **Four kinds of things, equals**: Apps, agents, skills and workflows share the same list pages, editors, sharing and publishing. Build the pattern once and reuse it for all four.
|
|
15
|
+
5. **Say what happens**: Buttons say exactly what they do; toasts confirm in the past tense; errors say what to do next. Plain words, sentence case, no exclamation marks.
|
|
16
|
+
6. **Location, choice and check look different**: Where you are is white. A choice you made is an outline with a check. A form check is the link colour. People should never confuse the three.
|
|
17
|
+
|
|
18
|
+
## States, everywhere the same
|
|
19
|
+
|
|
20
|
+
- **Hover:** `hover` fill. **Focus:** a 2px accent-tinted ring; inputs get a `faint` border plus a 2px `secondary` halo.
|
|
21
|
+
- **Disabled:** 50% opacity, no pointer.
|
|
22
|
+
- **Working:** the control that started it shows a spinner and a present-tense label and stays disabled; nothing else on the page locks.
|
|
23
|
+
- **Unsaved changes:** a `warn` dot on the editor tab, "Unsaved changes" under the name, Cancel + Save changes replace Share + Publish. Settings pages save as you go, confirmed by a toast.
|
|
24
|
+
- **Locked:** the row dims its name and tile, shows a lock and says "No access" instead of controls.
|
|
25
|
+
|
|
26
|
+
## Overlays and feedback, smallest first
|
|
27
|
+
|
|
28
|
+
- Tooltip (names a control) → DropdownMenu and Select (pick) → Popover (anchored) → Dialog and the Share modal (focused task, page dimmed) → side panels (work alongside the page).
|
|
29
|
+
- One overlay at a time, except a DropdownMenu opened from inside a dialog.
|
|
30
|
+
- A toast (Sonner) — what just happened (2.8s). Alert — what is true now, until it changes. EmptyState — nothing here yet, and what to do.
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: useIsMobile
|
|
3
|
+
slug: use-is-mobile
|
|
4
|
+
description: Whether the viewport is narrower than 768px, for what a class can't do; null until that can be known.
|
|
5
|
+
status: beta
|
|
6
|
+
since: 0.4.0
|
|
7
|
+
import: import { useIsMobile } from "@major-tech/ui/hooks/use-is-mobile";
|
|
8
|
+
source: packages/ui/src/hooks/use-is-mobile.ts
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# useIsMobile
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
### Another layout on a phone
|
|
16
|
+
|
|
17
|
+
Members as a table from 768px up and as a list below it: each member's name over their email, their role on the right. The two differ too much to draw one and then switch, so a placeholder stands in while the hook returns `null`. Pick Phone in the preview's size menu to see the list.
|
|
18
|
+
|
|
19
|
+
Example: `members`
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
"use client";
|
|
23
|
+
|
|
24
|
+
import { AVATAR_SIZES, AVATAR_TONES, Avatar, AvatarFallback } from "@major-tech/ui/avatar";
|
|
25
|
+
import { BADGE_VARIANTS, Badge } from "@major-tech/ui/badge";
|
|
26
|
+
import { Card } from "@major-tech/ui/card";
|
|
27
|
+
import { useIsMobile } from "@major-tech/ui/hooks/use-is-mobile";
|
|
28
|
+
import { Skeleton } from "@major-tech/ui/skeleton";
|
|
29
|
+
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@major-tech/ui/table";
|
|
30
|
+
|
|
31
|
+
const MEMBERS = [
|
|
32
|
+
{ id: "ana", name: "Ana Pereira", initials: "AP", email: "ana@acme.com", role: "Owner", isSelf: true },
|
|
33
|
+
{ id: "kenji", name: "Kenji Watanabe", initials: "KW", email: "kenji@acme.com", role: "Admin", isSelf: false },
|
|
34
|
+
{ id: "lea", name: "Léa Martin", initials: "LM", email: "lea@acme.com", role: "Member", isSelf: false },
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
type Member = (typeof MEMBERS)[number];
|
|
38
|
+
|
|
39
|
+
function MemberAvatar({ member }: { member: Member }) {
|
|
40
|
+
return (
|
|
41
|
+
<Avatar size={AVATAR_SIZES.MD}>
|
|
42
|
+
<AvatarFallback tone={member.isSelf ? AVATAR_TONES.SELF : AVATAR_TONES.MUTED}>{member.initials}</AvatarFallback>
|
|
43
|
+
</Avatar>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export default function UseIsMobileMembers() {
|
|
48
|
+
const isMobile = useIsMobile();
|
|
49
|
+
|
|
50
|
+
// The list and the table differ too much to draw one and then switch: a placeholder until the width is known.
|
|
51
|
+
if (isMobile === null) {
|
|
52
|
+
return <Skeleton className="h-44 w-full rounded-xl" aria-label="Loading members" />;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (isMobile) {
|
|
56
|
+
return (
|
|
57
|
+
<Card className="w-full gap-0 overflow-hidden">
|
|
58
|
+
{MEMBERS.map((member) => (
|
|
59
|
+
<div
|
|
60
|
+
key={member.id}
|
|
61
|
+
className="flex items-center gap-space-12 border-b border-line px-space-16 py-space-12 last:border-b-0"
|
|
62
|
+
>
|
|
63
|
+
<MemberAvatar member={member} />
|
|
64
|
+
<div className="flex min-w-0 flex-1 flex-col">
|
|
65
|
+
<span className="truncate text-ui-strong text-ink">{member.name}</span>
|
|
66
|
+
<span className="truncate text-small text-muted">{member.email}</span>
|
|
67
|
+
</div>
|
|
68
|
+
<Badge variant={BADGE_VARIANTS.OUTLINE}>{member.role}</Badge>
|
|
69
|
+
</div>
|
|
70
|
+
))}
|
|
71
|
+
</Card>
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return (
|
|
76
|
+
<Table>
|
|
77
|
+
<TableHeader>
|
|
78
|
+
<TableRow>
|
|
79
|
+
<TableHead>Name</TableHead>
|
|
80
|
+
<TableHead>Email</TableHead>
|
|
81
|
+
<TableHead>Role</TableHead>
|
|
82
|
+
</TableRow>
|
|
83
|
+
</TableHeader>
|
|
84
|
+
<TableBody>
|
|
85
|
+
{MEMBERS.map((member) => (
|
|
86
|
+
<TableRow key={member.id}>
|
|
87
|
+
<TableCell>
|
|
88
|
+
<span className="flex items-center gap-space-8">
|
|
89
|
+
<MemberAvatar member={member} />
|
|
90
|
+
{member.name}
|
|
91
|
+
</span>
|
|
92
|
+
</TableCell>
|
|
93
|
+
<TableCell className="text-muted">{member.email}</TableCell>
|
|
94
|
+
<TableCell>
|
|
95
|
+
<Badge variant={BADGE_VARIANTS.OUTLINE}>{member.role}</Badge>
|
|
96
|
+
</TableCell>
|
|
97
|
+
</TableRow>
|
|
98
|
+
))}
|
|
99
|
+
</TableBody>
|
|
100
|
+
</Table>
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Guidelines
|
|
106
|
+
|
|
107
|
+
- `true` below 768px, `false` from 768px up: the width Tailwind's `md:` and `max-md:` switch at, and [ResponsiveOverlay](../components/responsive-overlay.md) with them.
|
|
108
|
+
- `null` on the server and in the render that hydrates the page's HTML, where the width can't be known. After that it is right from the first render, so a page opened by a client-side navigation never draws the desktop layout first.
|
|
109
|
+
- The component re-renders when the window crosses 768px.
|
|
110
|
+
|
|
111
|
+
Do:
|
|
112
|
+
|
|
113
|
+
- Render another component on a phone: a list for a table, a sheet for a dialog (ResponsiveOverlay does that one).
|
|
114
|
+
- Render nothing, or a neutral placeholder, while it's `null` when the two layouts differ enough that a switch would show.
|
|
115
|
+
- Let `null` read as desktop where a switch can't be seen: a condition reads it as `false`.
|
|
116
|
+
|
|
117
|
+
Don't:
|
|
118
|
+
|
|
119
|
+
- Styles that differ by width: use `md:` and `max-md:` classes, which need no JavaScript and never flash.
|
|
120
|
+
- Your own `matchMedia` for 768px: every part switches at the same width with this hook.
|
|
121
|
+
|
|
122
|
+
## API
|
|
123
|
+
|
|
124
|
+
```tsx
|
|
125
|
+
import { useIsMobile } from "@major-tech/ui/hooks/use-is-mobile";
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### `useIsMobile()`
|
|
129
|
+
|
|
130
|
+
Takes no arguments.
|
|
131
|
+
|
|
132
|
+
| Prop | Type | Default | Description |
|
|
133
|
+
| --- | --- | --- | --- |
|
|
134
|
+
| `Returns` | `boolean \| null` | — | `true` below 768px, `false` from 768px up, `null` while that can't be known. |
|