@slexn/codecenter-ui 1.0.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/LICENSE +34 -0
- package/README.md +148 -0
- package/components.json +20 -0
- package/dist/codecenter-ui.cjs +10 -0
- package/dist/codecenter-ui.js +17995 -0
- package/dist/components/ui/accordion/Accordion.vue.d.ts +28 -0
- package/dist/components/ui/accordion/AccordionContent.vue.d.ts +22 -0
- package/dist/components/ui/accordion/AccordionItem.vue.d.ts +24 -0
- package/dist/components/ui/accordion/AccordionTrigger.vue.d.ts +22 -0
- package/dist/components/ui/accordion/index.d.ts +4 -0
- package/dist/components/ui/alert/Alert.vue.d.ts +32 -0
- package/dist/components/ui/alert/AlertDescription.vue.d.ts +24 -0
- package/dist/components/ui/alert/AlertTitle.vue.d.ts +24 -0
- package/dist/components/ui/alert/index.d.ts +4 -0
- package/dist/components/ui/alert/variants.d.ts +5 -0
- package/dist/components/ui/button/Button.vue.d.ts +27 -0
- package/dist/components/ui/button/index.d.ts +2 -0
- package/dist/components/ui/button/variants.d.ts +6 -0
- package/dist/components/ui/button-group/ButtonGroup.vue.d.ts +25 -0
- package/dist/components/ui/button-group/index.d.ts +2 -0
- package/dist/components/ui/card/Card.vue.d.ts +21 -0
- package/dist/components/ui/card/CardContent.vue.d.ts +21 -0
- package/dist/components/ui/card/CardDescription.vue.d.ts +21 -0
- package/dist/components/ui/card/CardFooter.vue.d.ts +21 -0
- package/dist/components/ui/card/CardHeader.vue.d.ts +21 -0
- package/dist/components/ui/card/CardTitle.vue.d.ts +21 -0
- package/dist/components/ui/card/index.d.ts +6 -0
- package/dist/components/ui/chart/Chart.vue.d.ts +92 -0
- package/dist/components/ui/chart/index.d.ts +2 -0
- package/dist/components/ui/chat/Chat.vue.d.ts +190 -0
- package/dist/components/ui/chat/ChatAttachments.vue.d.ts +11 -0
- package/dist/components/ui/chat/ChatCodeBlock.vue.d.ts +16 -0
- package/dist/components/ui/chat/code-block.d.ts +27 -0
- package/dist/components/ui/chat/index.d.ts +6 -0
- package/dist/components/ui/chat/types.d.ts +15 -0
- package/dist/components/ui/checkbox/Checkbox.vue.d.ts +29 -0
- package/dist/components/ui/checkbox/index.d.ts +1 -0
- package/dist/components/ui/commit/Commit.vue.d.ts +62 -0
- package/dist/components/ui/commit/index.d.ts +2 -0
- package/dist/components/ui/contribution-graph/ContributionGraph.vue.d.ts +87 -0
- package/dist/components/ui/contribution-graph/index.d.ts +2 -0
- package/dist/components/ui/data-table/DataTable.vue.d.ts +109 -0
- package/dist/components/ui/data-table/index.d.ts +2 -0
- package/dist/components/ui/date-picker/DatePicker.vue.d.ts +37 -0
- package/dist/components/ui/date-picker/index.d.ts +2 -0
- package/dist/components/ui/dialog/Dialog.vue.d.ts +25 -0
- package/dist/components/ui/dialog/DialogClose.vue.d.ts +18 -0
- package/dist/components/ui/dialog/DialogContent.vue.d.ts +39 -0
- package/dist/components/ui/dialog/DialogDescription.vue.d.ts +22 -0
- package/dist/components/ui/dialog/DialogFooter.vue.d.ts +21 -0
- package/dist/components/ui/dialog/DialogHeader.vue.d.ts +21 -0
- package/dist/components/ui/dialog/DialogOverlay.vue.d.ts +22 -0
- package/dist/components/ui/dialog/DialogScrollContent.vue.d.ts +36 -0
- package/dist/components/ui/dialog/DialogTitle.vue.d.ts +22 -0
- package/dist/components/ui/dialog/DialogTrigger.vue.d.ts +18 -0
- package/dist/components/ui/dialog/index.d.ts +10 -0
- package/dist/components/ui/diff/DiffTool.vue.d.ts +21 -0
- package/dist/components/ui/diff/diff-parser.d.ts +30 -0
- package/dist/components/ui/diff/diff-tool.d.ts +36 -0
- package/dist/components/ui/diff/index.d.ts +2 -0
- package/dist/components/ui/dropdown-menu/DropdownMenu.vue.d.ts +24 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.d.ts +29 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuContent.vue.d.ts +36 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuGroup.vue.d.ts +18 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuItem.vue.d.ts +26 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuLabel.vue.d.ts +23 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue.d.ts +22 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuRadioItem.vue.d.ts +27 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuSeparator.vue.d.ts +7 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuShortcut.vue.d.ts +21 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuSub.vue.d.ts +22 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +38 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +23 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuTrigger.vue.d.ts +18 -0
- package/dist/components/ui/dropdown-menu/index.d.ts +15 -0
- package/dist/components/ui/gauge/Gauge.vue.d.ts +62 -0
- package/dist/components/ui/gauge/index.d.ts +2 -0
- package/dist/components/ui/git-graph/GitGraph.vue.d.ts +59 -0
- package/dist/components/ui/git-graph/index.d.ts +2 -0
- package/dist/components/ui/incident-timeline/IncidentTimeline.vue.d.ts +50 -0
- package/dist/components/ui/incident-timeline/index.d.ts +2 -0
- package/dist/components/ui/input/Input.vue.d.ts +14 -0
- package/dist/components/ui/input/InputControl.vue.d.ts +14 -0
- package/dist/components/ui/input/InputFieldGroup.vue.d.ts +21 -0
- package/dist/components/ui/input/index.d.ts +4 -0
- package/dist/components/ui/input/types.d.ts +31 -0
- package/dist/components/ui/kpi-card/KpiCard.vue.d.ts +46 -0
- package/dist/components/ui/kpi-card/index.d.ts +2 -0
- package/dist/components/ui/kpi-line-card/KpiLineCard.vue.d.ts +66 -0
- package/dist/components/ui/kpi-line-card/index.d.ts +2 -0
- package/dist/components/ui/model-selector/ModelSelector.vue.d.ts +41 -0
- package/dist/components/ui/model-selector/index.d.ts +2 -0
- package/dist/components/ui/model-selector/types.d.ts +12 -0
- package/dist/components/ui/network-graph/NetworkGraph.vue.d.ts +75 -0
- package/dist/components/ui/network-graph/index.d.ts +2 -0
- package/dist/components/ui/pagination/Pagination.vue.d.ts +29 -0
- package/dist/components/ui/pagination/PaginationContent.vue.d.ts +29 -0
- package/dist/components/ui/pagination/PaginationEllipsis.vue.d.ts +22 -0
- package/dist/components/ui/pagination/PaginationFirst.vue.d.ts +26 -0
- package/dist/components/ui/pagination/PaginationItem.vue.d.ts +28 -0
- package/dist/components/ui/pagination/PaginationLast.vue.d.ts +26 -0
- package/dist/components/ui/pagination/PaginationNext.vue.d.ts +26 -0
- package/dist/components/ui/pagination/PaginationPrevious.vue.d.ts +26 -0
- package/dist/components/ui/pagination/index.d.ts +8 -0
- package/dist/components/ui/profile/Profile.vue.d.ts +30 -0
- package/dist/components/ui/profile/ProfileGroup.vue.d.ts +37 -0
- package/dist/components/ui/profile/index.d.ts +4 -0
- package/dist/components/ui/progress/Progress.vue.d.ts +36 -0
- package/dist/components/ui/progress/index.d.ts +2 -0
- package/dist/components/ui/prompt-input/PromptInput.vue.d.ts +150 -0
- package/dist/components/ui/prompt-input/index.d.ts +2 -0
- package/dist/components/ui/prompt-input/types.d.ts +61 -0
- package/dist/components/ui/radio-group/RadioGroup.vue.d.ts +30 -0
- package/dist/components/ui/radio-group/RadioGroupItem.vue.d.ts +12 -0
- package/dist/components/ui/radio-group/RadioGroupOption.vue.d.ts +28 -0
- package/dist/components/ui/radio-group/index.d.ts +3 -0
- package/dist/components/ui/reasoning/Reasoning.vue.d.ts +40 -0
- package/dist/components/ui/reasoning/index.d.ts +2 -0
- package/dist/components/ui/reasoning/types.d.ts +26 -0
- package/dist/components/ui/select/Select.vue.d.ts +28 -0
- package/dist/components/ui/select/SelectContent.vue.d.ts +46 -0
- package/dist/components/ui/select/SelectGroup.vue.d.ts +18 -0
- package/dist/components/ui/select/SelectItem.vue.d.ts +26 -0
- package/dist/components/ui/select/SelectItemText.vue.d.ts +18 -0
- package/dist/components/ui/select/SelectLabel.vue.d.ts +22 -0
- package/dist/components/ui/select/SelectScrollDownButton.vue.d.ts +22 -0
- package/dist/components/ui/select/SelectScrollUpButton.vue.d.ts +22 -0
- package/dist/components/ui/select/SelectSeparator.vue.d.ts +7 -0
- package/dist/components/ui/select/SelectTrigger.vue.d.ts +25 -0
- package/dist/components/ui/select/SelectValue.vue.d.ts +18 -0
- package/dist/components/ui/select/index.d.ts +11 -0
- package/dist/components/ui/select/search.d.ts +18 -0
- package/dist/components/ui/separator/Separator.vue.d.ts +6 -0
- package/dist/components/ui/separator/index.d.ts +2 -0
- package/dist/components/ui/separator/types.d.ts +7 -0
- package/dist/components/ui/shimmer/Shimmer.vue.d.ts +37 -0
- package/dist/components/ui/shimmer/index.d.ts +2 -0
- package/dist/components/ui/sidebar/Sidebar.vue.d.ts +24 -0
- package/dist/components/ui/sidebar/SidebarContent.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarFooter.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarGroup.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarGroupAction.vue.d.ts +24 -0
- package/dist/components/ui/sidebar/SidebarGroupContent.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarGroupLabel.vue.d.ts +24 -0
- package/dist/components/ui/sidebar/SidebarHeader.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarInput.vue.d.ts +6 -0
- package/dist/components/ui/sidebar/SidebarInset.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarMenu.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarMenuAction.vue.d.ts +25 -0
- package/dist/components/ui/sidebar/SidebarMenuBadge.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarMenuButton.vue.d.ts +25 -0
- package/dist/components/ui/sidebar/SidebarMenuButtonChild.vue.d.ts +30 -0
- package/dist/components/ui/sidebar/SidebarMenuItem.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarMenuSub.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarMenuSubButton.vue.d.ts +27 -0
- package/dist/components/ui/sidebar/SidebarMenuSubItem.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarProvider.vue.d.ts +36 -0
- package/dist/components/ui/sidebar/SidebarRail.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarSeparator.vue.d.ts +6 -0
- package/dist/components/ui/sidebar/SidebarTrigger.vue.d.ts +6 -0
- package/dist/components/ui/sidebar/context.d.ts +19 -0
- package/dist/components/ui/sidebar/index.d.ts +26 -0
- package/dist/components/ui/sidebar/types.d.ts +11 -0
- package/dist/components/ui/sidebar/variants.d.ts +6 -0
- package/dist/components/ui/skeleton/Skeleton.vue.d.ts +18 -0
- package/dist/components/ui/skeleton/index.d.ts +2 -0
- package/dist/components/ui/sonner/Sonner.vue.d.ts +5 -0
- package/dist/components/ui/sonner/index.d.ts +2 -0
- package/dist/components/ui/spinner/Spinner.vue.d.ts +11 -0
- package/dist/components/ui/spinner/index.d.ts +1 -0
- package/dist/components/ui/stepper/Stepper.vue.d.ts +38 -0
- package/dist/components/ui/stepper/StepperDescription.vue.d.ts +22 -0
- package/dist/components/ui/stepper/StepperIndicator.vue.d.ts +30 -0
- package/dist/components/ui/stepper/StepperItem.vue.d.ts +24 -0
- package/dist/components/ui/stepper/StepperSeparator.vue.d.ts +7 -0
- package/dist/components/ui/stepper/StepperTitle.vue.d.ts +22 -0
- package/dist/components/ui/stepper/StepperTrigger.vue.d.ts +22 -0
- package/dist/components/ui/stepper/index.d.ts +7 -0
- package/dist/components/ui/switch/Switch.vue.d.ts +12 -0
- package/dist/components/ui/switch/index.d.ts +1 -0
- package/dist/components/ui/table/Table.vue.d.ts +22 -0
- package/dist/components/ui/table/TableBody.vue.d.ts +21 -0
- package/dist/components/ui/table/TableCaption.vue.d.ts +21 -0
- package/dist/components/ui/table/TableCell.vue.d.ts +22 -0
- package/dist/components/ui/table/TableEmpty.vue.d.ts +24 -0
- package/dist/components/ui/table/TableFooter.vue.d.ts +21 -0
- package/dist/components/ui/table/TableHead.vue.d.ts +21 -0
- package/dist/components/ui/table/TableHeader.vue.d.ts +21 -0
- package/dist/components/ui/table/TableRow.vue.d.ts +21 -0
- package/dist/components/ui/table/index.d.ts +9 -0
- package/dist/components/ui/tabs/Tabs.vue.d.ts +28 -0
- package/dist/components/ui/tabs/TabsContent.vue.d.ts +22 -0
- package/dist/components/ui/tabs/TabsList.vue.d.ts +22 -0
- package/dist/components/ui/tabs/TabsTrigger.vue.d.ts +22 -0
- package/dist/components/ui/tabs/index.d.ts +4 -0
- package/dist/components/ui/tag/Tag.vue.d.ts +35 -0
- package/dist/components/ui/tag/index.d.ts +2 -0
- package/dist/components/ui/tag/variants.d.ts +6 -0
- package/dist/components/ui/textarea/Textarea.vue.d.ts +14 -0
- package/dist/components/ui/textarea/TextareaControl.vue.d.ts +14 -0
- package/dist/components/ui/textarea/TextareaFieldGroup.vue.d.ts +21 -0
- package/dist/components/ui/textarea/index.d.ts +4 -0
- package/dist/components/ui/textarea/types.d.ts +32 -0
- package/dist/components/ui/tool/Tool.vue.d.ts +61 -0
- package/dist/components/ui/tool/index.d.ts +2 -0
- package/dist/components/ui/tooltip/Tooltip.vue.d.ts +24 -0
- package/dist/components/ui/tooltip/TooltipContent.vue.d.ts +32 -0
- package/dist/components/ui/tooltip/TooltipProvider.vue.d.ts +20 -0
- package/dist/components/ui/tooltip/TooltipTrigger.vue.d.ts +18 -0
- package/dist/components/ui/tooltip/index.d.ts +4 -0
- package/dist/docs/component-docs.d.ts +18 -0
- package/dist/docs/markdown.d.ts +27 -0
- package/dist/index.d.ts +45 -0
- package/dist/lib/code-highlight.d.ts +11 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/styles.css +3 -0
- package/package.json +76 -0
- package/public/r/accordion.json +52 -0
- package/public/r/alert.json +51 -0
- package/public/r/button-group.json +31 -0
- package/public/r/button.json +39 -0
- package/public/r/card.json +61 -0
- package/public/r/chart.json +31 -0
- package/public/r/chat.json +186 -0
- package/public/r/checkbox.json +34 -0
- package/public/r/commit.json +32 -0
- package/public/r/contribution-graph.json +63 -0
- package/public/r/data-table.json +197 -0
- package/public/r/date-picker.json +33 -0
- package/public/r/dialog.json +88 -0
- package/public/r/diff.json +71 -0
- package/public/r/dropdown-menu.json +112 -0
- package/public/r/gauge.json +31 -0
- package/public/r/git-graph.json +32 -0
- package/public/r/incident-timeline.json +64 -0
- package/public/r/input.json +49 -0
- package/public/r/kpi-card.json +32 -0
- package/public/r/kpi-line-card.json +32 -0
- package/public/r/model-selector.json +148 -0
- package/public/r/network-graph.json +33 -0
- package/public/r/pagination.json +95 -0
- package/public/r/profile.json +37 -0
- package/public/r/progress.json +31 -0
- package/public/r/prompt-input.json +293 -0
- package/public/r/radio-group.json +45 -0
- package/public/r/reasoning.json +38 -0
- package/public/r/registry.json +2512 -0
- package/public/r/select.json +100 -0
- package/public/r/separator.json +37 -0
- package/public/r/shimmer.json +31 -0
- package/public/r/sidebar.json +221 -0
- package/public/r/skeleton.json +31 -0
- package/public/r/sonner.json +33 -0
- package/public/r/spinner.json +31 -0
- package/public/r/stepper.json +70 -0
- package/public/r/switch.json +33 -0
- package/public/r/table.json +79 -0
- package/public/r/tabs.json +51 -0
- package/public/r/tag.json +39 -0
- package/public/r/textarea.json +49 -0
- package/public/r/tool.json +32 -0
- package/public/r/tooltip.json +51 -0
- package/registry.json +2512 -0
- package/src/components/docs/MarkdownContent.vue +106 -0
- package/src/components/ui/accordion/Accordion.vue +24 -0
- package/src/components/ui/accordion/AccordionContent.vue +62 -0
- package/src/components/ui/accordion/AccordionItem.vue +23 -0
- package/src/components/ui/accordion/AccordionTrigger.vue +38 -0
- package/src/components/ui/accordion/index.ts +4 -0
- package/src/components/ui/alert/Alert.vue +40 -0
- package/src/components/ui/alert/AlertDescription.vue +24 -0
- package/src/components/ui/alert/AlertTitle.vue +24 -0
- package/src/components/ui/alert/index.ts +4 -0
- package/src/components/ui/alert/variants.ts +19 -0
- package/src/components/ui/button/Button.vue +27 -0
- package/src/components/ui/button/index.ts +2 -0
- package/src/components/ui/button/variants.ts +32 -0
- package/src/components/ui/button-group/ButtonGroup.vue +31 -0
- package/src/components/ui/button-group/index.ts +2 -0
- package/src/components/ui/card/Card.vue +17 -0
- package/src/components/ui/card/CardContent.vue +14 -0
- package/src/components/ui/card/CardDescription.vue +14 -0
- package/src/components/ui/card/CardFooter.vue +14 -0
- package/src/components/ui/card/CardHeader.vue +17 -0
- package/src/components/ui/card/CardTitle.vue +14 -0
- package/src/components/ui/card/index.ts +6 -0
- package/src/components/ui/chart/Chart.vue +1042 -0
- package/src/components/ui/chart/index.ts +13 -0
- package/src/components/ui/chat/Chat.vue +1297 -0
- package/src/components/ui/chat/ChatAttachments.vue +278 -0
- package/src/components/ui/chat/ChatCodeBlock.vue +283 -0
- package/src/components/ui/chat/code-block.ts +30 -0
- package/src/components/ui/chat/index.ts +24 -0
- package/src/components/ui/chat/types.ts +23 -0
- package/src/components/ui/checkbox/Checkbox.vue +38 -0
- package/src/components/ui/checkbox/index.ts +1 -0
- package/src/components/ui/commit/Commit.vue +423 -0
- package/src/components/ui/commit/index.ts +9 -0
- package/src/components/ui/contribution-graph/ContributionGraph.vue +719 -0
- package/src/components/ui/contribution-graph/index.ts +9 -0
- package/src/components/ui/data-table/DataTable.vue +534 -0
- package/src/components/ui/data-table/index.ts +9 -0
- package/src/components/ui/date-picker/DatePicker.vue +649 -0
- package/src/components/ui/date-picker/index.ts +7 -0
- package/src/components/ui/dialog/Dialog.vue +19 -0
- package/src/components/ui/dialog/DialogClose.vue +17 -0
- package/src/components/ui/dialog/DialogContent.vue +60 -0
- package/src/components/ui/dialog/DialogDescription.vue +23 -0
- package/src/components/ui/dialog/DialogFooter.vue +17 -0
- package/src/components/ui/dialog/DialogHeader.vue +17 -0
- package/src/components/ui/dialog/DialogOverlay.vue +23 -0
- package/src/components/ui/dialog/DialogScrollContent.vue +69 -0
- package/src/components/ui/dialog/DialogTitle.vue +23 -0
- package/src/components/ui/dialog/DialogTrigger.vue +17 -0
- package/src/components/ui/dialog/index.ts +10 -0
- package/src/components/ui/diff/DiffTool.vue +513 -0
- package/src/components/ui/diff/diff-parser.ts +423 -0
- package/src/components/ui/diff/diff-tool.ts +39 -0
- package/src/components/ui/diff/index.ts +5 -0
- package/src/components/ui/dropdown-menu/DropdownMenu.vue +19 -0
- package/src/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +39 -0
- package/src/components/ui/dropdown-menu/DropdownMenuContent.vue +39 -0
- package/src/components/ui/dropdown-menu/DropdownMenuGroup.vue +15 -0
- package/src/components/ui/dropdown-menu/DropdownMenuItem.vue +31 -0
- package/src/components/ui/dropdown-menu/DropdownMenuLabel.vue +23 -0
- package/src/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +21 -0
- package/src/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +40 -0
- package/src/components/ui/dropdown-menu/DropdownMenuSeparator.vue +23 -0
- package/src/components/ui/dropdown-menu/DropdownMenuShortcut.vue +17 -0
- package/src/components/ui/dropdown-menu/DropdownMenuSub.vue +18 -0
- package/src/components/ui/dropdown-menu/DropdownMenuSubContent.vue +27 -0
- package/src/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +31 -0
- package/src/components/ui/dropdown-menu/DropdownMenuTrigger.vue +17 -0
- package/src/components/ui/dropdown-menu/index.ts +16 -0
- package/src/components/ui/gauge/Gauge.vue +725 -0
- package/src/components/ui/gauge/index.ts +9 -0
- package/src/components/ui/git-graph/GitGraph.vue +715 -0
- package/src/components/ui/git-graph/index.ts +9 -0
- package/src/components/ui/incident-timeline/IncidentTimeline.vue +360 -0
- package/src/components/ui/incident-timeline/index.ts +7 -0
- package/src/components/ui/input/Input.vue +159 -0
- package/src/components/ui/input/InputControl.vue +135 -0
- package/src/components/ui/input/InputFieldGroup.vue +14 -0
- package/src/components/ui/input/index.ts +9 -0
- package/src/components/ui/input/types.ts +34 -0
- package/src/components/ui/kpi-card/KpiCard.vue +268 -0
- package/src/components/ui/kpi-card/index.ts +9 -0
- package/src/components/ui/kpi-line-card/KpiLineCard.vue +622 -0
- package/src/components/ui/kpi-line-card/index.ts +11 -0
- package/src/components/ui/model-selector/ModelSelector.vue +328 -0
- package/src/components/ui/model-selector/index.ts +6 -0
- package/src/components/ui/model-selector/types.ts +15 -0
- package/src/components/ui/network-graph/NetworkGraph.vue +902 -0
- package/src/components/ui/network-graph/index.ts +7 -0
- package/src/components/ui/pagination/Pagination.vue +26 -0
- package/src/components/ui/pagination/PaginationContent.vue +24 -0
- package/src/components/ui/pagination/PaginationEllipsis.vue +27 -0
- package/src/components/ui/pagination/PaginationFirst.vue +33 -0
- package/src/components/ui/pagination/PaginationItem.vue +39 -0
- package/src/components/ui/pagination/PaginationLast.vue +33 -0
- package/src/components/ui/pagination/PaginationNext.vue +33 -0
- package/src/components/ui/pagination/PaginationPrevious.vue +33 -0
- package/src/components/ui/pagination/index.ts +8 -0
- package/src/components/ui/profile/Profile.vue +226 -0
- package/src/components/ui/profile/ProfileGroup.vue +96 -0
- package/src/components/ui/profile/index.ts +8 -0
- package/src/components/ui/progress/Progress.vue +271 -0
- package/src/components/ui/progress/index.ts +9 -0
- package/src/components/ui/prompt-input/PromptInput.vue +1094 -0
- package/src/components/ui/prompt-input/index.ts +14 -0
- package/src/components/ui/prompt-input/types.ts +78 -0
- package/src/components/ui/radio-group/RadioGroup.vue +36 -0
- package/src/components/ui/radio-group/RadioGroupItem.vue +45 -0
- package/src/components/ui/radio-group/RadioGroupOption.vue +80 -0
- package/src/components/ui/radio-group/index.ts +3 -0
- package/src/components/ui/reasoning/Reasoning.vue +278 -0
- package/src/components/ui/reasoning/index.ts +8 -0
- package/src/components/ui/reasoning/types.ts +29 -0
- package/src/components/ui/select/Select.vue +19 -0
- package/src/components/ui/select/SelectContent.vue +166 -0
- package/src/components/ui/select/SelectGroup.vue +23 -0
- package/src/components/ui/select/SelectItem.vue +97 -0
- package/src/components/ui/select/SelectItemText.vue +15 -0
- package/src/components/ui/select/SelectLabel.vue +17 -0
- package/src/components/ui/select/SelectScrollDownButton.vue +26 -0
- package/src/components/ui/select/SelectScrollUpButton.vue +26 -0
- package/src/components/ui/select/SelectSeparator.vue +19 -0
- package/src/components/ui/select/SelectTrigger.vue +33 -0
- package/src/components/ui/select/SelectValue.vue +15 -0
- package/src/components/ui/select/index.ts +11 -0
- package/src/components/ui/select/search.ts +26 -0
- package/src/components/ui/separator/Separator.vue +30 -0
- package/src/components/ui/separator/index.ts +5 -0
- package/src/components/ui/separator/types.ts +9 -0
- package/src/components/ui/shimmer/Shimmer.vue +110 -0
- package/src/components/ui/shimmer/index.ts +5 -0
- package/src/components/ui/sidebar/Sidebar.vue +142 -0
- package/src/components/ui/sidebar/SidebarContent.vue +18 -0
- package/src/components/ui/sidebar/SidebarFooter.vue +18 -0
- package/src/components/ui/sidebar/SidebarGroup.vue +18 -0
- package/src/components/ui/sidebar/SidebarGroupAction.vue +31 -0
- package/src/components/ui/sidebar/SidebarGroupContent.vue +18 -0
- package/src/components/ui/sidebar/SidebarGroupLabel.vue +30 -0
- package/src/components/ui/sidebar/SidebarHeader.vue +18 -0
- package/src/components/ui/sidebar/SidebarInput.vue +26 -0
- package/src/components/ui/sidebar/SidebarInset.vue +23 -0
- package/src/components/ui/sidebar/SidebarMenu.vue +18 -0
- package/src/components/ui/sidebar/SidebarMenuAction.vue +34 -0
- package/src/components/ui/sidebar/SidebarMenuBadge.vue +25 -0
- package/src/components/ui/sidebar/SidebarMenuButton.vue +37 -0
- package/src/components/ui/sidebar/SidebarMenuButtonChild.vue +38 -0
- package/src/components/ui/sidebar/SidebarMenuItem.vue +18 -0
- package/src/components/ui/sidebar/SidebarMenuSub.vue +18 -0
- package/src/components/ui/sidebar/SidebarMenuSubButton.vue +36 -0
- package/src/components/ui/sidebar/SidebarMenuSubItem.vue +18 -0
- package/src/components/ui/sidebar/SidebarProvider.vue +119 -0
- package/src/components/ui/sidebar/SidebarRail.vue +35 -0
- package/src/components/ui/sidebar/SidebarSeparator.vue +18 -0
- package/src/components/ui/sidebar/SidebarTrigger.vue +28 -0
- package/src/components/ui/sidebar/context.ts +39 -0
- package/src/components/ui/sidebar/index.ts +43 -0
- package/src/components/ui/sidebar/types.ts +13 -0
- package/src/components/ui/sidebar/variants.ts +25 -0
- package/src/components/ui/skeleton/Skeleton.vue +53 -0
- package/src/components/ui/skeleton/index.ts +5 -0
- package/src/components/ui/sonner/Sonner.vue +69 -0
- package/src/components/ui/sonner/index.ts +12 -0
- package/src/components/ui/spinner/Spinner.vue +33 -0
- package/src/components/ui/spinner/index.ts +1 -0
- package/src/components/ui/stepper/Stepper.vue +29 -0
- package/src/components/ui/stepper/StepperDescription.vue +30 -0
- package/src/components/ui/stepper/StepperIndicator.vue +50 -0
- package/src/components/ui/stepper/StepperItem.vue +28 -0
- package/src/components/ui/stepper/StepperSeparator.vue +25 -0
- package/src/components/ui/stepper/StepperTitle.vue +27 -0
- package/src/components/ui/stepper/StepperTrigger.vue +27 -0
- package/src/components/ui/stepper/index.ts +7 -0
- package/src/components/ui/switch/Switch.vue +41 -0
- package/src/components/ui/switch/index.ts +1 -0
- package/src/components/ui/table/Table.vue +23 -0
- package/src/components/ui/table/TableBody.vue +17 -0
- package/src/components/ui/table/TableCaption.vue +17 -0
- package/src/components/ui/table/TableCell.vue +24 -0
- package/src/components/ui/table/TableEmpty.vue +31 -0
- package/src/components/ui/table/TableFooter.vue +17 -0
- package/src/components/ui/table/TableHead.vue +22 -0
- package/src/components/ui/table/TableHeader.vue +17 -0
- package/src/components/ui/table/TableRow.vue +22 -0
- package/src/components/ui/table/index.ts +9 -0
- package/src/components/ui/tabs/Tabs.vue +24 -0
- package/src/components/ui/tabs/TabsContent.vue +22 -0
- package/src/components/ui/tabs/TabsList.vue +27 -0
- package/src/components/ui/tabs/TabsTrigger.vue +27 -0
- package/src/components/ui/tabs/index.ts +4 -0
- package/src/components/ui/tag/Tag.vue +55 -0
- package/src/components/ui/tag/index.ts +2 -0
- package/src/components/ui/tag/variants.ts +29 -0
- package/src/components/ui/textarea/Textarea.vue +159 -0
- package/src/components/ui/textarea/TextareaControl.vue +120 -0
- package/src/components/ui/textarea/TextareaFieldGroup.vue +14 -0
- package/src/components/ui/textarea/index.ts +10 -0
- package/src/components/ui/textarea/types.ts +35 -0
- package/src/components/ui/tool/Tool.vue +304 -0
- package/src/components/ui/tool/index.ts +7 -0
- package/src/components/ui/tooltip/Tooltip.vue +19 -0
- package/src/components/ui/tooltip/TooltipContent.vue +44 -0
- package/src/components/ui/tooltip/TooltipProvider.vue +14 -0
- package/src/components/ui/tooltip/TooltipTrigger.vue +15 -0
- package/src/components/ui/tooltip/index.ts +4 -0
- package/src/lib/code-highlight.ts +220 -0
- package/src/lib/utils.ts +6 -0
- package/src/styles.css +684 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { PaginationRootEmits, PaginationRootProps } from "reka-ui"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import { reactiveOmit } from "@vueuse/core"
|
|
5
|
+
import { PaginationRoot, useForwardPropsEmits } from "reka-ui"
|
|
6
|
+
import { cn } from "@/lib/utils"
|
|
7
|
+
|
|
8
|
+
const props = defineProps<PaginationRootProps & {
|
|
9
|
+
class?: HTMLAttributes["class"]
|
|
10
|
+
}>()
|
|
11
|
+
const emits = defineEmits<PaginationRootEmits>()
|
|
12
|
+
|
|
13
|
+
const delegatedProps = reactiveOmit(props, "class")
|
|
14
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<PaginationRoot
|
|
19
|
+
v-slot="slotProps"
|
|
20
|
+
data-slot="pagination"
|
|
21
|
+
v-bind="forwarded"
|
|
22
|
+
:class="cn('mx-auto flex w-full justify-center', props.class)"
|
|
23
|
+
>
|
|
24
|
+
<slot v-bind="slotProps" />
|
|
25
|
+
</PaginationRoot>
|
|
26
|
+
</template>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { PaginationListProps } from "reka-ui"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import { reactiveOmit } from "@vueuse/core"
|
|
5
|
+
import { PaginationList } from "reka-ui"
|
|
6
|
+
import { cn } from "@/lib/utils"
|
|
7
|
+
|
|
8
|
+
const props = defineProps<PaginationListProps & {
|
|
9
|
+
class?: HTMLAttributes["class"]
|
|
10
|
+
}>()
|
|
11
|
+
|
|
12
|
+
const delegatedProps = reactiveOmit(props, "class")
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<PaginationList
|
|
17
|
+
v-slot="slotProps"
|
|
18
|
+
data-slot="pagination-content"
|
|
19
|
+
v-bind="delegatedProps"
|
|
20
|
+
:class="cn('flex flex-row items-center gap-1', props.class)"
|
|
21
|
+
>
|
|
22
|
+
<slot v-bind="slotProps" />
|
|
23
|
+
</PaginationList>
|
|
24
|
+
</template>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { PaginationEllipsisProps } from "reka-ui"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import { MoreHorizontalIcon } from "@lucide/vue"
|
|
5
|
+
import { reactiveOmit } from "@vueuse/core"
|
|
6
|
+
import { PaginationEllipsis } from "reka-ui"
|
|
7
|
+
import { cn } from "@/lib/utils"
|
|
8
|
+
|
|
9
|
+
const props = defineProps<PaginationEllipsisProps & {
|
|
10
|
+
class?: HTMLAttributes["class"]
|
|
11
|
+
}>()
|
|
12
|
+
|
|
13
|
+
const delegatedProps = reactiveOmit(props, "class")
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<PaginationEllipsis
|
|
18
|
+
data-slot="pagination-ellipsis"
|
|
19
|
+
v-bind="delegatedProps"
|
|
20
|
+
:class="cn('flex size-9 items-center justify-center', props.class)"
|
|
21
|
+
>
|
|
22
|
+
<slot>
|
|
23
|
+
<MoreHorizontalIcon class="size-4" />
|
|
24
|
+
<span class="sr-only">More pages</span>
|
|
25
|
+
</slot>
|
|
26
|
+
</PaginationEllipsis>
|
|
27
|
+
</template>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { PaginationFirstProps } from "reka-ui"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import type { ButtonVariants } from "@/components/ui/button"
|
|
5
|
+
import { ChevronsLeftIcon } from "@lucide/vue"
|
|
6
|
+
import { reactiveOmit } from "@vueuse/core"
|
|
7
|
+
import { PaginationFirst, useForwardProps } from "reka-ui"
|
|
8
|
+
import { cn } from "@/lib/utils"
|
|
9
|
+
import { buttonVariants } from "@/components/ui/button"
|
|
10
|
+
|
|
11
|
+
const props = withDefaults(defineProps<PaginationFirstProps & {
|
|
12
|
+
class?: HTMLAttributes["class"]
|
|
13
|
+
size?: ButtonVariants["size"]
|
|
14
|
+
}>(), {
|
|
15
|
+
size: "default",
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
const delegatedProps = reactiveOmit(props, "class", "size")
|
|
19
|
+
const forwarded = useForwardProps(delegatedProps)
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<PaginationFirst
|
|
24
|
+
data-slot="pagination-first"
|
|
25
|
+
v-bind="forwarded"
|
|
26
|
+
:class="cn(buttonVariants({ variant: 'ghost', size: props.size }), 'gap-1 px-2.5', props.class)"
|
|
27
|
+
>
|
|
28
|
+
<slot>
|
|
29
|
+
<ChevronsLeftIcon />
|
|
30
|
+
<span class="hidden sm:block">First</span>
|
|
31
|
+
</slot>
|
|
32
|
+
</PaginationFirst>
|
|
33
|
+
</template>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { PaginationListItemProps } from "reka-ui"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import type { ButtonVariants } from "@/components/ui/button"
|
|
5
|
+
import { reactiveOmit } from "@vueuse/core"
|
|
6
|
+
import { PaginationListItem } from "reka-ui"
|
|
7
|
+
import { cn } from "@/lib/utils"
|
|
8
|
+
import { buttonVariants } from "@/components/ui/button"
|
|
9
|
+
|
|
10
|
+
const props = withDefaults(defineProps<PaginationListItemProps & {
|
|
11
|
+
class?: HTMLAttributes["class"]
|
|
12
|
+
isActive?: boolean
|
|
13
|
+
size?: ButtonVariants["size"]
|
|
14
|
+
}>(), {
|
|
15
|
+
isActive: false,
|
|
16
|
+
size: "icon",
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
const delegatedProps = reactiveOmit(props, "class", "isActive", "size")
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<PaginationListItem
|
|
24
|
+
data-slot="pagination-item"
|
|
25
|
+
v-bind="delegatedProps"
|
|
26
|
+
:class="
|
|
27
|
+
cn(
|
|
28
|
+
buttonVariants({
|
|
29
|
+
variant: props.isActive ? 'outline' : 'ghost',
|
|
30
|
+
size: props.size,
|
|
31
|
+
}),
|
|
32
|
+
!props.isActive && 'data-[selected=true]:border data-[selected=true]:border-input data-[selected=true]:bg-background data-[selected=true]:shadow-xs',
|
|
33
|
+
props.class,
|
|
34
|
+
)
|
|
35
|
+
"
|
|
36
|
+
>
|
|
37
|
+
<slot />
|
|
38
|
+
</PaginationListItem>
|
|
39
|
+
</template>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { PaginationLastProps } from "reka-ui"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import type { ButtonVariants } from "@/components/ui/button"
|
|
5
|
+
import { ChevronsRightIcon } from "@lucide/vue"
|
|
6
|
+
import { reactiveOmit } from "@vueuse/core"
|
|
7
|
+
import { PaginationLast, useForwardProps } from "reka-ui"
|
|
8
|
+
import { cn } from "@/lib/utils"
|
|
9
|
+
import { buttonVariants } from "@/components/ui/button"
|
|
10
|
+
|
|
11
|
+
const props = withDefaults(defineProps<PaginationLastProps & {
|
|
12
|
+
class?: HTMLAttributes["class"]
|
|
13
|
+
size?: ButtonVariants["size"]
|
|
14
|
+
}>(), {
|
|
15
|
+
size: "default",
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
const delegatedProps = reactiveOmit(props, "class", "size")
|
|
19
|
+
const forwarded = useForwardProps(delegatedProps)
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<PaginationLast
|
|
24
|
+
data-slot="pagination-last"
|
|
25
|
+
v-bind="forwarded"
|
|
26
|
+
:class="cn(buttonVariants({ variant: 'ghost', size: props.size }), 'gap-1 px-2.5', props.class)"
|
|
27
|
+
>
|
|
28
|
+
<slot>
|
|
29
|
+
<span class="hidden sm:block">Last</span>
|
|
30
|
+
<ChevronsRightIcon />
|
|
31
|
+
</slot>
|
|
32
|
+
</PaginationLast>
|
|
33
|
+
</template>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { PaginationNextProps } from "reka-ui"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import type { ButtonVariants } from "@/components/ui/button"
|
|
5
|
+
import { ChevronRightIcon } from "@lucide/vue"
|
|
6
|
+
import { reactiveOmit } from "@vueuse/core"
|
|
7
|
+
import { PaginationNext, useForwardProps } from "reka-ui"
|
|
8
|
+
import { cn } from "@/lib/utils"
|
|
9
|
+
import { buttonVariants } from "@/components/ui/button"
|
|
10
|
+
|
|
11
|
+
const props = withDefaults(defineProps<PaginationNextProps & {
|
|
12
|
+
class?: HTMLAttributes["class"]
|
|
13
|
+
size?: ButtonVariants["size"]
|
|
14
|
+
}>(), {
|
|
15
|
+
size: "default",
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
const delegatedProps = reactiveOmit(props, "class", "size")
|
|
19
|
+
const forwarded = useForwardProps(delegatedProps)
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<PaginationNext
|
|
24
|
+
data-slot="pagination-next"
|
|
25
|
+
v-bind="forwarded"
|
|
26
|
+
:class="cn(buttonVariants({ variant: 'ghost', size: props.size }), 'gap-1 px-2.5', props.class)"
|
|
27
|
+
>
|
|
28
|
+
<slot>
|
|
29
|
+
<span class="hidden sm:block">Next</span>
|
|
30
|
+
<ChevronRightIcon />
|
|
31
|
+
</slot>
|
|
32
|
+
</PaginationNext>
|
|
33
|
+
</template>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { PaginationPrevProps } from "reka-ui"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import type { ButtonVariants } from "@/components/ui/button"
|
|
5
|
+
import { ChevronLeftIcon } from "@lucide/vue"
|
|
6
|
+
import { reactiveOmit } from "@vueuse/core"
|
|
7
|
+
import { PaginationPrev, useForwardProps } from "reka-ui"
|
|
8
|
+
import { cn } from "@/lib/utils"
|
|
9
|
+
import { buttonVariants } from "@/components/ui/button"
|
|
10
|
+
|
|
11
|
+
const props = withDefaults(defineProps<PaginationPrevProps & {
|
|
12
|
+
class?: HTMLAttributes["class"]
|
|
13
|
+
size?: ButtonVariants["size"]
|
|
14
|
+
}>(), {
|
|
15
|
+
size: "default",
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
const delegatedProps = reactiveOmit(props, "class", "size")
|
|
19
|
+
const forwarded = useForwardProps(delegatedProps)
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<PaginationPrev
|
|
24
|
+
data-slot="pagination-previous"
|
|
25
|
+
v-bind="forwarded"
|
|
26
|
+
:class="cn(buttonVariants({ variant: 'ghost', size: props.size }), 'gap-1 px-2.5', props.class)"
|
|
27
|
+
>
|
|
28
|
+
<slot>
|
|
29
|
+
<ChevronLeftIcon />
|
|
30
|
+
<span class="hidden sm:block">Previous</span>
|
|
31
|
+
</slot>
|
|
32
|
+
</PaginationPrev>
|
|
33
|
+
</template>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default as Pagination } from "./Pagination.vue"
|
|
2
|
+
export { default as PaginationContent } from "./PaginationContent.vue"
|
|
3
|
+
export { default as PaginationEllipsis } from "./PaginationEllipsis.vue"
|
|
4
|
+
export { default as PaginationFirst } from "./PaginationFirst.vue"
|
|
5
|
+
export { default as PaginationItem } from "./PaginationItem.vue"
|
|
6
|
+
export { default as PaginationLast } from "./PaginationLast.vue"
|
|
7
|
+
export { default as PaginationNext } from "./PaginationNext.vue"
|
|
8
|
+
export { default as PaginationPrevious } from "./PaginationPrevious.vue"
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, ref, watch } from "vue"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import { cn } from "@/lib/utils"
|
|
5
|
+
|
|
6
|
+
export type ProfileBadgePlacement =
|
|
7
|
+
| "bottom-left"
|
|
8
|
+
| "bottom-right"
|
|
9
|
+
| "top-left"
|
|
10
|
+
| "top-right"
|
|
11
|
+
|
|
12
|
+
export type ProfileBadgeVariant =
|
|
13
|
+
| "default"
|
|
14
|
+
| "destructive"
|
|
15
|
+
| "outline"
|
|
16
|
+
| "secondary"
|
|
17
|
+
|
|
18
|
+
export type ProfileSize = "default" | "lg" | "sm" | "xl" | "xs"
|
|
19
|
+
|
|
20
|
+
const props = withDefaults(
|
|
21
|
+
defineProps<{
|
|
22
|
+
alt?: string
|
|
23
|
+
avatarOnly?: boolean
|
|
24
|
+
badge?: boolean | number | string
|
|
25
|
+
badgeLabel?: string
|
|
26
|
+
badgePlacement?: ProfileBadgePlacement
|
|
27
|
+
badgeVariant?: ProfileBadgeVariant
|
|
28
|
+
class?: HTMLAttributes["class"]
|
|
29
|
+
contentClass?: HTMLAttributes["class"]
|
|
30
|
+
description?: string
|
|
31
|
+
descriptionClass?: HTMLAttributes["class"]
|
|
32
|
+
fallback?: string
|
|
33
|
+
name?: string
|
|
34
|
+
nameClass?: HTMLAttributes["class"]
|
|
35
|
+
shape?: "circle" | "rounded"
|
|
36
|
+
size?: ProfileSize
|
|
37
|
+
src?: string
|
|
38
|
+
}>(),
|
|
39
|
+
{
|
|
40
|
+
avatarOnly: false,
|
|
41
|
+
badgePlacement: "bottom-right",
|
|
42
|
+
badgeVariant: "default",
|
|
43
|
+
shape: "circle",
|
|
44
|
+
size: "default",
|
|
45
|
+
},
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
const imageFailed = ref(false)
|
|
49
|
+
|
|
50
|
+
watch(
|
|
51
|
+
() => props.src,
|
|
52
|
+
() => {
|
|
53
|
+
imageFailed.value = false
|
|
54
|
+
},
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
const showImage = computed(() => Boolean(props.src) && !imageFailed.value)
|
|
58
|
+
const showBadge = computed(
|
|
59
|
+
() =>
|
|
60
|
+
props.badge !== undefined &&
|
|
61
|
+
props.badge !== false &&
|
|
62
|
+
props.badge !== null,
|
|
63
|
+
)
|
|
64
|
+
const badgeText = computed(() => {
|
|
65
|
+
if (props.badge === true) return ""
|
|
66
|
+
if (!showBadge.value) return ""
|
|
67
|
+
return String(props.badge)
|
|
68
|
+
})
|
|
69
|
+
const resolvedFallback = computed(() => {
|
|
70
|
+
if (props.fallback) return props.fallback
|
|
71
|
+
|
|
72
|
+
const source = props.name ?? props.alt ?? "?"
|
|
73
|
+
const parts = source.trim().split(/\s+/).filter(Boolean)
|
|
74
|
+
|
|
75
|
+
if (parts.length >= 2) {
|
|
76
|
+
return `${Array.from(parts[0])[0] ?? ""}${Array.from(parts[1])[0] ?? ""}`.toUpperCase()
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return Array.from(parts[0] ?? source).slice(0, 2).join("").toUpperCase()
|
|
80
|
+
})
|
|
81
|
+
|
|
82
|
+
function avatarClass() {
|
|
83
|
+
return cn(
|
|
84
|
+
"relative inline-flex shrink-0 items-center justify-center overflow-hidden bg-muted font-medium text-muted-foreground",
|
|
85
|
+
props.shape === "circle" ? "rounded-full" : "rounded-md",
|
|
86
|
+
props.size === "xs" && "size-6 text-[10px]",
|
|
87
|
+
props.size === "sm" && "size-8 text-xs",
|
|
88
|
+
props.size === "default" && "size-10 text-sm",
|
|
89
|
+
props.size === "lg" && "size-12 text-base",
|
|
90
|
+
props.size === "xl" && "size-14 text-lg",
|
|
91
|
+
)
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function contentClasses() {
|
|
95
|
+
return cn(
|
|
96
|
+
"grid min-w-0 max-w-40 gap-0.5",
|
|
97
|
+
props.size === "xs" && "gap-0",
|
|
98
|
+
props.size === "sm" && "gap-0",
|
|
99
|
+
props.contentClass,
|
|
100
|
+
)
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function nameClasses() {
|
|
104
|
+
return cn(
|
|
105
|
+
"truncate font-medium leading-none text-foreground",
|
|
106
|
+
props.size === "xs" && "text-xs",
|
|
107
|
+
props.size === "sm" && "text-sm",
|
|
108
|
+
props.size === "default" && "text-sm",
|
|
109
|
+
props.size === "lg" && "text-base",
|
|
110
|
+
props.size === "xl" && "text-base",
|
|
111
|
+
props.nameClass,
|
|
112
|
+
)
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function descriptionClasses() {
|
|
116
|
+
return cn(
|
|
117
|
+
"truncate leading-normal text-muted-foreground",
|
|
118
|
+
props.size === "xs" ? "text-[10px]" : "text-xs",
|
|
119
|
+
props.descriptionClass,
|
|
120
|
+
)
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function badgeClass() {
|
|
124
|
+
const hasText = Boolean(badgeText.value)
|
|
125
|
+
|
|
126
|
+
return cn(
|
|
127
|
+
"absolute z-10 flex items-center justify-center border-2 border-background font-medium shadow-none",
|
|
128
|
+
props.badgePlacement === "bottom-right" &&
|
|
129
|
+
"bottom-0 right-0 translate-x-1/4 translate-y-1/4",
|
|
130
|
+
props.badgePlacement === "bottom-left" &&
|
|
131
|
+
"bottom-0 left-0 -translate-x-1/4 translate-y-1/4",
|
|
132
|
+
props.badgePlacement === "top-right" &&
|
|
133
|
+
"right-0 top-0 -translate-y-1/4 translate-x-1/4",
|
|
134
|
+
props.badgePlacement === "top-left" &&
|
|
135
|
+
"left-0 top-0 -translate-x-1/4 -translate-y-1/4",
|
|
136
|
+
props.badgeVariant === "default" && "bg-primary text-primary-foreground",
|
|
137
|
+
props.badgeVariant === "secondary" &&
|
|
138
|
+
"bg-secondary text-secondary-foreground",
|
|
139
|
+
props.badgeVariant === "destructive" &&
|
|
140
|
+
"bg-destructive text-destructive-foreground",
|
|
141
|
+
props.badgeVariant === "outline" && "bg-background text-foreground",
|
|
142
|
+
hasText
|
|
143
|
+
? "h-5 min-w-5 rounded-full px-1 text-[10px] leading-none"
|
|
144
|
+
: "rounded-full",
|
|
145
|
+
!hasText && props.size === "xs" && "size-2.5",
|
|
146
|
+
!hasText && props.size === "sm" && "size-3",
|
|
147
|
+
!hasText && props.size === "default" && "size-3.5",
|
|
148
|
+
!hasText && props.size === "lg" && "size-4",
|
|
149
|
+
!hasText && props.size === "xl" && "size-4",
|
|
150
|
+
)
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
function handleImageError() {
|
|
154
|
+
imageFailed.value = true
|
|
155
|
+
}
|
|
156
|
+
</script>
|
|
157
|
+
|
|
158
|
+
<template>
|
|
159
|
+
<div
|
|
160
|
+
data-slot="profile"
|
|
161
|
+
:data-size="props.size"
|
|
162
|
+
:data-avatar-only="props.avatarOnly ? '' : undefined"
|
|
163
|
+
:class="
|
|
164
|
+
cn(
|
|
165
|
+
'inline-flex min-w-0 items-center gap-3',
|
|
166
|
+
props.avatarOnly && 'gap-0',
|
|
167
|
+
props.class,
|
|
168
|
+
)
|
|
169
|
+
"
|
|
170
|
+
>
|
|
171
|
+
<span class="relative inline-flex shrink-0">
|
|
172
|
+
<span
|
|
173
|
+
data-slot="profile-avatar"
|
|
174
|
+
:class="avatarClass()"
|
|
175
|
+
>
|
|
176
|
+
<img
|
|
177
|
+
v-if="showImage"
|
|
178
|
+
data-slot="profile-image"
|
|
179
|
+
:alt="props.alt ?? props.name ?? ''"
|
|
180
|
+
class="size-full object-cover"
|
|
181
|
+
:src="props.src"
|
|
182
|
+
@error="handleImageError"
|
|
183
|
+
/>
|
|
184
|
+
<span
|
|
185
|
+
v-else
|
|
186
|
+
data-slot="profile-fallback"
|
|
187
|
+
>
|
|
188
|
+
{{ resolvedFallback }}
|
|
189
|
+
</span>
|
|
190
|
+
</span>
|
|
191
|
+
|
|
192
|
+
<span
|
|
193
|
+
v-if="showBadge"
|
|
194
|
+
data-slot="profile-badge"
|
|
195
|
+
:aria-hidden="!props.badgeLabel && !badgeText ? 'true' : undefined"
|
|
196
|
+
:aria-label="props.badgeLabel"
|
|
197
|
+
:class="badgeClass()"
|
|
198
|
+
>
|
|
199
|
+
<span v-if="badgeText">{{ badgeText }}</span>
|
|
200
|
+
</span>
|
|
201
|
+
</span>
|
|
202
|
+
|
|
203
|
+
<span
|
|
204
|
+
v-if="!props.avatarOnly && (props.name || props.description)"
|
|
205
|
+
data-slot="profile-content"
|
|
206
|
+
:class="contentClasses()"
|
|
207
|
+
>
|
|
208
|
+
<span
|
|
209
|
+
v-if="props.name"
|
|
210
|
+
data-slot="profile-name"
|
|
211
|
+
:class="nameClasses()"
|
|
212
|
+
:title="props.name"
|
|
213
|
+
>
|
|
214
|
+
{{ props.name }}
|
|
215
|
+
</span>
|
|
216
|
+
<span
|
|
217
|
+
v-if="props.description"
|
|
218
|
+
data-slot="profile-description"
|
|
219
|
+
:class="descriptionClasses()"
|
|
220
|
+
:title="props.description"
|
|
221
|
+
>
|
|
222
|
+
{{ props.description }}
|
|
223
|
+
</span>
|
|
224
|
+
</span>
|
|
225
|
+
</div>
|
|
226
|
+
</template>
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from "vue"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import { cn } from "@/lib/utils"
|
|
5
|
+
import Profile from "./Profile.vue"
|
|
6
|
+
import type { ProfileSize } from "./Profile.vue"
|
|
7
|
+
|
|
8
|
+
export interface ProfileGroupItem {
|
|
9
|
+
alt?: string
|
|
10
|
+
class?: HTMLAttributes["class"]
|
|
11
|
+
fallback?: string
|
|
12
|
+
name?: string
|
|
13
|
+
src?: string
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const props = withDefaults(
|
|
17
|
+
defineProps<{
|
|
18
|
+
ariaLabel?: string
|
|
19
|
+
class?: HTMLAttributes["class"]
|
|
20
|
+
items?: ProfileGroupItem[]
|
|
21
|
+
limit?: number
|
|
22
|
+
size?: ProfileSize
|
|
23
|
+
}>(),
|
|
24
|
+
{
|
|
25
|
+
ariaLabel: "Profile group",
|
|
26
|
+
limit: 4,
|
|
27
|
+
size: "default",
|
|
28
|
+
},
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
const visibleItems = computed(() => props.items?.slice(0, props.limit) ?? [])
|
|
32
|
+
const overflowCount = computed(() =>
|
|
33
|
+
Math.max((props.items?.length ?? 0) - props.limit, 0),
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
function itemClass(index: number, className?: HTMLAttributes["class"]) {
|
|
37
|
+
return cn(
|
|
38
|
+
"rounded-full ring-2 ring-background",
|
|
39
|
+
index > 0 && props.size === "xs" && "-ml-2.5",
|
|
40
|
+
index > 0 && props.size === "sm" && "-ml-3.5",
|
|
41
|
+
index > 0 && props.size === "default" && "-ml-4",
|
|
42
|
+
index > 0 && props.size === "lg" && "-ml-5",
|
|
43
|
+
index > 0 && props.size === "xl" && "-ml-6",
|
|
44
|
+
className,
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<template>
|
|
50
|
+
<div
|
|
51
|
+
data-slot="profile-group"
|
|
52
|
+
:aria-label="props.ariaLabel"
|
|
53
|
+
:class="
|
|
54
|
+
cn(
|
|
55
|
+
'flex items-center [&_[data-slot=profile-badge]]:hidden [&>[data-slot=profile]]:rounded-full [&>[data-slot=profile]]:ring-2 [&>[data-slot=profile]]:ring-background',
|
|
56
|
+
props.size === 'xs' &&
|
|
57
|
+
'[&>[data-slot=profile]:not(:first-child)]:-ml-2.5',
|
|
58
|
+
props.size === 'sm' &&
|
|
59
|
+
'[&>[data-slot=profile]:not(:first-child)]:-ml-3.5',
|
|
60
|
+
props.size === 'default' &&
|
|
61
|
+
'[&>[data-slot=profile]:not(:first-child)]:-ml-4',
|
|
62
|
+
props.size === 'lg' &&
|
|
63
|
+
'[&>[data-slot=profile]:not(:first-child)]:-ml-5',
|
|
64
|
+
props.size === 'xl' &&
|
|
65
|
+
'[&>[data-slot=profile]:not(:first-child)]:-ml-6',
|
|
66
|
+
props.class,
|
|
67
|
+
)
|
|
68
|
+
"
|
|
69
|
+
role="group"
|
|
70
|
+
>
|
|
71
|
+
<template v-if="visibleItems.length > 0">
|
|
72
|
+
<Profile
|
|
73
|
+
v-for="(item, index) in visibleItems"
|
|
74
|
+
:key="item.name ?? item.src ?? item.fallback ?? index"
|
|
75
|
+
:alt="item.alt"
|
|
76
|
+
avatar-only
|
|
77
|
+
:class="itemClass(index, item.class)"
|
|
78
|
+
:fallback="item.fallback"
|
|
79
|
+
:name="item.name"
|
|
80
|
+
:size="props.size"
|
|
81
|
+
:src="item.src"
|
|
82
|
+
/>
|
|
83
|
+
|
|
84
|
+
<Profile
|
|
85
|
+
v-if="overflowCount > 0"
|
|
86
|
+
:aria-label="`${overflowCount} more profiles`"
|
|
87
|
+
avatar-only
|
|
88
|
+
:class="itemClass(visibleItems.length)"
|
|
89
|
+
:fallback="`+${overflowCount}`"
|
|
90
|
+
:size="props.size"
|
|
91
|
+
/>
|
|
92
|
+
</template>
|
|
93
|
+
|
|
94
|
+
<slot v-else />
|
|
95
|
+
</div>
|
|
96
|
+
</template>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default as Profile } from "./Profile.vue"
|
|
2
|
+
export { default as ProfileGroup } from "./ProfileGroup.vue"
|
|
3
|
+
export type {
|
|
4
|
+
ProfileBadgePlacement,
|
|
5
|
+
ProfileBadgeVariant,
|
|
6
|
+
ProfileSize,
|
|
7
|
+
} from "./Profile.vue"
|
|
8
|
+
export type { ProfileGroupItem } from "./ProfileGroup.vue"
|