@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,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Calendar
|
|
3
|
+
slug: calendar
|
|
4
|
+
description: "A month grid for picking a day, several days or a range: shadcn's Calendar on react-day-picker."
|
|
5
|
+
group: Inputs
|
|
6
|
+
layer: primitive
|
|
7
|
+
status: beta
|
|
8
|
+
since: 0.4.0
|
|
9
|
+
import: import { Calendar, CalendarDayButton, CalendarProps, CalendarRange } from "@major-tech/ui/calendar";
|
|
10
|
+
source: packages/ui/src/components/calendar.tsx
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Calendar
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
### One day
|
|
18
|
+
|
|
19
|
+
`mode="single"`: the picked day is filled with ink, today has a dot under its number.
|
|
20
|
+
|
|
21
|
+
Example: `single`
|
|
22
|
+
|
|
23
|
+
```tsx
|
|
24
|
+
"use client";
|
|
25
|
+
|
|
26
|
+
import { useState } from "react";
|
|
27
|
+
import { Calendar } from "@major-tech/ui/calendar";
|
|
28
|
+
|
|
29
|
+
export default function CalendarSingle() {
|
|
30
|
+
const [day, setDay] = useState<Date | undefined>(() => new Date());
|
|
31
|
+
|
|
32
|
+
return <Calendar mode="single" selected={day} onSelect={setDay} className="rounded-xl border border-line p-space-12" />;
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### A range
|
|
37
|
+
|
|
38
|
+
`mode="range"`: both ends in ink and a chip band between them. `numberOfMonths` shows months side by side.
|
|
39
|
+
|
|
40
|
+
Example: `range`
|
|
41
|
+
|
|
42
|
+
```tsx
|
|
43
|
+
"use client";
|
|
44
|
+
|
|
45
|
+
import { useState } from "react";
|
|
46
|
+
import { Calendar, type CalendarRange } from "@major-tech/ui/calendar";
|
|
47
|
+
|
|
48
|
+
const RANGE_DAYS = 9;
|
|
49
|
+
|
|
50
|
+
export default function CalendarRangeExample() {
|
|
51
|
+
const [range, setRange] = useState<CalendarRange | undefined>(() => {
|
|
52
|
+
const to = new Date();
|
|
53
|
+
const from = new Date(to.getFullYear(), to.getMonth(), to.getDate() - RANGE_DAYS);
|
|
54
|
+
|
|
55
|
+
return { from, to };
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
return (
|
|
59
|
+
<Calendar
|
|
60
|
+
mode="range"
|
|
61
|
+
numberOfMonths={2}
|
|
62
|
+
selected={range}
|
|
63
|
+
onSelect={setRange}
|
|
64
|
+
defaultMonth={range?.from}
|
|
65
|
+
className="rounded-xl border border-line p-space-12"
|
|
66
|
+
/>
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Guidelines
|
|
72
|
+
|
|
73
|
+
- 34px days with a 6px radius; weekday names in small muted text; days of the next and previous month in faint.
|
|
74
|
+
- Six weeks always, so the grid keeps its height from month to month.
|
|
75
|
+
- No border or background of its own: it sits on the surface it's placed on (a Popover, a card).
|
|
76
|
+
|
|
77
|
+
Do:
|
|
78
|
+
|
|
79
|
+
- Inside a Popover under a field, or on a card for scheduling.
|
|
80
|
+
|
|
81
|
+
Don't:
|
|
82
|
+
|
|
83
|
+
- A time range with quick ranges and typed ends: use DateRangePicker, which is built on it.
|
|
84
|
+
- A date of birth or anything years away: a typed field is faster.
|
|
85
|
+
|
|
86
|
+
## API
|
|
87
|
+
|
|
88
|
+
```tsx
|
|
89
|
+
import { Calendar, CalendarDayButton, CalendarProps, CalendarRange } from "@major-tech/ui/calendar";
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### `<Calendar />`
|
|
93
|
+
|
|
94
|
+
shadcn's Calendar on react-day-picker: every DayPicker prop passes through (`mode`, `selected`, `onSelect`, `month`, `onMonthChange`, `numberOfMonths`, `disabled`, `onDayMouseEnter`, `modifiers`…).
|
|
95
|
+
|
|
96
|
+
| Prop | Type | Default | Description |
|
|
97
|
+
| --- | --- | --- | --- |
|
|
98
|
+
| `mode` | `"single" \| "multiple" \| "range"` | — | What a click picks. `selected` and `onSelect` follow it: a Date, Date[] or `{ from, to }` (CalendarRange). |
|
|
99
|
+
| `showOutsideDays` | `boolean` | `true` | Days of the months around it, in faint. |
|
|
100
|
+
| `fixedWeeks` | `boolean` | `true` | Always six weeks. |
|
|
101
|
+
| `classNames / components` | `object` | — | Replace a part's classes or a part (DayButton, Chevron) for a special grid. |
|
|
102
|
+
|
|
103
|
+
### `Parts`
|
|
104
|
+
|
|
105
|
+
| Prop | Type | Default | Description |
|
|
106
|
+
| --- | --- | --- | --- |
|
|
107
|
+
| `CalendarDayButton` | `DayButton` | — | The day it draws; reuse it when replacing `components.DayButton` to add to a day. |
|
|
108
|
+
|
|
109
|
+
### Accessibility
|
|
110
|
+
|
|
111
|
+
- A grid with the month as its label; each day's name reads in full (react-day-picker).
|
|
112
|
+
- Arrows move by day and week, Page Up/Down by month (Shift: a year), Home/End to the week's ends, Enter picks.
|
|
113
|
+
- `autoFocus` puts focus on the picked day or today when it mounts, as inside a popover.
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Card
|
|
3
|
+
slug: card
|
|
4
|
+
description: "The surface for things that sit on the page: list cards, catalog cards, settings sections."
|
|
5
|
+
group: Layout
|
|
6
|
+
layer: primitive
|
|
7
|
+
status: stable
|
|
8
|
+
since: 0.3.0
|
|
9
|
+
import: import { Card, CardHeader, CardTitle, CardDescription, CardAction, CardContent, CardFooter } from "@major-tech/ui/card";
|
|
10
|
+
source: packages/ui/src/components/card.tsx
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Card
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
### List cards
|
|
18
|
+
|
|
19
|
+
The surface a library's cards are built on: 14/14/12 padding, a one-line title with the overflow menu, a two-line description, and the owner and last edit in the footer. For apps, agents, skills and workflows use EntityCard, which composes it.
|
|
20
|
+
|
|
21
|
+
Example: `list-cards`
|
|
22
|
+
|
|
23
|
+
```tsx
|
|
24
|
+
import { Avatar, AvatarFallback } from "@major-tech/ui/avatar";
|
|
25
|
+
import { Button } from "@major-tech/ui/button";
|
|
26
|
+
import { Card, CardAction, CardDescription, CardFooter, CardHeader, CardTitle } from "@major-tech/ui/card";
|
|
27
|
+
import { EllipsisVertical } from "lucide-react";
|
|
28
|
+
|
|
29
|
+
const AGENTS = [
|
|
30
|
+
{
|
|
31
|
+
name: "Website visitor enrichment",
|
|
32
|
+
description: "Looks up every new website visitor in HubSpot and posts qualified leads to #sales.",
|
|
33
|
+
edited: "Edited 2 days ago",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: "Daily Joke",
|
|
37
|
+
description: "Writes one original, work-friendly joke each weekday at 12:00 and sends it as a Slack DM.",
|
|
38
|
+
edited: "Edited today at 09:25",
|
|
39
|
+
},
|
|
40
|
+
];
|
|
41
|
+
|
|
42
|
+
export default function CardListCards() {
|
|
43
|
+
return (
|
|
44
|
+
<div className="grid w-full grid-cols-[repeat(auto-fill,minmax(18.75rem,1fr))] gap-space-12">
|
|
45
|
+
{AGENTS.map((agent) => (
|
|
46
|
+
<Card key={agent.name} className="px-space-14 pt-space-14 pb-space-12">
|
|
47
|
+
<CardHeader>
|
|
48
|
+
<CardTitle>{agent.name}</CardTitle>
|
|
49
|
+
<CardAction>
|
|
50
|
+
<Button variant="ghost" size="icon" className="-mt-0.75 -mr-space-6" aria-label="Options">
|
|
51
|
+
<EllipsisVertical />
|
|
52
|
+
</Button>
|
|
53
|
+
</CardAction>
|
|
54
|
+
</CardHeader>
|
|
55
|
+
<CardDescription className="line-clamp-2">{agent.description}</CardDescription>
|
|
56
|
+
<CardFooter>
|
|
57
|
+
<Avatar>
|
|
58
|
+
<AvatarFallback>MC</AvatarFallback>
|
|
59
|
+
</Avatar>
|
|
60
|
+
<span className="text-ink-2">Maya Chen</span>
|
|
61
|
+
<span className="ml-auto">{agent.edited}</span>
|
|
62
|
+
</CardFooter>
|
|
63
|
+
</Card>
|
|
64
|
+
))}
|
|
65
|
+
</div>
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### With content
|
|
71
|
+
|
|
72
|
+
Settings sections and hover cards put their own content in CardContent. Parts sit 10px apart.
|
|
73
|
+
|
|
74
|
+
Example: `with-content`
|
|
75
|
+
|
|
76
|
+
```tsx
|
|
77
|
+
import { Button } from "@major-tech/ui/button";
|
|
78
|
+
import { Card, CardAction, CardContent, CardDescription, CardHeader, CardTitle } from "@major-tech/ui/card";
|
|
79
|
+
import { Progress } from "@major-tech/ui/progress";
|
|
80
|
+
|
|
81
|
+
const STORAGE_USED_GB = 1.4;
|
|
82
|
+
const STORAGE_LIMIT_GB = 10;
|
|
83
|
+
|
|
84
|
+
export default function CardWithContent() {
|
|
85
|
+
return (
|
|
86
|
+
<Card className="w-full max-w-110 p-space-16">
|
|
87
|
+
<CardHeader>
|
|
88
|
+
<div className="flex min-w-0 flex-1 flex-col gap-0.5">
|
|
89
|
+
<CardTitle>Storage</CardTitle>
|
|
90
|
+
<CardDescription>Files your agents and apps keep between runs.</CardDescription>
|
|
91
|
+
</div>
|
|
92
|
+
<CardAction>
|
|
93
|
+
<Button variant="outline" size="sm">
|
|
94
|
+
Manage
|
|
95
|
+
</Button>
|
|
96
|
+
</CardAction>
|
|
97
|
+
</CardHeader>
|
|
98
|
+
<CardContent className="flex flex-col gap-space-8">
|
|
99
|
+
<div className="flex justify-between text-ui">
|
|
100
|
+
<span className="text-ink">Used</span>
|
|
101
|
+
<span className="text-muted">
|
|
102
|
+
{STORAGE_USED_GB} GB of {STORAGE_LIMIT_GB} GB
|
|
103
|
+
</span>
|
|
104
|
+
</div>
|
|
105
|
+
<Progress value={(STORAGE_USED_GB / STORAGE_LIMIT_GB) * 100} aria-label="Storage used" />
|
|
106
|
+
</CardContent>
|
|
107
|
+
</Card>
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Guidelines
|
|
113
|
+
|
|
114
|
+
- Padding is set per use: list cards `px-space-14 pt-space-14 pb-space-12`, catalog cards `p-space-16`, plan cards `p-4.5`.
|
|
115
|
+
- A clickable card lifts 1px on hover with a deeper shadow: `hover:-translate-y-px hover:shadow-pop`.
|
|
116
|
+
|
|
117
|
+
Do:
|
|
118
|
+
|
|
119
|
+
- One card per thing: an agent, a connector, a plan.
|
|
120
|
+
- Lay cards out on a grid with gaps, all the same height in a row.
|
|
121
|
+
- Keep the title to one line; the description to two.
|
|
122
|
+
|
|
123
|
+
Don't:
|
|
124
|
+
|
|
125
|
+
- Cards inside cards.
|
|
126
|
+
- A card around a single line of text or one control.
|
|
127
|
+
- Borders or shadows of your own on top of the card's.
|
|
128
|
+
|
|
129
|
+
## API
|
|
130
|
+
|
|
131
|
+
```tsx
|
|
132
|
+
import { Card, CardHeader, CardTitle, CardDescription, CardAction, CardContent, CardFooter } from "@major-tech/ui/card";
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### `<Card />`
|
|
136
|
+
|
|
137
|
+
Every part also accepts native `<div>` attributes.
|
|
138
|
+
|
|
139
|
+
| Prop | Type | Default | Description |
|
|
140
|
+
| --- | --- | --- | --- |
|
|
141
|
+
| `className` | `string` | — | Padding for this use. The card is a flex column with a 10px gap. |
|
|
142
|
+
|
|
143
|
+
### `Parts`
|
|
144
|
+
|
|
145
|
+
| Prop | Type | Default | Description |
|
|
146
|
+
| --- | --- | --- | --- |
|
|
147
|
+
| `<CardHeader />` | `<div>` | — | The title row: flex, 8px gap, items at the top. |
|
|
148
|
+
| `<CardTitle />` | `<div>` | — | card-title (14.5px semibold), one line, truncated. |
|
|
149
|
+
| `<CardDescription />` | `<div>` | — | 13px muted text. Clamp it with `line-clamp-2` in lists. |
|
|
150
|
+
| `<CardAction />` | `<div>` | — | Pushed to the end of the header: a ghost icon Button or a small Button. |
|
|
151
|
+
| `<CardContent />` | `<div>` | — | Anything else; no styles of its own. |
|
|
152
|
+
| `<CardFooter />` | `<div>` | — | Meta under a line divider, 12px muted: owner, last edit. |
|
|
153
|
+
|
|
154
|
+
### Accessibility
|
|
155
|
+
|
|
156
|
+
- A card is a plain `<div>`. When cards form a list people skim by heading, put an `<h3>` inside CardTitle.
|
|
157
|
+
- For a clickable card, make the title the link and stretch its hit area; don't nest buttons inside a link.
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Carousel
|
|
3
|
+
slug: carousel
|
|
4
|
+
description: "One slide at a time, turned by arrows, a swipe, the keys or a timer: screenshots side by side, a status line that rolls over."
|
|
5
|
+
group: Layout
|
|
6
|
+
layer: primitive
|
|
7
|
+
status: beta
|
|
8
|
+
since: 0.4.0
|
|
9
|
+
import: import { Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext, CAROUSEL_ORIENTATIONS } from "@major-tech/ui/carousel";
|
|
10
|
+
source: packages/ui/src/components/carousel.tsx
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Carousel
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
One slide at a time. The arrows, a swipe, the arrow keys or a timer turn it; the slide slides in, or swaps at once with reduced motion.
|
|
18
|
+
|
|
19
|
+
### A status line that rolls over
|
|
20
|
+
|
|
21
|
+
Short lines about what is happening, one at a time, rolling up on a timer and around again. Vertical, `loop`, `autoplay`; give the carousel a line's height.
|
|
22
|
+
|
|
23
|
+
Example: `status-line`
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
"use client";
|
|
27
|
+
|
|
28
|
+
import { CAROUSEL_ORIENTATIONS, Carousel, CarouselContent, CarouselItem } from "@major-tech/ui/carousel";
|
|
29
|
+
|
|
30
|
+
const STATUS_LINES = ["Installing packages…", "Starting the dev server…", "Connecting the database…", "Almost there…"];
|
|
31
|
+
const ROLL_EVERY_MS = 3000;
|
|
32
|
+
|
|
33
|
+
export default function CarouselStatusLine() {
|
|
34
|
+
return (
|
|
35
|
+
<Carousel
|
|
36
|
+
orientation={CAROUSEL_ORIENTATIONS.VERTICAL}
|
|
37
|
+
loop
|
|
38
|
+
autoplay={ROLL_EVERY_MS}
|
|
39
|
+
aria-label="Status"
|
|
40
|
+
className="h-6 w-64"
|
|
41
|
+
>
|
|
42
|
+
<CarouselContent>
|
|
43
|
+
{STATUS_LINES.map((line) => (
|
|
44
|
+
<CarouselItem key={line} className="flex items-center justify-center">
|
|
45
|
+
<p className="m-0 text-ui text-muted">{line}</p>
|
|
46
|
+
</CarouselItem>
|
|
47
|
+
))}
|
|
48
|
+
</CarouselContent>
|
|
49
|
+
</Carousel>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
- The timer pauses while the pointer is over it, while it has focus and in a hidden tab.
|
|
55
|
+
- One line needs no carousel: show it as text.
|
|
56
|
+
|
|
57
|
+
### Side by side
|
|
58
|
+
|
|
59
|
+
A few screens or pictures the person looks through: the round arrow buttons sit on the edges, and a swipe turns it on touch.
|
|
60
|
+
|
|
61
|
+
Example: `screenshots`
|
|
62
|
+
|
|
63
|
+
```tsx
|
|
64
|
+
"use client";
|
|
65
|
+
|
|
66
|
+
import { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from "@major-tech/ui/carousel";
|
|
67
|
+
|
|
68
|
+
const SCREENS = [
|
|
69
|
+
{ title: "Orders", note: "Every order with its status and owner." },
|
|
70
|
+
{ title: "Order", note: "One order: items, payments and the timeline." },
|
|
71
|
+
{ title: "Customers", note: "Who orders most, and who stopped." },
|
|
72
|
+
];
|
|
73
|
+
|
|
74
|
+
export default function CarouselScreenshots() {
|
|
75
|
+
return (
|
|
76
|
+
<Carousel aria-label="Template screens" className="w-full max-w-120">
|
|
77
|
+
<CarouselContent className="rounded-xl border border-line">
|
|
78
|
+
{SCREENS.map((screen) => (
|
|
79
|
+
<CarouselItem
|
|
80
|
+
key={screen.title}
|
|
81
|
+
className="flex h-56 flex-col items-center justify-center gap-space-4 bg-panel"
|
|
82
|
+
>
|
|
83
|
+
<p className="m-0 text-card-title text-ink">{screen.title}</p>
|
|
84
|
+
<p className="m-0 text-ui text-muted">{screen.note}</p>
|
|
85
|
+
</CarouselItem>
|
|
86
|
+
))}
|
|
87
|
+
</CarouselContent>
|
|
88
|
+
<CarouselPrevious />
|
|
89
|
+
<CarouselNext />
|
|
90
|
+
</Carousel>
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
- Without `loop` the arrow at an end hides.
|
|
96
|
+
- Keep it to a few slides; many belong in a grid.
|
|
97
|
+
|
|
98
|
+
### Guidelines
|
|
99
|
+
|
|
100
|
+
Do:
|
|
101
|
+
|
|
102
|
+
- Name it with `aria-label`: "Status", "Template screens".
|
|
103
|
+
- Keep a timed carousel to text that can be missed: nothing a person must read.
|
|
104
|
+
|
|
105
|
+
Don't:
|
|
106
|
+
|
|
107
|
+
- Hide controls on slides people must use: a slide that isn't shown can't be focused.
|
|
108
|
+
- Time a carousel of pictures people look through.
|
|
109
|
+
|
|
110
|
+
## API
|
|
111
|
+
|
|
112
|
+
```tsx
|
|
113
|
+
import { Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext, CAROUSEL_ORIENTATIONS } from "@major-tech/ui/carousel";
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### `<Carousel />`
|
|
117
|
+
|
|
118
|
+
| Prop | Type | Default | Description |
|
|
119
|
+
| --- | --- | --- | --- |
|
|
120
|
+
| `orientation` | `"horizontal" \| "vertical"` | `"horizontal"` | CAROUSEL_ORIENTATIONS. Vertical slides need a height on the carousel. |
|
|
121
|
+
| `loop` | `boolean` | `false` | After the last slide the first, and before the first the last. |
|
|
122
|
+
| `autoplay` | `number` | — | Turns on every this many milliseconds. |
|
|
123
|
+
| `index` | `number` | — | The slide shown, controlled. |
|
|
124
|
+
| `defaultIndex` | `number` | `0` | The slide shown on mount. |
|
|
125
|
+
| `onIndexChange` | `(index: number) => void` | — | Called as the slide turns. |
|
|
126
|
+
| `aria-label` | `string` | — | What the slides are. |
|
|
127
|
+
|
|
128
|
+
### `<CarouselContent />`
|
|
129
|
+
|
|
130
|
+
The window onto the slides: it clips them and follows a swipe. Its children are CarouselItems.
|
|
131
|
+
|
|
132
|
+
### `<CarouselItem />`
|
|
133
|
+
|
|
134
|
+
One slide, the carousel's full width (or height).
|
|
135
|
+
|
|
136
|
+
### `<CarouselPrevious />`, `<CarouselNext />`
|
|
137
|
+
|
|
138
|
+
Round outline icon buttons on the start and end edges (top and bottom when vertical), hidden while there is nothing that way.
|
|
139
|
+
|
|
140
|
+
### Accessibility
|
|
141
|
+
|
|
142
|
+
- It is a region announced as a carousel, each slide a group named "2 of 4".
|
|
143
|
+
- The arrow keys turn it while it has focus: left and right, or up and down when vertical.
|
|
144
|
+
- Slides that aren't shown are hidden from screen readers and can't be focused.
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: CatalogCard
|
|
3
|
+
slug: catalog-card
|
|
4
|
+
description: One connector in the Add connector catalog.
|
|
5
|
+
group: Library
|
|
6
|
+
layer: composed
|
|
7
|
+
status: stable
|
|
8
|
+
since: 0.1.0
|
|
9
|
+
import: import { CatalogCard, CatalogIconTile } from "@major-tech/ui/catalog-card";
|
|
10
|
+
source: packages/ui/src/components/catalog-card.tsx
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# CatalogCard
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
### The catalog
|
|
18
|
+
|
|
19
|
+
Brand tile, name, what it does, and whether you already have one. The whole card is a button that opens the connect Dialog; click one to see Connecting….
|
|
20
|
+
|
|
21
|
+
Example: `catalog`
|
|
22
|
+
|
|
23
|
+
```tsx
|
|
24
|
+
"use client";
|
|
25
|
+
|
|
26
|
+
import { useState } from "react";
|
|
27
|
+
import { CatalogCard, CatalogIconTile } from "@major-tech/ui/catalog-card";
|
|
28
|
+
import { Code } from "lucide-react";
|
|
29
|
+
|
|
30
|
+
/** Stands in for the OAuth round trip. */
|
|
31
|
+
const CONNECT_DURATION_MS = 1800;
|
|
32
|
+
|
|
33
|
+
const CONNECTORS = [
|
|
34
|
+
{ name: "Gmail", description: "Read, draft and send email", color: "#B3261E", isConnected: true },
|
|
35
|
+
{ name: "Microsoft Teams", description: "Chats, channels and meetings", color: "#4B53BC", isConnected: false },
|
|
36
|
+
{ name: "Twilio", description: "Send texts and make calls", color: "#F22F46", isConnected: false },
|
|
37
|
+
{ name: "Slack", description: "Messages, channels and people", color: "#4A154B", isConnected: true },
|
|
38
|
+
];
|
|
39
|
+
|
|
40
|
+
export default function CatalogCardCatalog() {
|
|
41
|
+
const [connectingName, setConnectingName] = useState<string | null>(null);
|
|
42
|
+
|
|
43
|
+
const handleConnect = (name: string) => {
|
|
44
|
+
setConnectingName(name);
|
|
45
|
+
setTimeout(() => setConnectingName(null), CONNECT_DURATION_MS);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<section className="flex w-full flex-col gap-space-10">
|
|
50
|
+
<h5 className="flex items-baseline gap-space-8 text-md text-ink">
|
|
51
|
+
Communication <span className="text-ui font-normal text-muted">{CONNECTORS.length + 1}</span>
|
|
52
|
+
</h5>
|
|
53
|
+
<div className="grid grid-cols-[repeat(auto-fill,minmax(230px,1fr))] gap-space-12">
|
|
54
|
+
{CONNECTORS.map((connector) => (
|
|
55
|
+
<CatalogCard
|
|
56
|
+
key={connector.name}
|
|
57
|
+
name={connector.name}
|
|
58
|
+
description={connector.description}
|
|
59
|
+
brandColor={connector.color}
|
|
60
|
+
connected={connector.isConnected}
|
|
61
|
+
connecting={connectingName === connector.name}
|
|
62
|
+
onClick={() => handleConnect(connector.name)}
|
|
63
|
+
/>
|
|
64
|
+
))}
|
|
65
|
+
<CatalogCard
|
|
66
|
+
name="Custom API"
|
|
67
|
+
description="Connect any REST API with your own code"
|
|
68
|
+
tile={
|
|
69
|
+
<CatalogIconTile>
|
|
70
|
+
<Code />
|
|
71
|
+
</CatalogIconTile>
|
|
72
|
+
}
|
|
73
|
+
/>
|
|
74
|
+
</div>
|
|
75
|
+
</section>
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
- Built on Card: surface, rounded-xl, shadow-card, 16px padding, at least 124px tall. The border darkens on hover.
|
|
81
|
+
- Grid: `repeat(auto-fill, minmax(230px, 1fr))` with 12px gaps, under category headings with a count (“Communication 5”).
|
|
82
|
+
- 36px BrandTile, name 14px semibold, a two-line description in muted 13px. A live “Connected” Badge top-right when you already use the service.
|
|
83
|
+
- Above the grid: a full-width search (“Search 43 connectors”) and a row of category filter chips (a ToggleGroup).
|
|
84
|
+
|
|
85
|
+
### Guidelines
|
|
86
|
+
|
|
87
|
+
Do:
|
|
88
|
+
|
|
89
|
+
- Describe what it lets Major do: “Read, draft and send email”.
|
|
90
|
+
- Use letter tiles in the brand colour; icon tiles for connectors people build.
|
|
91
|
+
- Show progress on the card that started it.
|
|
92
|
+
|
|
93
|
+
Don't:
|
|
94
|
+
|
|
95
|
+
- Real logos.
|
|
96
|
+
- Buttons inside the card — the card is the button.
|
|
97
|
+
- Hide connected services; badge them instead.
|
|
98
|
+
|
|
99
|
+
## API
|
|
100
|
+
|
|
101
|
+
```tsx
|
|
102
|
+
import { CatalogCard, CatalogIconTile } from "@major-tech/ui/catalog-card";
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### `<CatalogCard />`
|
|
106
|
+
|
|
107
|
+
A `<button>` inside a Card; `className` goes to the Card, other native button attributes and the ref to the button.
|
|
108
|
+
|
|
109
|
+
| Prop | Type | Default | Description |
|
|
110
|
+
| --- | --- | --- | --- |
|
|
111
|
+
| `name`* | `string` | — | Connector name. |
|
|
112
|
+
| `description` | `ReactNode` | — | Two-line clamp. |
|
|
113
|
+
| `brandColor` | `string` | — | Tile colour. |
|
|
114
|
+
| `brandLetter` | `string` | — | Tile letter; defaults to the first letter. |
|
|
115
|
+
| `tile` | `ReactNode` | — | Replace the letter tile: a CatalogIconTile (a BrandTile icon tile) or any BrandTile. |
|
|
116
|
+
| `connected` | `boolean` | `false` | Shows the Connected badge. |
|
|
117
|
+
| `connecting` | `boolean` | `false` | Spinner + “Connecting…”, disables the card. |
|
|
118
|
+
|
|
119
|
+
`*` marks a required prop.
|
|
120
|
+
|
|
121
|
+
### `<CatalogIconTile />`
|
|
122
|
+
|
|
123
|
+
The 36px BrandTile icon tile for connectors people build (Custom API, MCP, Webhook): pass it as `tile`.
|
|
124
|
+
|
|
125
|
+
| Prop | Type | Default | Description |
|
|
126
|
+
| --- | --- | --- | --- |
|
|
127
|
+
| `children`* | `ReactNode` | — | The Lucide icon: `<Code />`, `<Plug />`. |
|
|
128
|
+
| `className` | `string` | — | On the tile. |
|
|
129
|
+
|
|
130
|
+
`*` marks a required prop.
|
|
131
|
+
|
|
132
|
+
### Accessibility
|
|
133
|
+
|
|
134
|
+
- One button per card: its name and description are the accessible name.
|
|
135
|
+
- `connecting` sets `aria-busy` and disables the card.
|
|
136
|
+
- The tile is decorative (`aria-hidden`).
|