@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,54 @@
|
|
|
1
|
+
|
|
2
|
+
import { Pie, PieChart } from 'recharts'
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
ChartContainer,
|
|
6
|
+
ChartTooltip,
|
|
7
|
+
ChartTooltipContent,
|
|
8
|
+
type ChartConfig,
|
|
9
|
+
} from '@mohou/ui/components/chart'
|
|
10
|
+
|
|
11
|
+
import { cn } from '@mohou/ui/lib/utils'
|
|
12
|
+
|
|
13
|
+
export type Slice = { name: string; value: number; fill: string }
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Ring chart with centre label.
|
|
17
|
+
* @when Part-of-whole (≤6 slices): storage usage, status split. More categories → `StackedBarChart`.
|
|
18
|
+
* @example
|
|
19
|
+
* <DonutChart data={[{ label: "OK", value: 82, color: "var(--primary)" }]} center="82%" />
|
|
20
|
+
* @family Chart & data
|
|
21
|
+
*/
|
|
22
|
+
export function DonutChart({
|
|
23
|
+
data,
|
|
24
|
+
config,
|
|
25
|
+
center,
|
|
26
|
+
size,
|
|
27
|
+
className,
|
|
28
|
+
}: {
|
|
29
|
+
data: Slice[]
|
|
30
|
+
config: ChartConfig
|
|
31
|
+
center?: string
|
|
32
|
+
size?: number
|
|
33
|
+
className?: string
|
|
34
|
+
}) {
|
|
35
|
+
return (
|
|
36
|
+
<div className={cn('relative', className)} data-testid="donut-chart">
|
|
37
|
+
<ChartContainer
|
|
38
|
+
config={config}
|
|
39
|
+
className={cn('mx-auto aspect-square', size ? '' : 'w-full max-w-80')}
|
|
40
|
+
style={size ? { width: size, height: size } : undefined}
|
|
41
|
+
>
|
|
42
|
+
<PieChart>
|
|
43
|
+
<ChartTooltip content={<ChartTooltipContent hideLabel />} />
|
|
44
|
+
<Pie data={data} dataKey="value" nameKey="name" innerRadius={50} />
|
|
45
|
+
</PieChart>
|
|
46
|
+
</ChartContainer>
|
|
47
|
+
{center ? (
|
|
48
|
+
<div className="pointer-events-none absolute inset-0 flex items-center justify-center text-sm font-medium">
|
|
49
|
+
{center}
|
|
50
|
+
</div>
|
|
51
|
+
) : null}
|
|
52
|
+
</div>
|
|
53
|
+
)
|
|
54
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Badge } from '@mohou/ui/components/badge'
|
|
2
|
+
import { cn } from '@mohou/ui/lib/utils'
|
|
3
|
+
|
|
4
|
+
const tone: Record<string, string> = {
|
|
5
|
+
prd: 'bg-destructive/15 text-destructive',
|
|
6
|
+
prod: 'bg-destructive/15 text-destructive',
|
|
7
|
+
stg: 'bg-amber-500/15 text-amber-700 dark:text-amber-400',
|
|
8
|
+
staging: 'bg-amber-500/15 text-amber-700 dark:text-amber-400',
|
|
9
|
+
dev: 'bg-sky-500/15 text-sky-700 dark:text-sky-400',
|
|
10
|
+
local: 'bg-muted text-muted-foreground',
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Coloured pill for an environment name.
|
|
15
|
+
* @when prd / stg / dev markers in headers and tables.
|
|
16
|
+
* @example
|
|
17
|
+
* <EnvBadge env="production" />
|
|
18
|
+
* @family Feedback & status
|
|
19
|
+
*/
|
|
20
|
+
export function EnvBadge({ env }: { env: string }) {
|
|
21
|
+
return (
|
|
22
|
+
<Badge
|
|
23
|
+
variant="outline"
|
|
24
|
+
data-testid="env-badge"
|
|
25
|
+
className={cn('border-transparent uppercase', tone[env.toLowerCase()] ?? tone.local)}
|
|
26
|
+
>
|
|
27
|
+
{env}
|
|
28
|
+
</Badge>
|
|
29
|
+
)
|
|
30
|
+
}
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Check, ClipboardList, Copy, Eye, EyeOff } from 'lucide-react';
|
|
4
|
+
|
|
5
|
+
import { useLabels } from '@mohou/ui/i18n/context';
|
|
6
|
+
import { writeClipboard } from '@mohou/ui/lib/clipboard';
|
|
7
|
+
import { cn } from '@mohou/ui/lib/utils';
|
|
8
|
+
|
|
9
|
+
export type Environment =
|
|
10
|
+
| 'production'
|
|
11
|
+
| 'preview'
|
|
12
|
+
| 'development'
|
|
13
|
+
| (string & {})
|
|
14
|
+
|
|
15
|
+
export type EnvVariable = {
|
|
16
|
+
/** Variable name (e.g. DATABASE_URL). */
|
|
17
|
+
key: string
|
|
18
|
+
/** Variable value. Masked by default. */
|
|
19
|
+
value: string
|
|
20
|
+
/** Target environment. When provided, renders as a pill. */
|
|
21
|
+
environment?: Environment
|
|
22
|
+
/** Optional description shown below the key. */
|
|
23
|
+
description?: string
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type EnvTableProps = Omit<
|
|
27
|
+
React.ComponentProps<'div'>,
|
|
28
|
+
'children' | 'title'
|
|
29
|
+
> & {
|
|
30
|
+
/** Environment variables to display. */
|
|
31
|
+
variables: EnvVariable[]
|
|
32
|
+
/** Optional heading above the table. */
|
|
33
|
+
title?: string
|
|
34
|
+
/** Start with all values revealed. Defaults to false. */
|
|
35
|
+
defaultRevealed?: boolean
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function envBadgeColor(env: Environment): string {
|
|
39
|
+
switch (env) {
|
|
40
|
+
case 'production':
|
|
41
|
+
return 'bg-emerald-500/15 text-emerald-700 dark:text-emerald-400';
|
|
42
|
+
case 'preview':
|
|
43
|
+
return 'bg-sky-500/15 text-sky-700 dark:text-sky-400';
|
|
44
|
+
case 'development':
|
|
45
|
+
return 'bg-amber-500/15 text-amber-700 dark:text-amber-400';
|
|
46
|
+
default:
|
|
47
|
+
return 'bg-muted text-muted-foreground';
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function maskValue(value: string): string {
|
|
52
|
+
if (value.length <= 4) return '••••••••';
|
|
53
|
+
return `${value.slice(0, 4)}••••••••`
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function CopyButton({
|
|
57
|
+
value,
|
|
58
|
+
label,
|
|
59
|
+
className,
|
|
60
|
+
}: {
|
|
61
|
+
value: string
|
|
62
|
+
label: string
|
|
63
|
+
className?: string
|
|
64
|
+
}) {
|
|
65
|
+
const [copied, setCopied] = React.useState(false)
|
|
66
|
+
|
|
67
|
+
const handleCopy = React.useCallback(() => {
|
|
68
|
+
void writeClipboard(value).then((ok) => {
|
|
69
|
+
if (!ok) return
|
|
70
|
+
setCopied(true)
|
|
71
|
+
setTimeout(() => setCopied(false), 1500)
|
|
72
|
+
});
|
|
73
|
+
}, [value])
|
|
74
|
+
|
|
75
|
+
return (
|
|
76
|
+
<button
|
|
77
|
+
type="button"
|
|
78
|
+
onClick={handleCopy}
|
|
79
|
+
aria-label={label}
|
|
80
|
+
className={cn(
|
|
81
|
+
'inline-flex items-center justify-center rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
|
|
82
|
+
className,
|
|
83
|
+
)}
|
|
84
|
+
>
|
|
85
|
+
{copied ? (
|
|
86
|
+
<Check className="size-3.5 text-emerald-500" />
|
|
87
|
+
) : (
|
|
88
|
+
<Copy className="size-3.5" />
|
|
89
|
+
)}
|
|
90
|
+
</button>
|
|
91
|
+
)
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function RevealButton({
|
|
95
|
+
revealed,
|
|
96
|
+
onToggle,
|
|
97
|
+
label,
|
|
98
|
+
}: {
|
|
99
|
+
revealed: boolean
|
|
100
|
+
onToggle: () => void
|
|
101
|
+
label: string
|
|
102
|
+
}) {
|
|
103
|
+
return (
|
|
104
|
+
<button
|
|
105
|
+
type="button"
|
|
106
|
+
onClick={onToggle}
|
|
107
|
+
aria-label={label}
|
|
108
|
+
className="inline-flex items-center justify-center rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
109
|
+
>
|
|
110
|
+
{revealed ? (
|
|
111
|
+
<EyeOff className="size-3.5" />
|
|
112
|
+
) : (
|
|
113
|
+
<Eye className="size-3.5" />
|
|
114
|
+
)}
|
|
115
|
+
</button>
|
|
116
|
+
)
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function EnvRow({
|
|
120
|
+
variable,
|
|
121
|
+
revealed,
|
|
122
|
+
onToggleReveal,
|
|
123
|
+
}: {
|
|
124
|
+
variable: EnvVariable
|
|
125
|
+
revealed: boolean
|
|
126
|
+
onToggleReveal: () => void
|
|
127
|
+
}) {
|
|
128
|
+
const t = useLabels('envTable');
|
|
129
|
+
const displayValue = revealed ? variable.value : maskValue(variable.value)
|
|
130
|
+
|
|
131
|
+
return (
|
|
132
|
+
<div
|
|
133
|
+
data-slot="env-row"
|
|
134
|
+
className="group flex items-start gap-3 px-3 py-2.5 sm:items-center sm:px-4"
|
|
135
|
+
>
|
|
136
|
+
<div className="flex min-w-0 flex-1 flex-col gap-1.5 sm:flex-row sm:items-center sm:gap-4">
|
|
137
|
+
<div className="flex shrink-0 items-center gap-2 sm:w-[220px]">
|
|
138
|
+
<span className="truncate font-mono text-xs font-semibold text-foreground">
|
|
139
|
+
{variable.key}
|
|
140
|
+
</span>
|
|
141
|
+
{variable.environment ? (
|
|
142
|
+
<span
|
|
143
|
+
className={cn(
|
|
144
|
+
'shrink-0 rounded-full px-2 py-0.5 text-[10px] font-medium leading-none',
|
|
145
|
+
envBadgeColor(variable.environment),
|
|
146
|
+
)}
|
|
147
|
+
>
|
|
148
|
+
{variable.environment}
|
|
149
|
+
</span>
|
|
150
|
+
) : null}
|
|
151
|
+
</div>
|
|
152
|
+
|
|
153
|
+
<div className="min-w-0 flex-1">
|
|
154
|
+
<span
|
|
155
|
+
className={cn(
|
|
156
|
+
'break-all font-mono text-xs',
|
|
157
|
+
revealed ? 'text-foreground' : 'text-muted-foreground',
|
|
158
|
+
)}
|
|
159
|
+
>
|
|
160
|
+
{displayValue}
|
|
161
|
+
</span>
|
|
162
|
+
{variable.description ? (
|
|
163
|
+
<p className="mt-0.5 text-[11px] text-muted-foreground/70">
|
|
164
|
+
{variable.description}
|
|
165
|
+
</p>
|
|
166
|
+
) : null}
|
|
167
|
+
</div>
|
|
168
|
+
</div>
|
|
169
|
+
|
|
170
|
+
<div className="flex shrink-0 items-center gap-0.5">
|
|
171
|
+
<RevealButton
|
|
172
|
+
revealed={revealed}
|
|
173
|
+
onToggle={onToggleReveal}
|
|
174
|
+
label={revealed ? t.hideKey(variable.key) : t.revealKey(variable.key)}
|
|
175
|
+
/>
|
|
176
|
+
<CopyButton value={variable.value} label={t.copyValue(variable.key)} />
|
|
177
|
+
</div>
|
|
178
|
+
</div>
|
|
179
|
+
)
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Read-only env var table with masked values and copy.
|
|
184
|
+
* @when Settings / deploy preview / secrets display
|
|
185
|
+
* @example
|
|
186
|
+
* <EnvTable variables={[{ key: "API_URL", value: "https://…", environment: "production" }]} />
|
|
187
|
+
* @family Data & tables
|
|
188
|
+
*/
|
|
189
|
+
export function EnvTable({
|
|
190
|
+
variables,
|
|
191
|
+
title,
|
|
192
|
+
defaultRevealed = false,
|
|
193
|
+
className,
|
|
194
|
+
...props
|
|
195
|
+
}: EnvTableProps) {
|
|
196
|
+
const t = useLabels('envTable');
|
|
197
|
+
const [revealedIndices, setRevealedIndices] = React.useState<Set<number>>(
|
|
198
|
+
() => (defaultRevealed ? new Set(variables.map((_, i) => i)) : new Set()),
|
|
199
|
+
)
|
|
200
|
+
const [copiedAll, setCopiedAll] = React.useState(false)
|
|
201
|
+
|
|
202
|
+
const allRevealed =
|
|
203
|
+
variables.length > 0 && revealedIndices.size === variables.length
|
|
204
|
+
|
|
205
|
+
const toggleIndex = React.useCallback((index: number) => {
|
|
206
|
+
setRevealedIndices((prev) => {
|
|
207
|
+
const next = new Set(prev)
|
|
208
|
+
if (next.has(index)) {
|
|
209
|
+
next.delete(index)
|
|
210
|
+
} else {
|
|
211
|
+
next.add(index)
|
|
212
|
+
}
|
|
213
|
+
return next
|
|
214
|
+
});
|
|
215
|
+
}, [])
|
|
216
|
+
|
|
217
|
+
const toggleAll = React.useCallback(() => {
|
|
218
|
+
if (allRevealed) {
|
|
219
|
+
setRevealedIndices(new Set())
|
|
220
|
+
} else {
|
|
221
|
+
setRevealedIndices(new Set(variables.map((_, i) => i)))
|
|
222
|
+
}
|
|
223
|
+
}, [allRevealed, variables])
|
|
224
|
+
|
|
225
|
+
const copyAllAsEnv = React.useCallback(() => {
|
|
226
|
+
const text = variables.map(v => `${v.key}=${v.value}`).join('\n');
|
|
227
|
+
void writeClipboard(text).then((ok) => {
|
|
228
|
+
if (!ok) return
|
|
229
|
+
setCopiedAll(true)
|
|
230
|
+
setTimeout(() => setCopiedAll(false), 1500)
|
|
231
|
+
});
|
|
232
|
+
}, [variables])
|
|
233
|
+
|
|
234
|
+
if (variables.length === 0) {
|
|
235
|
+
return (
|
|
236
|
+
<div
|
|
237
|
+
data-testid="env-table"
|
|
238
|
+
data-slot="env-table"
|
|
239
|
+
className={cn(
|
|
240
|
+
'flex items-center justify-center rounded-xl border border-border/60 bg-card py-10 text-sm text-muted-foreground shadow-sm',
|
|
241
|
+
className,
|
|
242
|
+
)}
|
|
243
|
+
{...props}
|
|
244
|
+
>
|
|
245
|
+
{t.empty}
|
|
246
|
+
</div>
|
|
247
|
+
)
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
return (
|
|
251
|
+
<div
|
|
252
|
+
data-testid="env-table"
|
|
253
|
+
data-slot="env-table"
|
|
254
|
+
className={cn(
|
|
255
|
+
'overflow-hidden rounded-xl border border-border/60 bg-card shadow-sm',
|
|
256
|
+
className,
|
|
257
|
+
)}
|
|
258
|
+
{...props}
|
|
259
|
+
>
|
|
260
|
+
<div className="flex items-center justify-between border-b border-border/40 px-3 py-2.5 sm:px-4">
|
|
261
|
+
<div className="flex items-center gap-2">
|
|
262
|
+
{title ? (
|
|
263
|
+
<h3 className="text-sm font-semibold text-foreground">{title}</h3>
|
|
264
|
+
) : null}
|
|
265
|
+
<span className="rounded-full bg-muted px-2 py-0.5 text-[10px] font-medium text-muted-foreground">
|
|
266
|
+
{variables.length}
|
|
267
|
+
</span>
|
|
268
|
+
</div>
|
|
269
|
+
<div className="flex items-center gap-1">
|
|
270
|
+
<button
|
|
271
|
+
type="button"
|
|
272
|
+
onClick={toggleAll}
|
|
273
|
+
aria-label={allRevealed ? t.hideAllValues : t.revealAllValues}
|
|
274
|
+
className="inline-flex items-center gap-1.5 rounded-md px-2 py-1.5 text-xs text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
275
|
+
>
|
|
276
|
+
{allRevealed ? (
|
|
277
|
+
<EyeOff className="size-3.5" />
|
|
278
|
+
) : (
|
|
279
|
+
<Eye className="size-3.5" />
|
|
280
|
+
)}
|
|
281
|
+
<span className="hidden sm:inline">
|
|
282
|
+
{allRevealed ? t.hideAll : t.revealAll}
|
|
283
|
+
</span>
|
|
284
|
+
</button>
|
|
285
|
+
<button
|
|
286
|
+
type="button"
|
|
287
|
+
onClick={copyAllAsEnv}
|
|
288
|
+
aria-label={t.copyEnv}
|
|
289
|
+
className="inline-flex items-center gap-1.5 rounded-md px-2 py-1.5 text-xs text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
290
|
+
>
|
|
291
|
+
{copiedAll ? (
|
|
292
|
+
<Check className="size-3.5 text-emerald-500" />
|
|
293
|
+
) : (
|
|
294
|
+
<ClipboardList className="size-3.5" />
|
|
295
|
+
)}
|
|
296
|
+
<span className="hidden sm:inline">
|
|
297
|
+
{copiedAll ? t.copied : t.copyEnv}
|
|
298
|
+
</span>
|
|
299
|
+
</button>
|
|
300
|
+
</div>
|
|
301
|
+
</div>
|
|
302
|
+
|
|
303
|
+
<div className="divide-y divide-border/40">
|
|
304
|
+
{variables.map((variable, i) => (
|
|
305
|
+
<EnvRow
|
|
306
|
+
key={`${variable.key}-${i}`}
|
|
307
|
+
variable={variable}
|
|
308
|
+
revealed={revealedIndices.has(i)}
|
|
309
|
+
onToggleReveal={() => toggleIndex(i)}
|
|
310
|
+
/>
|
|
311
|
+
))}
|
|
312
|
+
</div>
|
|
313
|
+
</div>
|
|
314
|
+
)
|
|
315
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TreeView, type TreeNode } from '@mohou/ui/products/tree-view'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Expandable file/dir tree (icons built in).
|
|
5
|
+
* @when Repo/zip contents where selection matters. Plain nested list → `TreeView`.
|
|
6
|
+
* @example
|
|
7
|
+
* <FileTree nodes={[{ name: "src", children: [{ name: "main.api.ts" }] }]} />
|
|
8
|
+
* @family Data & tables
|
|
9
|
+
*/
|
|
10
|
+
export function FileTree({ nodes }: { nodes: TreeNode[] }) {
|
|
11
|
+
return <TreeView nodes={nodes} />
|
|
12
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Horizontal wrap row for filters and toolbar controls.
|
|
5
|
+
* @when Above DataGrid or any filtered list
|
|
6
|
+
* @example
|
|
7
|
+
* <FilterBar>
|
|
8
|
+
* <DateRangePicker value={range} onChange={setRange} />
|
|
9
|
+
* <SearchInput value={q} onChange={setQ} />
|
|
10
|
+
* </FilterBar>
|
|
11
|
+
* @family Data & tables
|
|
12
|
+
*/
|
|
13
|
+
export function FilterBar({ children }: { children: ReactNode }) {
|
|
14
|
+
return (
|
|
15
|
+
<div
|
|
16
|
+
className="flex flex-wrap items-center gap-2"
|
|
17
|
+
data-testid="filter-bar"
|
|
18
|
+
>
|
|
19
|
+
{children}
|
|
20
|
+
</div>
|
|
21
|
+
)
|
|
22
|
+
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import type { FormEvent, ReactNode } from 'react';
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
AlertDialog,
|
|
7
|
+
AlertDialogCancel,
|
|
8
|
+
AlertDialogContent,
|
|
9
|
+
AlertDialogDescription,
|
|
10
|
+
AlertDialogAction,
|
|
11
|
+
AlertDialogFooter,
|
|
12
|
+
AlertDialogHeader,
|
|
13
|
+
AlertDialogTitle,
|
|
14
|
+
} from '@mohou/ui/components/alert-dialog';
|
|
15
|
+
import {
|
|
16
|
+
Sheet,
|
|
17
|
+
SheetContent,
|
|
18
|
+
SheetDescription,
|
|
19
|
+
SheetHeader,
|
|
20
|
+
SheetTitle,
|
|
21
|
+
} from '@mohou/ui/components/sheet';
|
|
22
|
+
import { useLabels } from '@mohou/ui/i18n/context';
|
|
23
|
+
import { cn } from '@mohou/ui/lib/utils';
|
|
24
|
+
|
|
25
|
+
export type FormSheetProps = {
|
|
26
|
+
open: boolean
|
|
27
|
+
onOpenChange: (open: boolean) => void
|
|
28
|
+
title: ReactNode
|
|
29
|
+
description?: ReactNode
|
|
30
|
+
/** Anything below the title: a badge, a record id, a tab strip. */
|
|
31
|
+
header?: ReactNode
|
|
32
|
+
/** The scrolling form fields. */
|
|
33
|
+
children: ReactNode
|
|
34
|
+
/** Action row, pinned. Put the primary control in here with `type="submit"`. */
|
|
35
|
+
footer?: ReactNode
|
|
36
|
+
/** One submit path for the whole sheet: Enter in a field and the footer button land here. */
|
|
37
|
+
onSubmit?: (e: FormEvent<HTMLFormElement>) => void
|
|
38
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
39
|
+
width?: string | number
|
|
40
|
+
/** Ask before throwing edits away. The app owns the check; the preset owns the prompt. */
|
|
41
|
+
dirty?: boolean
|
|
42
|
+
className?: string
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Create / edit form over a list you do not want to lose.
|
|
47
|
+
*
|
|
48
|
+
* The usual build has three cracks: the header and footer scroll away with the fields (so the
|
|
49
|
+
* Cancel button is somewhere the user has to hunt for), Enter in a text field submits *something
|
|
50
|
+
* else* or nothing because there is no form around the inputs, and Escape closes a sheet full of
|
|
51
|
+
* unsaved edits. Here only the body is a scroller — header, form and footer are siblings inside a
|
|
52
|
+
* flex column — the fields and the footer share one `<form onSubmit>`, and a dirty sheet asks
|
|
53
|
+
* first.
|
|
54
|
+
*
|
|
55
|
+
* @when Page shape: focused create/edit over a list — new record, edit record, wizard-less config
|
|
56
|
+
* @example
|
|
57
|
+
* <FormSheet
|
|
58
|
+
* open={Boolean(editing)}
|
|
59
|
+
* onOpenChange={(o) => !o && setEditing(null)}
|
|
60
|
+
* title="Edit issue"
|
|
61
|
+
* dirty={dirty}
|
|
62
|
+
* onSubmit={save}
|
|
63
|
+
* footer={<Button type="submit">Save</Button>}
|
|
64
|
+
* >
|
|
65
|
+
* <Input name="summary" />
|
|
66
|
+
* </FormSheet>
|
|
67
|
+
* @family Layout & structure
|
|
68
|
+
*/
|
|
69
|
+
export function FormSheet({
|
|
70
|
+
open,
|
|
71
|
+
onOpenChange,
|
|
72
|
+
title,
|
|
73
|
+
description,
|
|
74
|
+
header,
|
|
75
|
+
children,
|
|
76
|
+
footer,
|
|
77
|
+
onSubmit,
|
|
78
|
+
side = 'right',
|
|
79
|
+
width = 480,
|
|
80
|
+
dirty = false,
|
|
81
|
+
className,
|
|
82
|
+
}: FormSheetProps) {
|
|
83
|
+
const t = useLabels('formSheet');
|
|
84
|
+
const [guard, setGuard] = React.useState(false)
|
|
85
|
+
|
|
86
|
+
const request = (next: boolean) => {
|
|
87
|
+
if (!next && dirty) {
|
|
88
|
+
setGuard(true)
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
onOpenChange(next)
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
return (
|
|
95
|
+
<>
|
|
96
|
+
<Sheet open={open} onOpenChange={request}>
|
|
97
|
+
<SheetContent
|
|
98
|
+
side={side}
|
|
99
|
+
width={width}
|
|
100
|
+
className={cn('flex min-h-0 flex-col gap-0 p-0', className)}
|
|
101
|
+
data-testid="form-sheet"
|
|
102
|
+
>
|
|
103
|
+
<SheetHeader className="border-border shrink-0 border-b px-6 py-4 text-left">
|
|
104
|
+
<SheetTitle className="text-base">{title}</SheetTitle>
|
|
105
|
+
{description ? (
|
|
106
|
+
<SheetDescription>{description}</SheetDescription>
|
|
107
|
+
) : null}
|
|
108
|
+
{header}
|
|
109
|
+
</SheetHeader>
|
|
110
|
+
|
|
111
|
+
{/* One form wraps the scroller *and* the footer, so Enter and the button are the same path. */}
|
|
112
|
+
<form
|
|
113
|
+
className="flex min-h-0 flex-1 flex-col"
|
|
114
|
+
onSubmit={(e) => {
|
|
115
|
+
e.preventDefault()
|
|
116
|
+
onSubmit?.(e)
|
|
117
|
+
}}
|
|
118
|
+
data-testid="form-sheet-form"
|
|
119
|
+
>
|
|
120
|
+
<div
|
|
121
|
+
className="min-h-0 flex-1 overflow-y-auto px-6 py-4"
|
|
122
|
+
data-testid="form-sheet-body"
|
|
123
|
+
>
|
|
124
|
+
{children}
|
|
125
|
+
</div>
|
|
126
|
+
{footer ? (
|
|
127
|
+
<div
|
|
128
|
+
className="border-border bg-background shrink-0 border-t px-6 py-3"
|
|
129
|
+
data-testid="form-sheet-footer"
|
|
130
|
+
>
|
|
131
|
+
{footer}
|
|
132
|
+
</div>
|
|
133
|
+
) : null}
|
|
134
|
+
</form>
|
|
135
|
+
</SheetContent>
|
|
136
|
+
</Sheet>
|
|
137
|
+
|
|
138
|
+
<AlertDialog open={guard} onOpenChange={setGuard}>
|
|
139
|
+
<AlertDialogContent data-testid="form-sheet-guard">
|
|
140
|
+
<AlertDialogHeader>
|
|
141
|
+
<AlertDialogTitle>{t.discardTitle}</AlertDialogTitle>
|
|
142
|
+
<AlertDialogDescription>{t.discardBody}</AlertDialogDescription>
|
|
143
|
+
</AlertDialogHeader>
|
|
144
|
+
<AlertDialogFooter>
|
|
145
|
+
<AlertDialogCancel>{t.keepEditing}</AlertDialogCancel>
|
|
146
|
+
<AlertDialogAction
|
|
147
|
+
onClick={() => {
|
|
148
|
+
setGuard(false)
|
|
149
|
+
onOpenChange(false)
|
|
150
|
+
}}
|
|
151
|
+
>
|
|
152
|
+
{t.discard}
|
|
153
|
+
</AlertDialogAction>
|
|
154
|
+
</AlertDialogFooter>
|
|
155
|
+
</AlertDialogContent>
|
|
156
|
+
</AlertDialog>
|
|
157
|
+
</>
|
|
158
|
+
)
|
|
159
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ProgressRing } from '@mohou/ui/blocks/progress-ring'
|
|
2
|
+
import { cn } from '@mohou/ui/lib/utils'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Arc gauge for one 0–100 metric.
|
|
6
|
+
* @when A single health/capacity number that needs a zone (SLO, disk). Series over time → `Sparkline`.
|
|
7
|
+
* @example
|
|
8
|
+
* <Gauge value={73} label="磁盘" />
|
|
9
|
+
* @family Chart & data
|
|
10
|
+
*/
|
|
11
|
+
export function Gauge({
|
|
12
|
+
value,
|
|
13
|
+
label,
|
|
14
|
+
size = 112,
|
|
15
|
+
className,
|
|
16
|
+
}: {
|
|
17
|
+
value: number
|
|
18
|
+
label?: string
|
|
19
|
+
size?: number
|
|
20
|
+
className?: string
|
|
21
|
+
}) {
|
|
22
|
+
return (
|
|
23
|
+
<div
|
|
24
|
+
className={cn('flex flex-col items-center gap-2', className)}
|
|
25
|
+
data-testid="gauge"
|
|
26
|
+
>
|
|
27
|
+
<div className="relative" style={{ width: size, height: size }}>
|
|
28
|
+
<ProgressRing value={value} className="h-full w-full" />
|
|
29
|
+
<div className="absolute inset-0 flex flex-col items-center justify-center">
|
|
30
|
+
<span className="text-2xl font-semibold tabular-nums">{value}%</span>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
{label ? <div className="text-xs text-muted-foreground">{label}</div> : null}
|
|
34
|
+
</div>
|
|
35
|
+
)
|
|
36
|
+
}
|