@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,50 @@
|
|
|
1
|
+
import type { ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
import { Card, CardContent, CardHeader, CardTitle } from '@mohou/ui/components/card'
|
|
4
|
+
import { cn } from '@mohou/ui/lib/utils'
|
|
5
|
+
|
|
6
|
+
export type StatCardProps = {
|
|
7
|
+
title: string
|
|
8
|
+
value: ReactNode
|
|
9
|
+
delta?: string | undefined
|
|
10
|
+
trend?: 'up' | 'down' | 'flat' | undefined
|
|
11
|
+
children?: ReactNode | undefined
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* KPI card: title, value, optional delta/trend.
|
|
16
|
+
* @when Dashboard metric strip
|
|
17
|
+
* @example
|
|
18
|
+
* <StatCard title="Pass rate" value="98%" delta="+1.2%" trend="up" />
|
|
19
|
+
* @family Chart & data
|
|
20
|
+
*/
|
|
21
|
+
export function StatCard({ title, value, delta, trend = 'flat', children }: StatCardProps) {
|
|
22
|
+
return (
|
|
23
|
+
<Card data-testid="stat-card">
|
|
24
|
+
<CardHeader>
|
|
25
|
+
<CardTitle className="text-muted-foreground text-sm font-normal">
|
|
26
|
+
{title}
|
|
27
|
+
</CardTitle>
|
|
28
|
+
</CardHeader>
|
|
29
|
+
<CardContent className="flex flex-col gap-2">
|
|
30
|
+
<div className="text-2xl font-medium" data-testid="stat-card-value">
|
|
31
|
+
{value}
|
|
32
|
+
</div>
|
|
33
|
+
{delta ? (
|
|
34
|
+
<div
|
|
35
|
+
data-testid="stat-card-delta"
|
|
36
|
+
className={cn(
|
|
37
|
+
'text-xs',
|
|
38
|
+
trend === 'up' && 'text-emerald-600',
|
|
39
|
+
trend === 'down' && 'text-destructive',
|
|
40
|
+
trend === 'flat' && 'text-muted-foreground'
|
|
41
|
+
)}
|
|
42
|
+
>
|
|
43
|
+
{delta}
|
|
44
|
+
</div>
|
|
45
|
+
) : null}
|
|
46
|
+
{children}
|
|
47
|
+
</CardContent>
|
|
48
|
+
</Card>
|
|
49
|
+
)
|
|
50
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Badge } from '@mohou/ui/components/badge'
|
|
2
|
+
import { cn } from '@mohou/ui/lib/utils'
|
|
3
|
+
|
|
4
|
+
export const statusTone = {
|
|
5
|
+
pass: 'border-transparent bg-emerald-600/15 text-emerald-700 dark:text-emerald-400',
|
|
6
|
+
fail: 'border-transparent bg-destructive/15 text-destructive',
|
|
7
|
+
blocked: 'border-transparent bg-amber-500/15 text-amber-700 dark:text-amber-400',
|
|
8
|
+
flaky: 'border-transparent bg-orange-500/15 text-orange-700 dark:text-orange-400',
|
|
9
|
+
running: 'border-transparent bg-sky-500/15 text-sky-700 dark:text-sky-400',
|
|
10
|
+
pending: 'border-transparent bg-muted text-muted-foreground',
|
|
11
|
+
} as const
|
|
12
|
+
|
|
13
|
+
export type StatusKey = keyof typeof statusTone
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Toned badge for run/test status.
|
|
17
|
+
* @when pass | fail | blocked | flaky | running | pending cells and chips
|
|
18
|
+
* @example
|
|
19
|
+
* <StatusBadge status="pass" />
|
|
20
|
+
* @family Feedback & status
|
|
21
|
+
*/
|
|
22
|
+
export function StatusBadge({
|
|
23
|
+
status,
|
|
24
|
+
className,
|
|
25
|
+
}: {
|
|
26
|
+
status: StatusKey | string
|
|
27
|
+
className?: string
|
|
28
|
+
}) {
|
|
29
|
+
const tone = statusTone[status as StatusKey] ?? statusTone.pending
|
|
30
|
+
return (
|
|
31
|
+
<Badge
|
|
32
|
+
variant="outline"
|
|
33
|
+
data-testid="status-badge"
|
|
34
|
+
data-status={status}
|
|
35
|
+
className={cn('capitalize', tone, className)}
|
|
36
|
+
>
|
|
37
|
+
{status}
|
|
38
|
+
</Badge>
|
|
39
|
+
)
|
|
40
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
import { cn } from '@mohou/ui/lib/utils';
|
|
5
|
+
|
|
6
|
+
export type TablePageProps = {
|
|
7
|
+
/** Page-level actions above the table: search, filters, "New". Pinned; it never scrolls away. */
|
|
8
|
+
toolbar?: ReactNode
|
|
9
|
+
/** The table itself (a `DataGrid`, usually). The only slot that scrolls. */
|
|
10
|
+
grid?: ReactNode
|
|
11
|
+
/** First-run / no-match placeholder. Renders when `grid` is not given. */
|
|
12
|
+
empty?: ReactNode
|
|
13
|
+
/** A pager you own. `DataGrid` already renders its own when `features.pagination` is on. */
|
|
14
|
+
pagination?: ReactNode
|
|
15
|
+
/** Bulk actions. Floats over the bottom of the grid instead of pushing the rows around. */
|
|
16
|
+
bulk?: ReactNode
|
|
17
|
+
className?: string
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Full-height table page: toolbar pinned, one scrolling band for the grid, bulk bar floating.
|
|
22
|
+
*
|
|
23
|
+
* Without it a `DataGrid` is dropped into a plain flex column, the tallest child wins, and the
|
|
24
|
+
* page scrolls instead of the table: the toolbar slides off, pagination ends up below the fold,
|
|
25
|
+
* and selecting 200 rows shoves the table down every time the bulk bar appears. The band owns
|
|
26
|
+
* `min-h-0` + `overflow-y-auto` here, and the bulk bar is out of flow with `pointer-events-none`
|
|
27
|
+
* on its track so the rows under it stay clickable.
|
|
28
|
+
*
|
|
29
|
+
* @when Page shape: one wide filterable table is the product — inventories, ledgers, saved views
|
|
30
|
+
* @example
|
|
31
|
+
* <TablePage
|
|
32
|
+
* toolbar={<FilterBar {...{ query, onQueryChange, filters }} />}
|
|
33
|
+
* grid={rows.length ? <DataGrid columns={columns} data={rows} /> : undefined}
|
|
34
|
+
* empty={<FirstRun onImport={import} />}
|
|
35
|
+
* bulk={selected.size ? <BulkBar count={selected.size} onClear={clear} /> : undefined}
|
|
36
|
+
* />
|
|
37
|
+
* @family Layout & structure
|
|
38
|
+
*/
|
|
39
|
+
export function TablePage({
|
|
40
|
+
toolbar,
|
|
41
|
+
grid,
|
|
42
|
+
empty,
|
|
43
|
+
pagination,
|
|
44
|
+
bulk,
|
|
45
|
+
className,
|
|
46
|
+
}: TablePageProps) {
|
|
47
|
+
return (
|
|
48
|
+
<div
|
|
49
|
+
className={cn('relative flex h-full min-h-0 w-full flex-col', className)}
|
|
50
|
+
data-testid="table-page"
|
|
51
|
+
>
|
|
52
|
+
{toolbar ? (
|
|
53
|
+
<div className="shrink-0" data-testid="table-page-toolbar">
|
|
54
|
+
{toolbar}
|
|
55
|
+
</div>
|
|
56
|
+
) : null}
|
|
57
|
+
|
|
58
|
+
{/* The one scroller. `grid ?? empty` keeps "no rows" the app's decision, not a prop. */}
|
|
59
|
+
<div
|
|
60
|
+
className="min-h-0 flex-1 overflow-y-auto"
|
|
61
|
+
data-testid="table-page-grid"
|
|
62
|
+
>
|
|
63
|
+
{grid ?? empty ?? null}
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
{pagination ? (
|
|
67
|
+
<div className="shrink-0" data-testid="table-page-pagination">
|
|
68
|
+
{pagination}
|
|
69
|
+
</div>
|
|
70
|
+
) : null}
|
|
71
|
+
|
|
72
|
+
{bulk ? (
|
|
73
|
+
<div
|
|
74
|
+
className="pointer-events-none absolute inset-x-0 bottom-0 flex justify-center px-4 pb-4"
|
|
75
|
+
data-testid="table-page-bulk"
|
|
76
|
+
>
|
|
77
|
+
<div className="pointer-events-auto">{bulk}</div>
|
|
78
|
+
</div>
|
|
79
|
+
) : null}
|
|
80
|
+
</div>
|
|
81
|
+
)
|
|
82
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { cn } from '@mohou/ui/lib/utils';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Fixed-width console block.
|
|
5
|
+
* @when Showing a command + its output verbatim. Timestamped levels/scrolling → `LogViewer`.
|
|
6
|
+
* @example
|
|
7
|
+
* <Terminal lines={["$ df -h", "/dev/disk1 62%"]} />
|
|
8
|
+
* @family Realtime
|
|
9
|
+
*/
|
|
10
|
+
export function Terminal({
|
|
11
|
+
lines,
|
|
12
|
+
className,
|
|
13
|
+
}: {
|
|
14
|
+
lines: string[]
|
|
15
|
+
className?: string
|
|
16
|
+
}) {
|
|
17
|
+
return (
|
|
18
|
+
<pre
|
|
19
|
+
data-testid="terminal"
|
|
20
|
+
className={cn(
|
|
21
|
+
'overflow-auto rounded-xl bg-zinc-950 p-3 font-mono text-xs leading-6 text-zinc-100',
|
|
22
|
+
className,
|
|
23
|
+
)}
|
|
24
|
+
>
|
|
25
|
+
{lines.join('\n')}
|
|
26
|
+
</pre>
|
|
27
|
+
)
|
|
28
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { StatusBadge, type StatusKey } from '@mohou/ui/blocks/status-badge'
|
|
2
|
+
|
|
3
|
+
export type TestStep = { id: string; title: string; status: StatusKey | string }
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Numbered test steps with expected/actual + status.
|
|
7
|
+
* @when QA cases, checklists that get executed and graded.
|
|
8
|
+
* @example
|
|
9
|
+
* <TestStepList steps={[{ id: "s1", name: "登录", status: "pass" }]} />
|
|
10
|
+
* @family Data & tables
|
|
11
|
+
*/
|
|
12
|
+
export function TestStepList({ steps }: { steps: TestStep[] }) {
|
|
13
|
+
return (
|
|
14
|
+
<ol className="flex flex-col gap-2" data-testid="test-step-list">
|
|
15
|
+
{steps.map((step, index) => (
|
|
16
|
+
<li key={step.id} className="flex items-center justify-between gap-3 text-sm">
|
|
17
|
+
<span>
|
|
18
|
+
<span className="text-muted-foreground mr-2">{index + 1}.</span>
|
|
19
|
+
{step.title}
|
|
20
|
+
</span>
|
|
21
|
+
<StatusBadge status={step.status} />
|
|
22
|
+
</li>
|
|
23
|
+
))}
|
|
24
|
+
</ol>
|
|
25
|
+
)
|
|
26
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
|
|
2
|
+
import type { ReactNode } from 'react'
|
|
3
|
+
import { CartesianGrid, Line, LineChart, XAxis } from 'recharts'
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
ChartContainer,
|
|
7
|
+
ChartTooltip,
|
|
8
|
+
ChartTooltipContent,
|
|
9
|
+
type ChartConfig,
|
|
10
|
+
} from '@mohou/ui/components/chart'
|
|
11
|
+
import { StatCard } from '@mohou/ui/blocks/stat-card'
|
|
12
|
+
|
|
13
|
+
export type TrendPoint = { label: string; value: number }
|
|
14
|
+
|
|
15
|
+
const chartConfig = {
|
|
16
|
+
value: { label: 'Value', color: 'var(--primary)' },
|
|
17
|
+
} satisfies ChartConfig
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* KPI card with a trend series.
|
|
21
|
+
* @when Metric + direction over time. Metric only → `StatCard`.
|
|
22
|
+
* @example
|
|
23
|
+
* <TrendCard title="请求数" value="1.2k" trend="up" data={[{ value: 9 }, { value: 12 }]} />
|
|
24
|
+
* @family Chart & data
|
|
25
|
+
*/
|
|
26
|
+
export function TrendCard({
|
|
27
|
+
title,
|
|
28
|
+
value,
|
|
29
|
+
delta,
|
|
30
|
+
trend,
|
|
31
|
+
data,
|
|
32
|
+
}: {
|
|
33
|
+
title: string
|
|
34
|
+
value: ReactNode
|
|
35
|
+
delta?: string
|
|
36
|
+
trend?: 'up' | 'down' | 'flat'
|
|
37
|
+
data: TrendPoint[]
|
|
38
|
+
}) {
|
|
39
|
+
return (
|
|
40
|
+
<StatCard title={title} value={value} delta={delta} trend={trend}>
|
|
41
|
+
<ChartContainer config={chartConfig} className="h-[120px] w-full">
|
|
42
|
+
<LineChart data={data} accessibilityLayer>
|
|
43
|
+
<CartesianGrid vertical={false} />
|
|
44
|
+
<XAxis dataKey="label" tickLine={false} axisLine={false} />
|
|
45
|
+
<ChartTooltip content={<ChartTooltipContent />} />
|
|
46
|
+
<Line
|
|
47
|
+
dataKey="value"
|
|
48
|
+
type="monotone"
|
|
49
|
+
stroke="var(--color-value)"
|
|
50
|
+
strokeWidth={2}
|
|
51
|
+
dot={false}
|
|
52
|
+
/>
|
|
53
|
+
</LineChart>
|
|
54
|
+
</ChartContainer>
|
|
55
|
+
</StatCard>
|
|
56
|
+
)
|
|
57
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
import { Button } from '@mohou/ui/components/button';
|
|
5
|
+
import { Stepper, StepperItem } from '@mohou/ui/products/stepper';
|
|
6
|
+
import { useLabels } from '@mohou/ui/i18n/context';
|
|
7
|
+
import { cn } from '@mohou/ui/lib/utils';
|
|
8
|
+
|
|
9
|
+
export type WizardStep = {
|
|
10
|
+
id: string
|
|
11
|
+
label: string
|
|
12
|
+
/** Pass `false` while the step's form is incomplete — Next disables itself. Omit to allow. */
|
|
13
|
+
valid?: boolean
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type WizardShellProps = {
|
|
17
|
+
/** The steps, in order. The rail is generated from this, so it cannot disagree with the body. */
|
|
18
|
+
steps: WizardStep[]
|
|
19
|
+
/** Which step is showing. The app owns it — the preset never navigates on its own. */
|
|
20
|
+
index: number
|
|
21
|
+
/** Current step's content. The only scrolling area. */
|
|
22
|
+
body: ReactNode
|
|
23
|
+
/** Replaces the generated Back/Next/Finish row (a preview pane, a second action…). */
|
|
24
|
+
footer?: ReactNode
|
|
25
|
+
onBack?: () => void
|
|
26
|
+
onNext?: () => void
|
|
27
|
+
/** Fires on the last step's primary action. Without it the last step still shows Next. */
|
|
28
|
+
onSubmit?: () => void
|
|
29
|
+
/** Greys the primary action and swaps in the busy label. */
|
|
30
|
+
submitting?: boolean
|
|
31
|
+
className?: string
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Multi-step flow: step rail on top, scrolling body, action row that never moves.
|
|
36
|
+
*
|
|
37
|
+
* Hand-rolled, a wizard's footer rides along inside the scrolling column, so every step change
|
|
38
|
+
* jumps the buttons to a different height and the user chases them with the cursor; and Next is
|
|
39
|
+
* enabled into an invalid step because the validity check lives in the form and the button lives
|
|
40
|
+
* outside it. Here the footer is a `shrink-0` sibling of the scroller, and Next/Finish are
|
|
41
|
+
* disabled straight from `steps[index].valid`, which is the only place that can know.
|
|
42
|
+
*
|
|
43
|
+
* @when Page shape: create / import / onboarding, one step at a time with validation per step
|
|
44
|
+
* @example
|
|
45
|
+
* <WizardShell
|
|
46
|
+
* steps={[{ id: "pick", label: "Choose file", valid: Boolean(file) }, { id: "map", label: "Map columns", valid: mapped }]}
|
|
47
|
+
* index={step}
|
|
48
|
+
* body={<StepBody />}
|
|
49
|
+
* onBack={() => setStep((s) => s - 1)}
|
|
50
|
+
* onNext={() => setStep((s) => s + 1)}
|
|
51
|
+
* onSubmit={() => void run()}
|
|
52
|
+
* />
|
|
53
|
+
* @family Layout & structure
|
|
54
|
+
*/
|
|
55
|
+
export function WizardShell({
|
|
56
|
+
steps,
|
|
57
|
+
index,
|
|
58
|
+
body,
|
|
59
|
+
footer,
|
|
60
|
+
onBack,
|
|
61
|
+
onNext,
|
|
62
|
+
onSubmit,
|
|
63
|
+
submitting = false,
|
|
64
|
+
className,
|
|
65
|
+
}: WizardShellProps) {
|
|
66
|
+
const t = useLabels('wizardShell');
|
|
67
|
+
const current = steps[index]
|
|
68
|
+
const last = index >= steps.length - 1
|
|
69
|
+
const canAdvance = current?.valid !== false
|
|
70
|
+
const primary = last && onSubmit ? t.finish : t.next
|
|
71
|
+
|
|
72
|
+
return (
|
|
73
|
+
<div
|
|
74
|
+
className={cn('flex h-full min-h-0 w-full flex-col', className)}
|
|
75
|
+
data-testid="wizard-shell"
|
|
76
|
+
>
|
|
77
|
+
<div
|
|
78
|
+
className="border-border shrink-0 border-b px-4 py-3"
|
|
79
|
+
data-testid="wizard-rail"
|
|
80
|
+
>
|
|
81
|
+
<Stepper orientation="horizontal">
|
|
82
|
+
{steps.map((s, i) => (
|
|
83
|
+
<StepperItem
|
|
84
|
+
key={s.id}
|
|
85
|
+
step={i + 1}
|
|
86
|
+
title={s.label}
|
|
87
|
+
status={
|
|
88
|
+
i < index ? 'completed' : i === index ? 'active' : 'default'
|
|
89
|
+
}
|
|
90
|
+
/>
|
|
91
|
+
))}
|
|
92
|
+
</Stepper>
|
|
93
|
+
</div>
|
|
94
|
+
|
|
95
|
+
<div
|
|
96
|
+
className="min-h-0 flex-1 overflow-y-auto px-4 py-4"
|
|
97
|
+
data-testid="wizard-body"
|
|
98
|
+
>
|
|
99
|
+
{body}
|
|
100
|
+
</div>
|
|
101
|
+
|
|
102
|
+
<div
|
|
103
|
+
className="border-border bg-background flex shrink-0 items-center justify-between gap-3 border-t px-4 py-3"
|
|
104
|
+
data-testid="wizard-footer"
|
|
105
|
+
>
|
|
106
|
+
{footer ?? (
|
|
107
|
+
<>
|
|
108
|
+
<Button
|
|
109
|
+
variant="ghost"
|
|
110
|
+
onClick={onBack}
|
|
111
|
+
disabled={index === 0 || submitting}
|
|
112
|
+
data-testid="wizard-back"
|
|
113
|
+
>
|
|
114
|
+
{t.back}
|
|
115
|
+
</Button>
|
|
116
|
+
<span className="text-muted-foreground text-xs tabular-nums">
|
|
117
|
+
{t.stepOf(index + 1, steps.length)}
|
|
118
|
+
</span>
|
|
119
|
+
<Button
|
|
120
|
+
onClick={last && onSubmit ? onSubmit : onNext}
|
|
121
|
+
disabled={!canAdvance || submitting}
|
|
122
|
+
data-testid="wizard-next"
|
|
123
|
+
>
|
|
124
|
+
{submitting ? t.working : primary}
|
|
125
|
+
</Button>
|
|
126
|
+
</>
|
|
127
|
+
)}
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
)
|
|
131
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { Accordion as AccordionPrimitive } from '@base-ui/react/accordion'
|
|
2
|
+
|
|
3
|
+
import { cn } from '@mohou/ui/lib/utils'
|
|
4
|
+
import { ChevronDownIcon, ChevronUpIcon } from 'lucide-react'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Vertically expanding sections.
|
|
8
|
+
* @when Collapsible groups in settings/details.
|
|
9
|
+
* @example
|
|
10
|
+
* <Accordion type="single"><AccordionItem value="s1"><AccordionTrigger>高级</AccordionTrigger><AccordionContent>…</AccordionContent></AccordionItem></Accordion>
|
|
11
|
+
* @family Surface
|
|
12
|
+
*/
|
|
13
|
+
function Accordion({ className, ...props }: AccordionPrimitive.Root.Props) {
|
|
14
|
+
return (
|
|
15
|
+
<AccordionPrimitive.Root
|
|
16
|
+
data-slot="accordion"
|
|
17
|
+
className={cn('flex w-full flex-col', className)}
|
|
18
|
+
{...props}
|
|
19
|
+
/>
|
|
20
|
+
)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function AccordionItem({ className, ...props }: AccordionPrimitive.Item.Props) {
|
|
24
|
+
return (
|
|
25
|
+
<AccordionPrimitive.Item
|
|
26
|
+
data-slot="accordion-item"
|
|
27
|
+
className={cn('not-last:border-b', className)}
|
|
28
|
+
{...props}
|
|
29
|
+
/>
|
|
30
|
+
)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function AccordionTrigger({
|
|
34
|
+
className,
|
|
35
|
+
children,
|
|
36
|
+
...props
|
|
37
|
+
}: AccordionPrimitive.Trigger.Props) {
|
|
38
|
+
return (
|
|
39
|
+
<AccordionPrimitive.Header className="flex">
|
|
40
|
+
<AccordionPrimitive.Trigger
|
|
41
|
+
data-slot="accordion-trigger"
|
|
42
|
+
className={cn(
|
|
43
|
+
'group/accordion-trigger relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:after:border-ring aria-disabled:pointer-events-none aria-disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground',
|
|
44
|
+
className,
|
|
45
|
+
)}
|
|
46
|
+
{...props}
|
|
47
|
+
>
|
|
48
|
+
{children}
|
|
49
|
+
<ChevronDownIcon data-slot="accordion-trigger-icon" className="pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden" />
|
|
50
|
+
<ChevronUpIcon data-slot="accordion-trigger-icon" className="pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline" />
|
|
51
|
+
</AccordionPrimitive.Trigger>
|
|
52
|
+
</AccordionPrimitive.Header>
|
|
53
|
+
)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function AccordionContent({
|
|
57
|
+
className,
|
|
58
|
+
children,
|
|
59
|
+
...props
|
|
60
|
+
}: AccordionPrimitive.Panel.Props) {
|
|
61
|
+
return (
|
|
62
|
+
<AccordionPrimitive.Panel
|
|
63
|
+
data-slot="accordion-content"
|
|
64
|
+
className="overflow-hidden text-sm data-open:animate-accordion-down data-closed:animate-accordion-up"
|
|
65
|
+
{...props}
|
|
66
|
+
>
|
|
67
|
+
<div
|
|
68
|
+
className={cn(
|
|
69
|
+
'h-(--accordion-panel-height) pt-0 pb-2.5 data-ending-style:h-0 data-starting-style:h-0 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4',
|
|
70
|
+
className,
|
|
71
|
+
)}
|
|
72
|
+
>
|
|
73
|
+
{children}
|
|
74
|
+
</div>
|
|
75
|
+
</AccordionPrimitive.Panel>
|
|
76
|
+
)
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent }
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { AlertDialog as AlertDialogPrimitive } from '@base-ui/react/alert-dialog'
|
|
3
|
+
|
|
4
|
+
import { cn } from '@mohou/ui/lib/utils'
|
|
5
|
+
import { Button } from '@mohou/ui/components/button'
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Blocking confirm modal (no click-outside dismiss).
|
|
9
|
+
* @when Deleting/irreversible actions that must be answered.
|
|
10
|
+
* @example
|
|
11
|
+
* <AlertDialog open={ask} onOpenChange={setAsk}><AlertDialogContent><AlertDialogTitle>确定删除?</AlertDialogTitle><AlertDialogAction onClick={del}>删除</AlertDialogAction></AlertDialogContent></AlertDialog>
|
|
12
|
+
* @family Surface
|
|
13
|
+
*/
|
|
14
|
+
function AlertDialog({ ...props }: AlertDialogPrimitive.Root.Props) {
|
|
15
|
+
return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function AlertDialogTrigger({ ...props }: AlertDialogPrimitive.Trigger.Props) {
|
|
19
|
+
return (
|
|
20
|
+
<AlertDialogPrimitive.Trigger data-slot="alert-dialog-trigger" {...props} />
|
|
21
|
+
)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function AlertDialogPortal({ ...props }: AlertDialogPrimitive.Portal.Props) {
|
|
25
|
+
return (
|
|
26
|
+
<AlertDialogPrimitive.Portal data-slot="alert-dialog-portal" {...props} />
|
|
27
|
+
)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function AlertDialogOverlay({
|
|
31
|
+
className,
|
|
32
|
+
...props
|
|
33
|
+
}: AlertDialogPrimitive.Backdrop.Props) {
|
|
34
|
+
return (
|
|
35
|
+
<AlertDialogPrimitive.Backdrop
|
|
36
|
+
data-slot="alert-dialog-overlay"
|
|
37
|
+
className={cn(
|
|
38
|
+
'fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0',
|
|
39
|
+
className,
|
|
40
|
+
)}
|
|
41
|
+
{...props}
|
|
42
|
+
/>
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function AlertDialogContent({
|
|
47
|
+
className,
|
|
48
|
+
size = 'default',
|
|
49
|
+
...props
|
|
50
|
+
}: AlertDialogPrimitive.Popup.Props & {
|
|
51
|
+
size?: 'default' | 'sm'
|
|
52
|
+
}) {
|
|
53
|
+
return (
|
|
54
|
+
<AlertDialogPortal>
|
|
55
|
+
<AlertDialogOverlay />
|
|
56
|
+
<AlertDialogPrimitive.Popup
|
|
57
|
+
data-slot="alert-dialog-content"
|
|
58
|
+
data-size={size}
|
|
59
|
+
className={cn(
|
|
60
|
+
'group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-card p-4 text-card-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',
|
|
61
|
+
className,
|
|
62
|
+
)}
|
|
63
|
+
{...props}
|
|
64
|
+
/>
|
|
65
|
+
</AlertDialogPortal>
|
|
66
|
+
)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function AlertDialogHeader({
|
|
70
|
+
className,
|
|
71
|
+
...props
|
|
72
|
+
}: React.ComponentProps<'div'>) {
|
|
73
|
+
return (
|
|
74
|
+
<div
|
|
75
|
+
data-slot="alert-dialog-header"
|
|
76
|
+
className={cn(
|
|
77
|
+
'grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]',
|
|
78
|
+
className,
|
|
79
|
+
)}
|
|
80
|
+
{...props}
|
|
81
|
+
/>
|
|
82
|
+
)
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function AlertDialogFooter({
|
|
86
|
+
className,
|
|
87
|
+
...props
|
|
88
|
+
}: React.ComponentProps<'div'>) {
|
|
89
|
+
return (
|
|
90
|
+
<div
|
|
91
|
+
data-slot="alert-dialog-footer"
|
|
92
|
+
className={cn(
|
|
93
|
+
'-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end',
|
|
94
|
+
className,
|
|
95
|
+
)}
|
|
96
|
+
{...props}
|
|
97
|
+
/>
|
|
98
|
+
)
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function AlertDialogMedia({
|
|
102
|
+
className,
|
|
103
|
+
...props
|
|
104
|
+
}: React.ComponentProps<'div'>) {
|
|
105
|
+
return (
|
|
106
|
+
<div
|
|
107
|
+
data-slot="alert-dialog-media"
|
|
108
|
+
className={cn(
|
|
109
|
+
"mb-2 inline-flex size-10 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6",
|
|
110
|
+
className,
|
|
111
|
+
)}
|
|
112
|
+
{...props}
|
|
113
|
+
/>
|
|
114
|
+
)
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function AlertDialogTitle({
|
|
118
|
+
className,
|
|
119
|
+
...props
|
|
120
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {
|
|
121
|
+
return (
|
|
122
|
+
<AlertDialogPrimitive.Title
|
|
123
|
+
data-slot="alert-dialog-title"
|
|
124
|
+
className={cn(
|
|
125
|
+
'font-heading text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2',
|
|
126
|
+
className,
|
|
127
|
+
)}
|
|
128
|
+
{...props}
|
|
129
|
+
/>
|
|
130
|
+
)
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function AlertDialogDescription({
|
|
134
|
+
className,
|
|
135
|
+
...props
|
|
136
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {
|
|
137
|
+
return (
|
|
138
|
+
<AlertDialogPrimitive.Description
|
|
139
|
+
data-slot="alert-dialog-description"
|
|
140
|
+
className={cn(
|
|
141
|
+
'text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground',
|
|
142
|
+
className,
|
|
143
|
+
)}
|
|
144
|
+
{...props}
|
|
145
|
+
/>
|
|
146
|
+
)
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
function AlertDialogAction({
|
|
150
|
+
className,
|
|
151
|
+
...props
|
|
152
|
+
}: React.ComponentProps<typeof Button>) {
|
|
153
|
+
return (
|
|
154
|
+
<Button
|
|
155
|
+
data-slot="alert-dialog-action"
|
|
156
|
+
className={cn(className)}
|
|
157
|
+
{...props}
|
|
158
|
+
/>
|
|
159
|
+
)
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
function AlertDialogCancel({
|
|
163
|
+
className,
|
|
164
|
+
variant = 'outline',
|
|
165
|
+
size = 'default',
|
|
166
|
+
...props
|
|
167
|
+
}: AlertDialogPrimitive.Close.Props &
|
|
168
|
+
Pick<React.ComponentProps<typeof Button>, 'variant' | 'size'>) {
|
|
169
|
+
return (
|
|
170
|
+
<AlertDialogPrimitive.Close
|
|
171
|
+
data-slot="alert-dialog-cancel"
|
|
172
|
+
className={cn(className)}
|
|
173
|
+
render={<Button variant={variant} size={size} />}
|
|
174
|
+
{...props}
|
|
175
|
+
/>
|
|
176
|
+
)
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export {
|
|
180
|
+
AlertDialog,
|
|
181
|
+
AlertDialogAction,
|
|
182
|
+
AlertDialogCancel,
|
|
183
|
+
AlertDialogContent,
|
|
184
|
+
AlertDialogDescription,
|
|
185
|
+
AlertDialogFooter,
|
|
186
|
+
AlertDialogHeader,
|
|
187
|
+
AlertDialogMedia,
|
|
188
|
+
AlertDialogOverlay,
|
|
189
|
+
AlertDialogPortal,
|
|
190
|
+
AlertDialogTitle,
|
|
191
|
+
AlertDialogTrigger,
|
|
192
|
+
}
|