@oneclick.dev/cms-kit 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/components/ui/apple-emoji/AppleEmoji.vue +32 -0
- package/components/ui/apple-emoji/index.ts +1 -0
- package/components/ui/avatar/Avatar.vue +18 -0
- package/components/ui/avatar/AvatarFallback.vue +23 -0
- package/components/ui/avatar/AvatarImage.vue +16 -0
- package/components/ui/avatar/index.ts +3 -0
- package/components/ui/badge/Badge.vue +39 -0
- package/components/ui/badge/index.ts +1 -0
- package/components/ui/breadcrumb/Breadcrumb.vue +17 -0
- package/components/ui/breadcrumb/BreadcrumbEllipsis.vue +23 -0
- package/components/ui/breadcrumb/BreadcrumbItem.vue +17 -0
- package/components/ui/breadcrumb/BreadcrumbLink.vue +20 -0
- package/components/ui/breadcrumb/BreadcrumbList.vue +17 -0
- package/components/ui/breadcrumb/BreadcrumbPage.vue +20 -0
- package/components/ui/breadcrumb/BreadcrumbSeparator.vue +22 -0
- package/components/ui/breadcrumb/index.ts +7 -0
- package/components/ui/button/Button.vue +39 -0
- package/components/ui/button/index.ts +36 -0
- package/components/ui/calendar/Calendar.vue +63 -0
- package/components/ui/calendar/CalendarCell.vue +25 -0
- package/components/ui/calendar/CalendarCellTrigger.vue +41 -0
- package/components/ui/calendar/CalendarGrid.vue +25 -0
- package/components/ui/calendar/CalendarGridBody.vue +14 -0
- package/components/ui/calendar/CalendarGridHead.vue +15 -0
- package/components/ui/calendar/CalendarGridRow.vue +24 -0
- package/components/ui/calendar/CalendarHeadCell.vue +25 -0
- package/components/ui/calendar/CalendarHeader.vue +25 -0
- package/components/ui/calendar/CalendarHeading.vue +32 -0
- package/components/ui/calendar/CalendarNextButton.vue +34 -0
- package/components/ui/calendar/CalendarPrevButton.vue +34 -0
- package/components/ui/calendar/index.ts +12 -0
- package/components/ui/card/Card.vue +22 -0
- package/components/ui/card/CardAction.vue +17 -0
- package/components/ui/card/CardContent.vue +17 -0
- package/components/ui/card/CardDescription.vue +17 -0
- package/components/ui/card/CardFooter.vue +17 -0
- package/components/ui/card/CardHeader.vue +17 -0
- package/components/ui/card/CardTitle.vue +17 -0
- package/components/ui/card/index.ts +7 -0
- package/components/ui/checkbox/Checkbox.vue +37 -0
- package/components/ui/checkbox/index.ts +1 -0
- package/components/ui/code-editor/CodeEditor.vue +88 -0
- package/components/ui/code-editor/index.ts +1 -0
- package/components/ui/code-editor/interpolationHighlight.ts +39 -0
- package/components/ui/collapsible/Collapsible.vue +19 -0
- package/components/ui/collapsible/CollapsibleContent.vue +14 -0
- package/components/ui/collapsible/CollapsibleTrigger.vue +14 -0
- package/components/ui/collapsible/index.ts +3 -0
- package/components/ui/combobox/Combobox.vue +17 -0
- package/components/ui/combobox/ComboboxAnchor.vue +26 -0
- package/components/ui/combobox/ComboboxEmpty.vue +24 -0
- package/components/ui/combobox/ComboboxGroup.vue +30 -0
- package/components/ui/combobox/ComboboxInput.vue +47 -0
- package/components/ui/combobox/ComboboxItem.vue +27 -0
- package/components/ui/combobox/ComboboxItemIndicator.vue +26 -0
- package/components/ui/combobox/ComboboxList.vue +31 -0
- package/components/ui/combobox/ComboboxSeparator.vue +24 -0
- package/components/ui/combobox/ComboboxTrigger.vue +27 -0
- package/components/ui/combobox/ComboboxViewport.vue +26 -0
- package/components/ui/combobox/index.ts +12 -0
- package/components/ui/command/Command.vue +93 -0
- package/components/ui/command/CommandDialog.vue +31 -0
- package/components/ui/command/CommandEmpty.vue +29 -0
- package/components/ui/command/CommandGroup.vue +47 -0
- package/components/ui/command/CommandInput.vue +41 -0
- package/components/ui/command/CommandItem.vue +79 -0
- package/components/ui/command/CommandList.vue +28 -0
- package/components/ui/command/CommandSeparator.vue +24 -0
- package/components/ui/command/CommandShortcut.vue +17 -0
- package/components/ui/command/index.ts +25 -0
- package/components/ui/context-menu/ContextMenu.vue +18 -0
- package/components/ui/context-menu/ContextMenuCheckboxItem.vue +41 -0
- package/components/ui/context-menu/ContextMenuContent.vue +37 -0
- package/components/ui/context-menu/ContextMenuGroup.vue +14 -0
- package/components/ui/context-menu/ContextMenuItem.vue +42 -0
- package/components/ui/context-menu/ContextMenuLabel.vue +24 -0
- package/components/ui/context-menu/ContextMenuPortal.vue +14 -0
- package/components/ui/context-menu/ContextMenuRadioGroup.vue +22 -0
- package/components/ui/context-menu/ContextMenuRadioItem.vue +41 -0
- package/components/ui/context-menu/ContextMenuSeparator.vue +24 -0
- package/components/ui/context-menu/ContextMenuShortcut.vue +17 -0
- package/components/ui/context-menu/ContextMenuSub.vue +22 -0
- package/components/ui/context-menu/ContextMenuSubContent.vue +36 -0
- package/components/ui/context-menu/ContextMenuSubTrigger.vue +35 -0
- package/components/ui/context-menu/ContextMenuTrigger.vue +16 -0
- package/components/ui/context-menu/index.ts +14 -0
- package/components/ui/custom-dialog/CustomDialog.vue +31 -0
- package/components/ui/custom-dialog/index.ts +1 -0
- package/components/ui/dialog/Dialog.vue +17 -0
- package/components/ui/dialog/DialogClose.vue +14 -0
- package/components/ui/dialog/DialogContent.vue +49 -0
- package/components/ui/dialog/DialogDescription.vue +25 -0
- package/components/ui/dialog/DialogFooter.vue +15 -0
- package/components/ui/dialog/DialogHeader.vue +17 -0
- package/components/ui/dialog/DialogOverlay.vue +23 -0
- package/components/ui/dialog/DialogScrollContent.vue +59 -0
- package/components/ui/dialog/DialogTitle.vue +25 -0
- package/components/ui/dialog/DialogTrigger.vue +14 -0
- package/components/ui/dialog/index.ts +10 -0
- package/components/ui/drawer/Drawer.vue +22 -0
- package/components/ui/drawer/DrawerClose.vue +15 -0
- package/components/ui/drawer/DrawerContent.vue +34 -0
- package/components/ui/drawer/DrawerDescription.vue +24 -0
- package/components/ui/drawer/DrawerFooter.vue +17 -0
- package/components/ui/drawer/DrawerHeader.vue +17 -0
- package/components/ui/drawer/DrawerOverlay.vue +22 -0
- package/components/ui/drawer/DrawerTitle.vue +24 -0
- package/components/ui/drawer/DrawerTrigger.vue +15 -0
- package/components/ui/drawer/index.ts +9 -0
- package/components/ui/dropdown-menu/DropdownMenu.vue +17 -0
- package/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +41 -0
- package/components/ui/dropdown-menu/DropdownMenuContent.vue +39 -0
- package/components/ui/dropdown-menu/DropdownMenuGroup.vue +14 -0
- package/components/ui/dropdown-menu/DropdownMenuItem.vue +30 -0
- package/components/ui/dropdown-menu/DropdownMenuLabel.vue +22 -0
- package/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +22 -0
- package/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +42 -0
- package/components/ui/dropdown-menu/DropdownMenuSeparator.vue +26 -0
- package/components/ui/dropdown-menu/DropdownMenuShortcut.vue +17 -0
- package/components/ui/dropdown-menu/DropdownMenuSub.vue +19 -0
- package/components/ui/dropdown-menu/DropdownMenuSubContent.vue +31 -0
- package/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +30 -0
- package/components/ui/dropdown-menu/DropdownMenuTrigger.vue +16 -0
- package/components/ui/dropdown-menu/index.ts +16 -0
- package/components/ui/emoji-picker/EmojiPicker.vue +71 -0
- package/components/ui/emoji-picker/index.ts +1 -0
- package/components/ui/flow-builder/FlowBuilder.vue +48 -0
- package/components/ui/flow-builder/FlowBuilderSelect.vue +33 -0
- package/components/ui/flow-builder/components/Builder.vue +287 -0
- package/components/ui/flow-builder/components/DropzoneBackground.vue +13 -0
- package/components/ui/flow-builder/components/EdgeEditor.vue +36 -0
- package/components/ui/flow-builder/components/Menu.vue +78 -0
- package/components/ui/flow-builder/components/NodeEditor.vue +181 -0
- package/components/ui/flow-builder/components/edge-editor/DataEdgeEditor.vue +64 -0
- package/components/ui/flow-builder/components/edges/DataEdge.vue +87 -0
- package/components/ui/flow-builder/components/node-editor/ApiRequestEditor.vue +150 -0
- package/components/ui/flow-builder/components/node-editor/ConfettiEditor.vue +23 -0
- package/components/ui/flow-builder/components/node-editor/ConfirmEditor.vue +30 -0
- package/components/ui/flow-builder/components/node-editor/FinishFlowEditor.vue +33 -0
- package/components/ui/flow-builder/components/node-editor/IntegrationActionEditor.vue +50 -0
- package/components/ui/flow-builder/components/node-editor/SetVariableEditor.vue +71 -0
- package/components/ui/flow-builder/components/node-editor/ShowDialogEditor.vue +26 -0
- package/components/ui/flow-builder/components/node-editor/ShowModuleEditor.vue +92 -0
- package/components/ui/flow-builder/components/node-editor/ShowToastEditor.vue +28 -0
- package/components/ui/flow-builder/components/node-editor/TransformDataEditor.vue +27 -0
- package/components/ui/flow-builder/components/node-editor/VisitUrlEditor.vue +31 -0
- package/components/ui/flow-builder/components/nodes/ApiRequestNode.vue +45 -0
- package/components/ui/flow-builder/components/nodes/ConfettiNode.vue +32 -0
- package/components/ui/flow-builder/components/nodes/ConfirmNode.vue +45 -0
- package/components/ui/flow-builder/components/nodes/EmptyNode.vue +26 -0
- package/components/ui/flow-builder/components/nodes/FinishFlowNode.vue +30 -0
- package/components/ui/flow-builder/components/nodes/IntegrationActionNode.vue +52 -0
- package/components/ui/flow-builder/components/nodes/SetVariableNode.vue +34 -0
- package/components/ui/flow-builder/components/nodes/ShowDialogNode.vue +34 -0
- package/components/ui/flow-builder/components/nodes/ShowModuleNode.vue +34 -0
- package/components/ui/flow-builder/components/nodes/ShowToastNode.vue +35 -0
- package/components/ui/flow-builder/components/nodes/StartNode.vue +27 -0
- package/components/ui/flow-builder/components/nodes/TransformDataNode.vue +34 -0
- package/components/ui/flow-builder/components/nodes/VisitUrlNode.vue +34 -0
- package/components/ui/flow-builder/components/toolbars/ApiRequestToolbar.vue +45 -0
- package/components/ui/flow-builder/components/toolbars/ConfirmToolbar.vue +45 -0
- package/components/ui/flow-builder/components/toolbars/DefaultToolbar.vue +42 -0
- package/components/ui/flow-builder/components/toolbars/IntegrationActionToolbar.vue +45 -0
- package/components/ui/flow-builder/components/variables/Widget.vue +137 -0
- package/components/ui/flow-builder/composables/outputRegistry.ts +33 -0
- package/components/ui/flow-builder/composables/taskHandlers.js +185 -0
- package/components/ui/flow-builder/composables/useLayout.js +60 -0
- package/components/ui/flow-builder/composables/useProcessNodeLogic.js +55 -0
- package/components/ui/flow-builder/composables/useRunProcess.js +267 -0
- package/components/ui/flow-builder/index.ts +5 -0
- package/components/ui/flow-builder/types.ts +7 -0
- package/components/ui/form/FormControl.vue +17 -0
- package/components/ui/form/FormDescription.vue +21 -0
- package/components/ui/form/FormItem.vue +22 -0
- package/components/ui/form/FormLabel.vue +25 -0
- package/components/ui/form/FormMessage.vue +22 -0
- package/components/ui/form/index.ts +7 -0
- package/components/ui/form/injectionKeys.ts +4 -0
- package/components/ui/form/useFormField.ts +30 -0
- package/components/ui/form-builder/FormBuilder.vue +45 -0
- package/components/ui/form-builder/FormBuilderSelect.vue +42 -0
- package/components/ui/form-builder/FormDisplayer.vue +39 -0
- package/components/ui/form-builder/components/AdminElementEditor.vue +48 -0
- package/components/ui/form-builder/components/AdminToolbar.vue +60 -0
- package/components/ui/form-builder/components/AdminToolbarView.vue +19 -0
- package/components/ui/form-builder/components/CustomDashboard.vue +312 -0
- package/components/ui/form-builder/components/FormBuilderWrapper.vue +333 -0
- package/components/ui/form-builder/components/admin/Transformer.vue +25 -0
- package/components/ui/form-builder/components/admin/element-setting-views/Button.vue +30 -0
- package/components/ui/form-builder/components/admin/element-setting-views/Checkbox.vue +23 -0
- package/components/ui/form-builder/components/admin/element-setting-views/Label.vue +13 -0
- package/components/ui/form-builder/components/admin/element-setting-views/Radios.vue +85 -0
- package/components/ui/form-builder/components/admin/element-setting-views/Scanner.vue +15 -0
- package/components/ui/form-builder/components/admin/element-setting-views/Select.vue +75 -0
- package/components/ui/form-builder/components/admin/element-setting-views/Text.vue +13 -0
- package/components/ui/form-builder/components/admin/element-setting-views/Textarea.vue +20 -0
- package/components/ui/form-builder/components/admin/element-setting-views/Textfield.vue +20 -0
- package/components/ui/form-builder/components/admin/element-setting-views/index.ts +21 -0
- package/components/ui/form-builder/components/admin/setting-views/ApiActionsView.vue +111 -0
- package/components/ui/form-builder/components/admin/setting-views/NewElementView.vue +200 -0
- package/components/ui/form-builder/components/admin/setting-views/VariablesView.vue +19 -0
- package/components/ui/form-builder/components/admin/setting-views/new-element-view/DraggableElement.vue +107 -0
- package/components/ui/form-builder/components/admin/setting-views/variables-view/ApiActionVariables.vue +27 -0
- package/components/ui/form-builder/components/admin/setting-views/variables-view/RouteQueryParams.vue +47 -0
- package/components/ui/form-builder/components/admin/setting-views/variables-view/Transformers.vue +61 -0
- package/components/ui/form-builder/components/admin/setting-views/variables-view/Variables.vue +74 -0
- package/components/ui/form-builder/components/elements/button/Button.vue +60 -0
- package/components/ui/form-builder/components/elements/button/index.ts +1 -0
- package/components/ui/form-builder/components/elements/checkbox/Checkbox.vue +40 -0
- package/components/ui/form-builder/components/elements/checkbox/index.ts +1 -0
- package/components/ui/form-builder/components/elements/file/File.vue +6 -0
- package/components/ui/form-builder/components/elements/file/index.ts +1 -0
- package/components/ui/form-builder/components/elements/images/Images.vue +28 -0
- package/components/ui/form-builder/components/elements/images/index.ts +1 -0
- package/components/ui/form-builder/components/elements/index.ts +31 -0
- package/components/ui/form-builder/components/elements/items/Items.vue +6 -0
- package/components/ui/form-builder/components/elements/items/index.ts +1 -0
- package/components/ui/form-builder/components/elements/label/Label.vue +20 -0
- package/components/ui/form-builder/components/elements/label/index.ts +1 -0
- package/components/ui/form-builder/components/elements/location/Location.vue +6 -0
- package/components/ui/form-builder/components/elements/location/index.ts +1 -0
- package/components/ui/form-builder/components/elements/radios/Radios.vue +42 -0
- package/components/ui/form-builder/components/elements/radios/index.ts +1 -0
- package/components/ui/form-builder/components/elements/richtext/Richtext.vue +6 -0
- package/components/ui/form-builder/components/elements/richtext/index.ts +1 -0
- package/components/ui/form-builder/components/elements/scanner/Scanner.vue +173 -0
- package/components/ui/form-builder/components/elements/scanner/index.ts +1 -0
- package/components/ui/form-builder/components/elements/select/Select.vue +49 -0
- package/components/ui/form-builder/components/elements/select/index.ts +1 -0
- package/components/ui/form-builder/components/elements/text/Text.vue +20 -0
- package/components/ui/form-builder/components/elements/text/index.ts +1 -0
- package/components/ui/form-builder/components/elements/textarea/Textarea.vue +30 -0
- package/components/ui/form-builder/components/elements/textarea/index.ts +1 -0
- package/components/ui/form-builder/components/elements/textfield/Textfield.vue +30 -0
- package/components/ui/form-builder/components/elements/textfield/index.ts +1 -0
- package/components/ui/form-builder/index.ts +3 -0
- package/components/ui/input/Input.vue +33 -0
- package/components/ui/input/index.ts +1 -0
- package/components/ui/integration-action-builder/IntegrationActionBuilder.vue +193 -0
- package/components/ui/integration-action-builder/InterpolationField.vue +29 -0
- package/components/ui/integration-action-builder/index.ts +1 -0
- package/components/ui/integration-action-builder/integrations/firebase/AddDocument.vue +43 -0
- package/components/ui/integration-action-builder/integrations/firebase/DeleteDocument.vue +6 -0
- package/components/ui/integration-action-builder/integrations/firebase/GetCollections.vue +6 -0
- package/components/ui/integration-action-builder/integrations/firebase/GetDocumentById.vue +6 -0
- package/components/ui/integration-action-builder/integrations/firebase/QueryCollectionGroup.vue +6 -0
- package/components/ui/integration-action-builder/integrations/firebase/QueryFirestore.vue +165 -0
- package/components/ui/integration-action-builder/integrations/firebase/UpdateDocument.vue +6 -0
- package/components/ui/integration-action-builder/integrations/firebase/index.ts +204 -0
- package/components/ui/integration-action-builder/integrations/index.ts +9 -0
- package/components/ui/integration-action-builder/integrations/openai/AddDocument.vue +43 -0
- package/components/ui/integration-action-builder/integrations/openai/GenerateText.vue +40 -0
- package/components/ui/integration-action-builder/integrations/openai/components/ModelSelector.vue +75 -0
- package/components/ui/integration-action-builder/integrations/openai/index.ts +116 -0
- package/components/ui/integration-action-builder/integrations/twilio/MakeCall.vue +40 -0
- package/components/ui/integration-action-builder/integrations/twilio/SendSMS.vue +39 -0
- package/components/ui/integration-action-builder/integrations/twilio/components/ModelSelector.vue +75 -0
- package/components/ui/integration-action-builder/integrations/twilio/index.ts +68 -0
- package/components/ui/integration-icon/IntegrationIcon.vue +18 -0
- package/components/ui/integration-icon/index.ts +1 -0
- package/components/ui/label/Label.vue +28 -0
- package/components/ui/label/index.ts +1 -0
- package/components/ui/lucide-icon-selector/LucideIconPicker.vue +34 -0
- package/components/ui/lucide-icon-selector/LucideIconSelector.vue +55 -0
- package/components/ui/lucide-icon-selector/index.ts +2 -0
- package/components/ui/media-picker/MediaPicker.vue +40 -0
- package/components/ui/media-picker/MediaPickerDialog.vue +306 -0
- package/components/ui/media-picker/MediaPickerItems.vue +342 -0
- package/components/ui/media-picker/index.ts +2 -0
- package/components/ui/media-picker/media-picker-dialog/Dropzone.vue +104 -0
- package/components/ui/media-picker/media-picker-dialog/FileItem.vue +108 -0
- package/components/ui/media-picker/media-picker-dialog/Filters.vue +78 -0
- package/components/ui/menubar/Menubar.vue +36 -0
- package/components/ui/menubar/MenubarCheckboxItem.vue +41 -0
- package/components/ui/menubar/MenubarContent.vue +44 -0
- package/components/ui/menubar/MenubarGroup.vue +14 -0
- package/components/ui/menubar/MenubarItem.vue +37 -0
- package/components/ui/menubar/MenubarLabel.vue +19 -0
- package/components/ui/menubar/MenubarMenu.vue +14 -0
- package/components/ui/menubar/MenubarRadioGroup.vue +22 -0
- package/components/ui/menubar/MenubarRadioItem.vue +41 -0
- package/components/ui/menubar/MenubarSeparator.vue +23 -0
- package/components/ui/menubar/MenubarShortcut.vue +17 -0
- package/components/ui/menubar/MenubarSub.vue +22 -0
- package/components/ui/menubar/MenubarSubContent.vue +39 -0
- package/components/ui/menubar/MenubarSubTrigger.vue +27 -0
- package/components/ui/menubar/MenubarTrigger.vue +30 -0
- package/components/ui/menubar/index.ts +15 -0
- package/components/ui/number-field/NumberField.vue +23 -0
- package/components/ui/number-field/NumberFieldContent.vue +14 -0
- package/components/ui/number-field/NumberFieldDecrement.vue +25 -0
- package/components/ui/number-field/NumberFieldIncrement.vue +25 -0
- package/components/ui/number-field/NumberFieldInput.vue +16 -0
- package/components/ui/number-field/index.ts +5 -0
- package/components/ui/pagination/PaginationEllipsis.vue +22 -0
- package/components/ui/pagination/PaginationFirst.vue +29 -0
- package/components/ui/pagination/PaginationLast.vue +29 -0
- package/components/ui/pagination/PaginationNext.vue +29 -0
- package/components/ui/pagination/PaginationPrev.vue +29 -0
- package/components/ui/pagination/index.ts +10 -0
- package/components/ui/popover/Popover.vue +18 -0
- package/components/ui/popover/PopoverAnchor.vue +15 -0
- package/components/ui/popover/PopoverContent.vue +49 -0
- package/components/ui/popover/PopoverTrigger.vue +14 -0
- package/components/ui/popover/index.ts +4 -0
- package/components/ui/query-builder-dialog/QueryBuilderDialog.vue +389 -0
- package/components/ui/query-builder-dialog/index.ts +1 -0
- package/components/ui/radio-group/RadioGroup.vue +30 -0
- package/components/ui/radio-group/RadioGroupItem.vue +43 -0
- package/components/ui/radio-group/index.ts +2 -0
- package/components/ui/range-calendar/RangeCalendar.vue +57 -0
- package/components/ui/range-calendar/RangeCalendarCell.vue +21 -0
- package/components/ui/range-calendar/RangeCalendarCellTrigger.vue +37 -0
- package/components/ui/range-calendar/RangeCalendarGrid.vue +21 -0
- package/components/ui/range-calendar/RangeCalendarGridBody.vue +11 -0
- package/components/ui/range-calendar/RangeCalendarGridHead.vue +11 -0
- package/components/ui/range-calendar/RangeCalendarGridRow.vue +18 -0
- package/components/ui/range-calendar/RangeCalendarHeadCell.vue +18 -0
- package/components/ui/range-calendar/RangeCalendarHeader.vue +18 -0
- package/components/ui/range-calendar/RangeCalendarHeading.vue +28 -0
- package/components/ui/range-calendar/RangeCalendarNextButton.vue +29 -0
- package/components/ui/range-calendar/RangeCalendarPrevButton.vue +29 -0
- package/components/ui/range-calendar/index.ts +12 -0
- package/components/ui/resizable/ResizableHandle.vue +27 -0
- package/components/ui/resizable/ResizablePanel.vue +18 -0
- package/components/ui/resizable/ResizablePanelGroup.vue +25 -0
- package/components/ui/resizable/index.ts +3 -0
- package/components/ui/ripple-button/RippleButton.vue +97 -0
- package/components/ui/ripple-button/index.ts +1 -0
- package/components/ui/sandbox/Sandbox.vue +35 -0
- package/components/ui/sandbox/index.ts +1 -0
- package/components/ui/scroll-area/ScrollArea.vue +36 -0
- package/components/ui/scroll-area/ScrollBar.vue +34 -0
- package/components/ui/scroll-area/index.ts +2 -0
- package/components/ui/segmented-control/SegmentedControl.vue +121 -0
- package/components/ui/segmented-control/SegmentedControlButton.vue +64 -0
- package/components/ui/segmented-control/index.ts +2 -0
- package/components/ui/select/Select.vue +18 -0
- package/components/ui/select/SelectContent.vue +55 -0
- package/components/ui/select/SelectGroup.vue +14 -0
- package/components/ui/select/SelectItem.vue +45 -0
- package/components/ui/select/SelectItemText.vue +14 -0
- package/components/ui/select/SelectLabel.vue +16 -0
- package/components/ui/select/SelectScrollDownButton.vue +28 -0
- package/components/ui/select/SelectScrollUpButton.vue +28 -0
- package/components/ui/select/SelectSeparator.vue +21 -0
- package/components/ui/select/SelectTrigger.vue +32 -0
- package/components/ui/select/SelectValue.vue +15 -0
- package/components/ui/select/index.ts +11 -0
- package/components/ui/separator/Separator.vue +28 -0
- package/components/ui/separator/index.ts +1 -0
- package/components/ui/sheet/Sheet.vue +17 -0
- package/components/ui/sheet/SheetClose.vue +14 -0
- package/components/ui/sheet/SheetContent.vue +65 -0
- package/components/ui/sheet/SheetDescription.vue +20 -0
- package/components/ui/sheet/SheetFooter.vue +16 -0
- package/components/ui/sheet/SheetHeader.vue +15 -0
- package/components/ui/sheet/SheetOverlay.vue +24 -0
- package/components/ui/sheet/SheetTitle.vue +20 -0
- package/components/ui/sheet/SheetTrigger.vue +14 -0
- package/components/ui/sheet/index.ts +8 -0
- package/components/ui/sidebar/Sidebar.vue +96 -0
- package/components/ui/sidebar/SidebarContent.vue +18 -0
- package/components/ui/sidebar/SidebarFooter.vue +18 -0
- package/components/ui/sidebar/SidebarGroup.vue +18 -0
- package/components/ui/sidebar/SidebarGroupAction.vue +27 -0
- package/components/ui/sidebar/SidebarGroupContent.vue +18 -0
- package/components/ui/sidebar/SidebarGroupLabel.vue +25 -0
- package/components/ui/sidebar/SidebarHeader.vue +18 -0
- package/components/ui/sidebar/SidebarInput.vue +22 -0
- package/components/ui/sidebar/SidebarInset.vue +21 -0
- package/components/ui/sidebar/SidebarMenu.vue +18 -0
- package/components/ui/sidebar/SidebarMenuAction.vue +34 -0
- package/components/ui/sidebar/SidebarMenuBadge.vue +26 -0
- package/components/ui/sidebar/SidebarMenuButton.vue +49 -0
- package/components/ui/sidebar/SidebarMenuButtonChild.vue +34 -0
- package/components/ui/sidebar/SidebarMenuItem.vue +18 -0
- package/components/ui/sidebar/SidebarMenuSkeleton.vue +34 -0
- package/components/ui/sidebar/SidebarMenuSub.vue +22 -0
- package/components/ui/sidebar/SidebarMenuSubButton.vue +36 -0
- package/components/ui/sidebar/SidebarMenuSubItem.vue +18 -0
- package/components/ui/sidebar/SidebarProvider.vue +81 -0
- package/components/ui/sidebar/SidebarRail.vue +33 -0
- package/components/ui/sidebar/SidebarSeparator.vue +19 -0
- package/components/ui/sidebar/SidebarTrigger.vue +27 -0
- package/components/ui/sidebar/index.ts +60 -0
- package/components/ui/sidebar/utils.ts +19 -0
- package/components/ui/skeleton/Skeleton.vue +17 -0
- package/components/ui/skeleton/index.ts +1 -0
- package/components/ui/sonner/Sonner.vue +18 -0
- package/components/ui/sonner/index.ts +1 -0
- package/components/ui/spring-calendar/SpringCalendar.vue +110 -0
- package/components/ui/spring-calendar/TextMorph.vue +160 -0
- package/components/ui/spring-calendar/index.ts +2 -0
- package/components/ui/switch/Switch.vue +41 -0
- package/components/ui/switch/index.ts +1 -0
- package/components/ui/table/Table.vue +16 -0
- package/components/ui/table/TableBody.vue +17 -0
- package/components/ui/table/TableCaption.vue +17 -0
- package/components/ui/table/TableCell.vue +22 -0
- package/components/ui/table/TableEmpty.vue +37 -0
- package/components/ui/table/TableFooter.vue +17 -0
- package/components/ui/table/TableHead.vue +17 -0
- package/components/ui/table/TableHeader.vue +17 -0
- package/components/ui/table/TableRow.vue +17 -0
- package/components/ui/table/index.ts +9 -0
- package/components/ui/table/utils.ts +9 -0
- package/components/ui/tabs/Tabs.vue +15 -0
- package/components/ui/tabs/TabsContent.vue +22 -0
- package/components/ui/tabs/TabsList.vue +25 -0
- package/components/ui/tabs/TabsTrigger.vue +29 -0
- package/components/ui/tabs/index.ts +4 -0
- package/components/ui/tailwind-color-picker/TailwindColorPicker.vue +58 -0
- package/components/ui/tailwind-color-picker/index.ts +1 -0
- package/components/ui/textarea/Textarea.vue +28 -0
- package/components/ui/textarea/index.ts +1 -0
- package/components/ui/toggle/Toggle.vue +32 -0
- package/components/ui/toggle/index.ts +27 -0
- package/components/ui/tooltip/Tooltip.vue +17 -0
- package/components/ui/tooltip/TooltipContent.vue +33 -0
- package/components/ui/tooltip/TooltipProvider.vue +13 -0
- package/components/ui/tooltip/TooltipTrigger.vue +14 -0
- package/components/ui/tooltip/index.ts +4 -0
- package/composables/useCms.ts +11 -0
- package/index.ts +10 -0
- package/lib/interpolation.ts +77 -0
- package/lib/utils.ts +24 -0
- package/package.json +52 -0
- package/styles/components/code-editor.css +52 -0
- package/styles/components/flow-builder.css +159 -0
- package/styles/index.css +2 -0
- package/tsconfig.json +19 -0
- package/types/index.ts +41 -0
- package/vite.config.ts +25 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ComboboxItemIndicatorProps } from 'reka-ui'
|
|
3
|
+
import { cn } from '../../../lib/utils'
|
|
4
|
+
import { ComboboxItemIndicator, useForwardProps } from 'reka-ui'
|
|
5
|
+
import { computed, type HTMLAttributes } from 'vue'
|
|
6
|
+
|
|
7
|
+
const props = defineProps<ComboboxItemIndicatorProps & { class?: HTMLAttributes['class'] }>()
|
|
8
|
+
|
|
9
|
+
const delegatedProps = computed(() => {
|
|
10
|
+
const { class: _, ...delegated } = props
|
|
11
|
+
|
|
12
|
+
return delegated
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
const forwarded = useForwardProps(delegatedProps)
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<ComboboxItemIndicator
|
|
20
|
+
data-slot="combobox-item-indicator"
|
|
21
|
+
v-bind="forwarded"
|
|
22
|
+
:class="cn('ml-auto', props.class)"
|
|
23
|
+
>
|
|
24
|
+
<slot />
|
|
25
|
+
</ComboboxItemIndicator>
|
|
26
|
+
</template>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ComboboxContentEmits, ComboboxContentProps } from 'reka-ui'
|
|
3
|
+
import type { HTMLAttributes } from 'vue'
|
|
4
|
+
import { cn } from '../../../lib/utils'
|
|
5
|
+
import { reactiveOmit } from '@vueuse/core'
|
|
6
|
+
import { ComboboxContent, ComboboxPortal, useForwardPropsEmits } from 'reka-ui'
|
|
7
|
+
|
|
8
|
+
const props = withDefaults(defineProps<ComboboxContentProps & { class?: HTMLAttributes['class'], viewportClass?: HTMLAttributes['class'] }>(), {
|
|
9
|
+
position: 'popper',
|
|
10
|
+
align: 'center',
|
|
11
|
+
sideOffset: 4,
|
|
12
|
+
})
|
|
13
|
+
const emits = defineEmits<ComboboxContentEmits>()
|
|
14
|
+
|
|
15
|
+
const delegatedProps = reactiveOmit(props, 'class', 'viewportClass')
|
|
16
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<ComboboxPortal>
|
|
21
|
+
<ComboboxContent
|
|
22
|
+
data-slot="combobox-list"
|
|
23
|
+
v-bind="forwarded"
|
|
24
|
+
align="start"
|
|
25
|
+
side="bottom"
|
|
26
|
+
:class="cn('z-50 w-[200px] rounded-md border border-popover-border bg-popover text-popover-foreground origin-(--reka-combobox-content-transform-origin) overflow-hidden shadow-md outline-none 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', props.class)"
|
|
27
|
+
>
|
|
28
|
+
<slot />
|
|
29
|
+
</ComboboxContent>
|
|
30
|
+
</ComboboxPortal>
|
|
31
|
+
</template>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ComboboxSeparatorProps } from 'reka-ui'
|
|
3
|
+
import { cn } from '../../../lib/utils'
|
|
4
|
+
import { ComboboxSeparator } from 'reka-ui'
|
|
5
|
+
import { computed, type HTMLAttributes } from 'vue'
|
|
6
|
+
|
|
7
|
+
const props = defineProps<ComboboxSeparatorProps & { class?: HTMLAttributes['class'] }>()
|
|
8
|
+
|
|
9
|
+
const delegatedProps = computed(() => {
|
|
10
|
+
const { class: _, ...delegated } = props
|
|
11
|
+
|
|
12
|
+
return delegated
|
|
13
|
+
})
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<ComboboxSeparator
|
|
18
|
+
data-slot="combobox-separator"
|
|
19
|
+
v-bind="delegatedProps"
|
|
20
|
+
:class="cn('bg-border -mx-1 h-px', props.class)"
|
|
21
|
+
>
|
|
22
|
+
<slot />
|
|
23
|
+
</ComboboxSeparator>
|
|
24
|
+
</template>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ComboboxTriggerProps } from 'reka-ui'
|
|
3
|
+
import { cn } from '../../../lib/utils'
|
|
4
|
+
import { ComboboxTrigger, useForwardProps } from 'reka-ui'
|
|
5
|
+
import { computed, type HTMLAttributes } from 'vue'
|
|
6
|
+
|
|
7
|
+
const props = defineProps<ComboboxTriggerProps & { class?: HTMLAttributes['class'] }>()
|
|
8
|
+
|
|
9
|
+
const delegatedProps = computed(() => {
|
|
10
|
+
const { class: _, ...delegated } = props
|
|
11
|
+
|
|
12
|
+
return delegated
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
const forwarded = useForwardProps(delegatedProps)
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<ComboboxTrigger
|
|
20
|
+
data-slot="combobox-trigger"
|
|
21
|
+
v-bind="forwarded"
|
|
22
|
+
:class="cn('', props.class)"
|
|
23
|
+
tabindex="0"
|
|
24
|
+
>
|
|
25
|
+
<slot />
|
|
26
|
+
</ComboboxTrigger>
|
|
27
|
+
</template>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ComboboxViewportProps } from 'reka-ui'
|
|
3
|
+
import { cn } from '../../../lib/utils'
|
|
4
|
+
import { ComboboxViewport, useForwardProps } from 'reka-ui'
|
|
5
|
+
import { computed, type HTMLAttributes } from 'vue'
|
|
6
|
+
|
|
7
|
+
const props = defineProps<ComboboxViewportProps & { class?: HTMLAttributes['class'] }>()
|
|
8
|
+
|
|
9
|
+
const delegatedProps = computed(() => {
|
|
10
|
+
const { class: _, ...delegated } = props
|
|
11
|
+
|
|
12
|
+
return delegated
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
const forwarded = useForwardProps(delegatedProps)
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<ComboboxViewport
|
|
20
|
+
data-slot="combobox-viewport"
|
|
21
|
+
v-bind="forwarded"
|
|
22
|
+
:class="cn('max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto', props.class)"
|
|
23
|
+
>
|
|
24
|
+
<slot />
|
|
25
|
+
</ComboboxViewport>
|
|
26
|
+
</template>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { default as Combobox } from './Combobox.vue'
|
|
2
|
+
export { default as ComboboxAnchor } from './ComboboxAnchor.vue'
|
|
3
|
+
export { default as ComboboxEmpty } from './ComboboxEmpty.vue'
|
|
4
|
+
export { default as ComboboxGroup } from './ComboboxGroup.vue'
|
|
5
|
+
export { default as ComboboxInput } from './ComboboxInput.vue'
|
|
6
|
+
export { default as ComboboxItem } from './ComboboxItem.vue'
|
|
7
|
+
export { default as ComboboxItemIndicator } from './ComboboxItemIndicator.vue'
|
|
8
|
+
export { default as ComboboxList } from './ComboboxList.vue'
|
|
9
|
+
export { default as ComboboxSeparator } from './ComboboxSeparator.vue'
|
|
10
|
+
export { default as ComboboxViewport } from './ComboboxViewport.vue'
|
|
11
|
+
|
|
12
|
+
export { ComboboxCancel, ComboboxTrigger } from 'reka-ui'
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ListboxRootEmits, ListboxRootProps } from 'reka-ui'
|
|
3
|
+
import { cn } from '../../../lib/utils'
|
|
4
|
+
import { ListboxRoot, useFilter, useForwardPropsEmits } from 'reka-ui'
|
|
5
|
+
import { computed, type HTMLAttributes, reactive, ref, watch } from 'vue'
|
|
6
|
+
import { provideCommandContext } from '.'
|
|
7
|
+
|
|
8
|
+
const props = withDefaults(defineProps<ListboxRootProps & { class?: HTMLAttributes['class'] }>(), {
|
|
9
|
+
modelValue: '',
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
const emits = defineEmits<ListboxRootEmits>()
|
|
13
|
+
|
|
14
|
+
const delegatedProps = computed(() => {
|
|
15
|
+
const { class: _, ...delegated } = props
|
|
16
|
+
|
|
17
|
+
return delegated
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
21
|
+
|
|
22
|
+
const allItems = ref<Map<string, string>>(new Map())
|
|
23
|
+
const allGroups = ref<Map<string, Set<string>>>(new Map())
|
|
24
|
+
|
|
25
|
+
const { contains } = useFilter({ sensitivity: 'base' })
|
|
26
|
+
const filterState = reactive({
|
|
27
|
+
search: '',
|
|
28
|
+
filtered: {
|
|
29
|
+
/** The count of all visible items. */
|
|
30
|
+
count: 0,
|
|
31
|
+
/** Map from visible item id to its search score. */
|
|
32
|
+
items: new Map() as Map<string, number>,
|
|
33
|
+
/** Set of groups with at least one visible item. */
|
|
34
|
+
groups: new Set() as Set<string>,
|
|
35
|
+
},
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
function filterItems() {
|
|
39
|
+
if (!filterState.search) {
|
|
40
|
+
filterState.filtered.count = allItems.value.size
|
|
41
|
+
// Do nothing, each item will know to show itself because search is empty
|
|
42
|
+
return
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Reset the groups
|
|
46
|
+
filterState.filtered.groups = new Set()
|
|
47
|
+
let itemCount = 0
|
|
48
|
+
|
|
49
|
+
// Check which items should be included
|
|
50
|
+
for (const [id, value] of allItems.value) {
|
|
51
|
+
const score = contains(value, filterState.search)
|
|
52
|
+
filterState.filtered.items.set(id, score ? 1 : 0)
|
|
53
|
+
if (score)
|
|
54
|
+
itemCount++
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Check which groups have at least 1 item shown
|
|
58
|
+
for (const [groupId, group] of allGroups.value) {
|
|
59
|
+
for (const itemId of group) {
|
|
60
|
+
if (filterState.filtered.items.get(itemId)! > 0) {
|
|
61
|
+
filterState.filtered.groups.add(groupId)
|
|
62
|
+
break
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
filterState.filtered.count = itemCount
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function handleSelect() {
|
|
71
|
+
filterState.search = ''
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
watch(() => filterState.search, () => {
|
|
75
|
+
filterItems()
|
|
76
|
+
})
|
|
77
|
+
|
|
78
|
+
provideCommandContext({
|
|
79
|
+
allItems,
|
|
80
|
+
allGroups,
|
|
81
|
+
filterState,
|
|
82
|
+
})
|
|
83
|
+
</script>
|
|
84
|
+
|
|
85
|
+
<template>
|
|
86
|
+
<ListboxRoot
|
|
87
|
+
data-slot="command"
|
|
88
|
+
v-bind="forwarded"
|
|
89
|
+
:class="cn('bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md', props.class)"
|
|
90
|
+
>
|
|
91
|
+
<slot />
|
|
92
|
+
</ListboxRoot>
|
|
93
|
+
</template>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { DialogRootEmits, DialogRootProps } from 'reka-ui'
|
|
3
|
+
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from '../dialog'
|
|
4
|
+
import { useForwardPropsEmits } from 'reka-ui'
|
|
5
|
+
import Command from './Command.vue'
|
|
6
|
+
|
|
7
|
+
const props = withDefaults(defineProps<DialogRootProps & {
|
|
8
|
+
title?: string
|
|
9
|
+
description?: string
|
|
10
|
+
}>(), {
|
|
11
|
+
title: 'Command Palette',
|
|
12
|
+
description: 'Search for a command to run...',
|
|
13
|
+
})
|
|
14
|
+
const emits = defineEmits<DialogRootEmits>()
|
|
15
|
+
|
|
16
|
+
const forwarded = useForwardPropsEmits(props, emits)
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<Dialog v-bind="forwarded">
|
|
21
|
+
<DialogHeader class="sr-only">
|
|
22
|
+
<DialogTitle>{{ title }}</DialogTitle>
|
|
23
|
+
<DialogDescription>{{ description }}</DialogDescription>
|
|
24
|
+
</DialogHeader>
|
|
25
|
+
<DialogContent class="overflow-hidden p-0 ">
|
|
26
|
+
<Command>
|
|
27
|
+
<slot />
|
|
28
|
+
</Command>
|
|
29
|
+
</DialogContent>
|
|
30
|
+
</Dialog>
|
|
31
|
+
</template>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { PrimitiveProps } from 'reka-ui'
|
|
3
|
+
import { cn } from '../../../lib/utils'
|
|
4
|
+
import { Primitive } from 'reka-ui'
|
|
5
|
+
import { computed, type HTMLAttributes } from 'vue'
|
|
6
|
+
import { useCommand } from '.'
|
|
7
|
+
|
|
8
|
+
const props = defineProps<PrimitiveProps & { class?: HTMLAttributes['class'] }>()
|
|
9
|
+
|
|
10
|
+
const delegatedProps = computed(() => {
|
|
11
|
+
const { class: _, ...delegated } = props
|
|
12
|
+
|
|
13
|
+
return delegated
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
const { filterState } = useCommand()
|
|
17
|
+
const isRender = computed(() => !!filterState.search && filterState.filtered.count === 0,
|
|
18
|
+
)
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<template>
|
|
22
|
+
<Primitive
|
|
23
|
+
v-if="isRender"
|
|
24
|
+
data-slot="command-empty"
|
|
25
|
+
v-bind="delegatedProps" :class="cn('py-6 text-center text-sm', props.class)"
|
|
26
|
+
>
|
|
27
|
+
<slot />
|
|
28
|
+
</Primitive>
|
|
29
|
+
</template>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ListboxGroupProps } from 'reka-ui'
|
|
3
|
+
import { cn } from '../../../lib/utils'
|
|
4
|
+
import { ListboxGroup, ListboxGroupLabel, useId } from 'reka-ui'
|
|
5
|
+
import { computed, type HTMLAttributes, onMounted, onUnmounted } from 'vue'
|
|
6
|
+
import { provideCommandGroupContext, useCommand } from '.'
|
|
7
|
+
|
|
8
|
+
const props = defineProps<ListboxGroupProps & {
|
|
9
|
+
class?: HTMLAttributes['class']
|
|
10
|
+
heading?: string
|
|
11
|
+
}>()
|
|
12
|
+
|
|
13
|
+
const delegatedProps = computed(() => {
|
|
14
|
+
const { class: _, ...delegated } = props
|
|
15
|
+
|
|
16
|
+
return delegated
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
const { allGroups, filterState } = useCommand()
|
|
20
|
+
const id = useId()
|
|
21
|
+
|
|
22
|
+
const isRender = computed(() => !filterState.search ? true : filterState.filtered.groups.has(id))
|
|
23
|
+
|
|
24
|
+
provideCommandGroupContext({ id })
|
|
25
|
+
onMounted(() => {
|
|
26
|
+
if (!allGroups.value.has(id))
|
|
27
|
+
allGroups.value.set(id, new Set())
|
|
28
|
+
})
|
|
29
|
+
onUnmounted(() => {
|
|
30
|
+
allGroups.value.delete(id)
|
|
31
|
+
})
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<template>
|
|
35
|
+
<ListboxGroup
|
|
36
|
+
v-bind="delegatedProps"
|
|
37
|
+
:id="id"
|
|
38
|
+
data-slot="command-group"
|
|
39
|
+
:class="cn('text-foreground overflow-hidden p-1', props.class)"
|
|
40
|
+
:hidden="isRender ? undefined : true"
|
|
41
|
+
>
|
|
42
|
+
<ListboxGroupLabel v-if="heading" class="px-2 py-1.5 text-xs font-medium text-muted-foreground">
|
|
43
|
+
{{ heading }}
|
|
44
|
+
</ListboxGroupLabel>
|
|
45
|
+
<slot />
|
|
46
|
+
</ListboxGroup>
|
|
47
|
+
</template>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { cn } from '../../../lib/utils'
|
|
3
|
+
import { Search } from 'lucide-vue-next'
|
|
4
|
+
import { ListboxFilter, type ListboxFilterProps, useForwardProps } from 'reka-ui'
|
|
5
|
+
import { computed, type HTMLAttributes } from 'vue'
|
|
6
|
+
import { useCommand } from '.'
|
|
7
|
+
|
|
8
|
+
defineOptions({
|
|
9
|
+
inheritAttrs: false,
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
const props = defineProps<ListboxFilterProps & {
|
|
13
|
+
class?: HTMLAttributes['class']
|
|
14
|
+
}>()
|
|
15
|
+
|
|
16
|
+
const delegatedProps = computed(() => {
|
|
17
|
+
const { class: _, ...delegated } = props
|
|
18
|
+
|
|
19
|
+
return delegated
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
23
|
+
|
|
24
|
+
const { filterState } = useCommand()
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<template>
|
|
28
|
+
<div
|
|
29
|
+
data-slot="command-input-wrapper"
|
|
30
|
+
class="flex h-12 items-center gap-2 border-b px-3"
|
|
31
|
+
>
|
|
32
|
+
<Search class="size-4 shrink-0 opacity-50" />
|
|
33
|
+
<ListboxFilter
|
|
34
|
+
v-bind="{ ...forwardedProps, ...$attrs }"
|
|
35
|
+
v-model="filterState.search"
|
|
36
|
+
data-slot="command-input"
|
|
37
|
+
auto-focus
|
|
38
|
+
:class="cn('placeholder:text-muted-foreground flex h-12 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50', props.class)"
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
41
|
+
</template>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ListboxItemEmits, ListboxItemProps } from 'reka-ui'
|
|
3
|
+
import { cn } from '../../../lib/utils'
|
|
4
|
+
import { useCurrentElement } from '@vueuse/core'
|
|
5
|
+
import { ListboxItem, useForwardPropsEmits, useId } from 'reka-ui'
|
|
6
|
+
import { computed, type HTMLAttributes, onMounted, onUnmounted, ref } from 'vue'
|
|
7
|
+
import { useCommand, useCommandGroup } from '.'
|
|
8
|
+
|
|
9
|
+
const props = defineProps<ListboxItemProps & { class?: HTMLAttributes['class'] }>()
|
|
10
|
+
const emits = defineEmits<ListboxItemEmits>()
|
|
11
|
+
|
|
12
|
+
const delegatedProps = computed(() => {
|
|
13
|
+
const { class: _, ...delegated } = props
|
|
14
|
+
|
|
15
|
+
return delegated
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
19
|
+
|
|
20
|
+
const id = useId()
|
|
21
|
+
const { filterState, allItems, allGroups } = useCommand()
|
|
22
|
+
const groupContext = useCommandGroup()
|
|
23
|
+
|
|
24
|
+
const isRender = computed(() => {
|
|
25
|
+
if (!filterState.search) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
const filteredCurrentItem = filterState.filtered.items.get(id)
|
|
30
|
+
// If the filtered items is undefined means not in the all times map yet
|
|
31
|
+
// Do the first render to add into the map
|
|
32
|
+
if (filteredCurrentItem === undefined) {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Check with filter
|
|
37
|
+
return filteredCurrentItem > 0;
|
|
38
|
+
}
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
const itemRef = ref()
|
|
42
|
+
const currentElement = useCurrentElement(itemRef)
|
|
43
|
+
onMounted(() => {
|
|
44
|
+
if (!(currentElement.value instanceof HTMLElement))
|
|
45
|
+
return
|
|
46
|
+
|
|
47
|
+
// textValue to perform filter
|
|
48
|
+
allItems.value.set(id, currentElement.value.textContent ?? props.value.toString())
|
|
49
|
+
|
|
50
|
+
const groupId = groupContext?.id
|
|
51
|
+
if (groupId) {
|
|
52
|
+
if (!allGroups.value.has(groupId)) {
|
|
53
|
+
allGroups.value.set(groupId, new Set([id]))
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
allGroups.value.get(groupId)?.add(id)
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
})
|
|
60
|
+
onUnmounted(() => {
|
|
61
|
+
allItems.value.delete(id)
|
|
62
|
+
})
|
|
63
|
+
</script>
|
|
64
|
+
|
|
65
|
+
<template>
|
|
66
|
+
<ListboxItem
|
|
67
|
+
v-if="isRender"
|
|
68
|
+
v-bind="forwarded"
|
|
69
|
+
:id="id"
|
|
70
|
+
ref="itemRef"
|
|
71
|
+
data-slot="command-item"
|
|
72
|
+
:class="cn(`data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-3 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`, props.class)"
|
|
73
|
+
@select="() => {
|
|
74
|
+
filterState.search = ''
|
|
75
|
+
}"
|
|
76
|
+
>
|
|
77
|
+
<slot />
|
|
78
|
+
</ListboxItem>
|
|
79
|
+
</template>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ListboxContentProps } from 'reka-ui'
|
|
3
|
+
import { cn } from '../../../lib/utils'
|
|
4
|
+
import { ListboxContent, useForwardProps } from 'reka-ui'
|
|
5
|
+
import { computed, type HTMLAttributes } from 'vue'
|
|
6
|
+
|
|
7
|
+
const props = defineProps<ListboxContentProps & { class?: HTMLAttributes['class'] }>()
|
|
8
|
+
|
|
9
|
+
const delegatedProps = computed(() => {
|
|
10
|
+
const { class: _, ...delegated } = props
|
|
11
|
+
|
|
12
|
+
return delegated
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
const forwarded = useForwardProps(delegatedProps)
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<ListboxContent
|
|
20
|
+
data-slot="command-list"
|
|
21
|
+
v-bind="forwarded"
|
|
22
|
+
:class="cn('max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto', props.class)"
|
|
23
|
+
>
|
|
24
|
+
<div role="presentation">
|
|
25
|
+
<slot />
|
|
26
|
+
</div>
|
|
27
|
+
</ListboxContent>
|
|
28
|
+
</template>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { SeparatorProps } from 'reka-ui'
|
|
3
|
+
import { cn } from '../../../lib/utils'
|
|
4
|
+
import { Separator } from 'reka-ui'
|
|
5
|
+
import { computed, type HTMLAttributes } from 'vue'
|
|
6
|
+
|
|
7
|
+
const props = defineProps<SeparatorProps & { class?: HTMLAttributes['class'] }>()
|
|
8
|
+
|
|
9
|
+
const delegatedProps = computed(() => {
|
|
10
|
+
const { class: _, ...delegated } = props
|
|
11
|
+
|
|
12
|
+
return delegated
|
|
13
|
+
})
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<Separator
|
|
18
|
+
data-slot="command-separator"
|
|
19
|
+
v-bind="delegatedProps"
|
|
20
|
+
:class="cn('bg-border -mx-1 h-px', props.class)"
|
|
21
|
+
>
|
|
22
|
+
<slot />
|
|
23
|
+
</Separator>
|
|
24
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue'
|
|
3
|
+
import { cn } from '../../../lib/utils'
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes['class']
|
|
7
|
+
}>()
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<span
|
|
12
|
+
data-slot="command-shortcut"
|
|
13
|
+
:class="cn('text-muted-foreground ml-auto text-xs tracking-widest', props.class)"
|
|
14
|
+
>
|
|
15
|
+
<slot />
|
|
16
|
+
</span>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Ref } from 'vue'
|
|
2
|
+
import { createContext } from 'reka-ui'
|
|
3
|
+
|
|
4
|
+
export { default as Command } from './Command.vue'
|
|
5
|
+
export { default as CommandDialog } from './CommandDialog.vue'
|
|
6
|
+
export { default as CommandEmpty } from './CommandEmpty.vue'
|
|
7
|
+
export { default as CommandGroup } from './CommandGroup.vue'
|
|
8
|
+
export { default as CommandInput } from './CommandInput.vue'
|
|
9
|
+
export { default as CommandItem } from './CommandItem.vue'
|
|
10
|
+
export { default as CommandList } from './CommandList.vue'
|
|
11
|
+
export { default as CommandSeparator } from './CommandSeparator.vue'
|
|
12
|
+
export { default as CommandShortcut } from './CommandShortcut.vue'
|
|
13
|
+
|
|
14
|
+
export const [useCommand, provideCommandContext] = createContext<{
|
|
15
|
+
allItems: Ref<Map<string, string>>
|
|
16
|
+
allGroups: Ref<Map<string, Set<string>>>
|
|
17
|
+
filterState: {
|
|
18
|
+
search: string
|
|
19
|
+
filtered: { count: number, items: Map<string, number>, groups: Set<string> }
|
|
20
|
+
}
|
|
21
|
+
}>('Command')
|
|
22
|
+
|
|
23
|
+
export const [useCommandGroup, provideCommandGroupContext] = createContext<{
|
|
24
|
+
id?: string
|
|
25
|
+
}>('CommandGroup')
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ContextMenuRootEmits, ContextMenuRootProps } from 'reka-ui'
|
|
3
|
+
import { ContextMenuRoot, useForwardPropsEmits } from 'reka-ui'
|
|
4
|
+
|
|
5
|
+
const props = defineProps<ContextMenuRootProps>()
|
|
6
|
+
const emits = defineEmits<ContextMenuRootEmits>()
|
|
7
|
+
|
|
8
|
+
const forwarded = useForwardPropsEmits(props, emits)
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<ContextMenuRoot
|
|
13
|
+
data-slot="context-menu"
|
|
14
|
+
v-bind="forwarded"
|
|
15
|
+
>
|
|
16
|
+
<slot />
|
|
17
|
+
</ContextMenuRoot>
|
|
18
|
+
</template>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { cn } from '../../../lib/utils'
|
|
3
|
+
import { Check } from 'lucide-vue-next'
|
|
4
|
+
import {
|
|
5
|
+
ContextMenuCheckboxItem,
|
|
6
|
+
type ContextMenuCheckboxItemEmits,
|
|
7
|
+
type ContextMenuCheckboxItemProps,
|
|
8
|
+
ContextMenuItemIndicator,
|
|
9
|
+
useForwardPropsEmits,
|
|
10
|
+
} from 'reka-ui'
|
|
11
|
+
import { computed, type HTMLAttributes } from 'vue'
|
|
12
|
+
|
|
13
|
+
const props = defineProps<ContextMenuCheckboxItemProps & { class?: HTMLAttributes['class'] }>()
|
|
14
|
+
const emits = defineEmits<ContextMenuCheckboxItemEmits>()
|
|
15
|
+
|
|
16
|
+
const delegatedProps = computed(() => {
|
|
17
|
+
const { class: _, ...delegated } = props
|
|
18
|
+
|
|
19
|
+
return delegated
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<template>
|
|
26
|
+
<ContextMenuCheckboxItem
|
|
27
|
+
data-slot="context-menu-checkbox-item"
|
|
28
|
+
v-bind="forwarded"
|
|
29
|
+
:class="cn(
|
|
30
|
+
`focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 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`,
|
|
31
|
+
props.class,
|
|
32
|
+
)"
|
|
33
|
+
>
|
|
34
|
+
<span class="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
|
35
|
+
<ContextMenuItemIndicator>
|
|
36
|
+
<Check class="size-4" />
|
|
37
|
+
</ContextMenuItemIndicator>
|
|
38
|
+
</span>
|
|
39
|
+
<slot />
|
|
40
|
+
</ContextMenuCheckboxItem>
|
|
41
|
+
</template>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { cn } from '../../../lib/utils'
|
|
3
|
+
import {
|
|
4
|
+
ContextMenuContent,
|
|
5
|
+
type ContextMenuContentEmits,
|
|
6
|
+
type ContextMenuContentProps,
|
|
7
|
+
ContextMenuPortal,
|
|
8
|
+
useForwardPropsEmits,
|
|
9
|
+
} from 'reka-ui'
|
|
10
|
+
import { computed, type HTMLAttributes } from 'vue'
|
|
11
|
+
|
|
12
|
+
const props = defineProps<ContextMenuContentProps & { class?: HTMLAttributes['class'] }>()
|
|
13
|
+
const emits = defineEmits<ContextMenuContentEmits>()
|
|
14
|
+
|
|
15
|
+
const delegatedProps = computed(() => {
|
|
16
|
+
const { class: _, ...delegated } = props
|
|
17
|
+
|
|
18
|
+
return delegated
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<ContextMenuPortal>
|
|
26
|
+
<ContextMenuContent
|
|
27
|
+
data-slot="context-menu-content"
|
|
28
|
+
v-bind="forwarded"
|
|
29
|
+
:class="cn(
|
|
30
|
+
'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 z-50 max-h-(--reka-context-menu-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border border-popover-border p-1 shadow-md',
|
|
31
|
+
props.class,
|
|
32
|
+
)"
|
|
33
|
+
>
|
|
34
|
+
<slot />
|
|
35
|
+
</ContextMenuContent>
|
|
36
|
+
</ContextMenuPortal>
|
|
37
|
+
</template>
|