@monkey-mini-app/ui 0.1.0
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/components.json +23 -0
- package/dist/globals.css +2 -0
- package/dist/index.js +138 -0
- package/dist/manifest.json +11 -0
- package/dist/src/blocks/activity-feed.tsx +9 -0
- package/dist/src/blocks/app-shell.tsx +37 -0
- package/dist/src/blocks/attachment-gallery.tsx +30 -0
- package/dist/src/blocks/bar-chart.tsx +33 -0
- package/dist/src/blocks/comment-thread.tsx +30 -0
- package/dist/src/blocks/description-list.tsx +16 -0
- package/dist/src/blocks/detail-panel.tsx +43 -0
- package/dist/src/blocks/donut-chart.tsx +38 -0
- package/dist/src/blocks/env-badge.tsx +23 -0
- package/dist/src/blocks/file-tree.tsx +5 -0
- package/dist/src/blocks/filter-bar.tsx +21 -0
- package/dist/src/blocks/gauge.tsx +13 -0
- package/dist/src/blocks/notification-center.tsx +22 -0
- package/dist/src/blocks/page-header.tsx +30 -0
- package/dist/src/blocks/progress-ring.tsx +25 -0
- package/dist/src/blocks/radar-chart.tsx +31 -0
- package/dist/src/blocks/request-inspector.tsx +34 -0
- package/dist/src/blocks/run-timeline.tsx +5 -0
- package/dist/src/blocks/scrollspy.tsx +42 -0
- package/dist/src/blocks/severity-chip.tsx +27 -0
- package/dist/src/blocks/sparkline.tsx +19 -0
- package/dist/src/blocks/stat-card.tsx +49 -0
- package/dist/src/blocks/status-badge.tsx +39 -0
- package/dist/src/blocks/terminal.tsx +10 -0
- package/dist/src/blocks/test-step-list.tsx +19 -0
- package/dist/src/blocks/trend-card.tsx +51 -0
- package/dist/src/components/accordion.tsx +72 -0
- package/dist/src/components/alert-dialog.tsx +185 -0
- package/dist/src/components/alert.tsx +76 -0
- package/dist/src/components/aspect-ratio.tsx +22 -0
- package/dist/src/components/attachment.tsx +207 -0
- package/dist/src/components/avatar.tsx +107 -0
- package/dist/src/components/badge.tsx +52 -0
- package/dist/src/components/breadcrumb.tsx +125 -0
- package/dist/src/components/bubble.tsx +128 -0
- package/dist/src/components/button-group.tsx +87 -0
- package/dist/src/components/button.tsx +58 -0
- package/dist/src/components/calendar.tsx +221 -0
- package/dist/src/components/card.tsx +103 -0
- package/dist/src/components/chart.tsx +371 -0
- package/dist/src/components/checkbox.tsx +29 -0
- package/dist/src/components/collapsible.tsx +19 -0
- package/dist/src/components/combobox.tsx +295 -0
- package/dist/src/components/command.tsx +196 -0
- package/dist/src/components/context-menu.tsx +271 -0
- package/dist/src/components/dialog.tsx +158 -0
- package/dist/src/components/drawer.tsx +226 -0
- package/dist/src/components/dropdown-menu.tsx +268 -0
- package/dist/src/components/empty.tsx +123 -0
- package/dist/src/components/field.tsx +236 -0
- package/dist/src/components/hover-card.tsx +49 -0
- package/dist/src/components/input-group.tsx +158 -0
- package/dist/src/components/input.tsx +20 -0
- package/dist/src/components/item.tsx +201 -0
- package/dist/src/components/kbd.tsx +26 -0
- package/dist/src/components/label.tsx +20 -0
- package/dist/src/components/marker.tsx +71 -0
- package/dist/src/components/menubar.tsx +280 -0
- package/dist/src/components/message-scroller.tsx +129 -0
- package/dist/src/components/message.tsx +92 -0
- package/dist/src/components/native-select.tsx +61 -0
- package/dist/src/components/navigation-menu.tsx +168 -0
- package/dist/src/components/pagination.tsx +135 -0
- package/dist/src/components/popover.tsx +88 -0
- package/dist/src/components/progress.tsx +83 -0
- package/dist/src/components/questionnaire.tsx +329 -0
- package/dist/src/components/radio-group.tsx +36 -0
- package/dist/src/components/resizable.tsx +50 -0
- package/dist/src/components/scroll-area.tsx +52 -0
- package/dist/src/components/select.tsx +201 -0
- package/dist/src/components/separator.tsx +23 -0
- package/dist/src/components/sheet.tsx +136 -0
- package/dist/src/components/sidebar.tsx +721 -0
- package/dist/src/components/skeleton.tsx +13 -0
- package/dist/src/components/slider.tsx +52 -0
- package/dist/src/components/spinner.tsx +10 -0
- package/dist/src/components/switch.tsx +32 -0
- package/dist/src/components/table.tsx +114 -0
- package/dist/src/components/tabs.tsx +82 -0
- package/dist/src/components/textarea.tsx +18 -0
- package/dist/src/components/toast.tsx +234 -0
- package/dist/src/components/toggle-group.tsx +89 -0
- package/dist/src/components/toggle.tsx +43 -0
- package/dist/src/components/tooltip.tsx +66 -0
- package/dist/src/composites/autocomplete.tsx +55 -0
- package/dist/src/composites/cascader.tsx +46 -0
- package/dist/src/composites/color-picker.tsx +19 -0
- package/dist/src/composites/confirm-dialog.tsx +56 -0
- package/dist/src/composites/copyable.tsx +37 -0
- package/dist/src/composites/currency-input.tsx +31 -0
- package/dist/src/composites/date-chrome.tsx +157 -0
- package/dist/src/composites/date-picker.tsx +91 -0
- package/dist/src/composites/date-range-picker.tsx +96 -0
- package/dist/src/composites/date-time-picker.tsx +115 -0
- package/dist/src/composites/date-time-range-picker.tsx +51 -0
- package/dist/src/composites/duration-input.tsx +122 -0
- package/dist/src/composites/mini-calendar.tsx +24 -0
- package/dist/src/composites/number-field.tsx +53 -0
- package/dist/src/composites/password-field.tsx +44 -0
- package/dist/src/composites/phone-input.tsx +22 -0
- package/dist/src/composites/rating.tsx +39 -0
- package/dist/src/composites/relative-date-picker.tsx +62 -0
- package/dist/src/composites/search-input.tsx +49 -0
- package/dist/src/composites/slider-range.tsx +30 -0
- package/dist/src/composites/tag-input.tsx +56 -0
- package/dist/src/composites/time-picker.tsx +199 -0
- package/dist/src/composites/time-range-picker.tsx +25 -0
- package/dist/src/composites/timezone-select.tsx +251 -0
- package/dist/src/composites/transfer.tsx +52 -0
- package/dist/src/composites/user-picker.tsx +40 -0
- package/dist/src/hooks/use-mobile.ts +19 -0
- package/dist/src/i18n/context.tsx +72 -0
- package/dist/src/i18n/en.ts +168 -0
- package/dist/src/i18n/zh.ts +160 -0
- package/dist/src/index.ts +134 -0
- package/dist/src/lib/icons.tsx +16 -0
- package/dist/src/lib/illustrations.tsx +573 -0
- package/dist/src/lib/utils.ts +6 -0
- package/dist/src/products/cells.tsx +18 -0
- package/dist/src/products/code-block.tsx +75 -0
- package/dist/src/products/code-editor.tsx +49 -0
- package/dist/src/products/column-meta.d.ts +9 -0
- package/dist/src/products/data-grid.tsx +689 -0
- package/dist/src/products/diff-viewer.tsx +129 -0
- package/dist/src/products/event-calendar.tsx +845 -0
- package/dist/src/products/export-csv.ts +25 -0
- package/dist/src/products/file-dropzone.tsx +41 -0
- package/dist/src/products/gantt.tsx +41 -0
- package/dist/src/products/jira-wiki-parse.ts +197 -0
- package/dist/src/products/jira-wiki.tsx +285 -0
- package/dist/src/products/jql-input.tsx +62 -0
- package/dist/src/products/jql-language.ts +70 -0
- package/dist/src/products/json-viewer.tsx +37 -0
- package/dist/src/products/kanban-issue-panel.tsx +98 -0
- package/dist/src/products/kanban.tsx +245 -0
- package/dist/src/products/log-viewer.tsx +33 -0
- package/dist/src/products/markdown-editor.tsx +63 -0
- package/dist/src/products/markdown.tsx +26 -0
- package/dist/src/products/rich-text-editor.tsx +84 -0
- package/dist/src/products/sortable-list.tsx +61 -0
- package/dist/src/products/stepper.tsx +89 -0
- package/dist/src/products/timeline.tsx +32 -0
- package/dist/src/products/tree-view.tsx +56 -0
- package/dist/src/styles/globals.css +352 -0
- package/package.json +100 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from "./src/components/accordion.tsx"
|
|
2
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger } from "./src/components/alert-dialog.tsx"
|
|
3
|
+
export { Alert, AlertTitle, AlertDescription, AlertAction } from "./src/components/alert.tsx"
|
|
4
|
+
export { AspectRatio } from "./src/components/aspect-ratio.tsx"
|
|
5
|
+
export { Attachment, AttachmentGroup, AttachmentMedia, AttachmentContent, AttachmentTitle, AttachmentDescription, AttachmentActions, AttachmentAction, AttachmentTrigger } from "./src/components/attachment.tsx"
|
|
6
|
+
export { Avatar, AvatarImage, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarBadge } from "./src/components/avatar.tsx"
|
|
7
|
+
export { Badge, badgeVariants } from "./src/components/badge.tsx"
|
|
8
|
+
export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis } from "./src/components/breadcrumb.tsx"
|
|
9
|
+
export { BubbleGroup, Bubble, BubbleContent, BubbleReactions } from "./src/components/bubble.tsx"
|
|
10
|
+
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants } from "./src/components/button-group.tsx"
|
|
11
|
+
export { Button, buttonVariants } from "./src/components/button.tsx"
|
|
12
|
+
export { Calendar, CalendarDayButton } from "./src/components/calendar.tsx"
|
|
13
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent } from "./src/components/card.tsx"
|
|
14
|
+
export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle } from "./src/components/chart.tsx"
|
|
15
|
+
export { Checkbox } from "./src/components/checkbox.tsx"
|
|
16
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent } from "./src/components/collapsible.tsx"
|
|
17
|
+
export { Combobox, ComboboxInput, ComboboxContent, ComboboxList, ComboboxItem, ComboboxGroup, ComboboxLabel, ComboboxCollection, ComboboxEmpty, ComboboxSeparator, ComboboxChips, ComboboxChip, ComboboxChipsInput, ComboboxTrigger, ComboboxValue, useComboboxAnchor } from "./src/components/combobox.tsx"
|
|
18
|
+
export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator } from "./src/components/command.tsx"
|
|
19
|
+
export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup } from "./src/components/context-menu.tsx"
|
|
20
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from "./src/components/dialog.tsx"
|
|
21
|
+
export { Drawer, DrawerPortal, DrawerOverlay, DrawerSwipeHandle, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription } from "./src/components/drawer.tsx"
|
|
22
|
+
export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent } from "./src/components/dropdown-menu.tsx"
|
|
23
|
+
export { Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyMedia } from "./src/components/empty.tsx"
|
|
24
|
+
export { Field, FieldLabel, FieldDescription, FieldError, FieldGroup, FieldLegend, FieldSeparator, FieldSet, FieldContent, FieldTitle } from "./src/components/field.tsx"
|
|
25
|
+
export { HoverCard, HoverCardTrigger, HoverCardContent } from "./src/components/hover-card.tsx"
|
|
26
|
+
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupText, InputGroupInput, InputGroupTextarea } from "./src/components/input-group.tsx"
|
|
27
|
+
export { Input } from "./src/components/input.tsx"
|
|
28
|
+
export { Item, ItemMedia, ItemContent, ItemActions, ItemGroup, ItemSeparator, ItemTitle, ItemDescription, ItemHeader, ItemFooter } from "./src/components/item.tsx"
|
|
29
|
+
export { Kbd, KbdGroup } from "./src/components/kbd.tsx"
|
|
30
|
+
export { Label } from "./src/components/label.tsx"
|
|
31
|
+
export { Marker, MarkerIcon, MarkerContent, markerVariants } from "./src/components/marker.tsx"
|
|
32
|
+
export { Menubar, MenubarPortal, MenubarMenu, MenubarTrigger, MenubarContent, MenubarGroup, MenubarSeparator, MenubarLabel, MenubarItem, MenubarShortcut, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarSub, MenubarSubTrigger, MenubarSubContent } from "./src/components/menubar.tsx"
|
|
33
|
+
export { MessageScrollerProvider, MessageScroller, MessageScrollerViewport, MessageScrollerContent, MessageScrollerItem, MessageScrollerButton, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from "./src/components/message-scroller.tsx"
|
|
34
|
+
export { MessageGroup, Message, MessageAvatar, MessageContent, MessageFooter, MessageHeader } from "./src/components/message.tsx"
|
|
35
|
+
export { NativeSelect, NativeSelectOptGroup, NativeSelectOption } from "./src/components/native-select.tsx"
|
|
36
|
+
export { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, navigationMenuTriggerStyle, NavigationMenuPositioner } from "./src/components/navigation-menu.tsx"
|
|
37
|
+
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "./src/components/pagination.tsx"
|
|
38
|
+
export { Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger } from "./src/components/popover.tsx"
|
|
39
|
+
export { Progress, ProgressTrack, ProgressIndicator, ProgressLabel, ProgressValue } from "./src/components/progress.tsx"
|
|
40
|
+
export { Questionnaire, QuestionnaireActions, QuestionnaireChoice, QuestionnaireChoiceDescription, QuestionnaireChoices, QuestionnaireDescription, QuestionnaireError, QuestionnaireInput, QuestionnaireItem, QuestionnaireNext, QuestionnairePrevious, QuestionnaireProgress, QuestionnaireSkip, QuestionnaireSubmit, QuestionnaireTitle } from "./src/components/questionnaire.tsx"
|
|
41
|
+
export { RadioGroup, RadioGroupItem } from "./src/components/radio-group.tsx"
|
|
42
|
+
export { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "./src/components/resizable.tsx"
|
|
43
|
+
export { ScrollArea, ScrollBar } from "./src/components/scroll-area.tsx"
|
|
44
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from "./src/components/select.tsx"
|
|
45
|
+
export { Separator } from "./src/components/separator.tsx"
|
|
46
|
+
export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription } from "./src/components/sheet.tsx"
|
|
47
|
+
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar } from "./src/components/sidebar.tsx"
|
|
48
|
+
export { Skeleton } from "./src/components/skeleton.tsx"
|
|
49
|
+
export { Slider } from "./src/components/slider.tsx"
|
|
50
|
+
export { Spinner } from "./src/components/spinner.tsx"
|
|
51
|
+
export { Switch } from "./src/components/switch.tsx"
|
|
52
|
+
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption } from "./src/components/table.tsx"
|
|
53
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants } from "./src/components/tabs.tsx"
|
|
54
|
+
export { Textarea } from "./src/components/textarea.tsx"
|
|
55
|
+
export { Toaster, Toast, ToastAction, ToastClose, ToastContent, ToastDescription, ToastPortal, ToastProvider, ToastTitle, ToastViewport, createToastManager, toast, useToastManager } from "./src/components/toast.tsx"
|
|
56
|
+
export { ToggleGroup, ToggleGroupItem } from "./src/components/toggle-group.tsx"
|
|
57
|
+
export { Toggle, toggleVariants } from "./src/components/toggle.tsx"
|
|
58
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider } from "./src/components/tooltip.tsx"
|
|
59
|
+
export { Autocomplete } from "./src/composites/autocomplete.tsx"
|
|
60
|
+
export { Cascader } from "./src/composites/cascader.tsx"
|
|
61
|
+
export { ColorPicker } from "./src/composites/color-picker.tsx"
|
|
62
|
+
export { ConfirmDialog } from "./src/composites/confirm-dialog.tsx"
|
|
63
|
+
export { Copyable } from "./src/composites/copyable.tsx"
|
|
64
|
+
export { CurrencyInput } from "./src/composites/currency-input.tsx"
|
|
65
|
+
export { DateChrome } from "./src/composites/date-chrome.tsx"
|
|
66
|
+
export { DatePicker } from "./src/composites/date-picker.tsx"
|
|
67
|
+
export { DateRangePicker } from "./src/composites/date-range-picker.tsx"
|
|
68
|
+
export { DateTimePicker } from "./src/composites/date-time-picker.tsx"
|
|
69
|
+
export { DateTimeRangePicker } from "./src/composites/date-time-range-picker.tsx"
|
|
70
|
+
export { parseDuration, formatDuration, DurationInput } from "./src/composites/duration-input.tsx"
|
|
71
|
+
export { MiniCalendar } from "./src/composites/mini-calendar.tsx"
|
|
72
|
+
export { NumberField } from "./src/composites/number-field.tsx"
|
|
73
|
+
export { PasswordField } from "./src/composites/password-field.tsx"
|
|
74
|
+
export { PhoneInput } from "./src/composites/phone-input.tsx"
|
|
75
|
+
export { Rating } from "./src/composites/rating.tsx"
|
|
76
|
+
export { RelativeDatePicker } from "./src/composites/relative-date-picker.tsx"
|
|
77
|
+
export { SearchInput } from "./src/composites/search-input.tsx"
|
|
78
|
+
export { SliderRange } from "./src/composites/slider-range.tsx"
|
|
79
|
+
export { TagInput } from "./src/composites/tag-input.tsx"
|
|
80
|
+
export { TimeWheel, TimePicker } from "./src/composites/time-picker.tsx"
|
|
81
|
+
export { TimeRangePicker } from "./src/composites/time-range-picker.tsx"
|
|
82
|
+
export { listTimezones, TimezoneSelect } from "./src/composites/timezone-select.tsx"
|
|
83
|
+
export { Transfer } from "./src/composites/transfer.tsx"
|
|
84
|
+
export { UserPicker } from "./src/composites/user-picker.tsx"
|
|
85
|
+
export { CodeBlock } from "./src/products/code-block.tsx"
|
|
86
|
+
export { CodeEditor } from "./src/products/code-editor.tsx"
|
|
87
|
+
export { DataGrid } from "./src/products/data-grid.tsx"
|
|
88
|
+
export { DiffViewer } from "./src/products/diff-viewer.tsx"
|
|
89
|
+
export { EventCalendar } from "./src/products/event-calendar.tsx"
|
|
90
|
+
export { exportCsv } from "./src/products/export-csv.ts"
|
|
91
|
+
export { FileDropzone } from "./src/products/file-dropzone.tsx"
|
|
92
|
+
export { Gantt } from "./src/products/gantt.tsx"
|
|
93
|
+
export { parseInline, parseJiraWiki } from "./src/products/jira-wiki-parse.ts"
|
|
94
|
+
export { JiraWiki } from "./src/products/jira-wiki.tsx"
|
|
95
|
+
export { JqlInput } from "./src/products/jql-input.tsx"
|
|
96
|
+
export { jqlLanguage, jqlCompletion, defaultJqlFields, defaultJqlFunctions } from "./src/products/jql-language.ts"
|
|
97
|
+
export { JsonViewer } from "./src/products/json-viewer.tsx"
|
|
98
|
+
export { KanbanIssuePanel } from "./src/products/kanban-issue-panel.tsx"
|
|
99
|
+
export { Kanban } from "./src/products/kanban.tsx"
|
|
100
|
+
export { LogViewer } from "./src/products/log-viewer.tsx"
|
|
101
|
+
export { MarkdownEditor } from "./src/products/markdown-editor.tsx"
|
|
102
|
+
export { Markdown } from "./src/products/markdown.tsx"
|
|
103
|
+
export { RichTextEditor } from "./src/products/rich-text-editor.tsx"
|
|
104
|
+
export { SortableList } from "./src/products/sortable-list.tsx"
|
|
105
|
+
export { Stepper } from "./src/products/stepper.tsx"
|
|
106
|
+
export { Timeline } from "./src/products/timeline.tsx"
|
|
107
|
+
export { TreeView } from "./src/products/tree-view.tsx"
|
|
108
|
+
export { ActivityFeed } from "./src/blocks/activity-feed.tsx"
|
|
109
|
+
export { AppShell } from "./src/blocks/app-shell.tsx"
|
|
110
|
+
export { AttachmentGallery } from "./src/blocks/attachment-gallery.tsx"
|
|
111
|
+
export { StackedBarChart } from "./src/blocks/bar-chart.tsx"
|
|
112
|
+
export { CommentThread } from "./src/blocks/comment-thread.tsx"
|
|
113
|
+
export { DescriptionList } from "./src/blocks/description-list.tsx"
|
|
114
|
+
export { DetailPanel } from "./src/blocks/detail-panel.tsx"
|
|
115
|
+
export { DonutChart } from "./src/blocks/donut-chart.tsx"
|
|
116
|
+
export { EnvBadge } from "./src/blocks/env-badge.tsx"
|
|
117
|
+
export { FileTree } from "./src/blocks/file-tree.tsx"
|
|
118
|
+
export { FilterBar } from "./src/blocks/filter-bar.tsx"
|
|
119
|
+
export { Gauge } from "./src/blocks/gauge.tsx"
|
|
120
|
+
export { NotificationCenter } from "./src/blocks/notification-center.tsx"
|
|
121
|
+
export { PageHeader } from "./src/blocks/page-header.tsx"
|
|
122
|
+
export { ProgressRing } from "./src/blocks/progress-ring.tsx"
|
|
123
|
+
export { RadarChart } from "./src/blocks/radar-chart.tsx"
|
|
124
|
+
export { RequestInspector } from "./src/blocks/request-inspector.tsx"
|
|
125
|
+
export { RunTimeline } from "./src/blocks/run-timeline.tsx"
|
|
126
|
+
export { Scrollspy } from "./src/blocks/scrollspy.tsx"
|
|
127
|
+
export { SeverityChip } from "./src/blocks/severity-chip.tsx"
|
|
128
|
+
export { Sparkline } from "./src/blocks/sparkline.tsx"
|
|
129
|
+
export { StatCard } from "./src/blocks/stat-card.tsx"
|
|
130
|
+
export { statusTone, StatusBadge } from "./src/blocks/status-badge.tsx"
|
|
131
|
+
export { Terminal } from "./src/blocks/terminal.tsx"
|
|
132
|
+
export { TestStepList } from "./src/blocks/test-step-list.tsx"
|
|
133
|
+
export { TrendCard } from "./src/blocks/trend-card.tsx"
|
|
134
|
+
export { cn } from "./src/lib/utils.ts"
|
|
135
|
+
export { Icon } from "./src/lib/icons.tsx"
|
|
136
|
+
export { IlluServerStatus, IlluAccessDenied, IlluPageNotFound, IlluSearch, IlluDataProcessing, IlluBugFixing, IlluEmpty, IlluNoData, IlluLoading, IlluCodeReview } from "./src/lib/illustrations.tsx"
|
|
137
|
+
export { UiProvider, useUiI18n, useUiMessages, useUiLocale, useDateLocale, useLabels, en, zh, dictionaries } from "./src/i18n/context.tsx"
|
|
138
|
+
export { useIsMobile } from "./src/hooks/use-mobile.ts"
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { ReactNode } from "react"
|
|
2
|
+
|
|
3
|
+
import { cn } from "@monkey-mini-app/ui/lib/utils"
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* App frame: optional sidebar + header + main.
|
|
7
|
+
* @when Root layout for a mini-app page
|
|
8
|
+
* @example
|
|
9
|
+
* <AppShell sidebar={<nav />} header={<PageHeader title="Home" />}>
|
|
10
|
+
* {children}
|
|
11
|
+
* </AppShell>
|
|
12
|
+
*/
|
|
13
|
+
export function AppShell({
|
|
14
|
+
sidebar,
|
|
15
|
+
header,
|
|
16
|
+
children,
|
|
17
|
+
className,
|
|
18
|
+
}: {
|
|
19
|
+
sidebar?: ReactNode
|
|
20
|
+
header?: ReactNode
|
|
21
|
+
children: ReactNode
|
|
22
|
+
className?: string
|
|
23
|
+
}) {
|
|
24
|
+
return (
|
|
25
|
+
<div className={cn("flex min-h-svh w-full", className)} data-testid="app-shell">
|
|
26
|
+
{sidebar ? (
|
|
27
|
+
<aside className="w-56 shrink-0 border-r bg-sidebar p-3">{sidebar}</aside>
|
|
28
|
+
) : null}
|
|
29
|
+
<div className="flex min-w-0 flex-1 flex-col">
|
|
30
|
+
{header ? (
|
|
31
|
+
<header className="border-b px-4 py-3">{header}</header>
|
|
32
|
+
) : null}
|
|
33
|
+
<main className="flex-1 p-4">{children}</main>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
)
|
|
37
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
Attachment,
|
|
5
|
+
AttachmentContent,
|
|
6
|
+
AttachmentGroup,
|
|
7
|
+
AttachmentMedia,
|
|
8
|
+
AttachmentTitle,
|
|
9
|
+
} from "@monkey-mini-app/ui/components/attachment"
|
|
10
|
+
|
|
11
|
+
export type GalleryFile = { name: string; url?: string }
|
|
12
|
+
|
|
13
|
+
export function AttachmentGallery({ files }: { files: GalleryFile[] }) {
|
|
14
|
+
return (
|
|
15
|
+
<AttachmentGroup data-testid="attachment-gallery">
|
|
16
|
+
{files.map((file) => (
|
|
17
|
+
<Attachment key={file.name}>
|
|
18
|
+
{file.url ? (
|
|
19
|
+
<AttachmentMedia>
|
|
20
|
+
<img src={file.url} alt={file.name} className="size-10 object-cover" />
|
|
21
|
+
</AttachmentMedia>
|
|
22
|
+
) : null}
|
|
23
|
+
<AttachmentContent>
|
|
24
|
+
<AttachmentTitle>{file.name}</AttachmentTitle>
|
|
25
|
+
</AttachmentContent>
|
|
26
|
+
</Attachment>
|
|
27
|
+
))}
|
|
28
|
+
</AttachmentGroup>
|
|
29
|
+
)
|
|
30
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { Bar, BarChart as ReBar, CartesianGrid, XAxis } from "recharts"
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
ChartContainer,
|
|
7
|
+
ChartTooltip,
|
|
8
|
+
ChartTooltipContent,
|
|
9
|
+
type ChartConfig,
|
|
10
|
+
} from "@monkey-mini-app/ui/components/chart"
|
|
11
|
+
|
|
12
|
+
export function StackedBarChart({
|
|
13
|
+
data,
|
|
14
|
+
config,
|
|
15
|
+
keys,
|
|
16
|
+
}: {
|
|
17
|
+
data: Record<string, string | number>[]
|
|
18
|
+
config: ChartConfig
|
|
19
|
+
keys: string[]
|
|
20
|
+
}) {
|
|
21
|
+
return (
|
|
22
|
+
<ChartContainer config={config} className="h-56 w-full" data-testid="bar-chart">
|
|
23
|
+
<ReBar accessibilityLayer data={data}>
|
|
24
|
+
<CartesianGrid vertical={false} />
|
|
25
|
+
<XAxis dataKey="label" tickLine={false} axisLine={false} />
|
|
26
|
+
<ChartTooltip content={<ChartTooltipContent />} />
|
|
27
|
+
{keys.map((key) => (
|
|
28
|
+
<Bar key={key} dataKey={key} stackId="a" fill={`var(--color-${key})`} />
|
|
29
|
+
))}
|
|
30
|
+
</ReBar>
|
|
31
|
+
</ChartContainer>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Avatar, AvatarFallback } from "@monkey-mini-app/ui/components/avatar"
|
|
2
|
+
|
|
3
|
+
export type Comment = { id: string; author: string; body: string; time?: string }
|
|
4
|
+
|
|
5
|
+
export function CommentThread({ comments }: { comments: Comment[] }) {
|
|
6
|
+
return (
|
|
7
|
+
<div className="flex flex-col gap-3" data-testid="comment-thread">
|
|
8
|
+
{comments.map((comment) => (
|
|
9
|
+
<div key={comment.id} className="flex gap-2">
|
|
10
|
+
<Avatar className="size-7">
|
|
11
|
+
<AvatarFallback className="text-[10px]">
|
|
12
|
+
{comment.author.slice(0, 2).toUpperCase()}
|
|
13
|
+
</AvatarFallback>
|
|
14
|
+
</Avatar>
|
|
15
|
+
<div>
|
|
16
|
+
<div className="text-sm font-medium">
|
|
17
|
+
{comment.author}
|
|
18
|
+
{comment.time ? (
|
|
19
|
+
<span className="text-muted-foreground ml-2 text-xs font-normal">
|
|
20
|
+
{comment.time}
|
|
21
|
+
</span>
|
|
22
|
+
) : null}
|
|
23
|
+
</div>
|
|
24
|
+
<p className="text-sm">{comment.body}</p>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
))}
|
|
28
|
+
</div>
|
|
29
|
+
)
|
|
30
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export function DescriptionList({
|
|
2
|
+
items,
|
|
3
|
+
}: {
|
|
4
|
+
items: { label: string; value: string }[]
|
|
5
|
+
}) {
|
|
6
|
+
return (
|
|
7
|
+
<dl className="grid grid-cols-[8rem_1fr] gap-x-3 gap-y-2 text-sm" data-testid="description-list">
|
|
8
|
+
{items.map((item) => (
|
|
9
|
+
<div key={item.label} className="contents">
|
|
10
|
+
<dt className="text-muted-foreground">{item.label}</dt>
|
|
11
|
+
<dd>{item.value}</dd>
|
|
12
|
+
</div>
|
|
13
|
+
))}
|
|
14
|
+
</dl>
|
|
15
|
+
)
|
|
16
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import type { ReactNode } from "react"
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
Sheet,
|
|
7
|
+
SheetContent,
|
|
8
|
+
SheetDescription,
|
|
9
|
+
SheetHeader,
|
|
10
|
+
SheetTitle,
|
|
11
|
+
} from "@monkey-mini-app/ui/components/sheet"
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Right-side inspector Sheet for a selected row/entity.
|
|
15
|
+
* @when Master-detail after row/card click
|
|
16
|
+
* @example
|
|
17
|
+
* <DetailPanel open={!!id} onOpenChange={() => setId(null)} title="Run #12">{body}</DetailPanel>
|
|
18
|
+
*/
|
|
19
|
+
export function DetailPanel({
|
|
20
|
+
open,
|
|
21
|
+
onOpenChange,
|
|
22
|
+
title,
|
|
23
|
+
description,
|
|
24
|
+
children,
|
|
25
|
+
}: {
|
|
26
|
+
open: boolean
|
|
27
|
+
onOpenChange: (open: boolean) => void
|
|
28
|
+
title: string
|
|
29
|
+
description?: string
|
|
30
|
+
children?: ReactNode
|
|
31
|
+
}) {
|
|
32
|
+
return (
|
|
33
|
+
<Sheet open={open} onOpenChange={onOpenChange}>
|
|
34
|
+
<SheetContent data-testid="detail-panel">
|
|
35
|
+
<SheetHeader>
|
|
36
|
+
<SheetTitle>{title}</SheetTitle>
|
|
37
|
+
{description ? <SheetDescription>{description}</SheetDescription> : null}
|
|
38
|
+
</SheetHeader>
|
|
39
|
+
<div className="px-4 pb-4">{children}</div>
|
|
40
|
+
</SheetContent>
|
|
41
|
+
</Sheet>
|
|
42
|
+
)
|
|
43
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { Pie, PieChart } from "recharts"
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
ChartContainer,
|
|
7
|
+
ChartTooltip,
|
|
8
|
+
ChartTooltipContent,
|
|
9
|
+
type ChartConfig,
|
|
10
|
+
} from "@monkey-mini-app/ui/components/chart"
|
|
11
|
+
|
|
12
|
+
export type Slice = { name: string; value: number; fill: string }
|
|
13
|
+
|
|
14
|
+
export function DonutChart({
|
|
15
|
+
data,
|
|
16
|
+
config,
|
|
17
|
+
center,
|
|
18
|
+
}: {
|
|
19
|
+
data: Slice[]
|
|
20
|
+
config: ChartConfig
|
|
21
|
+
center?: string
|
|
22
|
+
}) {
|
|
23
|
+
return (
|
|
24
|
+
<div className="relative" data-testid="donut-chart">
|
|
25
|
+
<ChartContainer config={config} className="mx-auto aspect-square h-48">
|
|
26
|
+
<PieChart>
|
|
27
|
+
<ChartTooltip content={<ChartTooltipContent hideLabel />} />
|
|
28
|
+
<Pie data={data} dataKey="value" nameKey="name" innerRadius={50} />
|
|
29
|
+
</PieChart>
|
|
30
|
+
</ChartContainer>
|
|
31
|
+
{center ? (
|
|
32
|
+
<div className="pointer-events-none absolute inset-0 flex items-center justify-center text-sm font-medium">
|
|
33
|
+
{center}
|
|
34
|
+
</div>
|
|
35
|
+
) : null}
|
|
36
|
+
</div>
|
|
37
|
+
)
|
|
38
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Badge } from "@monkey-mini-app/ui/components/badge"
|
|
2
|
+
import { cn } from "@monkey-mini-app/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
|
+
export function EnvBadge({ env }: { env: string }) {
|
|
14
|
+
return (
|
|
15
|
+
<Badge
|
|
16
|
+
variant="outline"
|
|
17
|
+
data-testid="env-badge"
|
|
18
|
+
className={cn("border-transparent uppercase", tone[env.toLowerCase()] ?? tone.local)}
|
|
19
|
+
>
|
|
20
|
+
{env}
|
|
21
|
+
</Badge>
|
|
22
|
+
)
|
|
23
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
*/
|
|
12
|
+
export function FilterBar({ children }: { children: ReactNode }) {
|
|
13
|
+
return (
|
|
14
|
+
<div
|
|
15
|
+
className="flex flex-wrap items-center gap-2"
|
|
16
|
+
data-testid="filter-bar"
|
|
17
|
+
>
|
|
18
|
+
{children}
|
|
19
|
+
</div>
|
|
20
|
+
)
|
|
21
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ProgressRing } from "@monkey-mini-app/ui/blocks/progress-ring"
|
|
2
|
+
|
|
3
|
+
export function Gauge({ value, label }: { value: number; label?: string }) {
|
|
4
|
+
return (
|
|
5
|
+
<div className="flex items-center gap-2" data-testid="gauge">
|
|
6
|
+
<ProgressRing value={value} />
|
|
7
|
+
<div>
|
|
8
|
+
<div className="text-sm font-medium">{value}%</div>
|
|
9
|
+
{label ? <div className="text-muted-foreground text-xs">{label}</div> : null}
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
)
|
|
13
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Item, ItemContent, ItemDescription, ItemTitle } from "@monkey-mini-app/ui/components/item"
|
|
2
|
+
|
|
3
|
+
export type NotificationItem = {
|
|
4
|
+
id: string
|
|
5
|
+
title: string
|
|
6
|
+
body?: string
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function NotificationCenter({ items }: { items: NotificationItem[] }) {
|
|
10
|
+
return (
|
|
11
|
+
<div className="flex flex-col gap-1" data-testid="notification-center">
|
|
12
|
+
{items.map((item) => (
|
|
13
|
+
<Item key={item.id} variant="outline">
|
|
14
|
+
<ItemContent>
|
|
15
|
+
<ItemTitle>{item.title}</ItemTitle>
|
|
16
|
+
{item.body ? <ItemDescription>{item.body}</ItemDescription> : null}
|
|
17
|
+
</ItemContent>
|
|
18
|
+
</Item>
|
|
19
|
+
))}
|
|
20
|
+
</div>
|
|
21
|
+
)
|
|
22
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ReactNode } from "react"
|
|
2
|
+
|
|
3
|
+
export type PageHeaderProps = {
|
|
4
|
+
title: string
|
|
5
|
+
description?: string
|
|
6
|
+
actions?: ReactNode
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Page title row with optional description and right-side actions.
|
|
11
|
+
* @when Top of a page inside AppShell main
|
|
12
|
+
* @example
|
|
13
|
+
* <PageHeader title="QA Runs" description="Last 24h" actions={<Button>New</Button>} />
|
|
14
|
+
*/
|
|
15
|
+
export function PageHeader({ title, description, actions }: PageHeaderProps) {
|
|
16
|
+
return (
|
|
17
|
+
<div
|
|
18
|
+
className="flex flex-wrap items-start justify-between gap-3"
|
|
19
|
+
data-testid="page-header"
|
|
20
|
+
>
|
|
21
|
+
<div className="flex min-w-0 flex-col gap-1">
|
|
22
|
+
<h1 className="font-heading text-xl font-medium">{title}</h1>
|
|
23
|
+
{description ? (
|
|
24
|
+
<p className="text-muted-foreground text-sm">{description}</p>
|
|
25
|
+
) : null}
|
|
26
|
+
</div>
|
|
27
|
+
{actions ? <div className="flex items-center gap-2">{actions}</div> : null}
|
|
28
|
+
</div>
|
|
29
|
+
)
|
|
30
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export function ProgressRing({ value }: { value: number }) {
|
|
2
|
+
const clamped = Math.min(100, Math.max(0, value))
|
|
3
|
+
const r = 16
|
|
4
|
+
const c = 2 * Math.PI * r
|
|
5
|
+
const offset = c - (clamped / 100) * c
|
|
6
|
+
return (
|
|
7
|
+
<svg
|
|
8
|
+
data-testid="progress-ring"
|
|
9
|
+
viewBox="0 0 40 40"
|
|
10
|
+
className="size-10 -rotate-90"
|
|
11
|
+
>
|
|
12
|
+
<circle cx="20" cy="20" r={r} className="fill-none stroke-muted" strokeWidth="4" />
|
|
13
|
+
<circle
|
|
14
|
+
cx="20"
|
|
15
|
+
cy="20"
|
|
16
|
+
r={r}
|
|
17
|
+
className="fill-none stroke-primary"
|
|
18
|
+
strokeWidth="4"
|
|
19
|
+
strokeDasharray={c}
|
|
20
|
+
strokeDashoffset={offset}
|
|
21
|
+
strokeLinecap="round"
|
|
22
|
+
/>
|
|
23
|
+
</svg>
|
|
24
|
+
)
|
|
25
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { PolarAngleAxis, PolarGrid, Radar, RadarChart as ReRadar } from "recharts"
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
ChartContainer,
|
|
7
|
+
ChartTooltip,
|
|
8
|
+
ChartTooltipContent,
|
|
9
|
+
type ChartConfig,
|
|
10
|
+
} from "@monkey-mini-app/ui/components/chart"
|
|
11
|
+
|
|
12
|
+
export function RadarChart({
|
|
13
|
+
data,
|
|
14
|
+
config,
|
|
15
|
+
dataKey = "value",
|
|
16
|
+
}: {
|
|
17
|
+
data: { label: string; value: number }[]
|
|
18
|
+
config: ChartConfig
|
|
19
|
+
dataKey?: string
|
|
20
|
+
}) {
|
|
21
|
+
return (
|
|
22
|
+
<ChartContainer config={config} className="mx-auto aspect-square h-56" data-testid="radar-chart">
|
|
23
|
+
<ReRadar data={data}>
|
|
24
|
+
<PolarGrid />
|
|
25
|
+
<PolarAngleAxis dataKey="label" />
|
|
26
|
+
<ChartTooltip content={<ChartTooltipContent />} />
|
|
27
|
+
<Radar dataKey={dataKey} fill="var(--color-value)" fillOpacity={0.35} />
|
|
28
|
+
</ReRadar>
|
|
29
|
+
</ChartContainer>
|
|
30
|
+
)
|
|
31
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@monkey-mini-app/ui/components/tabs"
|
|
2
|
+
import { CodeBlock } from "@monkey-mini-app/ui/products/code-block"
|
|
3
|
+
|
|
4
|
+
export function RequestInspector({
|
|
5
|
+
method,
|
|
6
|
+
url,
|
|
7
|
+
request,
|
|
8
|
+
response,
|
|
9
|
+
}: {
|
|
10
|
+
method: string
|
|
11
|
+
url: string
|
|
12
|
+
request?: string
|
|
13
|
+
response?: string
|
|
14
|
+
}) {
|
|
15
|
+
return (
|
|
16
|
+
<div data-testid="request-inspector" className="flex flex-col gap-2">
|
|
17
|
+
<div className="font-mono text-sm">
|
|
18
|
+
<span className="font-medium">{method}</span> {url}
|
|
19
|
+
</div>
|
|
20
|
+
<Tabs defaultValue="response">
|
|
21
|
+
<TabsList>
|
|
22
|
+
<TabsTrigger value="request">Request</TabsTrigger>
|
|
23
|
+
<TabsTrigger value="response">Response</TabsTrigger>
|
|
24
|
+
</TabsList>
|
|
25
|
+
<TabsContent value="request">
|
|
26
|
+
<CodeBlock code={request ?? ""} language="json" />
|
|
27
|
+
</TabsContent>
|
|
28
|
+
<TabsContent value="response">
|
|
29
|
+
<CodeBlock code={response ?? ""} language="json" />
|
|
30
|
+
</TabsContent>
|
|
31
|
+
</Tabs>
|
|
32
|
+
</div>
|
|
33
|
+
)
|
|
34
|
+
}
|