@mohou/ui 1.0.20
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/README.md +10 -0
- package/lib/types/blocks/activity-feed.d.ts +12 -0
- package/lib/types/blocks/activity-feed.d.ts.map +1 -0
- package/lib/types/blocks/app-shell.d.ts +17 -0
- package/lib/types/blocks/app-shell.d.ts.map +1 -0
- package/lib/types/blocks/attachment-gallery.d.ts +15 -0
- package/lib/types/blocks/attachment-gallery.d.ts.map +1 -0
- package/lib/types/blocks/bar-chart.d.ts +19 -0
- package/lib/types/blocks/bar-chart.d.ts.map +1 -0
- package/lib/types/blocks/comment-thread.d.ts +17 -0
- package/lib/types/blocks/comment-thread.d.ts.map +1 -0
- package/lib/types/blocks/dashboard-shell.d.ts +35 -0
- package/lib/types/blocks/dashboard-shell.d.ts.map +1 -0
- package/lib/types/blocks/description-list.d.ts +14 -0
- package/lib/types/blocks/description-list.d.ts.map +1 -0
- package/lib/types/blocks/detail-panel.d.ts +16 -0
- package/lib/types/blocks/detail-panel.d.ts.map +1 -0
- package/lib/types/blocks/donut-chart.d.ts +21 -0
- package/lib/types/blocks/donut-chart.d.ts.map +1 -0
- package/lib/types/blocks/env-badge.d.ts +11 -0
- package/lib/types/blocks/env-badge.d.ts.map +1 -0
- package/lib/types/blocks/env-table.d.ts +29 -0
- package/lib/types/blocks/env-table.d.ts.map +1 -0
- package/lib/types/blocks/file-tree.d.ts +12 -0
- package/lib/types/blocks/file-tree.d.ts.map +1 -0
- package/lib/types/blocks/filter-bar.d.ts +15 -0
- package/lib/types/blocks/filter-bar.d.ts.map +1 -0
- package/lib/types/blocks/form-sheet.d.ts +47 -0
- package/lib/types/blocks/form-sheet.d.ts.map +1 -0
- package/lib/types/blocks/gauge.d.ts +14 -0
- package/lib/types/blocks/gauge.d.ts.map +1 -0
- package/lib/types/blocks/list-detail.d.ts +42 -0
- package/lib/types/blocks/list-detail.d.ts.map +1 -0
- package/lib/types/blocks/notification-center.d.ts +16 -0
- package/lib/types/blocks/notification-center.d.ts.map +1 -0
- package/lib/types/blocks/page-header.d.ts +15 -0
- package/lib/types/blocks/page-header.d.ts.map +1 -0
- package/lib/types/blocks/progress-ring.d.ts +13 -0
- package/lib/types/blocks/progress-ring.d.ts.map +1 -0
- package/lib/types/blocks/radar-chart.d.ts +19 -0
- package/lib/types/blocks/radar-chart.d.ts.map +1 -0
- package/lib/types/blocks/request-inspector.d.ts +14 -0
- package/lib/types/blocks/request-inspector.d.ts.map +1 -0
- package/lib/types/blocks/reveal.d.ts +30 -0
- package/lib/types/blocks/reveal.d.ts.map +1 -0
- package/lib/types/blocks/run-timeline.d.ts +12 -0
- package/lib/types/blocks/run-timeline.d.ts.map +1 -0
- package/lib/types/blocks/scrollspy.d.ts +15 -0
- package/lib/types/blocks/scrollspy.d.ts.map +1 -0
- package/lib/types/blocks/settings-split.d.ts +47 -0
- package/lib/types/blocks/settings-split.d.ts.map +1 -0
- package/lib/types/blocks/severity-chip.d.ts +23 -0
- package/lib/types/blocks/severity-chip.d.ts.map +1 -0
- package/lib/types/blocks/sparkline.d.ts +14 -0
- package/lib/types/blocks/sparkline.d.ts.map +1 -0
- package/lib/types/blocks/stat-card.d.ts +17 -0
- package/lib/types/blocks/stat-card.d.ts.map +1 -0
- package/lib/types/blocks/status-badge.d.ts +21 -0
- package/lib/types/blocks/status-badge.d.ts.map +1 -0
- package/lib/types/blocks/table-page.d.ts +35 -0
- package/lib/types/blocks/table-page.d.ts.map +1 -0
- package/lib/types/blocks/terminal.d.ts +12 -0
- package/lib/types/blocks/terminal.d.ts.map +1 -0
- package/lib/types/blocks/test-step-list.d.ts +17 -0
- package/lib/types/blocks/test-step-list.d.ts.map +1 -0
- package/lib/types/blocks/trend-card.d.ts +20 -0
- package/lib/types/blocks/trend-card.d.ts.map +1 -0
- package/lib/types/blocks/wizard-shell.d.ts +47 -0
- package/lib/types/blocks/wizard-shell.d.ts.map +1 -0
- package/lib/types/components/accordion.d.ts +14 -0
- package/lib/types/components/accordion.d.ts.map +1 -0
- package/lib/types/components/alert-dialog.d.ts +26 -0
- package/lib/types/components/alert-dialog.d.ts.map +1 -0
- package/lib/types/components/alert.d.ts +18 -0
- package/lib/types/components/alert.d.ts.map +1 -0
- package/lib/types/components/aspect-ratio.d.ts +9 -0
- package/lib/types/components/aspect-ratio.d.ts.map +1 -0
- package/lib/types/components/attachment.d.ts +28 -0
- package/lib/types/components/attachment.d.ts.map +1 -0
- package/lib/types/components/avatar.d.ts +16 -0
- package/lib/types/components/avatar.d.ts.map +1 -0
- package/lib/types/components/badge.d.ts +15 -0
- package/lib/types/components/badge.d.ts.map +1 -0
- package/lib/types/components/breadcrumb.d.ts +15 -0
- package/lib/types/components/breadcrumb.d.ts.map +1 -0
- package/lib/types/components/bubble.d.ts +21 -0
- package/lib/types/components/bubble.d.ts.map +1 -0
- package/lib/types/components/button-group.d.ts +17 -0
- package/lib/types/components/button-group.d.ts.map +1 -0
- package/lib/types/components/button.d.ts +16 -0
- package/lib/types/components/button.d.ts.map +1 -0
- package/lib/types/components/calendar.d.ts +15 -0
- package/lib/types/components/calendar.d.ts.map +1 -0
- package/lib/types/components/card.d.ts +19 -0
- package/lib/types/components/card.d.ts.map +1 -0
- package/lib/types/components/chart.d.ts +52 -0
- package/lib/types/components/chart.d.ts.map +1 -0
- package/lib/types/components/checkbox.d.ts +9 -0
- package/lib/types/components/checkbox.d.ts.map +1 -0
- package/lib/types/components/collapsible.d.ts +10 -0
- package/lib/types/components/collapsible.d.ts.map +1 -0
- package/lib/types/components/combobox.d.ts +29 -0
- package/lib/types/components/combobox.d.ts.map +1 -0
- package/lib/types/components/command.d.ts +26 -0
- package/lib/types/components/command.d.ts.map +1 -0
- package/lib/types/components/context-menu.d.ts +34 -0
- package/lib/types/components/context-menu.d.ts.map +1 -0
- package/lib/types/components/dialog.d.ts +30 -0
- package/lib/types/components/dialog.d.ts.map +1 -0
- package/lib/types/components/drawer.d.ts +21 -0
- package/lib/types/components/drawer.d.ts.map +1 -0
- package/lib/types/components/dropdown-menu.d.ts +37 -0
- package/lib/types/components/dropdown-menu.d.ts.map +1 -0
- package/lib/types/components/empty.d.ts +24 -0
- package/lib/types/components/empty.d.ts.map +1 -0
- package/lib/types/components/field.d.ts +31 -0
- package/lib/types/components/field.d.ts.map +1 -0
- package/lib/types/components/hover-card.d.ts +10 -0
- package/lib/types/components/hover-card.d.ts.map +1 -0
- package/lib/types/components/input-group.d.ts +23 -0
- package/lib/types/components/input-group.d.ts.map +1 -0
- package/lib/types/components/input.d.ts +11 -0
- package/lib/types/components/input.d.ts.map +1 -0
- package/lib/types/components/item.d.ts +27 -0
- package/lib/types/components/item.d.ts.map +1 -0
- package/lib/types/components/kbd.d.ts +8 -0
- package/lib/types/components/kbd.d.ts.map +1 -0
- package/lib/types/components/label.d.ts +11 -0
- package/lib/types/components/label.d.ts.map +1 -0
- package/lib/types/components/marker.d.ts +15 -0
- package/lib/types/components/marker.d.ts.map +1 -0
- package/lib/types/components/menubar.d.ts +34 -0
- package/lib/types/components/menubar.d.ts.map +1 -0
- package/lib/types/components/message-scroller.d.ts +15 -0
- package/lib/types/components/message-scroller.d.ts.map +1 -0
- package/lib/types/components/message.d.ts +15 -0
- package/lib/types/components/message.d.ts.map +1 -0
- package/lib/types/components/native-select.d.ts +13 -0
- package/lib/types/components/native-select.d.ts.map +1 -0
- package/lib/types/components/navigation-menu.d.ts +16 -0
- package/lib/types/components/navigation-menu.d.ts.map +1 -0
- package/lib/types/components/pagination.d.ts +22 -0
- package/lib/types/components/pagination.d.ts.map +1 -0
- package/lib/types/components/popover.d.ts +17 -0
- package/lib/types/components/popover.d.ts.map +1 -0
- package/lib/types/components/progress.d.ts +15 -0
- package/lib/types/components/progress.d.ts.map +1 -0
- package/lib/types/components/questionnaire.d.ts +24 -0
- package/lib/types/components/questionnaire.d.ts.map +1 -0
- package/lib/types/components/radio-group.d.ts +10 -0
- package/lib/types/components/radio-group.d.ts.map +1 -0
- package/lib/types/components/resizable.d.ts +15 -0
- package/lib/types/components/resizable.d.ts.map +1 -0
- package/lib/types/components/scroll-area.d.ts +9 -0
- package/lib/types/components/scroll-area.d.ts.map +1 -0
- package/lib/types/components/select.d.ts +23 -0
- package/lib/types/components/select.d.ts.map +1 -0
- package/lib/types/components/separator.d.ts +9 -0
- package/lib/types/components/separator.d.ts.map +1 -0
- package/lib/types/components/sheet.d.ts +28 -0
- package/lib/types/components/sheet.d.ts.map +1 -0
- package/lib/types/components/sidebar.d.ts +68 -0
- package/lib/types/components/sidebar.d.ts.map +1 -0
- package/lib/types/components/skeleton.d.ts +10 -0
- package/lib/types/components/skeleton.d.ts.map +1 -0
- package/lib/types/components/slider.d.ts +8 -0
- package/lib/types/components/slider.d.ts.map +1 -0
- package/lib/types/components/spinner.d.ts +9 -0
- package/lib/types/components/spinner.d.ts.map +1 -0
- package/lib/types/components/switch.d.ts +13 -0
- package/lib/types/components/switch.d.ts.map +1 -0
- package/lib/types/components/table.d.ts +18 -0
- package/lib/types/components/table.d.ts.map +1 -0
- package/lib/types/components/tabs.d.ts +18 -0
- package/lib/types/components/tabs.d.ts.map +1 -0
- package/lib/types/components/textarea.d.ts +11 -0
- package/lib/types/components/textarea.d.ts.map +1 -0
- package/lib/types/components/toast.d.ts +35 -0
- package/lib/types/components/toast.d.ts.map +1 -0
- package/lib/types/components/toggle-group.d.ts +16 -0
- package/lib/types/components/toggle-group.d.ts.map +1 -0
- package/lib/types/components/toggle.d.ts +13 -0
- package/lib/types/components/toggle.d.ts.map +1 -0
- package/lib/types/components/tooltip.d.ts +14 -0
- package/lib/types/components/tooltip.d.ts.map +1 -0
- package/lib/types/composites/autocomplete.d.ts +15 -0
- package/lib/types/composites/autocomplete.d.ts.map +1 -0
- package/lib/types/composites/cascader.d.ts +18 -0
- package/lib/types/composites/cascader.d.ts.map +1 -0
- package/lib/types/composites/color-picker.d.ts +12 -0
- package/lib/types/composites/color-picker.d.ts.map +1 -0
- package/lib/types/composites/confirm-dialog.d.ts +17 -0
- package/lib/types/composites/confirm-dialog.d.ts.map +1 -0
- package/lib/types/composites/copyable.d.ts +12 -0
- package/lib/types/composites/copyable.d.ts.map +1 -0
- package/lib/types/composites/currency-input.d.ts +13 -0
- package/lib/types/composites/currency-input.d.ts.map +1 -0
- package/lib/types/composites/date-chrome.d.ts +8 -0
- package/lib/types/composites/date-chrome.d.ts.map +1 -0
- package/lib/types/composites/date-picker.d.ts +17 -0
- package/lib/types/composites/date-picker.d.ts.map +1 -0
- package/lib/types/composites/date-range-picker.d.ts +18 -0
- package/lib/types/composites/date-range-picker.d.ts.map +1 -0
- package/lib/types/composites/date-time-picker.d.ts +18 -0
- package/lib/types/composites/date-time-picker.d.ts.map +1 -0
- package/lib/types/composites/date-time-range-picker.d.ts +17 -0
- package/lib/types/composites/date-time-range-picker.d.ts.map +1 -0
- package/lib/types/composites/duration-input.d.ts +14 -0
- package/lib/types/composites/duration-input.d.ts.map +1 -0
- package/lib/types/composites/live-refresh.d.ts +46 -0
- package/lib/types/composites/live-refresh.d.ts.map +1 -0
- package/lib/types/composites/mini-calendar.d.ts +13 -0
- package/lib/types/composites/mini-calendar.d.ts.map +1 -0
- package/lib/types/composites/number-field.d.ts +15 -0
- package/lib/types/composites/number-field.d.ts.map +1 -0
- package/lib/types/composites/password-field.d.ts +13 -0
- package/lib/types/composites/password-field.d.ts.map +1 -0
- package/lib/types/composites/phone-input.d.ts +12 -0
- package/lib/types/composites/phone-input.d.ts.map +1 -0
- package/lib/types/composites/rating.d.ts +13 -0
- package/lib/types/composites/rating.d.ts.map +1 -0
- package/lib/types/composites/relative-date-picker.d.ts +16 -0
- package/lib/types/composites/relative-date-picker.d.ts.map +1 -0
- package/lib/types/composites/search-input.d.ts +16 -0
- package/lib/types/composites/search-input.d.ts.map +1 -0
- package/lib/types/composites/slider-range.d.ts +14 -0
- package/lib/types/composites/slider-range.d.ts.map +1 -0
- package/lib/types/composites/tag-input.d.ts +14 -0
- package/lib/types/composites/tag-input.d.ts.map +1 -0
- package/lib/types/composites/time-picker.d.ts +28 -0
- package/lib/types/composites/time-picker.d.ts.map +1 -0
- package/lib/types/composites/time-range-picker.d.ts +16 -0
- package/lib/types/composites/time-range-picker.d.ts.map +1 -0
- package/lib/types/composites/timezone-select.d.ts +22 -0
- package/lib/types/composites/timezone-select.d.ts.map +1 -0
- package/lib/types/composites/transfer.d.ts +17 -0
- package/lib/types/composites/transfer.d.ts.map +1 -0
- package/lib/types/composites/user-picker.d.ts +17 -0
- package/lib/types/composites/user-picker.d.ts.map +1 -0
- package/lib/types/hooks/use-html-dark.d.ts +4 -0
- package/lib/types/hooks/use-html-dark.d.ts.map +1 -0
- package/lib/types/hooks/use-mobile.d.ts +2 -0
- package/lib/types/hooks/use-mobile.d.ts.map +1 -0
- package/lib/types/i18n/context.d.ts +310 -0
- package/lib/types/i18n/context.d.ts.map +1 -0
- package/lib/types/i18n/en.d.ts +290 -0
- package/lib/types/i18n/en.d.ts.map +1 -0
- package/lib/types/i18n/zh.d.ts +3 -0
- package/lib/types/i18n/zh.d.ts.map +1 -0
- package/lib/types/index.d.ts +151 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/lib/clipboard.d.ts +3 -0
- package/lib/types/lib/clipboard.d.ts.map +1 -0
- package/lib/types/lib/defined.d.ts +3 -0
- package/lib/types/lib/defined.d.ts.map +1 -0
- package/lib/types/lib/icons.d.ts +16 -0
- package/lib/types/lib/icons.d.ts.map +1 -0
- package/lib/types/lib/illustrations.d.ts +18 -0
- package/lib/types/lib/illustrations.d.ts.map +1 -0
- package/lib/types/lib/utils.d.ts +3 -0
- package/lib/types/lib/utils.d.ts.map +1 -0
- package/lib/types/products/cells.d.ts +13 -0
- package/lib/types/products/cells.d.ts.map +1 -0
- package/lib/types/products/code-block.d.ts +14 -0
- package/lib/types/products/code-block.d.ts.map +1 -0
- package/lib/types/products/code-editor.d.ts +21 -0
- package/lib/types/products/code-editor.d.ts.map +1 -0
- package/lib/types/products/commit-graph.d.ts +38 -0
- package/lib/types/products/commit-graph.d.ts.map +1 -0
- package/lib/types/products/data-grid.d.ts +79 -0
- package/lib/types/products/data-grid.d.ts.map +1 -0
- package/lib/types/products/diff-viewer.d.ts +15 -0
- package/lib/types/products/diff-viewer.d.ts.map +1 -0
- package/lib/types/products/event-calendar.d.ts +23 -0
- package/lib/types/products/event-calendar.d.ts.map +1 -0
- package/lib/types/products/export-csv.d.ts +2 -0
- package/lib/types/products/export-csv.d.ts.map +1 -0
- package/lib/types/products/file-dropzone.d.ts +12 -0
- package/lib/types/products/file-dropzone.d.ts.map +1 -0
- package/lib/types/products/full-calendar/animations.d.ts +12 -0
- package/lib/types/products/full-calendar/animations.d.ts.map +1 -0
- package/lib/types/products/full-calendar/calendar-body.d.ts +2 -0
- package/lib/types/products/full-calendar/calendar-body.d.ts.map +1 -0
- package/lib/types/products/full-calendar/constants.d.ts +3 -0
- package/lib/types/products/full-calendar/constants.d.ts.map +1 -0
- package/lib/types/products/full-calendar/contexts/calendar-context.d.ts +42 -0
- package/lib/types/products/full-calendar/contexts/calendar-context.d.ts.map +1 -0
- package/lib/types/products/full-calendar/contexts/dnd-context.d.ts +16 -0
- package/lib/types/products/full-calendar/contexts/dnd-context.d.ts.map +1 -0
- package/lib/types/products/full-calendar/dialogs/add-edit-event-dialog.d.ts +21 -0
- package/lib/types/products/full-calendar/dialogs/add-edit-event-dialog.d.ts.map +1 -0
- package/lib/types/products/full-calendar/dialogs/delete-event-dialog.d.ts +4 -0
- package/lib/types/products/full-calendar/dialogs/delete-event-dialog.d.ts.map +1 -0
- package/lib/types/products/full-calendar/dialogs/event-details-dialog.d.ts +7 -0
- package/lib/types/products/full-calendar/dialogs/event-details-dialog.d.ts.map +1 -0
- package/lib/types/products/full-calendar/dialogs/events-list-dialog.d.ts +9 -0
- package/lib/types/products/full-calendar/dialogs/events-list-dialog.d.ts.map +1 -0
- package/lib/types/products/full-calendar/dnd/draggable-event.d.ts +11 -0
- package/lib/types/products/full-calendar/dnd/draggable-event.d.ts.map +1 -0
- package/lib/types/products/full-calendar/dnd/droppable-area.d.ts +11 -0
- package/lib/types/products/full-calendar/dnd/droppable-area.d.ts.map +1 -0
- package/lib/types/products/full-calendar/dnd/resizable-event.d.ts +10 -0
- package/lib/types/products/full-calendar/dnd/resizable-event.d.ts.map +1 -0
- package/lib/types/products/full-calendar/header/calendar-header.d.ts +2 -0
- package/lib/types/products/full-calendar/header/calendar-header.d.ts.map +1 -0
- package/lib/types/products/full-calendar/header/date-navigator.d.ts +9 -0
- package/lib/types/products/full-calendar/header/date-navigator.d.ts.map +1 -0
- package/lib/types/products/full-calendar/header/filter.d.ts +2 -0
- package/lib/types/products/full-calendar/header/filter.d.ts.map +1 -0
- package/lib/types/products/full-calendar/header/today-button.d.ts +2 -0
- package/lib/types/products/full-calendar/header/today-button.d.ts.map +1 -0
- package/lib/types/products/full-calendar/header/user-select.d.ts +2 -0
- package/lib/types/products/full-calendar/header/user-select.d.ts.map +1 -0
- package/lib/types/products/full-calendar/header/view-tabs.d.ts +4 -0
- package/lib/types/products/full-calendar/header/view-tabs.d.ts.map +1 -0
- package/lib/types/products/full-calendar/helpers.d.ts +42 -0
- package/lib/types/products/full-calendar/helpers.d.ts.map +1 -0
- package/lib/types/products/full-calendar/hooks/use-time-range-create.d.ts +25 -0
- package/lib/types/products/full-calendar/hooks/use-time-range-create.d.ts.map +1 -0
- package/lib/types/products/full-calendar/hooks.d.ts +11 -0
- package/lib/types/products/full-calendar/hooks.d.ts.map +1 -0
- package/lib/types/products/full-calendar/interfaces.d.ts +21 -0
- package/lib/types/products/full-calendar/interfaces.d.ts.map +1 -0
- package/lib/types/products/full-calendar/settings/settings.d.ts +2 -0
- package/lib/types/products/full-calendar/settings/settings.d.ts.map +1 -0
- package/lib/types/products/full-calendar/shims/avatar-group.d.ts +7 -0
- package/lib/types/products/full-calendar/shims/avatar-group.d.ts.map +1 -0
- package/lib/types/products/full-calendar/shims/day-picker.d.ts +2 -0
- package/lib/types/products/full-calendar/shims/day-picker.d.ts.map +1 -0
- package/lib/types/products/full-calendar/shims/motion.d.ts +32 -0
- package/lib/types/products/full-calendar/shims/motion.d.ts.map +1 -0
- package/lib/types/products/full-calendar/shims/next-themes.d.ts +5 -0
- package/lib/types/products/full-calendar/shims/next-themes.d.ts.map +1 -0
- package/lib/types/products/full-calendar/shims/re-resizable.d.ts +19 -0
- package/lib/types/products/full-calendar/shims/re-resizable.d.ts.map +1 -0
- package/lib/types/products/full-calendar/shims/sonner.d.ts +5 -0
- package/lib/types/products/full-calendar/shims/sonner.d.ts.map +1 -0
- package/lib/types/products/full-calendar/types.d.ts +3 -0
- package/lib/types/products/full-calendar/types.d.ts.map +1 -0
- package/lib/types/products/full-calendar/views/agenda-view/agenda-events.d.ts +3 -0
- package/lib/types/products/full-calendar/views/agenda-view/agenda-events.d.ts.map +1 -0
- package/lib/types/products/full-calendar/views/month-view/calendar-month-view.d.ts +8 -0
- package/lib/types/products/full-calendar/views/month-view/calendar-month-view.d.ts.map +1 -0
- package/lib/types/products/full-calendar/views/month-view/day-cell.d.ts +12 -0
- package/lib/types/products/full-calendar/views/month-view/day-cell.d.ts.map +1 -0
- package/lib/types/products/full-calendar/views/month-view/event-bullet.d.ts +6 -0
- package/lib/types/products/full-calendar/views/month-view/event-bullet.d.ts.map +1 -0
- package/lib/types/products/full-calendar/views/month-view/month-event-badge.d.ts +17 -0
- package/lib/types/products/full-calendar/views/month-view/month-event-badge.d.ts.map +1 -0
- package/lib/types/products/full-calendar/views/week-and-day-view/calendar-day-view.d.ts +8 -0
- package/lib/types/products/full-calendar/views/week-and-day-view/calendar-day-view.d.ts.map +1 -0
- package/lib/types/products/full-calendar/views/week-and-day-view/calendar-time-line.d.ts +2 -0
- package/lib/types/products/full-calendar/views/week-and-day-view/calendar-time-line.d.ts.map +1 -0
- package/lib/types/products/full-calendar/views/week-and-day-view/calendar-week-view.d.ts +8 -0
- package/lib/types/products/full-calendar/views/week-and-day-view/calendar-week-view.d.ts.map +1 -0
- package/lib/types/products/full-calendar/views/week-and-day-view/day-view-multi-day-events-row.d.ts +8 -0
- package/lib/types/products/full-calendar/views/week-and-day-view/day-view-multi-day-events-row.d.ts.map +1 -0
- package/lib/types/products/full-calendar/views/week-and-day-view/event-block.d.ts +12 -0
- package/lib/types/products/full-calendar/views/week-and-day-view/event-block.d.ts.map +1 -0
- package/lib/types/products/full-calendar/views/week-and-day-view/render-grouped-events.d.ts +8 -0
- package/lib/types/products/full-calendar/views/week-and-day-view/render-grouped-events.d.ts.map +1 -0
- package/lib/types/products/full-calendar/views/week-and-day-view/week-view-multi-day-events-row.d.ts +8 -0
- package/lib/types/products/full-calendar/views/week-and-day-view/week-view-multi-day-events-row.d.ts.map +1 -0
- package/lib/types/products/full-calendar/views/year-view/calendar-year-view.d.ts +8 -0
- package/lib/types/products/full-calendar/views/year-view/calendar-year-view.d.ts.map +1 -0
- package/lib/types/products/gantt.d.ts +17 -0
- package/lib/types/products/gantt.d.ts.map +1 -0
- package/lib/types/products/jira-wiki-parse.d.ts +55 -0
- package/lib/types/products/jira-wiki-parse.d.ts.map +1 -0
- package/lib/types/products/jira-wiki.d.ts +39 -0
- package/lib/types/products/jira-wiki.d.ts.map +1 -0
- package/lib/types/products/jql-input.d.ts +22 -0
- package/lib/types/products/jql-input.d.ts.map +1 -0
- package/lib/types/products/json-viewer.d.ts +12 -0
- package/lib/types/products/json-viewer.d.ts.map +1 -0
- package/lib/types/products/kanban-issue-panel.d.ts +15 -0
- package/lib/types/products/kanban-issue-panel.d.ts.map +1 -0
- package/lib/types/products/kanban.d.ts +43 -0
- package/lib/types/products/kanban.d.ts.map +1 -0
- package/lib/types/products/log-viewer.d.ts +25 -0
- package/lib/types/products/log-viewer.d.ts.map +1 -0
- package/lib/types/products/markdown-editor.d.ts +16 -0
- package/lib/types/products/markdown-editor.d.ts.map +1 -0
- package/lib/types/products/markdown.d.ts +13 -0
- package/lib/types/products/markdown.d.ts.map +1 -0
- package/lib/types/products/rich-text-editor.d.ts +13 -0
- package/lib/types/products/rich-text-editor.d.ts.map +1 -0
- package/lib/types/products/sortable-list.d.ts +16 -0
- package/lib/types/products/sortable-list.d.ts.map +1 -0
- package/lib/types/products/stepper.d.ts +39 -0
- package/lib/types/products/stepper.d.ts.map +1 -0
- package/lib/types/products/timeline.d.ts +17 -0
- package/lib/types/products/timeline.d.ts.map +1 -0
- package/lib/types/products/tree-view.d.ts +17 -0
- package/lib/types/products/tree-view.d.ts.map +1 -0
- package/lib/types/sdk/app-error-boundary.d.ts +33 -0
- package/lib/types/sdk/app-error-boundary.d.ts.map +1 -0
- package/lib/types/sdk/app-id.d.ts +6 -0
- package/lib/types/sdk/app-id.d.ts.map +1 -0
- package/lib/types/sdk/use-app.d.ts +32 -0
- package/lib/types/sdk/use-app.d.ts.map +1 -0
- package/package.json +67 -0
- package/src/blocks/activity-feed.tsx +16 -0
- package/src/blocks/app-shell.tsx +38 -0
- package/src/blocks/attachment-gallery.tsx +36 -0
- package/src/blocks/bar-chart.tsx +46 -0
- package/src/blocks/comment-thread.tsx +37 -0
- package/src/blocks/dashboard-shell.tsx +108 -0
- package/src/blocks/description-list.tsx +23 -0
- package/src/blocks/detail-panel.tsx +43 -0
- package/src/blocks/donut-chart.tsx +54 -0
- package/src/blocks/env-badge.tsx +30 -0
- package/src/blocks/env-table.tsx +315 -0
- package/src/blocks/file-tree.tsx +12 -0
- package/src/blocks/filter-bar.tsx +22 -0
- package/src/blocks/form-sheet.tsx +159 -0
- package/src/blocks/gauge.tsx +36 -0
- package/src/blocks/list-detail.tsx +120 -0
- package/src/blocks/notification-center.tsx +29 -0
- package/src/blocks/page-header.tsx +31 -0
- package/src/blocks/progress-ring.tsx +43 -0
- package/src/blocks/radar-chart.tsx +47 -0
- package/src/blocks/request-inspector.tsx +41 -0
- package/src/blocks/reveal.tsx +56 -0
- package/src/blocks/run-timeline.tsx +12 -0
- package/src/blocks/scrollspy.tsx +48 -0
- package/src/blocks/settings-split.tsx +153 -0
- package/src/blocks/severity-chip.tsx +34 -0
- package/src/blocks/sparkline.tsx +27 -0
- package/src/blocks/stat-card.tsx +50 -0
- package/src/blocks/status-badge.tsx +40 -0
- package/src/blocks/table-page.tsx +82 -0
- package/src/blocks/terminal.tsx +28 -0
- package/src/blocks/test-step-list.tsx +26 -0
- package/src/blocks/trend-card.tsx +57 -0
- package/src/blocks/wizard-shell.tsx +131 -0
- package/src/cdn-modules.d.ts +5 -0
- package/src/components/accordion.tsx +79 -0
- package/src/components/alert-dialog.tsx +192 -0
- package/src/components/alert.tsx +83 -0
- package/src/components/aspect-ratio.tsx +26 -0
- package/src/components/attachment.tsx +211 -0
- package/src/components/avatar.tsx +111 -0
- package/src/components/badge.tsx +59 -0
- package/src/components/breadcrumb.tsx +129 -0
- package/src/components/bubble.tsx +132 -0
- package/src/components/button-group.tsx +93 -0
- package/src/components/button.tsx +65 -0
- package/src/components/calendar.tsx +224 -0
- package/src/components/card.tsx +110 -0
- package/src/components/chart.tsx +378 -0
- package/src/components/checkbox.tsx +33 -0
- package/src/components/collapsible.tsx +23 -0
- package/src/components/combobox.tsx +299 -0
- package/src/components/command.tsx +201 -0
- package/src/components/context-menu.tsx +274 -0
- package/src/components/dialog.tsx +179 -0
- package/src/components/drawer.tsx +230 -0
- package/src/components/dropdown-menu.tsx +274 -0
- package/src/components/empty.tsx +130 -0
- package/src/components/field.tsx +242 -0
- package/src/components/hover-card.tsx +53 -0
- package/src/components/input-group.tsx +161 -0
- package/src/components/input.tsx +27 -0
- package/src/components/item.tsx +205 -0
- package/src/components/kbd.tsx +30 -0
- package/src/components/label.tsx +26 -0
- package/src/components/marker.tsx +75 -0
- package/src/components/menubar.tsx +283 -0
- package/src/components/message-scroller.tsx +133 -0
- package/src/components/message.tsx +96 -0
- package/src/components/native-select.tsx +65 -0
- package/src/components/navigation-menu.tsx +172 -0
- package/src/components/pagination.tsx +138 -0
- package/src/components/popover.tsx +95 -0
- package/src/components/progress.tsx +89 -0
- package/src/components/questionnaire.tsx +332 -0
- package/src/components/radio-group.tsx +40 -0
- package/src/components/resizable.tsx +56 -0
- package/src/components/scroll-area.tsx +56 -0
- package/src/components/select.tsx +207 -0
- package/src/components/separator.tsx +28 -0
- package/src/components/sheet.tsx +158 -0
- package/src/components/sidebar.tsx +725 -0
- package/src/components/skeleton.tsx +20 -0
- package/src/components/slider.tsx +56 -0
- package/src/components/spinner.tsx +16 -0
- package/src/components/switch.tsx +38 -0
- package/src/components/table.tsx +121 -0
- package/src/components/tabs.tsx +88 -0
- package/src/components/textarea.tsx +25 -0
- package/src/components/toast.tsx +273 -0
- package/src/components/toggle-group.tsx +92 -0
- package/src/components/toggle.tsx +47 -0
- package/src/components/tooltip.tsx +72 -0
- package/src/composites/autocomplete.tsx +61 -0
- package/src/composites/cascader.tsx +52 -0
- package/src/composites/color-picker.tsx +25 -0
- package/src/composites/confirm-dialog.tsx +62 -0
- package/src/composites/copyable.tsx +44 -0
- package/src/composites/currency-input.tsx +37 -0
- package/src/composites/date-chrome.tsx +156 -0
- package/src/composites/date-picker.tsx +97 -0
- package/src/composites/date-range-picker.tsx +99 -0
- package/src/composites/date-time-picker.tsx +121 -0
- package/src/composites/date-time-range-picker.tsx +57 -0
- package/src/composites/duration-input.tsx +128 -0
- package/src/composites/live-refresh.tsx +348 -0
- package/src/composites/mini-calendar.tsx +30 -0
- package/src/composites/number-field.tsx +59 -0
- package/src/composites/password-field.tsx +50 -0
- package/src/composites/phone-input.tsx +28 -0
- package/src/composites/rating.tsx +45 -0
- package/src/composites/relative-date-picker.tsx +68 -0
- package/src/composites/search-input.tsx +55 -0
- package/src/composites/slider-range.tsx +36 -0
- package/src/composites/tag-input.tsx +62 -0
- package/src/composites/time-picker.tsx +208 -0
- package/src/composites/time-range-picker.tsx +31 -0
- package/src/composites/timezone-select.tsx +257 -0
- package/src/composites/transfer.tsx +58 -0
- package/src/composites/user-picker.tsx +46 -0
- package/src/hooks/use-html-dark.ts +36 -0
- package/src/hooks/use-mobile.ts +22 -0
- package/src/i18n/context.tsx +71 -0
- package/src/i18n/en.ts +308 -0
- package/src/i18n/zh.ts +290 -0
- package/src/index.ts +151 -0
- package/src/lib/clipboard.ts +10 -0
- package/src/lib/defined.ts +8 -0
- package/src/lib/icons.tsx +16 -0
- package/src/lib/illustrations.tsx +573 -0
- package/src/lib/utils.ts +6 -0
- package/src/products/cells.tsx +18 -0
- package/src/products/code-block.tsx +91 -0
- package/src/products/code-editor.tsx +271 -0
- package/src/products/column-meta.d.ts +9 -0
- package/src/products/commit-graph.tsx +643 -0
- package/src/products/data-grid.tsx +692 -0
- package/src/products/diff-viewer.tsx +224 -0
- package/src/products/event-calendar.tsx +49 -0
- package/src/products/export-csv.ts +26 -0
- package/src/products/file-dropzone.tsx +47 -0
- package/src/products/full-calendar/animations.ts +38 -0
- package/src/products/full-calendar/calendar-body.tsx +76 -0
- package/src/products/full-calendar/constants.ts +10 -0
- package/src/products/full-calendar/contexts/calendar-context.tsx +254 -0
- package/src/products/full-calendar/contexts/dnd-context.tsx +156 -0
- package/src/products/full-calendar/dialogs/add-edit-event-dialog.tsx +186 -0
- package/src/products/full-calendar/dialogs/delete-event-dialog.tsx +39 -0
- package/src/products/full-calendar/dialogs/event-details-dialog.tsx +99 -0
- package/src/products/full-calendar/dialogs/events-list-dialog.tsx +86 -0
- package/src/products/full-calendar/dnd/draggable-event.tsx +45 -0
- package/src/products/full-calendar/dnd/droppable-area.tsx +45 -0
- package/src/products/full-calendar/dnd/resizable-event.tsx +178 -0
- package/src/products/full-calendar/header/calendar-header.tsx +64 -0
- package/src/products/full-calendar/header/date-navigator.tsx +110 -0
- package/src/products/full-calendar/header/filter.tsx +58 -0
- package/src/products/full-calendar/header/today-button.tsx +45 -0
- package/src/products/full-calendar/header/user-select.tsx +64 -0
- package/src/products/full-calendar/header/view-tabs.tsx +36 -0
- package/src/products/full-calendar/helpers.ts +463 -0
- package/src/products/full-calendar/hooks/use-time-range-create.ts +152 -0
- package/src/products/full-calendar/hooks.ts +70 -0
- package/src/products/full-calendar/interfaces.ts +23 -0
- package/src/products/full-calendar/settings/settings.tsx +80 -0
- package/src/products/full-calendar/shims/avatar-group.tsx +16 -0
- package/src/products/full-calendar/shims/day-picker.tsx +1 -0
- package/src/products/full-calendar/shims/motion.tsx +97 -0
- package/src/products/full-calendar/shims/next-themes.ts +6 -0
- package/src/products/full-calendar/shims/re-resizable.tsx +25 -0
- package/src/products/full-calendar/shims/sonner.ts +4 -0
- package/src/products/full-calendar/types.ts +8 -0
- package/src/products/full-calendar/views/agenda-view/agenda-events.tsx +140 -0
- package/src/products/full-calendar/views/month-view/calendar-month-view.tsx +69 -0
- package/src/products/full-calendar/views/month-view/day-cell.tsx +200 -0
- package/src/products/full-calendar/views/month-view/event-bullet.tsx +40 -0
- package/src/products/full-calendar/views/month-view/month-event-badge.tsx +143 -0
- package/src/products/full-calendar/views/week-and-day-view/calendar-day-view.tsx +295 -0
- package/src/products/full-calendar/views/week-and-day-view/calendar-time-line.tsx +35 -0
- package/src/products/full-calendar/views/week-and-day-view/calendar-week-view.tsx +251 -0
- package/src/products/full-calendar/views/week-and-day-view/day-view-multi-day-events-row.tsx +73 -0
- package/src/products/full-calendar/views/week-and-day-view/event-block.tsx +114 -0
- package/src/products/full-calendar/views/week-and-day-view/render-grouped-events.tsx +49 -0
- package/src/products/full-calendar/views/week-and-day-view/week-view-multi-day-events-row.tsx +145 -0
- package/src/products/full-calendar/views/year-view/calendar-year-view.tsx +161 -0
- package/src/products/gantt.tsx +47 -0
- package/src/products/jira-wiki-parse.ts +197 -0
- package/src/products/jira-wiki.tsx +287 -0
- package/src/products/jql-input.tsx +391 -0
- package/src/products/json-viewer.tsx +43 -0
- package/src/products/kanban-issue-panel.tsx +104 -0
- package/src/products/kanban.tsx +245 -0
- package/src/products/log-viewer.tsx +404 -0
- package/src/products/markdown-editor.tsx +77 -0
- package/src/products/markdown.tsx +50 -0
- package/src/products/rich-text-editor.tsx +89 -0
- package/src/products/sortable-list.tsx +67 -0
- package/src/products/stepper.tsx +237 -0
- package/src/products/timeline.tsx +39 -0
- package/src/products/tree-view.tsx +62 -0
- package/src/sdk/app-error-boundary.tsx +240 -0
- package/src/sdk/app-id.ts +7 -0
- package/src/sdk/use-app.ts +43 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type SortableItem = {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Drag-to-reorder list.
|
|
7
|
+
* @when Priority queues / column order. Read-only ordered events → `Timeline`.
|
|
8
|
+
* @example
|
|
9
|
+
* <SortableList items={items} onChange={(next) => set(next)} />
|
|
10
|
+
* @family Data & tables
|
|
11
|
+
*/
|
|
12
|
+
export declare function SortableList({ items, onChange, }: {
|
|
13
|
+
items: SortableItem[];
|
|
14
|
+
onChange?: (items: SortableItem[]) => void;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
16
|
+
//# sourceMappingURL=sortable-list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sortable-list.d.ts","sourceRoot":"","sources":["../../../src/products/sortable-list.tsx"],"names":[],"mappings":"AAeA,MAAM,MAAM,YAAY,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAmBxD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,YAAY,EAAE,CAAA;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,IAAI,CAAA;CAC3C,+BAmBA"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type StepStatus = 'default' | 'active' | 'completed';
|
|
3
|
+
export interface StepperProps {
|
|
4
|
+
/** StepperItem elements. */
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
/** Layout direction. Defaults to "vertical". */
|
|
7
|
+
orientation?: 'vertical' | 'horizontal' | undefined;
|
|
8
|
+
className?: string | undefined;
|
|
9
|
+
}
|
|
10
|
+
export interface StepperItemProps {
|
|
11
|
+
/** Step heading text. */
|
|
12
|
+
title: string;
|
|
13
|
+
/** Optional description below the title. */
|
|
14
|
+
description?: string | undefined;
|
|
15
|
+
/** Override the auto-incremented step number. */
|
|
16
|
+
step?: number | undefined;
|
|
17
|
+
/** Visual status of this step. Defaults to "default". */
|
|
18
|
+
status?: StepStatus | undefined;
|
|
19
|
+
/** Custom icon to replace the step number circle. */
|
|
20
|
+
icon?: React.ReactNode | undefined;
|
|
21
|
+
/** Content rendered below the step header (code blocks, text, etc.). */
|
|
22
|
+
children?: React.ReactNode | undefined;
|
|
23
|
+
className?: string | undefined;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* One step inside `Stepper` (title, description, status).
|
|
27
|
+
* @family Feedback & status
|
|
28
|
+
* @when As a child of `Stepper` only — status is `default | active | completed` (lowercase).
|
|
29
|
+
*/
|
|
30
|
+
export declare function StepperItem({ title, description, step, status, icon, children, className, }: StepperItemProps): React.JSX.Element;
|
|
31
|
+
/**
|
|
32
|
+
* Numbered steps with status; children are `StepperItem`.
|
|
33
|
+
* @family Feedback & status
|
|
34
|
+
* @when Wizard/progress of an ordered process. Time axis → `RunTimeline`.
|
|
35
|
+
* @example
|
|
36
|
+
* <Stepper><StepperItem title="上传" status="pass" /><StepperItem title="校验" status="running" /></Stepper>
|
|
37
|
+
*/
|
|
38
|
+
export declare function Stepper({ children, orientation, className, }: StepperProps): React.JSX.Element;
|
|
39
|
+
//# sourceMappingURL=stepper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stepper.d.ts","sourceRoot":"","sources":["../../../src/products/stepper.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,WAAW,CAAC;AAE5D,MAAM,WAAW,YAAY;IAC3B,4BAA4B;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,gDAAgD;IAChD,WAAW,CAAC,EAAE,UAAU,GAAG,YAAY,GAAG,SAAS,CAAA;IACnD,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC/B;AAED,MAAM,WAAW,gBAAgB;IAC/B,yBAAyB;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,iDAAiD;IACjD,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,yDAAyD;IACzD,MAAM,CAAC,EAAE,UAAU,GAAG,SAAS,CAAA;IAC/B,qDAAqD;IACrD,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,SAAS,CAAA;IAClC,wEAAwE;IACxE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,SAAS,CAAA;IACtC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC/B;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,WAAW,EACX,IAAI,EACJ,MAAkB,EAClB,IAAI,EACJ,QAAQ,EACR,SAAS,GACV,EAAE,gBAAgB,qBAwDlB;AAqHD;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,EACtB,QAAQ,EACR,WAAwB,EACxB,SAAS,GACV,EAAE,YAAY,qBAOd"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type TimelineItem = {
|
|
2
|
+
id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
time?: string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Vertical ordered events.
|
|
9
|
+
* @when Statuses/history without durations. Durations → `RunTimeline`.
|
|
10
|
+
* @example
|
|
11
|
+
* <Timeline items={[{ id: "1", title: "已创建", time: "09:00" }]} />
|
|
12
|
+
* @family Realtime
|
|
13
|
+
*/
|
|
14
|
+
export declare function Timeline({ items }: {
|
|
15
|
+
items: TimelineItem[];
|
|
16
|
+
}): import("react").JSX.Element;
|
|
17
|
+
//# sourceMappingURL=timeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeline.d.ts","sourceRoot":"","sources":["../../../src/products/timeline.tsx"],"names":[],"mappings":"AAEA,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,YAAY,EAAE,CAAA;CAAE,+BAsB5D"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type TreeNode = {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
children?: TreeNode[];
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Generic expandable node list.
|
|
9
|
+
* @when Any hierarchy without file semantics. Files → `FileTree`.
|
|
10
|
+
* @example
|
|
11
|
+
* <TreeView nodes={[{ id: "a", label: "华东" }]} />
|
|
12
|
+
* @family Data & tables
|
|
13
|
+
*/
|
|
14
|
+
export declare function TreeView({ nodes }: {
|
|
15
|
+
nodes: TreeNode[];
|
|
16
|
+
}): React.JSX.Element;
|
|
17
|
+
//# sourceMappingURL=tree-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree-view.d.ts","sourceRoot":"","sources":["../../../src/products/tree-view.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAA;CACtB,CAAA;AAoCD;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,QAAQ,EAAE,CAAA;CAAE,qBAQxD"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/** Where a captured failure came from — drives the hint the human sees. */
|
|
3
|
+
export type AppErrorKind = 'render' | 'module' | 'uncaught' | 'async';
|
|
4
|
+
export type ReportedAppError = {
|
|
5
|
+
kind: AppErrorKind;
|
|
6
|
+
message: string;
|
|
7
|
+
file?: string | undefined;
|
|
8
|
+
line?: number | undefined;
|
|
9
|
+
column?: number | undefined;
|
|
10
|
+
stack?: string | undefined;
|
|
11
|
+
componentStack?: string | undefined;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Hand an error to the host so `mini_app_errors` can see it.
|
|
15
|
+
*
|
|
16
|
+
* The app iframe is same-origin with the host, but the panel embedding it is not — so the
|
|
17
|
+
* only channel that works in both directions is the iframe POSTing to its own host. This
|
|
18
|
+
* is deliberately fire-and-forget: a diagnostic path must never be able to break the app
|
|
19
|
+
* that is reporting through it.
|
|
20
|
+
*/
|
|
21
|
+
export declare function reportAppError(appId: string, err: ReportedAppError): void;
|
|
22
|
+
/**
|
|
23
|
+
* Runtime crash guard for a mini-app UI. The host injects this around the app entry when
|
|
24
|
+
* it compiles `ui.tsx`, so authors never have to add it — and an app that throws during
|
|
25
|
+
* render shows a real message instead of a blank iframe.
|
|
26
|
+
*
|
|
27
|
+
* @when Not used from mini-app code: it is already wrapped around your `ui.tsx` by the host.
|
|
28
|
+
* @family Feedback & status
|
|
29
|
+
*/
|
|
30
|
+
export declare function AppErrorBoundary(props: {
|
|
31
|
+
children: React.ReactNode;
|
|
32
|
+
}): React.JSX.Element;
|
|
33
|
+
//# sourceMappingURL=app-error-boundary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-error-boundary.d.ts","sourceRoot":"","sources":["../../../src/sdk/app-error-boundary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,2EAA2E;AAC3E,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,CAAC;AAEtE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CACpC,CAAA;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,gBAAgB,GAAG,IAAI,CAmBzE;AAuLD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,qBAGpE"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* App id injected by `<AppRuntime>`. Its own module so the error boundary can read it
|
|
3
|
+
* without importing `use-app` (which would make the two mutually dependent).
|
|
4
|
+
*/
|
|
5
|
+
export declare const AppIdContext: import("react").Context<string>;
|
|
6
|
+
//# sourceMappingURL=app-id.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-id.d.ts","sourceRoot":"","sources":["../../../src/sdk/app-id.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,YAAY,iCAAoB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { AppAgentEvent, AppLlmEvent } from '@mohou/contract';
|
|
2
|
+
import { agentEventType, eventType, llmEventType } from '@mohou/contract/event-type';
|
|
3
|
+
import { type ReactNode } from 'react';
|
|
4
|
+
export type AppEvent = {
|
|
5
|
+
name: string;
|
|
6
|
+
data: unknown;
|
|
7
|
+
};
|
|
8
|
+
export { agentEventType, eventType, llmEventType };
|
|
9
|
+
/** `ctx.llm` observation. Same union the host writes. */
|
|
10
|
+
export type LlmEvent = AppLlmEvent;
|
|
11
|
+
/** `ctx.agent` observation. Same union the host writes. */
|
|
12
|
+
export type AgentEvent = AppAgentEvent;
|
|
13
|
+
export interface AppHandle {
|
|
14
|
+
call: (method: string, args?: unknown) => Promise<unknown>;
|
|
15
|
+
/** Yields what the method yields. Awaiting the same object is the method return. */
|
|
16
|
+
streamCall: (method: string, args?: unknown) => AsyncIterable<unknown> & Promise<unknown>;
|
|
17
|
+
on: (name: string, cb: (data: unknown) => void) => () => void;
|
|
18
|
+
onAny: (cb: (event: AppEvent) => void) => () => void;
|
|
19
|
+
/** URL for a file under `assets/`. Throws `asset-invalid` when the path is not that tree. */
|
|
20
|
+
resolveAssetUrl: (path: string) => string;
|
|
21
|
+
}
|
|
22
|
+
/** Host runner still wraps the tree. Authors do not construct this. */
|
|
23
|
+
export declare function AppRuntime(props: {
|
|
24
|
+
appId: string;
|
|
25
|
+
children: ReactNode;
|
|
26
|
+
}): import("react").FunctionComponentElement<import("react").ProviderProps<string>>;
|
|
27
|
+
/**
|
|
28
|
+
* App UI handle. `call` throws outside the host wrapper.
|
|
29
|
+
* The wrapper installs the live handle on `globalThis.miniAppHost`.
|
|
30
|
+
*/
|
|
31
|
+
export declare function useApp(): AppHandle;
|
|
32
|
+
//# sourceMappingURL=use-app.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-app.d.ts","sourceRoot":"","sources":["../../../src/sdk/use-app.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AACjE,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACpF,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAIrD,MAAM,MAAM,QAAQ,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,CAAA;AAEtD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA;AAElD,yDAAyD;AACzD,MAAM,MAAM,QAAQ,GAAG,WAAW,CAAA;AAElC,2DAA2D;AAC3D,MAAM,MAAM,UAAU,GAAG,aAAa,CAAA;AAEtC,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;IAC1D,oFAAoF;IACpF,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,KAAK,aAAa,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IACzF,EAAE,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,KAAK,MAAM,IAAI,CAAA;IAC7D,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,KAAK,MAAM,IAAI,CAAA;IACpD,6FAA6F;IAC7F,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;CAC1C;AAID,uEAAuE;AACvE,wBAAgB,UAAU,CAAC,KAAK,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,mFAEvE;AAED;;;GAGG;AACH,wBAAgB,MAAM,IAAI,SAAS,CAKlC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mohou/ui",
|
|
3
|
+
"version": "1.0.20",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"engines": {
|
|
7
|
+
"node": "^22.19.0 || >=24.0.0"
|
|
8
|
+
},
|
|
9
|
+
"publishConfig": {
|
|
10
|
+
"access": "public"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"src",
|
|
14
|
+
"lib/types",
|
|
15
|
+
"README.md",
|
|
16
|
+
"!**/*.tsbuildinfo"
|
|
17
|
+
],
|
|
18
|
+
"main": "./src/index.ts",
|
|
19
|
+
"types": "./lib/types/index.d.ts",
|
|
20
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./lib/types/index.d.ts",
|
|
23
|
+
"default": "./src/index.ts"
|
|
24
|
+
},
|
|
25
|
+
"./*": "./src/*",
|
|
26
|
+
"./src/*": "./src/*",
|
|
27
|
+
"./package.json": "./package.json"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@base-ui/react": "^1.7.0",
|
|
31
|
+
"@dnd-kit/core": "^6.3.1",
|
|
32
|
+
"@dnd-kit/sortable": "^10.0.0",
|
|
33
|
+
"@dnd-kit/utilities": "^3.2.2",
|
|
34
|
+
"@shadcn/react": "^0.3.1",
|
|
35
|
+
"@tanstack/react-table": "^8.21.3",
|
|
36
|
+
"@tanstack/react-virtual": "^3.13.12",
|
|
37
|
+
"class-variance-authority": "^0.7.1",
|
|
38
|
+
"clsx": "^2.1.1",
|
|
39
|
+
"cmdk": "^1.1.1",
|
|
40
|
+
"date-fns": "^4.1.0",
|
|
41
|
+
"diff": "^9.0.0",
|
|
42
|
+
"lodash-es": "^4.18.1",
|
|
43
|
+
"lucide-react": "^0.544.0",
|
|
44
|
+
"motion": "^12.23.12",
|
|
45
|
+
"react": "^19.2.0",
|
|
46
|
+
"react-day-picker": "^10.0.1",
|
|
47
|
+
"react-dom": "^19.2.0",
|
|
48
|
+
"react-is": "^19.2.0",
|
|
49
|
+
"react-dropzone": "^20.1.1",
|
|
50
|
+
"react-markdown": "^10.1.0",
|
|
51
|
+
"react-resizable-panels": "^4.12.3",
|
|
52
|
+
"recharts": "^3.8.0",
|
|
53
|
+
"remark-gfm": "^4.0.1",
|
|
54
|
+
"tailwind-merge": "^3.6.0",
|
|
55
|
+
"zod": "^4.4.3",
|
|
56
|
+
"@mohou/app-view": "^1.0.20",
|
|
57
|
+
"@mohou/contract": "^1.0.20"
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"@testing-library/jest-dom": "^6.8.0",
|
|
61
|
+
"@testing-library/react": "^16.3.0",
|
|
62
|
+
"@testing-library/user-event": "^14.6.1",
|
|
63
|
+
"@types/diff": "^8.0.0",
|
|
64
|
+
"@types/react": "^19.2.0",
|
|
65
|
+
"@types/react-dom": "^19.2.0"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Timeline, type TimelineItem } from '@mohou/ui/products/timeline'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Chronological activity list (avatar + text + time).
|
|
5
|
+
* @when Read-only “who did what when” — commits, deploys, agent runs. For steps with status use `RunTimeline`.
|
|
6
|
+
* @example
|
|
7
|
+
* <ActivityFeed items={[{ id: "1", title: "部署完成", time: "10:24" }]} />
|
|
8
|
+
* @family Realtime
|
|
9
|
+
*/
|
|
10
|
+
export function ActivityFeed({ items }: { items: TimelineItem[] }) {
|
|
11
|
+
return (
|
|
12
|
+
<div data-testid="activity-feed">
|
|
13
|
+
<Timeline items={items} />
|
|
14
|
+
</div>
|
|
15
|
+
)
|
|
16
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
import { cn } from '@mohou/ui/lib/utils'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* App frame: optional sidebar + header + main.
|
|
7
|
+
* @when Root layout for a mini-app page
|
|
8
|
+
* @example
|
|
9
|
+
* <AppShell sidebar={<nav />} header={<PageHeader title="Home" />}>
|
|
10
|
+
* {children}
|
|
11
|
+
* </AppShell>
|
|
12
|
+
* @family Layout & structure
|
|
13
|
+
*/
|
|
14
|
+
export function AppShell({
|
|
15
|
+
sidebar,
|
|
16
|
+
header,
|
|
17
|
+
children,
|
|
18
|
+
className,
|
|
19
|
+
}: {
|
|
20
|
+
sidebar?: ReactNode
|
|
21
|
+
header?: ReactNode
|
|
22
|
+
children: ReactNode
|
|
23
|
+
className?: string
|
|
24
|
+
}) {
|
|
25
|
+
return (
|
|
26
|
+
<div className={cn('flex min-h-svh w-full', className)} data-testid="app-shell">
|
|
27
|
+
{sidebar ? (
|
|
28
|
+
<aside className="w-56 shrink-0 border-r bg-background p-3">{sidebar}</aside>
|
|
29
|
+
) : null}
|
|
30
|
+
<div className="flex min-w-0 flex-1 flex-col">
|
|
31
|
+
{header ? (
|
|
32
|
+
<header className="border-b px-4 py-3">{header}</header>
|
|
33
|
+
) : null}
|
|
34
|
+
<main className="flex-1 p-4">{children}</main>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
)
|
|
38
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
import {
|
|
3
|
+
Attachment,
|
|
4
|
+
AttachmentContent,
|
|
5
|
+
AttachmentGroup,
|
|
6
|
+
AttachmentMedia,
|
|
7
|
+
AttachmentTitle,
|
|
8
|
+
} from '@mohou/ui/components/attachment'
|
|
9
|
+
|
|
10
|
+
export type GalleryFile = { name: string; url?: string }
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Thumbnail grid of files with open/copy.
|
|
14
|
+
* @when A record has N files/images and you show them as tiles, not a table.
|
|
15
|
+
* @example
|
|
16
|
+
* <AttachmentGallery files={[{ name: "log.txt", url: "https://…" }]} />
|
|
17
|
+
* @family Discovery & inspect
|
|
18
|
+
*/
|
|
19
|
+
export function AttachmentGallery({ files }: { files: GalleryFile[] }) {
|
|
20
|
+
return (
|
|
21
|
+
<AttachmentGroup data-testid="attachment-gallery">
|
|
22
|
+
{files.map(file => (
|
|
23
|
+
<Attachment key={file.name}>
|
|
24
|
+
{file.url ? (
|
|
25
|
+
<AttachmentMedia>
|
|
26
|
+
<img src={file.url} alt={file.name} className="size-10 object-cover" />
|
|
27
|
+
</AttachmentMedia>
|
|
28
|
+
) : null}
|
|
29
|
+
<AttachmentContent>
|
|
30
|
+
<AttachmentTitle>{file.name}</AttachmentTitle>
|
|
31
|
+
</AttachmentContent>
|
|
32
|
+
</Attachment>
|
|
33
|
+
))}
|
|
34
|
+
</AttachmentGroup>
|
|
35
|
+
)
|
|
36
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
|
|
2
|
+
import { Bar, BarChart as ReBar, CartesianGrid, XAxis } from 'recharts'
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
ChartContainer,
|
|
6
|
+
ChartTooltip,
|
|
7
|
+
ChartTooltipContent,
|
|
8
|
+
type ChartConfig,
|
|
9
|
+
} from '@mohou/ui/components/chart'
|
|
10
|
+
import { cn } from '@mohou/ui/lib/utils'
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Stacked bar chart over flat rows.
|
|
14
|
+
* @family Chart & data
|
|
15
|
+
* @when Comparing several series across categories (pass/fail per day). Single ratio → `DonutChart`; trend → `Sparkline`.
|
|
16
|
+
* @example
|
|
17
|
+
* <StackedBarChart
|
|
18
|
+
* data={[{ label: "09-01", ok: 12, fail: 2 }]}
|
|
19
|
+
* keys={["ok", "fail"]}
|
|
20
|
+
* config={{ ok: { label: "通过", color: "var(--primary)" }, fail: { label: "失败", color: "var(--destructive)" } }}
|
|
21
|
+
* />
|
|
22
|
+
*/
|
|
23
|
+
export function StackedBarChart({
|
|
24
|
+
data,
|
|
25
|
+
config,
|
|
26
|
+
keys,
|
|
27
|
+
className,
|
|
28
|
+
}: {
|
|
29
|
+
data: Record<string, string | number>[]
|
|
30
|
+
config: ChartConfig
|
|
31
|
+
keys: string[]
|
|
32
|
+
className?: string
|
|
33
|
+
}) {
|
|
34
|
+
return (
|
|
35
|
+
<ChartContainer config={config} className={cn('aspect-video w-full', className)} data-testid="bar-chart">
|
|
36
|
+
<ReBar accessibilityLayer data={data}>
|
|
37
|
+
<CartesianGrid vertical={false} />
|
|
38
|
+
<XAxis dataKey="label" tickLine={false} axisLine={false} />
|
|
39
|
+
<ChartTooltip content={<ChartTooltipContent />} />
|
|
40
|
+
{keys.map(key => (
|
|
41
|
+
<Bar key={key} dataKey={key} stackId="a" fill={`var(--color-${key})`} />
|
|
42
|
+
))}
|
|
43
|
+
</ReBar>
|
|
44
|
+
</ChartContainer>
|
|
45
|
+
)
|
|
46
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Avatar, AvatarFallback } from '@mohou/ui/components/avatar'
|
|
2
|
+
|
|
3
|
+
export type Comment = { id: string; author: string; body: string; time?: string | undefined }
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Nested comments with author + time.
|
|
7
|
+
* @when Issue/ticket discussion, review comments. Editing a comment is your job, not the component's.
|
|
8
|
+
* @example
|
|
9
|
+
* <CommentThread comments={[{ id: "c1", author: "P.Wang", text: "这里再确认下" }]} />
|
|
10
|
+
* @family Realtime
|
|
11
|
+
*/
|
|
12
|
+
export function CommentThread({ comments }: { comments: Comment[] }) {
|
|
13
|
+
return (
|
|
14
|
+
<div className="flex flex-col gap-3" data-testid="comment-thread">
|
|
15
|
+
{comments.map(comment => (
|
|
16
|
+
<div key={comment.id} className="flex gap-2">
|
|
17
|
+
<Avatar className="size-7">
|
|
18
|
+
<AvatarFallback className="text-[10px]">
|
|
19
|
+
{comment.author.slice(0, 2).toUpperCase()}
|
|
20
|
+
</AvatarFallback>
|
|
21
|
+
</Avatar>
|
|
22
|
+
<div>
|
|
23
|
+
<div className="text-sm font-medium">
|
|
24
|
+
{comment.author}
|
|
25
|
+
{comment.time ? (
|
|
26
|
+
<span className="text-muted-foreground ml-2 text-xs font-normal">
|
|
27
|
+
{comment.time}
|
|
28
|
+
</span>
|
|
29
|
+
) : null}
|
|
30
|
+
</div>
|
|
31
|
+
<p className="text-sm">{comment.body}</p>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
))}
|
|
35
|
+
</div>
|
|
36
|
+
)
|
|
37
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
import { useIsMobile } from '@mohou/ui/hooks/use-mobile';
|
|
5
|
+
import { cn } from '@mohou/ui/lib/utils';
|
|
6
|
+
|
|
7
|
+
export type DashboardShellProps = {
|
|
8
|
+
/** Title row / `PageHeader`. Pinned: it stays while the content scrolls under it. */
|
|
9
|
+
header?: ReactNode
|
|
10
|
+
/** KPI strip. Pinned with the header — the point of a dashboard is that the numbers hold. */
|
|
11
|
+
kpis?: ReactNode
|
|
12
|
+
/** Charts and tables. The scrolling body. */
|
|
13
|
+
main: ReactNode
|
|
14
|
+
/** Activity feed / top offenders. Sits beside `main` on wide screens, stacks under it when narrow. */
|
|
15
|
+
aside?: ReactNode
|
|
16
|
+
/** Aside width in px on wide screens. Default 320. */
|
|
17
|
+
asideWidth?: number
|
|
18
|
+
className?: string
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Overview page with a pinned header + KPI strip and exactly one scrolling body.
|
|
23
|
+
*
|
|
24
|
+
* The failure this exists for: the page is a plain column, `overflow-auto` ends up on the
|
|
25
|
+
* outermost div, and the first chart the user scrolls past takes the header and the KPI row
|
|
26
|
+
* with it — a dashboard whose numbers scroll away is not a dashboard. The aside gets its own
|
|
27
|
+
* scroller when there is room for two, and folds under `main` into the single body scroller
|
|
28
|
+
* when there is not, rather than becoming a third half-height pane.
|
|
29
|
+
*
|
|
30
|
+
* @when Page shape: metrics up top, charts below, optional activity rail — ops overviews, monitor walls
|
|
31
|
+
* @example
|
|
32
|
+
* <DashboardShell
|
|
33
|
+
* header={<PageHeader title="值班" description="每 5 秒" />}
|
|
34
|
+
* kpis={<div className="grid grid-cols-4 gap-3">{cards}</div>}
|
|
35
|
+
* main={<Charts />}
|
|
36
|
+
* aside={<ActivityFeed items={items} />}
|
|
37
|
+
* />
|
|
38
|
+
* @family Layout & structure
|
|
39
|
+
*/
|
|
40
|
+
export function DashboardShell({
|
|
41
|
+
header,
|
|
42
|
+
kpis,
|
|
43
|
+
main,
|
|
44
|
+
aside,
|
|
45
|
+
asideWidth = 320,
|
|
46
|
+
className,
|
|
47
|
+
}: DashboardShellProps) {
|
|
48
|
+
const isNarrow = useIsMobile()
|
|
49
|
+
|
|
50
|
+
const pinned = (
|
|
51
|
+
<>
|
|
52
|
+
{header ? (
|
|
53
|
+
<div className="shrink-0" data-testid="dashboard-header">
|
|
54
|
+
{header}
|
|
55
|
+
</div>
|
|
56
|
+
) : null}
|
|
57
|
+
{kpis ? (
|
|
58
|
+
<div className="shrink-0" data-testid="dashboard-kpis">
|
|
59
|
+
{kpis}
|
|
60
|
+
</div>
|
|
61
|
+
) : null}
|
|
62
|
+
</>
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
return (
|
|
66
|
+
<div
|
|
67
|
+
className={cn('flex h-full min-h-0 w-full flex-col', className)}
|
|
68
|
+
data-testid="dashboard-shell"
|
|
69
|
+
>
|
|
70
|
+
{pinned}
|
|
71
|
+
|
|
72
|
+
{aside && !isNarrow ? (
|
|
73
|
+
// Room for two panes: each scrolls on its own, neither can push the other.
|
|
74
|
+
<div className="flex min-h-0 flex-1" data-testid="dashboard-body">
|
|
75
|
+
<div
|
|
76
|
+
className="min-h-0 flex-1 overflow-y-auto"
|
|
77
|
+
data-testid="dashboard-main"
|
|
78
|
+
>
|
|
79
|
+
{main}
|
|
80
|
+
</div>
|
|
81
|
+
<div
|
|
82
|
+
className="border-border bg-muted/30 min-h-0 shrink-0 overflow-y-auto border-l"
|
|
83
|
+
data-testid="dashboard-aside"
|
|
84
|
+
style={{ width: asideWidth }}
|
|
85
|
+
>
|
|
86
|
+
{aside}
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
) : (
|
|
90
|
+
// One body scroller; the aside folds to the bottom of it instead of a squeezed pane.
|
|
91
|
+
<div
|
|
92
|
+
className="min-h-0 flex-1 overflow-y-auto"
|
|
93
|
+
data-testid="dashboard-body"
|
|
94
|
+
>
|
|
95
|
+
<div data-testid="dashboard-main">{main}</div>
|
|
96
|
+
{aside ? (
|
|
97
|
+
<div
|
|
98
|
+
className="border-border border-t px-4 py-4"
|
|
99
|
+
data-testid="dashboard-aside"
|
|
100
|
+
>
|
|
101
|
+
{aside}
|
|
102
|
+
</div>
|
|
103
|
+
) : null}
|
|
104
|
+
</div>
|
|
105
|
+
)}
|
|
106
|
+
</div>
|
|
107
|
+
)
|
|
108
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Label/value pairs, two columns.
|
|
3
|
+
* @when Detail/inspector panel of a selected row — the default “show one record” view.
|
|
4
|
+
* @example
|
|
5
|
+
* <DescriptionList items={[{ label: "状态", value: "运行中" }]} />
|
|
6
|
+
* @family Layout & structure
|
|
7
|
+
*/
|
|
8
|
+
export function DescriptionList({
|
|
9
|
+
items,
|
|
10
|
+
}: {
|
|
11
|
+
items: { label: string; value: string }[]
|
|
12
|
+
}) {
|
|
13
|
+
return (
|
|
14
|
+
<dl className="grid grid-cols-[8rem_1fr] gap-x-3 gap-y-2 text-sm" data-testid="description-list">
|
|
15
|
+
{items.map(item => (
|
|
16
|
+
<div key={item.label} className="contents">
|
|
17
|
+
<dt className="text-muted-foreground">{item.label}</dt>
|
|
18
|
+
<dd>{item.value}</dd>
|
|
19
|
+
</div>
|
|
20
|
+
))}
|
|
21
|
+
</dl>
|
|
22
|
+
)
|
|
23
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
|
|
2
|
+
import type { ReactNode } from 'react'
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
Sheet,
|
|
6
|
+
SheetContent,
|
|
7
|
+
SheetDescription,
|
|
8
|
+
SheetHeader,
|
|
9
|
+
SheetTitle,
|
|
10
|
+
} from '@mohou/ui/components/sheet'
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Right-side inspector Sheet for a selected row/entity.
|
|
14
|
+
* @when Master-detail after row/card click
|
|
15
|
+
* @example
|
|
16
|
+
* <DetailPanel open={!!id} onOpenChange={() => setId(null)} title="Run #12">{body}</DetailPanel>
|
|
17
|
+
* @family Surface
|
|
18
|
+
*/
|
|
19
|
+
export function DetailPanel({
|
|
20
|
+
open,
|
|
21
|
+
onOpenChange,
|
|
22
|
+
title,
|
|
23
|
+
description,
|
|
24
|
+
children,
|
|
25
|
+
}: {
|
|
26
|
+
open: boolean
|
|
27
|
+
onOpenChange: (open: boolean) => void
|
|
28
|
+
title: string
|
|
29
|
+
description?: string
|
|
30
|
+
children?: ReactNode
|
|
31
|
+
}) {
|
|
32
|
+
return (
|
|
33
|
+
<Sheet open={open} onOpenChange={onOpenChange}>
|
|
34
|
+
<SheetContent data-testid="detail-panel">
|
|
35
|
+
<SheetHeader>
|
|
36
|
+
<SheetTitle>{title}</SheetTitle>
|
|
37
|
+
{description ? <SheetDescription>{description}</SheetDescription> : null}
|
|
38
|
+
</SheetHeader>
|
|
39
|
+
<div className="px-4 pb-4">{children}</div>
|
|
40
|
+
</SheetContent>
|
|
41
|
+
</Sheet>
|
|
42
|
+
)
|
|
43
|
+
}
|