@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,166 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { SelectContentEmits, SelectContentProps } from "reka-ui"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import { computed, nextTick, provide, ref, shallowReactive } from "vue"
|
|
5
|
+
import { Search, X } from "@lucide/vue"
|
|
6
|
+
import { reactiveOmit } from "@vueuse/core"
|
|
7
|
+
import {
|
|
8
|
+
SelectContent,
|
|
9
|
+
SelectPortal,
|
|
10
|
+
SelectViewport,
|
|
11
|
+
useForwardPropsEmits,
|
|
12
|
+
} from "reka-ui"
|
|
13
|
+
import { cn } from "@/lib/utils"
|
|
14
|
+
import { SelectScrollDownButton, SelectScrollUpButton } from "."
|
|
15
|
+
import {
|
|
16
|
+
normalizeSelectSearchText,
|
|
17
|
+
selectSearchContextKey,
|
|
18
|
+
type SelectSearchItem,
|
|
19
|
+
} from "./search"
|
|
20
|
+
|
|
21
|
+
defineOptions({
|
|
22
|
+
inheritAttrs: false,
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
const props = withDefaults(
|
|
26
|
+
defineProps<SelectContentProps & {
|
|
27
|
+
class?: HTMLAttributes["class"]
|
|
28
|
+
emptyText?: string
|
|
29
|
+
search?: boolean
|
|
30
|
+
searchClearLabel?: string
|
|
31
|
+
searchPlaceholder?: string
|
|
32
|
+
검색?: boolean
|
|
33
|
+
}>(),
|
|
34
|
+
{
|
|
35
|
+
emptyText: "No results found.",
|
|
36
|
+
position: "popper",
|
|
37
|
+
search: false,
|
|
38
|
+
searchClearLabel: "Clear search",
|
|
39
|
+
searchPlaceholder: "Search options",
|
|
40
|
+
검색: false,
|
|
41
|
+
},
|
|
42
|
+
)
|
|
43
|
+
const emits = defineEmits<SelectContentEmits>()
|
|
44
|
+
|
|
45
|
+
const delegatedProps = reactiveOmit(
|
|
46
|
+
props,
|
|
47
|
+
"class",
|
|
48
|
+
"emptyText",
|
|
49
|
+
"search",
|
|
50
|
+
"searchClearLabel",
|
|
51
|
+
"searchPlaceholder",
|
|
52
|
+
"검색",
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
56
|
+
const searchQuery = ref("")
|
|
57
|
+
const searchInputRef = ref<HTMLInputElement | null>(null)
|
|
58
|
+
const searchItems = shallowReactive(new Map<symbol, SelectSearchItem>())
|
|
59
|
+
const isSearchEnabled = computed(() => props.search || props.검색)
|
|
60
|
+
const normalizedSearchQuery = computed(() => normalizeSelectSearchText(searchQuery.value))
|
|
61
|
+
const hasSearchQuery = computed(() => normalizedSearchQuery.value.length > 0)
|
|
62
|
+
const hasVisibleItems = computed(() => {
|
|
63
|
+
if (!isSearchEnabled.value || !hasSearchQuery.value) return true
|
|
64
|
+
|
|
65
|
+
return Array.from(searchItems.values()).some((item) => item.matches.value)
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
function hasVisibleItemsInGroup(groupId: symbol) {
|
|
69
|
+
if (!isSearchEnabled.value || !hasSearchQuery.value) return true
|
|
70
|
+
|
|
71
|
+
return Array.from(searchItems.values()).some(
|
|
72
|
+
(item) => item.groupId === groupId && item.matches.value,
|
|
73
|
+
)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function handleSearchKeydown(event: KeyboardEvent) {
|
|
77
|
+
if (event.key === "Escape" && searchQuery.value) {
|
|
78
|
+
searchQuery.value = ""
|
|
79
|
+
event.preventDefault()
|
|
80
|
+
event.stopPropagation()
|
|
81
|
+
return
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (event.key !== "Escape") {
|
|
85
|
+
event.stopPropagation()
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function clearSearch() {
|
|
90
|
+
searchQuery.value = ""
|
|
91
|
+
|
|
92
|
+
void nextTick(() => searchInputRef.value?.focus())
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
provide(selectSearchContextKey, {
|
|
96
|
+
enabled: isSearchEnabled,
|
|
97
|
+
hasQuery: hasSearchQuery,
|
|
98
|
+
hasVisibleItems,
|
|
99
|
+
query: normalizedSearchQuery,
|
|
100
|
+
hasVisibleItemsInGroup,
|
|
101
|
+
registerItem: (item) => searchItems.set(item.id, item),
|
|
102
|
+
unregisterItem: (id) => searchItems.delete(id),
|
|
103
|
+
})
|
|
104
|
+
</script>
|
|
105
|
+
|
|
106
|
+
<template>
|
|
107
|
+
<SelectPortal>
|
|
108
|
+
<SelectContent
|
|
109
|
+
data-slot="select-content"
|
|
110
|
+
v-bind="{ ...$attrs, ...forwarded }"
|
|
111
|
+
:class="cn(
|
|
112
|
+
'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--reka-select-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border shadow-md',
|
|
113
|
+
position === 'popper'
|
|
114
|
+
&& 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',
|
|
115
|
+
props.class,
|
|
116
|
+
)
|
|
117
|
+
"
|
|
118
|
+
>
|
|
119
|
+
<SelectScrollUpButton />
|
|
120
|
+
<div v-if="isSearchEnabled" data-slot="select-search" class="border-b p-1">
|
|
121
|
+
<div class="relative">
|
|
122
|
+
<Search
|
|
123
|
+
aria-hidden="true"
|
|
124
|
+
class="pointer-events-none absolute top-1/2 left-2 size-4 -translate-y-1/2 text-muted-foreground"
|
|
125
|
+
/>
|
|
126
|
+
<input
|
|
127
|
+
ref="searchInputRef"
|
|
128
|
+
v-model="searchQuery"
|
|
129
|
+
data-slot="select-search-input"
|
|
130
|
+
type="text"
|
|
131
|
+
role="searchbox"
|
|
132
|
+
autocomplete="off"
|
|
133
|
+
:placeholder="props.searchPlaceholder"
|
|
134
|
+
class="h-8 w-full rounded-sm bg-transparent py-1.5 pr-8 pl-8 text-sm outline-none placeholder:text-muted-foreground focus:bg-accent focus:text-accent-foreground"
|
|
135
|
+
@click.stop
|
|
136
|
+
@keydown="handleSearchKeydown"
|
|
137
|
+
@pointerdown.stop
|
|
138
|
+
/>
|
|
139
|
+
<button
|
|
140
|
+
v-if="searchQuery"
|
|
141
|
+
data-slot="select-search-clear"
|
|
142
|
+
type="button"
|
|
143
|
+
:aria-label="props.searchClearLabel"
|
|
144
|
+
class="absolute top-1/2 right-1 flex size-6 -translate-y-1/2 items-center justify-center rounded-sm text-muted-foreground transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none"
|
|
145
|
+
@click.stop.prevent="clearSearch"
|
|
146
|
+
@keydown.stop
|
|
147
|
+
@pointerdown.stop.prevent
|
|
148
|
+
>
|
|
149
|
+
<X aria-hidden="true" class="size-4" />
|
|
150
|
+
</button>
|
|
151
|
+
</div>
|
|
152
|
+
</div>
|
|
153
|
+
<SelectViewport :class="cn('p-1', position === 'popper' && 'h-[var(--reka-select-trigger-height)] w-full min-w-[var(--reka-select-trigger-width)] scroll-my-1')">
|
|
154
|
+
<slot />
|
|
155
|
+
<div
|
|
156
|
+
v-if="isSearchEnabled && hasSearchQuery && !hasVisibleItems"
|
|
157
|
+
data-slot="select-empty"
|
|
158
|
+
class="px-2 py-6 text-center text-sm text-muted-foreground"
|
|
159
|
+
>
|
|
160
|
+
{{ props.emptyText }}
|
|
161
|
+
</div>
|
|
162
|
+
</SelectViewport>
|
|
163
|
+
<SelectScrollDownButton />
|
|
164
|
+
</SelectContent>
|
|
165
|
+
</SelectPortal>
|
|
166
|
+
</template>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { SelectGroupProps } from "reka-ui"
|
|
3
|
+
import { computed, inject, provide } from "vue"
|
|
4
|
+
import { SelectGroup } from "reka-ui"
|
|
5
|
+
import { selectSearchContextKey, selectSearchGroupKey } from "./search"
|
|
6
|
+
|
|
7
|
+
const props = defineProps<SelectGroupProps>()
|
|
8
|
+
const groupId = Symbol("select-group")
|
|
9
|
+
const searchContext = inject(selectSearchContextKey, null)
|
|
10
|
+
const isVisible = computed(() => searchContext?.hasVisibleItemsInGroup(groupId) ?? true)
|
|
11
|
+
|
|
12
|
+
provide(selectSearchGroupKey, groupId)
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<SelectGroup
|
|
17
|
+
v-show="isVisible"
|
|
18
|
+
data-slot="select-group"
|
|
19
|
+
v-bind="props"
|
|
20
|
+
>
|
|
21
|
+
<slot />
|
|
22
|
+
</SelectGroup>
|
|
23
|
+
</template>
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { SelectItemProps } from "reka-ui"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import { computed, inject, onBeforeUnmount } from "vue"
|
|
5
|
+
import { Check } from "@lucide/vue"
|
|
6
|
+
import { reactiveOmit } from "@vueuse/core"
|
|
7
|
+
import {
|
|
8
|
+
SelectItem,
|
|
9
|
+
SelectItemIndicator,
|
|
10
|
+
SelectItemText,
|
|
11
|
+
useForwardProps,
|
|
12
|
+
} from "reka-ui"
|
|
13
|
+
import { cn } from "@/lib/utils"
|
|
14
|
+
import {
|
|
15
|
+
normalizeSelectSearchText,
|
|
16
|
+
selectSearchContextKey,
|
|
17
|
+
selectSearchGroupKey,
|
|
18
|
+
} from "./search"
|
|
19
|
+
|
|
20
|
+
const props = defineProps<SelectItemProps & {
|
|
21
|
+
class?: HTMLAttributes["class"]
|
|
22
|
+
description?: string
|
|
23
|
+
descriptionClass?: HTMLAttributes["class"]
|
|
24
|
+
}>()
|
|
25
|
+
|
|
26
|
+
const delegatedProps = reactiveOmit(props, "class", "description", "descriptionClass")
|
|
27
|
+
|
|
28
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
29
|
+
const searchContext = inject(selectSearchContextKey, null)
|
|
30
|
+
const groupId = inject(selectSearchGroupKey, undefined)
|
|
31
|
+
const itemId = Symbol("select-item")
|
|
32
|
+
const itemSearchText = computed(() =>
|
|
33
|
+
normalizeSelectSearchText(
|
|
34
|
+
[props.textValue ?? props.value, props.description].filter(Boolean).join(" "),
|
|
35
|
+
),
|
|
36
|
+
)
|
|
37
|
+
const matchesSearch = computed(() => {
|
|
38
|
+
if (!searchContext?.enabled.value || !searchContext.hasQuery.value) return true
|
|
39
|
+
|
|
40
|
+
return itemSearchText.value.includes(searchContext.query.value)
|
|
41
|
+
})
|
|
42
|
+
const isVisible = computed(() => matchesSearch.value)
|
|
43
|
+
|
|
44
|
+
if (searchContext) {
|
|
45
|
+
searchContext.registerItem({
|
|
46
|
+
groupId,
|
|
47
|
+
id: itemId,
|
|
48
|
+
matches: matchesSearch,
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
onBeforeUnmount(() => searchContext.unregisterItem(itemId))
|
|
52
|
+
}
|
|
53
|
+
</script>
|
|
54
|
+
|
|
55
|
+
<template>
|
|
56
|
+
<SelectItem
|
|
57
|
+
v-if="isVisible"
|
|
58
|
+
data-slot="select-item"
|
|
59
|
+
v-bind="forwardedProps"
|
|
60
|
+
:class="
|
|
61
|
+
cn(
|
|
62
|
+
'group focus:bg-accent focus:text-accent-foreground data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground [&_svg:not([class*=text-])]:text-muted-foreground relative flex w-full cursor-default items-start gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4',
|
|
63
|
+
props.class,
|
|
64
|
+
)
|
|
65
|
+
"
|
|
66
|
+
>
|
|
67
|
+
<span class="absolute top-1/2 right-2 flex size-3.5 -translate-y-1/2 items-center justify-center">
|
|
68
|
+
<SelectItemIndicator>
|
|
69
|
+
<slot name="indicator-icon">
|
|
70
|
+
<Check class="size-4" />
|
|
71
|
+
</slot>
|
|
72
|
+
</SelectItemIndicator>
|
|
73
|
+
</span>
|
|
74
|
+
|
|
75
|
+
<span class="grid min-w-0 gap-0.5">
|
|
76
|
+
<SelectItemText>
|
|
77
|
+
<span data-slot="select-item-label" class="truncate">
|
|
78
|
+
<slot />
|
|
79
|
+
</span>
|
|
80
|
+
</SelectItemText>
|
|
81
|
+
<span
|
|
82
|
+
v-if="props.description || $slots.description"
|
|
83
|
+
data-slot="select-item-description"
|
|
84
|
+
:class="
|
|
85
|
+
cn(
|
|
86
|
+
'text-xs leading-snug text-muted-foreground group-data-[highlighted]:text-accent-foreground/80 group-focus:text-accent-foreground/80',
|
|
87
|
+
props.descriptionClass,
|
|
88
|
+
)
|
|
89
|
+
"
|
|
90
|
+
>
|
|
91
|
+
<slot name="description">
|
|
92
|
+
{{ props.description }}
|
|
93
|
+
</slot>
|
|
94
|
+
</span>
|
|
95
|
+
</span>
|
|
96
|
+
</SelectItem>
|
|
97
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { SelectItemTextProps } from "reka-ui"
|
|
3
|
+
import { SelectItemText } from "reka-ui"
|
|
4
|
+
|
|
5
|
+
const props = defineProps<SelectItemTextProps>()
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<SelectItemText
|
|
10
|
+
data-slot="select-item-text"
|
|
11
|
+
v-bind="props"
|
|
12
|
+
>
|
|
13
|
+
<slot />
|
|
14
|
+
</SelectItemText>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { SelectLabelProps } from "reka-ui"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import { SelectLabel } from "reka-ui"
|
|
5
|
+
import { cn } from "@/lib/utils"
|
|
6
|
+
|
|
7
|
+
const props = defineProps<SelectLabelProps & { class?: HTMLAttributes["class"] }>()
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<SelectLabel
|
|
12
|
+
data-slot="select-label"
|
|
13
|
+
:class="cn('text-muted-foreground px-2 py-1.5 text-xs', props.class)"
|
|
14
|
+
>
|
|
15
|
+
<slot />
|
|
16
|
+
</SelectLabel>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { SelectScrollDownButtonProps } from "reka-ui"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import { ChevronDown } from "@lucide/vue"
|
|
5
|
+
import { reactiveOmit } from "@vueuse/core"
|
|
6
|
+
import { SelectScrollDownButton, useForwardProps } from "reka-ui"
|
|
7
|
+
import { cn } from "@/lib/utils"
|
|
8
|
+
|
|
9
|
+
const props = defineProps<SelectScrollDownButtonProps & { class?: HTMLAttributes["class"] }>()
|
|
10
|
+
|
|
11
|
+
const delegatedProps = reactiveOmit(props, "class")
|
|
12
|
+
|
|
13
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<SelectScrollDownButton
|
|
18
|
+
data-slot="select-scroll-down-button"
|
|
19
|
+
v-bind="forwardedProps"
|
|
20
|
+
:class="cn('flex cursor-default items-center justify-center py-1', props.class)"
|
|
21
|
+
>
|
|
22
|
+
<slot>
|
|
23
|
+
<ChevronDown class="size-4" />
|
|
24
|
+
</slot>
|
|
25
|
+
</SelectScrollDownButton>
|
|
26
|
+
</template>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { SelectScrollUpButtonProps } from "reka-ui"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import { ChevronUp } from "@lucide/vue"
|
|
5
|
+
import { reactiveOmit } from "@vueuse/core"
|
|
6
|
+
import { SelectScrollUpButton, useForwardProps } from "reka-ui"
|
|
7
|
+
import { cn } from "@/lib/utils"
|
|
8
|
+
|
|
9
|
+
const props = defineProps<SelectScrollUpButtonProps & { class?: HTMLAttributes["class"] }>()
|
|
10
|
+
|
|
11
|
+
const delegatedProps = reactiveOmit(props, "class")
|
|
12
|
+
|
|
13
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<SelectScrollUpButton
|
|
18
|
+
data-slot="select-scroll-up-button"
|
|
19
|
+
v-bind="forwardedProps"
|
|
20
|
+
:class="cn('flex cursor-default items-center justify-center py-1', props.class)"
|
|
21
|
+
>
|
|
22
|
+
<slot>
|
|
23
|
+
<ChevronUp class="size-4" />
|
|
24
|
+
</slot>
|
|
25
|
+
</SelectScrollUpButton>
|
|
26
|
+
</template>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { SelectSeparatorProps } from "reka-ui"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import { reactiveOmit } from "@vueuse/core"
|
|
5
|
+
import { SelectSeparator } from "reka-ui"
|
|
6
|
+
import { cn } from "@/lib/utils"
|
|
7
|
+
|
|
8
|
+
const props = defineProps<SelectSeparatorProps & { class?: HTMLAttributes["class"] }>()
|
|
9
|
+
|
|
10
|
+
const delegatedProps = reactiveOmit(props, "class")
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<SelectSeparator
|
|
15
|
+
data-slot="select-separator"
|
|
16
|
+
v-bind="delegatedProps"
|
|
17
|
+
:class="cn('bg-border pointer-events-none -mx-1 my-1 h-px', props.class)"
|
|
18
|
+
/>
|
|
19
|
+
</template>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { SelectTriggerProps } from "reka-ui"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import { ChevronDown } from "@lucide/vue"
|
|
5
|
+
import { reactiveOmit } from "@vueuse/core"
|
|
6
|
+
import { SelectIcon, SelectTrigger, useForwardProps } from "reka-ui"
|
|
7
|
+
import { cn } from "@/lib/utils"
|
|
8
|
+
|
|
9
|
+
const props = withDefaults(
|
|
10
|
+
defineProps<SelectTriggerProps & { class?: HTMLAttributes["class"], size?: "sm" | "default" }>(),
|
|
11
|
+
{ size: "default" },
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
const delegatedProps = reactiveOmit(props, "class", "size")
|
|
15
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<SelectTrigger
|
|
20
|
+
data-slot="select-trigger"
|
|
21
|
+
:data-size="size"
|
|
22
|
+
v-bind="forwardedProps"
|
|
23
|
+
:class="cn(
|
|
24
|
+
'border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*=text-])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4',
|
|
25
|
+
props.class,
|
|
26
|
+
)"
|
|
27
|
+
>
|
|
28
|
+
<slot />
|
|
29
|
+
<SelectIcon as-child>
|
|
30
|
+
<ChevronDown class="size-4 opacity-50" />
|
|
31
|
+
</SelectIcon>
|
|
32
|
+
</SelectTrigger>
|
|
33
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { SelectValueProps } from "reka-ui"
|
|
3
|
+
import { SelectValue } from "reka-ui"
|
|
4
|
+
|
|
5
|
+
const props = defineProps<SelectValueProps>()
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<SelectValue
|
|
10
|
+
data-slot="select-value"
|
|
11
|
+
v-bind="props"
|
|
12
|
+
>
|
|
13
|
+
<slot />
|
|
14
|
+
</SelectValue>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { default as Select } from "./Select.vue"
|
|
2
|
+
export { default as SelectContent } from "./SelectContent.vue"
|
|
3
|
+
export { default as SelectGroup } from "./SelectGroup.vue"
|
|
4
|
+
export { default as SelectItem } from "./SelectItem.vue"
|
|
5
|
+
export { default as SelectItemText } from "./SelectItemText.vue"
|
|
6
|
+
export { default as SelectLabel } from "./SelectLabel.vue"
|
|
7
|
+
export { default as SelectScrollDownButton } from "./SelectScrollDownButton.vue"
|
|
8
|
+
export { default as SelectScrollUpButton } from "./SelectScrollUpButton.vue"
|
|
9
|
+
export { default as SelectSeparator } from "./SelectSeparator.vue"
|
|
10
|
+
export { default as SelectTrigger } from "./SelectTrigger.vue"
|
|
11
|
+
export { default as SelectValue } from "./SelectValue.vue"
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ComputedRef, InjectionKey } from "vue"
|
|
2
|
+
|
|
3
|
+
export interface SelectSearchItem {
|
|
4
|
+
groupId?: symbol
|
|
5
|
+
id: symbol
|
|
6
|
+
matches: ComputedRef<boolean>
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface SelectSearchContext {
|
|
10
|
+
enabled: ComputedRef<boolean>
|
|
11
|
+
hasQuery: ComputedRef<boolean>
|
|
12
|
+
hasVisibleItems: ComputedRef<boolean>
|
|
13
|
+
query: ComputedRef<string>
|
|
14
|
+
hasVisibleItemsInGroup: (groupId: symbol) => boolean
|
|
15
|
+
registerItem: (item: SelectSearchItem) => void
|
|
16
|
+
unregisterItem: (id: symbol) => void
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const selectSearchContextKey: InjectionKey<SelectSearchContext> =
|
|
20
|
+
Symbol("select-search-context")
|
|
21
|
+
|
|
22
|
+
export const selectSearchGroupKey: InjectionKey<symbol> = Symbol("select-search-group")
|
|
23
|
+
|
|
24
|
+
export function normalizeSelectSearchText(value: unknown) {
|
|
25
|
+
return String(value ?? "").trim().toLocaleLowerCase()
|
|
26
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from "vue"
|
|
3
|
+
import { cn } from "@/lib/utils"
|
|
4
|
+
import type { SeparatorProps } from "./types"
|
|
5
|
+
|
|
6
|
+
const props = withDefaults(defineProps<SeparatorProps>(), {
|
|
7
|
+
decorative: true,
|
|
8
|
+
orientation: "horizontal",
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
const separatorRole = computed(() => props.decorative ? undefined : "separator")
|
|
12
|
+
const ariaOrientation = computed(() =>
|
|
13
|
+
props.decorative ? undefined : props.orientation,
|
|
14
|
+
)
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<div
|
|
19
|
+
data-slot="separator"
|
|
20
|
+
:data-orientation="props.orientation"
|
|
21
|
+
:role="separatorRole"
|
|
22
|
+
:aria-orientation="ariaOrientation"
|
|
23
|
+
:class="
|
|
24
|
+
cn(
|
|
25
|
+
'bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px',
|
|
26
|
+
props.class,
|
|
27
|
+
)
|
|
28
|
+
"
|
|
29
|
+
/>
|
|
30
|
+
</template>
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from "vue"
|
|
3
|
+
import type { CSSProperties, HTMLAttributes } from "vue"
|
|
4
|
+
import { cn } from "@/lib/utils"
|
|
5
|
+
|
|
6
|
+
export type ShimmerTone = "default" | "muted" | "primary" | "success" | "warning"
|
|
7
|
+
|
|
8
|
+
export interface ShimmerProps {
|
|
9
|
+
as?: string
|
|
10
|
+
class?: HTMLAttributes["class"]
|
|
11
|
+
decorative?: boolean
|
|
12
|
+
delay?: string
|
|
13
|
+
disabled?: boolean
|
|
14
|
+
duration?: string
|
|
15
|
+
label?: string
|
|
16
|
+
text?: string
|
|
17
|
+
tone?: ShimmerTone
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const props = withDefaults(defineProps<ShimmerProps>(), {
|
|
21
|
+
as: "span",
|
|
22
|
+
decorative: false,
|
|
23
|
+
delay: "0s",
|
|
24
|
+
disabled: false,
|
|
25
|
+
duration: "3.6s",
|
|
26
|
+
tone: "default",
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
const shimmerStyle = computed<CSSProperties>(() => ({
|
|
30
|
+
"--shimmer-delay": props.delay,
|
|
31
|
+
"--shimmer-duration": props.duration,
|
|
32
|
+
} as CSSProperties))
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<template>
|
|
36
|
+
<component
|
|
37
|
+
:is="props.as"
|
|
38
|
+
data-slot="shimmer"
|
|
39
|
+
:data-animated="props.disabled ? 'false' : 'true'"
|
|
40
|
+
:data-tone="props.tone"
|
|
41
|
+
:aria-hidden="props.decorative ? 'true' : undefined"
|
|
42
|
+
:aria-label="props.decorative ? undefined : props.label"
|
|
43
|
+
:class="cn('inline-block font-medium leading-none tracking-normal', props.class)"
|
|
44
|
+
:role="!props.decorative && props.label ? 'status' : undefined"
|
|
45
|
+
:style="shimmerStyle"
|
|
46
|
+
>
|
|
47
|
+
<slot>{{ props.text }}</slot>
|
|
48
|
+
</component>
|
|
49
|
+
</template>
|
|
50
|
+
|
|
51
|
+
<style scoped>
|
|
52
|
+
@keyframes shimmer-text-sweep {
|
|
53
|
+
0% {
|
|
54
|
+
background-position: 180% 0;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
100% {
|
|
58
|
+
background-position: -180% 0;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
[data-slot="shimmer"] {
|
|
63
|
+
--shimmer-base: color-mix(in oklab, var(--foreground) 38%, transparent);
|
|
64
|
+
--shimmer-highlight: var(--foreground);
|
|
65
|
+
color: var(--shimmer-highlight);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
[data-slot="shimmer"][data-tone="muted"] {
|
|
69
|
+
--shimmer-base: color-mix(in oklab, var(--muted-foreground) 36%, transparent);
|
|
70
|
+
--shimmer-highlight: var(--muted-foreground);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
[data-slot="shimmer"][data-tone="primary"] {
|
|
74
|
+
--shimmer-base: color-mix(in oklab, var(--primary) 38%, transparent);
|
|
75
|
+
--shimmer-highlight: var(--primary);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
[data-slot="shimmer"][data-tone="success"] {
|
|
79
|
+
--shimmer-base: oklch(0.58 0.15 154 / 38%);
|
|
80
|
+
--shimmer-highlight: oklch(0.58 0.15 154);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
[data-slot="shimmer"][data-tone="warning"] {
|
|
84
|
+
--shimmer-base: oklch(0.67 0.17 68 / 42%);
|
|
85
|
+
--shimmer-highlight: oklch(0.58 0.15 68);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
[data-slot="shimmer"][data-animated="true"] {
|
|
89
|
+
animation: shimmer-text-sweep var(--shimmer-duration) ease-in-out var(--shimmer-delay) infinite;
|
|
90
|
+
background-image: linear-gradient(
|
|
91
|
+
110deg,
|
|
92
|
+
var(--shimmer-base) 0%,
|
|
93
|
+
var(--shimmer-base) 36%,
|
|
94
|
+
var(--shimmer-highlight) 50%,
|
|
95
|
+
var(--shimmer-base) 64%,
|
|
96
|
+
var(--shimmer-base) 100%
|
|
97
|
+
);
|
|
98
|
+
background-size: 260% 100%;
|
|
99
|
+
-webkit-background-clip: text;
|
|
100
|
+
background-clip: text;
|
|
101
|
+
-webkit-text-fill-color: transparent;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@media (prefers-reduced-motion: reduce) {
|
|
105
|
+
[data-slot="shimmer"][data-animated="true"] {
|
|
106
|
+
animation: none;
|
|
107
|
+
background-position: 50% 0;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
</style>
|