@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,120 @@
|
|
|
1
|
+
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
ResizableHandle,
|
|
6
|
+
ResizablePanel,
|
|
7
|
+
ResizablePanelGroup,
|
|
8
|
+
} from '@mohou/ui/components/resizable';
|
|
9
|
+
import { useIsMobile } from '@mohou/ui/hooks/use-mobile';
|
|
10
|
+
import { useLabels } from '@mohou/ui/i18n/context';
|
|
11
|
+
import { cn } from '@mohou/ui/lib/utils';
|
|
12
|
+
|
|
13
|
+
export type ListDetailProps = {
|
|
14
|
+
/** The collection pane: list, table, board — anything you scroll through. */
|
|
15
|
+
list: ReactNode
|
|
16
|
+
/** The record pane. Pass `undefined` for "nothing selected" — `empty` renders instead. */
|
|
17
|
+
detail?: ReactNode
|
|
18
|
+
/** Placeholder for the record pane while nothing is selected. */
|
|
19
|
+
empty?: ReactNode
|
|
20
|
+
/** Search / filters / create button. Fixed above the panes; it never scrolls. */
|
|
21
|
+
toolbar?: ReactNode
|
|
22
|
+
/** Narrow screens show one pane at a time. The app owns which one. */
|
|
23
|
+
mobileView?: 'list' | 'detail';
|
|
24
|
+
/** Renders a back control on the record pane below `md`. No-op on wide screens. */
|
|
25
|
+
onMobileBack?: () => void
|
|
26
|
+
/** Collection pane share of the width, 0-100. Default 34. */
|
|
27
|
+
defaultSize?: number
|
|
28
|
+
/** Collection pane floor, so a long record title cannot push it away. Default 18. */
|
|
29
|
+
minSize?: number
|
|
30
|
+
className?: string
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** One scroll container per pane, and nothing above it that also scrolls. */
|
|
34
|
+
const PANE = 'h-full min-h-0 w-full overflow-y-auto';
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Two-pane record browser: the list holds its place while the selected record scrolls on its own.
|
|
38
|
+
*
|
|
39
|
+
* This is the shape agents get wrong without help — a flex child with no `min-h-0` grows to fit
|
|
40
|
+
* its content, so the whole page scrolls, the toolbar slides away, and the two panes are never
|
|
41
|
+
* independent. Both panes scroll here by construction, and the record pane collapses to a
|
|
42
|
+
* full-width view below `md` instead of squashing.
|
|
43
|
+
*
|
|
44
|
+
* @when Page shape: click a row, then read or edit that one record beside the list — orders, tickets, contacts, log lines
|
|
45
|
+
* @example
|
|
46
|
+
* <ListDetail
|
|
47
|
+
* toolbar={<SearchInput />}
|
|
48
|
+
* list={<OrderList />}
|
|
49
|
+
* detail={order ? <OrderCard order={order} /> : undefined}
|
|
50
|
+
* empty={<div>Pick an order</div>}
|
|
51
|
+
* mobileView={order ? "detail" : "list"}
|
|
52
|
+
* onMobileBack={() => setOrder(null)}
|
|
53
|
+
* />
|
|
54
|
+
* @family Layout & structure
|
|
55
|
+
*/
|
|
56
|
+
export function ListDetail({
|
|
57
|
+
list,
|
|
58
|
+
detail,
|
|
59
|
+
empty,
|
|
60
|
+
toolbar,
|
|
61
|
+
mobileView = 'list',
|
|
62
|
+
onMobileBack,
|
|
63
|
+
defaultSize = 34,
|
|
64
|
+
minSize = 18,
|
|
65
|
+
className,
|
|
66
|
+
}: ListDetailProps) {
|
|
67
|
+
const isMobile = useIsMobile()
|
|
68
|
+
const t = useLabels('listDetail');
|
|
69
|
+
|
|
70
|
+
const listPane = (
|
|
71
|
+
<div className={PANE} data-testid="list-detail-list">
|
|
72
|
+
{list}
|
|
73
|
+
</div>
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
const detailPane = (
|
|
77
|
+
<div className={PANE} data-testid="list-detail-detail">
|
|
78
|
+
{isMobile && detail && onMobileBack ? (
|
|
79
|
+
<button
|
|
80
|
+
type="button"
|
|
81
|
+
onClick={onMobileBack}
|
|
82
|
+
className="text-muted-foreground -mb-2 px-4 pt-3 pb-1 text-sm underline-offset-4 hover:underline"
|
|
83
|
+
data-testid="list-detail-back"
|
|
84
|
+
>
|
|
85
|
+
{t.back}
|
|
86
|
+
</button>
|
|
87
|
+
) : null}
|
|
88
|
+
{detail ?? empty ?? null}
|
|
89
|
+
</div>
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
return (
|
|
93
|
+
<div
|
|
94
|
+
className={cn('flex h-full min-h-0 w-full flex-col', className)}
|
|
95
|
+
data-testid="list-detail"
|
|
96
|
+
>
|
|
97
|
+
{toolbar ? (
|
|
98
|
+
<div className="shrink-0" data-testid="list-detail-toolbar">
|
|
99
|
+
{toolbar}
|
|
100
|
+
</div>
|
|
101
|
+
) : null}
|
|
102
|
+
|
|
103
|
+
{isMobile ? (
|
|
104
|
+
<div className="min-h-0 flex-1">
|
|
105
|
+
{mobileView === 'detail' ? detailPane : listPane}
|
|
106
|
+
</div>
|
|
107
|
+
) : (
|
|
108
|
+
<ResizablePanelGroup orientation="horizontal" className="min-h-0 flex-1">
|
|
109
|
+
<ResizablePanel defaultSize={defaultSize} minSize={minSize}>
|
|
110
|
+
{listPane}
|
|
111
|
+
</ResizablePanel>
|
|
112
|
+
<ResizableHandle withHandle />
|
|
113
|
+
<ResizablePanel defaultSize={100 - defaultSize} minSize={30}>
|
|
114
|
+
{detailPane}
|
|
115
|
+
</ResizablePanel>
|
|
116
|
+
</ResizablePanelGroup>
|
|
117
|
+
)}
|
|
118
|
+
</div>
|
|
119
|
+
)
|
|
120
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Item, ItemContent, ItemDescription, ItemTitle } from '@mohou/ui/components/item'
|
|
2
|
+
|
|
3
|
+
export type NotificationItem = {
|
|
4
|
+
id: string
|
|
5
|
+
title: string
|
|
6
|
+
body?: string
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Grouped notification list with unread state.
|
|
11
|
+
* @when Inbox/alert panel. Audit log (read-only, with time) → `ActivityFeed`.
|
|
12
|
+
* @example
|
|
13
|
+
* <NotificationCenter items={[{ id: "n1", title: "构建失败", unread: true }]} />
|
|
14
|
+
* @family Feedback & status
|
|
15
|
+
*/
|
|
16
|
+
export function NotificationCenter({ items }: { items: NotificationItem[] }) {
|
|
17
|
+
return (
|
|
18
|
+
<div className="flex flex-col gap-1" data-testid="notification-center">
|
|
19
|
+
{items.map(item => (
|
|
20
|
+
<Item key={item.id} variant="outline">
|
|
21
|
+
<ItemContent>
|
|
22
|
+
<ItemTitle>{item.title}</ItemTitle>
|
|
23
|
+
{item.body ? <ItemDescription>{item.body}</ItemDescription> : null}
|
|
24
|
+
</ItemContent>
|
|
25
|
+
</Item>
|
|
26
|
+
))}
|
|
27
|
+
</div>
|
|
28
|
+
)
|
|
29
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
export type PageHeaderProps = {
|
|
4
|
+
title: string
|
|
5
|
+
description?: string
|
|
6
|
+
actions?: ReactNode
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Page title row with optional description and right-side actions.
|
|
11
|
+
* @when Top of a page inside AppShell main
|
|
12
|
+
* @example
|
|
13
|
+
* <PageHeader title="QA Runs" description="Last 24h" actions={<Button>New</Button>} />
|
|
14
|
+
* @family Layout & structure
|
|
15
|
+
*/
|
|
16
|
+
export function PageHeader({ title, description, actions }: PageHeaderProps) {
|
|
17
|
+
return (
|
|
18
|
+
<div
|
|
19
|
+
className="flex flex-wrap items-start justify-between gap-3"
|
|
20
|
+
data-testid="page-header"
|
|
21
|
+
>
|
|
22
|
+
<div className="flex min-w-0 flex-col gap-1">
|
|
23
|
+
<h1 className="font-heading text-xl font-medium">{title}</h1>
|
|
24
|
+
{description ? (
|
|
25
|
+
<p className="text-muted-foreground text-sm">{description}</p>
|
|
26
|
+
) : null}
|
|
27
|
+
</div>
|
|
28
|
+
{actions ? <div className="flex items-center gap-2">{actions}</div> : null}
|
|
29
|
+
</div>
|
|
30
|
+
)
|
|
31
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { cn } from '../lib/utils'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Circular determinate progress.
|
|
5
|
+
* @when One percent-done value in a tight space (card corner, table cell).
|
|
6
|
+
* @example
|
|
7
|
+
* <ProgressRing value={45} size={56} />
|
|
8
|
+
* @family Feedback & status
|
|
9
|
+
*/
|
|
10
|
+
export function ProgressRing({
|
|
11
|
+
value,
|
|
12
|
+
size,
|
|
13
|
+
className,
|
|
14
|
+
}: {
|
|
15
|
+
value: number
|
|
16
|
+
size?: number
|
|
17
|
+
className?: string
|
|
18
|
+
}) {
|
|
19
|
+
const clamped = Math.min(100, Math.max(0, value))
|
|
20
|
+
const r = 16
|
|
21
|
+
const c = 2 * Math.PI * r
|
|
22
|
+
const offset = c - (clamped / 100) * c
|
|
23
|
+
return (
|
|
24
|
+
<svg
|
|
25
|
+
data-testid="progress-ring"
|
|
26
|
+
viewBox="0 0 40 40"
|
|
27
|
+
style={size ? { width: size, height: size } : undefined}
|
|
28
|
+
className={cn('-rotate-90 size-10', className)}
|
|
29
|
+
>
|
|
30
|
+
<circle cx="20" cy="20" r={r} className="fill-none stroke-muted" strokeWidth="4" />
|
|
31
|
+
<circle
|
|
32
|
+
cx="20"
|
|
33
|
+
cy="20"
|
|
34
|
+
r={r}
|
|
35
|
+
className="fill-none stroke-primary"
|
|
36
|
+
strokeWidth="4"
|
|
37
|
+
strokeDasharray={c}
|
|
38
|
+
strokeDashoffset={offset}
|
|
39
|
+
strokeLinecap="round"
|
|
40
|
+
/>
|
|
41
|
+
</svg>
|
|
42
|
+
)
|
|
43
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
|
|
2
|
+
import { PolarAngleAxis, PolarGrid, Radar, RadarChart as ReRadar } 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
|
+
* Multi-axis radar chart.
|
|
14
|
+
* @when Comparing an item across 4–8 dimensions (scores, coverage).
|
|
15
|
+
* @example
|
|
16
|
+
* <RadarChart data={[{ label: "性能", value: 70 }]} />
|
|
17
|
+
* @family Chart & data
|
|
18
|
+
*/
|
|
19
|
+
export function RadarChart({
|
|
20
|
+
data,
|
|
21
|
+
config,
|
|
22
|
+
dataKey = 'value',
|
|
23
|
+
size,
|
|
24
|
+
className,
|
|
25
|
+
}: {
|
|
26
|
+
data: { label: string; value: number }[]
|
|
27
|
+
config: ChartConfig
|
|
28
|
+
dataKey?: string
|
|
29
|
+
size?: number
|
|
30
|
+
className?: string
|
|
31
|
+
}) {
|
|
32
|
+
return (
|
|
33
|
+
<ChartContainer
|
|
34
|
+
config={config}
|
|
35
|
+
className={cn('mx-auto aspect-square', size ? '' : 'w-full max-w-80', className)}
|
|
36
|
+
style={size ? { width: size, height: size } : undefined}
|
|
37
|
+
data-testid="radar-chart"
|
|
38
|
+
>
|
|
39
|
+
<ReRadar data={data}>
|
|
40
|
+
<PolarGrid />
|
|
41
|
+
<PolarAngleAxis dataKey="label" />
|
|
42
|
+
<ChartTooltip content={<ChartTooltipContent />} />
|
|
43
|
+
<Radar dataKey={dataKey} fill="var(--color-value)" fillOpacity={0.35} />
|
|
44
|
+
</ReRadar>
|
|
45
|
+
</ChartContainer>
|
|
46
|
+
)
|
|
47
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@mohou/ui/components/tabs'
|
|
2
|
+
import { CodeBlock } from '@mohou/ui/products/code-block'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Side-by-side HTTP request/response panel.
|
|
6
|
+
* @when Debugging one API call: method, url, bodies. Multiple calls streaming → `LogViewer`.
|
|
7
|
+
* @example
|
|
8
|
+
* <RequestInspector method="POST" url="/api/x" response="{\"ok\":true}" />
|
|
9
|
+
* @family Discovery & inspect
|
|
10
|
+
*/
|
|
11
|
+
export function RequestInspector({
|
|
12
|
+
method,
|
|
13
|
+
url,
|
|
14
|
+
request,
|
|
15
|
+
response,
|
|
16
|
+
}: {
|
|
17
|
+
method: string
|
|
18
|
+
url: string
|
|
19
|
+
request?: string
|
|
20
|
+
response?: string
|
|
21
|
+
}) {
|
|
22
|
+
return (
|
|
23
|
+
<div data-testid="request-inspector" className="flex flex-col gap-2">
|
|
24
|
+
<div className="font-mono text-sm">
|
|
25
|
+
<span className="font-medium">{method}</span> {url}
|
|
26
|
+
</div>
|
|
27
|
+
<Tabs defaultValue="response">
|
|
28
|
+
<TabsList>
|
|
29
|
+
<TabsTrigger value="request">Request</TabsTrigger>
|
|
30
|
+
<TabsTrigger value="response">Response</TabsTrigger>
|
|
31
|
+
</TabsList>
|
|
32
|
+
<TabsContent value="request">
|
|
33
|
+
<CodeBlock code={request ?? ''} language="json" />
|
|
34
|
+
</TabsContent>
|
|
35
|
+
<TabsContent value="response">
|
|
36
|
+
<CodeBlock code={response ?? ''} language="json" />
|
|
37
|
+
</TabsContent>
|
|
38
|
+
</Tabs>
|
|
39
|
+
</div>
|
|
40
|
+
)
|
|
41
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { motion, useReducedMotion, type MotionStyle } from 'motion/react'
|
|
2
|
+
|
|
3
|
+
import { cn } from '../lib/utils'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Entrance reveal — fade and rise, with a per-item `delay` for a stagger.
|
|
7
|
+
*
|
|
8
|
+
* This is the kit's front door to the platform `motion` build (`/mma/vendors/motion.js`,
|
|
9
|
+
* one shared React). Use it for the common case and reach for
|
|
10
|
+
* `import { motion, AnimatePresence } from "motion/react"` when you need exit, layout,
|
|
11
|
+
* or gesture animation — `AnimatePresence` in particular is what keeps a removing row
|
|
12
|
+
* from vanishing mid-transition.
|
|
13
|
+
*
|
|
14
|
+
* @when A card, row, or section appearing on first paint or after a filter change. Not
|
|
15
|
+
* for a hover/press response (one property: use a Tailwind `transition`) and not for
|
|
16
|
+
* animating an element out (use `AnimatePresence`).
|
|
17
|
+
* @example
|
|
18
|
+
* {rows.map((r, i) => (
|
|
19
|
+
* <Reveal key={r.id} delay={i * 60}>
|
|
20
|
+
* <Card>{r.title}</Card>
|
|
21
|
+
* </Reveal>
|
|
22
|
+
* ))}
|
|
23
|
+
* @family Animation
|
|
24
|
+
*/
|
|
25
|
+
export function Reveal({
|
|
26
|
+
children,
|
|
27
|
+
delay = 0,
|
|
28
|
+
distance = 8,
|
|
29
|
+
className,
|
|
30
|
+
style,
|
|
31
|
+
}: {
|
|
32
|
+
children: React.ReactNode
|
|
33
|
+
/** Stagger in ms — pass `i * 60` for a list. */
|
|
34
|
+
delay?: number | undefined
|
|
35
|
+
/** Rise distance in px. `0` fades in place. */
|
|
36
|
+
distance?: number | undefined
|
|
37
|
+
className?: string | undefined
|
|
38
|
+
style?: React.CSSProperties | undefined
|
|
39
|
+
}) {
|
|
40
|
+
// OS "reduce motion" wins over the design: no travel, no stagger, just present.
|
|
41
|
+
const reduce = useReducedMotion()
|
|
42
|
+
return (
|
|
43
|
+
<motion.div
|
|
44
|
+
data-mma-reveal=""
|
|
45
|
+
className={cn(className)}
|
|
46
|
+
style={(style ?? {}) as MotionStyle}
|
|
47
|
+
initial={reduce ? false : { opacity: 0, y: distance }}
|
|
48
|
+
animate={{ opacity: 1, y: 0 }}
|
|
49
|
+
transition={
|
|
50
|
+
reduce ? { duration: 0 } : { duration: 0.32, delay: delay / 1000, ease: 'easeOut' }
|
|
51
|
+
}
|
|
52
|
+
>
|
|
53
|
+
{children}
|
|
54
|
+
</motion.div>
|
|
55
|
+
)
|
|
56
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Timeline, type TimelineItem } from '@mohou/ui/products/timeline'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Timeline of run phases with duration + status.
|
|
5
|
+
* @when CI/agent/job phases on a time axis. Plain ordered events → `Timeline`.
|
|
6
|
+
* @example
|
|
7
|
+
* <RunTimeline items={[{ id: "p1", title: "checkout", status: "pass", time: "3s" }]} />
|
|
8
|
+
* @family Realtime
|
|
9
|
+
*/
|
|
10
|
+
export function RunTimeline({ items }: { items: TimelineItem[] }) {
|
|
11
|
+
return <Timeline items={items} />
|
|
12
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
|
|
2
|
+
import * as React from 'react'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Anchor nav that highlights the section in view.
|
|
6
|
+
* @when Long settings/report page with jump links.
|
|
7
|
+
* @example
|
|
8
|
+
* <Scrollspy sections={[{ id: "overview", label: "概览" }]} />
|
|
9
|
+
* @family Navigation
|
|
10
|
+
*/
|
|
11
|
+
export function Scrollspy({
|
|
12
|
+
sections,
|
|
13
|
+
}: {
|
|
14
|
+
sections: { id: string; label: string }[]
|
|
15
|
+
}) {
|
|
16
|
+
const [active, setActive] = React.useState(sections[0]?.id)
|
|
17
|
+
React.useEffect(() => {
|
|
18
|
+
const observer = new IntersectionObserver(
|
|
19
|
+
(entries) => {
|
|
20
|
+
const visible = entries.find(entry => entry.isIntersecting)
|
|
21
|
+
if (visible?.target.id) setActive(visible.target.id)
|
|
22
|
+
},
|
|
23
|
+
{ rootMargin: '-40% 0px -50% 0px' },
|
|
24
|
+
)
|
|
25
|
+
sections.forEach((section) => {
|
|
26
|
+
const el = document.getElementById(section.id)
|
|
27
|
+
if (el) observer.observe(el)
|
|
28
|
+
})
|
|
29
|
+
return () => observer.disconnect()
|
|
30
|
+
}, [sections])
|
|
31
|
+
return (
|
|
32
|
+
<nav className="flex flex-col gap-1 text-sm" data-testid="scrollspy">
|
|
33
|
+
{sections.map(section => (
|
|
34
|
+
<a
|
|
35
|
+
key={section.id}
|
|
36
|
+
href={`#${section.id}`}
|
|
37
|
+
className={
|
|
38
|
+
active === section.id
|
|
39
|
+
? 'text-foreground font-medium'
|
|
40
|
+
: 'text-muted-foreground'
|
|
41
|
+
}
|
|
42
|
+
>
|
|
43
|
+
{section.label}
|
|
44
|
+
</a>
|
|
45
|
+
))}
|
|
46
|
+
</nav>
|
|
47
|
+
)
|
|
48
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import type { ReactNode } from 'react';
|
|
4
|
+
|
|
5
|
+
import { Scrollspy } from '@mohou/ui/blocks/scrollspy';
|
|
6
|
+
import { useIsMobile } from '@mohou/ui/hooks/use-mobile';
|
|
7
|
+
import { useLabels } from '@mohou/ui/i18n/context';
|
|
8
|
+
import { cn } from '@mohou/ui/lib/utils';
|
|
9
|
+
|
|
10
|
+
export type SettingsSection = {
|
|
11
|
+
/** The anchor id. The preset puts it on the section **and** hands the same value to the jump
|
|
12
|
+
* list, so a nav that silently never highlights is not reachable from outside. */
|
|
13
|
+
id: string
|
|
14
|
+
label: string
|
|
15
|
+
/** One line under the heading — what this section is for. */
|
|
16
|
+
description?: string
|
|
17
|
+
content: ReactNode
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type SettingsSplitProps = {
|
|
21
|
+
/** The page's sections, in nav order. */
|
|
22
|
+
sections: SettingsSection[]
|
|
23
|
+
/** Anything above the jump list: page title, search, a plan badge. */
|
|
24
|
+
nav?: ReactNode
|
|
25
|
+
/** Pinned to the bottom of the **content** pane — an unsaved-changes bar belongs to what it
|
|
26
|
+
* applies to, not to the window. */
|
|
27
|
+
footer?: ReactNode
|
|
28
|
+
/** Jump-list width on wide screens, px. Default 224. */
|
|
29
|
+
navWidth?: number
|
|
30
|
+
className?: string
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Preferences / long-form page: a jump list that always matches the sections it scrolls to.
|
|
35
|
+
*
|
|
36
|
+
* Hand-rolled, this shape fails in three quiet ways: the nav's `href="#x"` and the section's
|
|
37
|
+
* `id` drift apart and the highlight never moves; the whole page scrolls so the nav scrolls out
|
|
38
|
+
* of view with the content it navigates; and a save bar placed after the content disappears
|
|
39
|
+
* below the fold. Here the ids come from one array, the nav and the content are independent
|
|
40
|
+
* scrollers, the jump list collapses to a pinned row when the panel is narrow, and `footer` is a
|
|
41
|
+
* sibling of the scroller — always visible, never part of the scroll.
|
|
42
|
+
*
|
|
43
|
+
* @when Page shape: a settings page, integration config, or a long report with anchored sections
|
|
44
|
+
* @example
|
|
45
|
+
* <SettingsSplit
|
|
46
|
+
* sections={[
|
|
47
|
+
* { id: "general", label: "通用", content: <GeneralForm /> },
|
|
48
|
+
* { id: "hooks", label: "Webhook", description: "出站事件", content: <HooksForm /> },
|
|
49
|
+
* ]}
|
|
50
|
+
* nav={<PageHeader title="设置" />}
|
|
51
|
+
* footer={dirty ? <UnsavedBar onSave={save} /> : undefined}
|
|
52
|
+
* />
|
|
53
|
+
* @family Layout & structure
|
|
54
|
+
*/
|
|
55
|
+
export function SettingsSplit({
|
|
56
|
+
sections,
|
|
57
|
+
nav,
|
|
58
|
+
footer,
|
|
59
|
+
navWidth = 224,
|
|
60
|
+
className,
|
|
61
|
+
}: SettingsSplitProps) {
|
|
62
|
+
const isNarrow = useIsMobile()
|
|
63
|
+
const t = useLabels('settingsSplit');
|
|
64
|
+
|
|
65
|
+
// Scrollspy re-observes whenever this array identity changes, so derive it once per section list.
|
|
66
|
+
const anchors = React.useMemo(
|
|
67
|
+
() => sections.map(({ id, label }) => ({ id, label })),
|
|
68
|
+
[sections],
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
const jumpList = <Scrollspy sections={anchors} />
|
|
72
|
+
|
|
73
|
+
const content = (
|
|
74
|
+
<div
|
|
75
|
+
className="flex min-h-0 flex-1 flex-col"
|
|
76
|
+
data-testid="settings-split-content"
|
|
77
|
+
>
|
|
78
|
+
<div
|
|
79
|
+
className="min-h-0 flex-1 overflow-y-auto"
|
|
80
|
+
data-testid="settings-split-scroll"
|
|
81
|
+
>
|
|
82
|
+
{sections.map(s => (
|
|
83
|
+
<section
|
|
84
|
+
key={s.id}
|
|
85
|
+
id={s.id}
|
|
86
|
+
className="border-border scroll-mt-4 border-b px-6 py-6 last:border-b-0"
|
|
87
|
+
>
|
|
88
|
+
<h2 className="text-base font-semibold tracking-tight">
|
|
89
|
+
{s.label}
|
|
90
|
+
</h2>
|
|
91
|
+
{s.description ? (
|
|
92
|
+
<p className="text-muted-foreground mt-1 text-sm">
|
|
93
|
+
{s.description}
|
|
94
|
+
</p>
|
|
95
|
+
) : null}
|
|
96
|
+
<div className="mt-4">{s.content}</div>
|
|
97
|
+
</section>
|
|
98
|
+
))}
|
|
99
|
+
</div>
|
|
100
|
+
{footer ? (
|
|
101
|
+
// Sibling of the scroller, not its last child: the bar cannot scroll out of view.
|
|
102
|
+
<div
|
|
103
|
+
className="border-border bg-background shrink-0 border-t px-6 py-3"
|
|
104
|
+
data-testid="settings-split-footer"
|
|
105
|
+
>
|
|
106
|
+
{footer}
|
|
107
|
+
</div>
|
|
108
|
+
) : null}
|
|
109
|
+
</div>
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
if (isNarrow) {
|
|
113
|
+
return (
|
|
114
|
+
<div
|
|
115
|
+
className={cn('flex h-full min-h-0 w-full flex-col', className)}
|
|
116
|
+
data-testid="settings-split"
|
|
117
|
+
>
|
|
118
|
+
<div
|
|
119
|
+
className="border-border bg-background shrink-0 overflow-x-auto border-b px-4 py-2"
|
|
120
|
+
data-testid="settings-split-nav"
|
|
121
|
+
aria-label={t.nav}
|
|
122
|
+
>
|
|
123
|
+
<div className="flex min-w-max items-center gap-4">
|
|
124
|
+
{nav ? (
|
|
125
|
+
<div className="text-muted-foreground text-xs">{nav}</div>
|
|
126
|
+
) : null}
|
|
127
|
+
{jumpList}
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
{content}
|
|
131
|
+
</div>
|
|
132
|
+
)
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
return (
|
|
136
|
+
<div
|
|
137
|
+
className={cn('flex h-full min-h-0 w-full', className)}
|
|
138
|
+
data-testid="settings-split"
|
|
139
|
+
data-slot="settings-split-wide"
|
|
140
|
+
>
|
|
141
|
+
<aside
|
|
142
|
+
className="border-border min-h-0 w-56 shrink-0 overflow-y-auto border-r px-4 py-6"
|
|
143
|
+
data-testid="settings-split-nav"
|
|
144
|
+
aria-label={t.nav}
|
|
145
|
+
style={{ width: navWidth }}
|
|
146
|
+
>
|
|
147
|
+
{nav ? <div className="mb-4">{nav}</div> : null}
|
|
148
|
+
{jumpList}
|
|
149
|
+
</aside>
|
|
150
|
+
{content}
|
|
151
|
+
</div>
|
|
152
|
+
)
|
|
153
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Badge } from '@mohou/ui/components/badge'
|
|
2
|
+
import { cn } from '@mohou/ui/lib/utils'
|
|
3
|
+
|
|
4
|
+
const tone = {
|
|
5
|
+
P0: 'bg-destructive/15 text-destructive',
|
|
6
|
+
P1: 'bg-orange-500/15 text-orange-700 dark:text-orange-400',
|
|
7
|
+
P2: 'bg-amber-500/15 text-amber-700 dark:text-amber-400',
|
|
8
|
+
P3: 'bg-muted text-muted-foreground',
|
|
9
|
+
critical: 'bg-destructive/15 text-destructive',
|
|
10
|
+
high: 'bg-orange-500/15 text-orange-700 dark:text-orange-400',
|
|
11
|
+
medium: 'bg-amber-500/15 text-amber-700 dark:text-amber-400',
|
|
12
|
+
low: 'bg-muted text-muted-foreground',
|
|
13
|
+
} as const
|
|
14
|
+
|
|
15
|
+
export type Severity = keyof typeof tone
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Chip for severity/blocker level.
|
|
19
|
+
* @when P0–P4, blocker/critical columns. Run outcome → `StatusBadge`.
|
|
20
|
+
* @example
|
|
21
|
+
* <SeverityChip severity="critical" />
|
|
22
|
+
* @family Feedback & status
|
|
23
|
+
*/
|
|
24
|
+
export function SeverityChip({ severity }: { severity: Severity | string }) {
|
|
25
|
+
return (
|
|
26
|
+
<Badge
|
|
27
|
+
variant="outline"
|
|
28
|
+
data-testid="severity-chip"
|
|
29
|
+
className={cn('border-transparent uppercase', tone[severity as Severity] ?? tone.low)}
|
|
30
|
+
>
|
|
31
|
+
{severity}
|
|
32
|
+
</Badge>
|
|
33
|
+
)
|
|
34
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
|
|
2
|
+
import { Line, LineChart, YAxis } from 'recharts'
|
|
3
|
+
|
|
4
|
+
import { ChartContainer, type ChartConfig } from '@mohou/ui/components/chart'
|
|
5
|
+
import { cn } from '@mohou/ui/lib/utils'
|
|
6
|
+
|
|
7
|
+
const config = {
|
|
8
|
+
value: { label: 'Value', color: 'var(--primary)' },
|
|
9
|
+
} satisfies ChartConfig
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Tiny inline trend line, no axes.
|
|
13
|
+
* @when Trend inside a table row or KPI card.
|
|
14
|
+
* @example
|
|
15
|
+
* <Sparkline data={[{ value: 3 }, { value: 9 }, { value: 6 }]} />
|
|
16
|
+
* @family Chart & data
|
|
17
|
+
*/
|
|
18
|
+
export function Sparkline({ data, className }: { data: { value: number }[]; className?: string }) {
|
|
19
|
+
return (
|
|
20
|
+
<ChartContainer config={config} className={cn('h-20 w-full', className)} data-testid="sparkline">
|
|
21
|
+
<LineChart data={data}>
|
|
22
|
+
<YAxis hide domain={['dataMin', 'dataMax']} />
|
|
23
|
+
<Line dataKey="value" type="monotone" stroke="var(--color-value)" strokeWidth={1.5} dot={false} />
|
|
24
|
+
</LineChart>
|
|
25
|
+
</ChartContainer>
|
|
26
|
+
)
|
|
27
|
+
}
|