@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,104 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { useDropZone } from '@vueuse/core'
|
|
3
|
+
import { Check, Loader2, X } from 'lucide-vue-next'
|
|
4
|
+
import { cn } from '../../../../lib/utils'
|
|
5
|
+
|
|
6
|
+
interface PENDING_FILE {
|
|
7
|
+
id: string
|
|
8
|
+
name: string
|
|
9
|
+
size: number
|
|
10
|
+
file: File,
|
|
11
|
+
contentType: string,
|
|
12
|
+
path: string,
|
|
13
|
+
url: string,
|
|
14
|
+
status: 'pending' | 'uploading' | 'error'
|
|
15
|
+
updated: Date
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const props = defineProps({
|
|
19
|
+
activeSourceId: {
|
|
20
|
+
type: String,
|
|
21
|
+
required: true
|
|
22
|
+
},
|
|
23
|
+
path: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: ''
|
|
26
|
+
}
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
const { uploadFile } = useMediaLibrary()
|
|
30
|
+
|
|
31
|
+
const dropZoneRef = ref<HTMLDivElement>()
|
|
32
|
+
|
|
33
|
+
const MAX_CONCURRENT_UPLOADS = 3
|
|
34
|
+
|
|
35
|
+
const PENDING_FILES = inject('pendingFiles', ref<PENDING_FILE[]>([]))
|
|
36
|
+
const reload = inject('reload')
|
|
37
|
+
|
|
38
|
+
async function onDrop(files: File[] | null) {
|
|
39
|
+
for (let i = 0; i < files?.length; i++) {
|
|
40
|
+
let randomID = crypto.randomUUID()
|
|
41
|
+
addToUploadQueue(randomID, files[i])
|
|
42
|
+
await new Promise((resolve) => setTimeout(resolve, 50));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const addToUploadQueue = async (id: string, file: File) => {
|
|
47
|
+
PENDING_FILES.value.push({
|
|
48
|
+
id,
|
|
49
|
+
name: file.name,
|
|
50
|
+
size: file.size,
|
|
51
|
+
file,
|
|
52
|
+
contentType: file.type,
|
|
53
|
+
path: props.path,
|
|
54
|
+
url: URL.createObjectURL(file),
|
|
55
|
+
status: 'pending',
|
|
56
|
+
updated: new Date()
|
|
57
|
+
})
|
|
58
|
+
handleQueue()
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const handleQueue = () => {
|
|
62
|
+
const CURRENTLY_UPLOADING = PENDING_FILES.value.filter((f) => f.status === 'uploading')
|
|
63
|
+
if (CURRENTLY_UPLOADING.length < MAX_CONCURRENT_UPLOADS) {
|
|
64
|
+
const nextFile = PENDING_FILES.value.find((f) => f.status === 'pending')
|
|
65
|
+
if (nextFile) {
|
|
66
|
+
startUploadingFile(nextFile.id)
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const startUploadingFile = async (id: string) => {
|
|
72
|
+
try {
|
|
73
|
+
PENDING_FILES.value.find((f) => f.id === id)!.status = 'uploading'
|
|
74
|
+
const file = PENDING_FILES.value.find((f) => f.id === id)!.file
|
|
75
|
+
const res = await uploadFile(props.activeSourceId, file, props.path)
|
|
76
|
+
PENDING_FILES.value = PENDING_FILES.value.filter((f) => f.id !== id)
|
|
77
|
+
reload()
|
|
78
|
+
} catch (error) {
|
|
79
|
+
console.error(error)
|
|
80
|
+
PENDING_FILES.value.find((f) => f.id === id)!.status = 'error'
|
|
81
|
+
PENDING_FILES.value.find((f) => f.id === id)!.updated = new Date()
|
|
82
|
+
} finally {
|
|
83
|
+
handleQueue()
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const { isOverDropZone } = useDropZone(dropZoneRef, {
|
|
88
|
+
onDrop,
|
|
89
|
+
dataTypes: ['image'],
|
|
90
|
+
multiple: true,
|
|
91
|
+
preventDefaultForUnhandled: false,
|
|
92
|
+
})
|
|
93
|
+
</script>
|
|
94
|
+
|
|
95
|
+
<template>
|
|
96
|
+
<button
|
|
97
|
+
ref="dropZoneRef"
|
|
98
|
+
:class="cn('relative w-[calc(100%-0.5rem)] outline-dashed outline px-4 py-16 mx-1 mb-4 flex items-center justify-center rounded-md text-muted-foreground cursor-pointer transition-colors duration-300 hover:outline-2 hover:outline-ring hover:bg-muted focus-visible:outline-2 focus-visible:outline-ring',
|
|
99
|
+
isOverDropZone ? 'outline-2 outline-ring bg-muted' : ''
|
|
100
|
+
)"
|
|
101
|
+
>
|
|
102
|
+
Drop file(s) here
|
|
103
|
+
</button>
|
|
104
|
+
</template>
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { Copy, FolderInput, Pencil, Trash2, Image, Square, SquareCheck, Loader2, X, Pause } from 'lucide-vue-next'
|
|
3
|
+
import { formatFileSize } from '../../../../lib/utils'
|
|
4
|
+
import { cn } from '../../../../lib/utils'
|
|
5
|
+
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
file: {
|
|
8
|
+
type: Object,
|
|
9
|
+
required: true
|
|
10
|
+
},
|
|
11
|
+
selected: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
required: true
|
|
14
|
+
}
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
const emit = defineEmits(['toggle'])
|
|
18
|
+
|
|
19
|
+
const focus = ref(false)
|
|
20
|
+
|
|
21
|
+
const { urlToBase64 } = useUtilsService()
|
|
22
|
+
const openImageEditor = inject('openImageEditor')
|
|
23
|
+
const editImage = async (url: string) => {
|
|
24
|
+
let res = await urlToBase64(url)
|
|
25
|
+
openImageEditor(res.base64)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const isImageFile = (contentType: string) => {
|
|
29
|
+
return contentType && contentType.startsWith('image/') || false
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const imageFailed = ref(false)
|
|
33
|
+
const onImageError = () => {
|
|
34
|
+
imageFailed.value = true
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const isPending = computed(() => props.file.status === 'pending' || props.file.status === 'uploading' || props.file.status === 'error')
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<template>
|
|
41
|
+
<ContextMenu>
|
|
42
|
+
<ContextMenuTrigger>
|
|
43
|
+
<div class="relative group border rounded-xl p-1 select-none" :class="{ 'bg-muted': selected, 'border-ring': focus }">
|
|
44
|
+
<div class="relative" v-if="isImageFile(file.contentType) && !imageFailed">
|
|
45
|
+
<img
|
|
46
|
+
:src="file.url"
|
|
47
|
+
:alt="file.displayName || file.name"
|
|
48
|
+
:class="cn('w-full aspect-square object-contain rounded-lg pointer-events-none',
|
|
49
|
+
file.status === 'pending' || file.status === 'uploading' ? 'animate-pulse' : '',
|
|
50
|
+
file.status === 'error' ? 'opacity-30' : ''
|
|
51
|
+
)"
|
|
52
|
+
loading="lazy"
|
|
53
|
+
draggable="false"
|
|
54
|
+
@error="onImageError"
|
|
55
|
+
/>
|
|
56
|
+
|
|
57
|
+
<div v-if="isPending" class="absolute inset-0 flex items-center justify-center">
|
|
58
|
+
<Pause v-if="file.status === 'pending'" class="size-6 text-white" />
|
|
59
|
+
<Loader2 v-else-if="file.status === 'uploading'" class="size-6 text-white animate-spin" />
|
|
60
|
+
<X v-else-if="file.status === 'error'" class="size-6 text-red-500" />
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<div
|
|
65
|
+
v-else
|
|
66
|
+
:class="cn('w-full h-28 flex items-center justify-center rounded-lg', selected ? 'bg-black/40' : 'bg-muted/50')"
|
|
67
|
+
>
|
|
68
|
+
<Image class="size-6 text-muted-foreground" v-if="isImageFile(file.contentType)" />
|
|
69
|
+
</div>
|
|
70
|
+
|
|
71
|
+
<button v-if="!isPending" @click="emit('toggle', file.url)" class="absolute inset-0 flex items-start justify-end bg-black/20 opacity-0 group-hover:opacity-100 transition-opacity rounded-xl cursor-pointer focus-visible:outline-none" @focus="focus = true" @blur="focus = false">
|
|
72
|
+
<Square v-if="!selected" class="size-6 mt-2 mr-2 drop-shadow-[0_3px_3px_rgba(0,0,0,0.7)] pointer-events-none" />
|
|
73
|
+
</button>
|
|
74
|
+
|
|
75
|
+
<SquareCheck v-if="!isPending && selected" class="absolute top-2 right-2 size-6 drop-shadow-[0_3px_3px_rgba(0,0,0,0.7)] pointer-events-none" />
|
|
76
|
+
<Square v-else-if="!isPending && focus" class="absolute top-2 right-2 size-6 drop-shadow-[0_3px_3px_rgba(0,0,0,0.7)] pointer-events-none" />
|
|
77
|
+
|
|
78
|
+
<div class="flex flex-col mt-1 px-1">
|
|
79
|
+
<span class="text-sm mb-0.5 truncate">{{ file.displayName || file.name.split('/').pop() }}</span>
|
|
80
|
+
<span class="text-xs text-muted-foreground truncate">{{ formatFileSize(file.size) }}</span>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
</ContextMenuTrigger>
|
|
84
|
+
<ContextMenuContent>
|
|
85
|
+
<ContextMenuItem @click="editImage(file.url)">
|
|
86
|
+
<Image class="size-4" />
|
|
87
|
+
Edit image
|
|
88
|
+
</ContextMenuItem>
|
|
89
|
+
<ContextMenuSeparator />
|
|
90
|
+
<ContextMenuItem>
|
|
91
|
+
<Copy class="size-4" />
|
|
92
|
+
Duplicate...
|
|
93
|
+
</ContextMenuItem>
|
|
94
|
+
<ContextMenuItem>
|
|
95
|
+
<FolderInput class="size-4" />
|
|
96
|
+
Move...
|
|
97
|
+
</ContextMenuItem>
|
|
98
|
+
<ContextMenuItem>
|
|
99
|
+
<Pencil class="size-4" />
|
|
100
|
+
Rename...
|
|
101
|
+
</ContextMenuItem>
|
|
102
|
+
<ContextMenuItem variant="destructive">
|
|
103
|
+
<Trash2 class="size-4" />
|
|
104
|
+
Delete
|
|
105
|
+
</ContextMenuItem>
|
|
106
|
+
</ContextMenuContent>
|
|
107
|
+
</ContextMenu>
|
|
108
|
+
</template>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ArrowUpDown, FolderPlus, CircleX } from 'lucide-vue-next'
|
|
3
|
+
import { cn } from '../../../../lib/utils'
|
|
4
|
+
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
showNewFolder: {
|
|
7
|
+
type: Boolean,
|
|
8
|
+
required: true
|
|
9
|
+
}
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
const focusSearch = ref(false)
|
|
13
|
+
|
|
14
|
+
const search = inject('search')
|
|
15
|
+
const sort = inject('sort')
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<div class="flex items-center justify-between gap-2 mb-4">
|
|
20
|
+
<div class="group relative w-full max-w-sm">
|
|
21
|
+
<Input
|
|
22
|
+
type="text"
|
|
23
|
+
placeholder="Search..."
|
|
24
|
+
v-model="search"
|
|
25
|
+
class="pr-8"
|
|
26
|
+
@focus="focusSearch = true"
|
|
27
|
+
@blur="focusSearch = false"
|
|
28
|
+
/>
|
|
29
|
+
<button class="absolute right-2 top-2.5 opacity-50 hover:opacity-100" @click="search = ''">
|
|
30
|
+
<CircleX :class="cn('size-4 transition-opacity duration-200 opacity-0',
|
|
31
|
+
search ? 'group-hover:opacity-100 cursor-pointer' : '',
|
|
32
|
+
focusSearch && search ? 'opacity-100' : '')" />
|
|
33
|
+
</button>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<div class="flex items-center gap-2">
|
|
37
|
+
<Select v-model="sort">
|
|
38
|
+
<SelectTrigger class="w-[100px]">
|
|
39
|
+
<ArrowUpDown class="size-4" />
|
|
40
|
+
Sort
|
|
41
|
+
</SelectTrigger>
|
|
42
|
+
<SelectContent>
|
|
43
|
+
<SelectGroup>
|
|
44
|
+
<SelectItem value="name">
|
|
45
|
+
Name (A-Z)
|
|
46
|
+
</SelectItem>
|
|
47
|
+
<SelectItem value="name-desc">
|
|
48
|
+
Name (Z-A)
|
|
49
|
+
</SelectItem>
|
|
50
|
+
<SelectItem value="size">
|
|
51
|
+
Size (smallest first)
|
|
52
|
+
</SelectItem>
|
|
53
|
+
<SelectItem value="size-desc">
|
|
54
|
+
Size (largest first)
|
|
55
|
+
</SelectItem>
|
|
56
|
+
<SelectItem value="date">
|
|
57
|
+
Date (oldest first)
|
|
58
|
+
</SelectItem>
|
|
59
|
+
<SelectItem value="date-desc">
|
|
60
|
+
Date (newest first)
|
|
61
|
+
</SelectItem>
|
|
62
|
+
</SelectGroup>
|
|
63
|
+
</SelectContent>
|
|
64
|
+
</Select>
|
|
65
|
+
|
|
66
|
+
<Tooltip v-if="showNewFolder">
|
|
67
|
+
<TooltipTrigger as-child>
|
|
68
|
+
<Button variant="outline">
|
|
69
|
+
<FolderPlus class="size-4" />
|
|
70
|
+
</Button>
|
|
71
|
+
</TooltipTrigger>
|
|
72
|
+
<TooltipContent>
|
|
73
|
+
<p>New folder</p>
|
|
74
|
+
</TooltipContent>
|
|
75
|
+
</Tooltip>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
</template>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { cn } from '../../../lib/utils'
|
|
3
|
+
import {
|
|
4
|
+
MenubarRoot,
|
|
5
|
+
type MenubarRootEmits,
|
|
6
|
+
type MenubarRootProps,
|
|
7
|
+
useForwardPropsEmits,
|
|
8
|
+
} from 'reka-ui'
|
|
9
|
+
import { computed, type HTMLAttributes } from 'vue'
|
|
10
|
+
|
|
11
|
+
const props = defineProps<MenubarRootProps & { class?: HTMLAttributes['class'] }>()
|
|
12
|
+
const emits = defineEmits<MenubarRootEmits>()
|
|
13
|
+
|
|
14
|
+
const delegatedProps = computed(() => {
|
|
15
|
+
const { class: _, ...delegated } = props
|
|
16
|
+
|
|
17
|
+
return delegated
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<template>
|
|
24
|
+
<MenubarRoot
|
|
25
|
+
data-slot="menubar"
|
|
26
|
+
v-bind="forwarded"
|
|
27
|
+
:class="
|
|
28
|
+
cn(
|
|
29
|
+
'bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs',
|
|
30
|
+
props.class,
|
|
31
|
+
)
|
|
32
|
+
"
|
|
33
|
+
>
|
|
34
|
+
<slot />
|
|
35
|
+
</MenubarRoot>
|
|
36
|
+
</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
|
+
MenubarCheckboxItem,
|
|
6
|
+
type MenubarCheckboxItemEmits,
|
|
7
|
+
type MenubarCheckboxItemProps,
|
|
8
|
+
MenubarItemIndicator,
|
|
9
|
+
useForwardPropsEmits,
|
|
10
|
+
} from 'reka-ui'
|
|
11
|
+
import { computed, type HTMLAttributes } from 'vue'
|
|
12
|
+
|
|
13
|
+
const props = defineProps<MenubarCheckboxItemProps & { class?: HTMLAttributes['class'] }>()
|
|
14
|
+
const emits = defineEmits<MenubarCheckboxItemEmits>()
|
|
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
|
+
<MenubarCheckboxItem
|
|
27
|
+
data-slot="menubar-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-xs 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
|
+
<MenubarItemIndicator>
|
|
36
|
+
<Check class="size-4" />
|
|
37
|
+
</MenubarItemIndicator>
|
|
38
|
+
</span>
|
|
39
|
+
<slot />
|
|
40
|
+
</MenubarCheckboxItem>
|
|
41
|
+
</template>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { cn } from '../../../lib/utils'
|
|
3
|
+
import {
|
|
4
|
+
MenubarContent,
|
|
5
|
+
type MenubarContentProps,
|
|
6
|
+
MenubarPortal,
|
|
7
|
+
useForwardProps,
|
|
8
|
+
} from 'reka-ui'
|
|
9
|
+
import { computed, type HTMLAttributes } from 'vue'
|
|
10
|
+
|
|
11
|
+
const props = withDefaults(
|
|
12
|
+
defineProps<MenubarContentProps & { class?: HTMLAttributes['class'] }>(),
|
|
13
|
+
{
|
|
14
|
+
align: 'start',
|
|
15
|
+
alignOffset: -4,
|
|
16
|
+
sideOffset: 8,
|
|
17
|
+
},
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
const delegatedProps = computed(() => {
|
|
21
|
+
const { class: _, ...delegated } = props
|
|
22
|
+
|
|
23
|
+
return delegated
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<template>
|
|
30
|
+
<MenubarPortal>
|
|
31
|
+
<MenubarContent
|
|
32
|
+
data-slot="menubar-content"
|
|
33
|
+
v-bind="forwardedProps"
|
|
34
|
+
:class="
|
|
35
|
+
cn(
|
|
36
|
+
'bg-popover text-popover-foreground data-[state=open]:animate-in 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 min-w-[12rem] origin-(--reka-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-md',
|
|
37
|
+
props.class,
|
|
38
|
+
)
|
|
39
|
+
"
|
|
40
|
+
>
|
|
41
|
+
<slot />
|
|
42
|
+
</MenubarContent>
|
|
43
|
+
</MenubarPortal>
|
|
44
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { MenubarGroup, type MenubarGroupProps } from 'reka-ui'
|
|
3
|
+
|
|
4
|
+
const props = defineProps<MenubarGroupProps>()
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<MenubarGroup
|
|
9
|
+
data-slot="menubar-group"
|
|
10
|
+
v-bind="props"
|
|
11
|
+
>
|
|
12
|
+
<slot />
|
|
13
|
+
</MenubarGroup>
|
|
14
|
+
</template>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue'
|
|
3
|
+
import { cn } from '../../../lib/utils'
|
|
4
|
+
import { reactiveOmit } from '@vueuse/core'
|
|
5
|
+
import {
|
|
6
|
+
MenubarItem,
|
|
7
|
+
type MenubarItemEmits,
|
|
8
|
+
type MenubarItemProps,
|
|
9
|
+
useForwardPropsEmits,
|
|
10
|
+
} from 'reka-ui'
|
|
11
|
+
|
|
12
|
+
const props = defineProps<MenubarItemProps & {
|
|
13
|
+
class?: HTMLAttributes['class']
|
|
14
|
+
inset?: boolean
|
|
15
|
+
variant?: 'default' | 'destructive'
|
|
16
|
+
}>()
|
|
17
|
+
|
|
18
|
+
const emits = defineEmits<MenubarItemEmits>()
|
|
19
|
+
|
|
20
|
+
const delegatedProps = reactiveOmit(props, 'class', 'inset', 'variant')
|
|
21
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<MenubarItem
|
|
26
|
+
data-slot="menubar-item"
|
|
27
|
+
:data-inset="inset ? '' : undefined"
|
|
28
|
+
:data-variant="variant"
|
|
29
|
+
v-bind="forwarded"
|
|
30
|
+
:class="cn(
|
|
31
|
+
`focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive-foreground data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/40 data-[variant=destructive]:focus:text-destructive-foreground data-[variant=destructive]:*:[svg]:!text-destructive-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,
|
|
32
|
+
props.class,
|
|
33
|
+
)"
|
|
34
|
+
>
|
|
35
|
+
<slot />
|
|
36
|
+
</MenubarItem>
|
|
37
|
+
</template>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue'
|
|
3
|
+
import { cn } from '../../../lib/utils'
|
|
4
|
+
import { reactiveOmit } from '@vueuse/core'
|
|
5
|
+
import { MenubarLabel, type MenubarLabelProps } from 'reka-ui'
|
|
6
|
+
|
|
7
|
+
const props = defineProps<MenubarLabelProps & { class?: HTMLAttributes['class'], inset?: boolean }>()
|
|
8
|
+
const delegatedProps = reactiveOmit(props, 'class', 'inset')
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<MenubarLabel
|
|
13
|
+
:data-inset="inset ? '' : undefined"
|
|
14
|
+
v-bind="delegatedProps"
|
|
15
|
+
:class="cn('px-2 py-1.5 text-sm font-medium data-[inset]:pl-8', props.class)"
|
|
16
|
+
>
|
|
17
|
+
<slot />
|
|
18
|
+
</MenubarLabel>
|
|
19
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { MenubarMenu, type MenubarMenuProps } from 'reka-ui'
|
|
3
|
+
|
|
4
|
+
const props = defineProps<MenubarMenuProps>()
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<MenubarMenu
|
|
9
|
+
data-slot="menubar-menu"
|
|
10
|
+
v-bind="props"
|
|
11
|
+
>
|
|
12
|
+
<slot />
|
|
13
|
+
</MenubarMenu>
|
|
14
|
+
</template>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import {
|
|
3
|
+
MenubarRadioGroup,
|
|
4
|
+
type MenubarRadioGroupEmits,
|
|
5
|
+
type MenubarRadioGroupProps,
|
|
6
|
+
useForwardPropsEmits,
|
|
7
|
+
} from 'reka-ui'
|
|
8
|
+
|
|
9
|
+
const props = defineProps<MenubarRadioGroupProps>()
|
|
10
|
+
const emits = defineEmits<MenubarRadioGroupEmits>()
|
|
11
|
+
|
|
12
|
+
const forwarded = useForwardPropsEmits(props, emits)
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<MenubarRadioGroup
|
|
17
|
+
data-slot="menubar-radio-group"
|
|
18
|
+
v-bind="forwarded"
|
|
19
|
+
>
|
|
20
|
+
<slot />
|
|
21
|
+
</MenubarRadioGroup>
|
|
22
|
+
</template>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { cn } from '../../../lib/utils'
|
|
3
|
+
import { Circle } from 'lucide-vue-next'
|
|
4
|
+
import {
|
|
5
|
+
MenubarItemIndicator,
|
|
6
|
+
MenubarRadioItem,
|
|
7
|
+
type MenubarRadioItemEmits,
|
|
8
|
+
type MenubarRadioItemProps,
|
|
9
|
+
useForwardPropsEmits,
|
|
10
|
+
} from 'reka-ui'
|
|
11
|
+
import { computed, type HTMLAttributes } from 'vue'
|
|
12
|
+
|
|
13
|
+
const props = defineProps<MenubarRadioItemProps & { class?: HTMLAttributes['class'] }>()
|
|
14
|
+
const emits = defineEmits<MenubarRadioItemEmits>()
|
|
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
|
+
<MenubarRadioItem
|
|
27
|
+
data-slot="menubar-radio-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-xs 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
|
+
<MenubarItemIndicator>
|
|
36
|
+
<Circle class="size-2 fill-current" />
|
|
37
|
+
</MenubarItemIndicator>
|
|
38
|
+
</span>
|
|
39
|
+
<slot />
|
|
40
|
+
</MenubarRadioItem>
|
|
41
|
+
</template>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { cn } from '../../../lib/utils'
|
|
3
|
+
import { MenubarSeparator, type MenubarSeparatorProps, useForwardProps } from 'reka-ui'
|
|
4
|
+
import { computed, type HTMLAttributes } from 'vue'
|
|
5
|
+
|
|
6
|
+
const props = defineProps<MenubarSeparatorProps & { class?: HTMLAttributes['class'] }>()
|
|
7
|
+
|
|
8
|
+
const delegatedProps = computed(() => {
|
|
9
|
+
const { class: _, ...delegated } = props
|
|
10
|
+
|
|
11
|
+
return delegated
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<MenubarSeparator
|
|
19
|
+
data-slot="menubar-separator"
|
|
20
|
+
:class=" cn('bg-border -mx-1 my-1 h-px', props.class)"
|
|
21
|
+
v-bind="forwardedProps"
|
|
22
|
+
/>
|
|
23
|
+
</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="menubar-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,22 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { MenubarSub, type MenubarSubEmits, useForwardPropsEmits } from 'reka-ui'
|
|
3
|
+
|
|
4
|
+
interface MenubarSubRootProps {
|
|
5
|
+
defaultOpen?: boolean
|
|
6
|
+
open?: boolean
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const props = defineProps<MenubarSubRootProps>()
|
|
10
|
+
const emits = defineEmits<MenubarSubEmits>()
|
|
11
|
+
|
|
12
|
+
const forwarded = useForwardPropsEmits(props, emits)
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<MenubarSub
|
|
17
|
+
data-slot="menubar-sub"
|
|
18
|
+
v-bind="forwarded"
|
|
19
|
+
>
|
|
20
|
+
<slot />
|
|
21
|
+
</MenubarSub>
|
|
22
|
+
</template>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { cn } from '../../../lib/utils'
|
|
3
|
+
import {
|
|
4
|
+
MenubarPortal,
|
|
5
|
+
MenubarSubContent,
|
|
6
|
+
type MenubarSubContentEmits,
|
|
7
|
+
type MenubarSubContentProps,
|
|
8
|
+
useForwardPropsEmits,
|
|
9
|
+
} from 'reka-ui'
|
|
10
|
+
import { computed, type HTMLAttributes } from 'vue'
|
|
11
|
+
|
|
12
|
+
const props = defineProps<MenubarSubContentProps & { class?: HTMLAttributes['class'] }>()
|
|
13
|
+
const emits = defineEmits<MenubarSubContentEmits>()
|
|
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
|
+
<MenubarPortal>
|
|
26
|
+
<MenubarSubContent
|
|
27
|
+
data-slot="menubar-sub-content"
|
|
28
|
+
v-bind="forwarded"
|
|
29
|
+
:class="
|
|
30
|
+
cn(
|
|
31
|
+
'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 min-w-[8rem] origin-(--reka-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg',
|
|
32
|
+
props.class,
|
|
33
|
+
)
|
|
34
|
+
"
|
|
35
|
+
>
|
|
36
|
+
<slot />
|
|
37
|
+
</MenubarSubContent>
|
|
38
|
+
</MenubarPortal>
|
|
39
|
+
</template>
|