@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,60 @@
|
|
|
1
|
+
import type { VariantProps } from 'class-variance-authority'
|
|
2
|
+
import type { HTMLAttributes } from 'vue'
|
|
3
|
+
import { cva } from 'class-variance-authority'
|
|
4
|
+
|
|
5
|
+
export interface SidebarProps {
|
|
6
|
+
side?: 'left' | 'right'
|
|
7
|
+
variant?: 'sidebar' | 'floating' | 'inset'
|
|
8
|
+
collapsible?: 'offcanvas' | 'icon' | 'none'
|
|
9
|
+
class?: HTMLAttributes['class']
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { default as Sidebar } from './Sidebar.vue'
|
|
13
|
+
export { default as SidebarContent } from './SidebarContent.vue'
|
|
14
|
+
export { default as SidebarFooter } from './SidebarFooter.vue'
|
|
15
|
+
export { default as SidebarGroup } from './SidebarGroup.vue'
|
|
16
|
+
export { default as SidebarGroupAction } from './SidebarGroupAction.vue'
|
|
17
|
+
export { default as SidebarGroupContent } from './SidebarGroupContent.vue'
|
|
18
|
+
export { default as SidebarGroupLabel } from './SidebarGroupLabel.vue'
|
|
19
|
+
export { default as SidebarHeader } from './SidebarHeader.vue'
|
|
20
|
+
export { default as SidebarInput } from './SidebarInput.vue'
|
|
21
|
+
export { default as SidebarInset } from './SidebarInset.vue'
|
|
22
|
+
export { default as SidebarMenu } from './SidebarMenu.vue'
|
|
23
|
+
export { default as SidebarMenuAction } from './SidebarMenuAction.vue'
|
|
24
|
+
export { default as SidebarMenuBadge } from './SidebarMenuBadge.vue'
|
|
25
|
+
export { default as SidebarMenuButton } from './SidebarMenuButton.vue'
|
|
26
|
+
export { default as SidebarMenuItem } from './SidebarMenuItem.vue'
|
|
27
|
+
export { default as SidebarMenuSkeleton } from './SidebarMenuSkeleton.vue'
|
|
28
|
+
export { default as SidebarMenuSub } from './SidebarMenuSub.vue'
|
|
29
|
+
export { default as SidebarMenuSubButton } from './SidebarMenuSubButton.vue'
|
|
30
|
+
export { default as SidebarMenuSubItem } from './SidebarMenuSubItem.vue'
|
|
31
|
+
export { default as SidebarProvider } from './SidebarProvider.vue'
|
|
32
|
+
export { default as SidebarRail } from './SidebarRail.vue'
|
|
33
|
+
export { default as SidebarSeparator } from './SidebarSeparator.vue'
|
|
34
|
+
export { default as SidebarTrigger } from './SidebarTrigger.vue'
|
|
35
|
+
|
|
36
|
+
export { useSidebar } from './utils'
|
|
37
|
+
|
|
38
|
+
export const sidebarMenuButtonVariants = cva(
|
|
39
|
+
'peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0',
|
|
40
|
+
{
|
|
41
|
+
variants: {
|
|
42
|
+
variant: {
|
|
43
|
+
default: 'hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',
|
|
44
|
+
outline:
|
|
45
|
+
'bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]',
|
|
46
|
+
},
|
|
47
|
+
size: {
|
|
48
|
+
default: 'h-8 text-sm',
|
|
49
|
+
sm: 'h-7 text-xs',
|
|
50
|
+
lg: 'h-12 text-sm group-data-[collapsible=icon]:p-0!',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
defaultVariants: {
|
|
54
|
+
variant: 'default',
|
|
55
|
+
size: 'default',
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
export type SidebarMenuButtonVariants = VariantProps<typeof sidebarMenuButtonVariants>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ComputedRef, Ref } from 'vue'
|
|
2
|
+
import { createContext } from 'reka-ui'
|
|
3
|
+
|
|
4
|
+
export const SIDEBAR_COOKIE_NAME = 'sidebar:state'
|
|
5
|
+
export const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7
|
|
6
|
+
export const SIDEBAR_WIDTH = '16rem'
|
|
7
|
+
export const SIDEBAR_WIDTH_MOBILE = '18rem'
|
|
8
|
+
export const SIDEBAR_WIDTH_ICON = '3rem'
|
|
9
|
+
export const SIDEBAR_KEYBOARD_SHORTCUT = 'b'
|
|
10
|
+
|
|
11
|
+
export const [useSidebar, provideSidebarContext] = createContext<{
|
|
12
|
+
state: ComputedRef<'expanded' | 'collapsed'>
|
|
13
|
+
open: Ref<boolean>
|
|
14
|
+
setOpen: (value: boolean) => void
|
|
15
|
+
isMobile: Ref<boolean>
|
|
16
|
+
openMobile: Ref<boolean>
|
|
17
|
+
setOpenMobile: (value: boolean) => void
|
|
18
|
+
toggleSidebar: () => void
|
|
19
|
+
}>('Sidebar')
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue'
|
|
3
|
+
import { cn } from '../../../lib/utils'
|
|
4
|
+
|
|
5
|
+
interface SkeletonProps {
|
|
6
|
+
class?: HTMLAttributes['class']
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const props = defineProps<SkeletonProps>()
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<div
|
|
14
|
+
data-slot="skeleton"
|
|
15
|
+
:class="cn('animate-pulse rounded-md bg-primary/10', props.class)"
|
|
16
|
+
/>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Skeleton } from './Skeleton.vue'
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { Toaster as Sonner, type ToasterProps } from 'vue-sonner'
|
|
3
|
+
|
|
4
|
+
const props = defineProps<ToasterProps>()
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<Sonner
|
|
9
|
+
class="toaster group"
|
|
10
|
+
v-bind="props"
|
|
11
|
+
:style="{
|
|
12
|
+
'--normal-bg': 'var(--popover)',
|
|
13
|
+
'--normal-text': 'var(--popover-foreground)',
|
|
14
|
+
'--normal-border': 'var(--border)',
|
|
15
|
+
|
|
16
|
+
}"
|
|
17
|
+
/>
|
|
18
|
+
</template>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Toaster } from './Sonner.vue'
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref } from "vue";
|
|
3
|
+
import { Motion, MotionConfig } from "motion-v";
|
|
4
|
+
|
|
5
|
+
interface CalendarEvent {
|
|
6
|
+
title: string;
|
|
7
|
+
day: string;
|
|
8
|
+
time: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface CalendarDay {
|
|
12
|
+
month: string;
|
|
13
|
+
date: number;
|
|
14
|
+
day: string;
|
|
15
|
+
events?: CalendarEvent[];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const props = defineProps<{
|
|
19
|
+
calendarData: CalendarDay[];
|
|
20
|
+
initialIndex?: number;
|
|
21
|
+
}>();
|
|
22
|
+
|
|
23
|
+
const emit = defineEmits<{
|
|
24
|
+
(e: "update:activeIndex", value: number): void;
|
|
25
|
+
}>();
|
|
26
|
+
|
|
27
|
+
const activeIndex = ref(props.initialIndex ?? 0);
|
|
28
|
+
|
|
29
|
+
function setActive(index: number) {
|
|
30
|
+
activeIndex.value = index;
|
|
31
|
+
emit("update:activeIndex", index);
|
|
32
|
+
}
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<template>
|
|
36
|
+
<MotionConfig :transition="{ duration: 0.7, type: 'spring', bounce: 0.5 }">
|
|
37
|
+
<Motion
|
|
38
|
+
layout
|
|
39
|
+
as="div"
|
|
40
|
+
class="flex w-full flex-col gap-6 overflow-hidden rounded-3xl border bg-muted/50 p-8"
|
|
41
|
+
:animate="{
|
|
42
|
+
height: calendarData[activeIndex].events ? 'auto' : 'fit',
|
|
43
|
+
}"
|
|
44
|
+
>
|
|
45
|
+
<TextMorph
|
|
46
|
+
:text="calendarData[activeIndex].day"
|
|
47
|
+
class="w-fit font-bold"
|
|
48
|
+
:morph-time="0.5"
|
|
49
|
+
:cool-down-time="0.1"
|
|
50
|
+
/>
|
|
51
|
+
|
|
52
|
+
<Motion
|
|
53
|
+
v-if="calendarData[activeIndex].events"
|
|
54
|
+
:key="'event-container' + Math.random()"
|
|
55
|
+
layout
|
|
56
|
+
as="div"
|
|
57
|
+
class="flex flex-col gap-4"
|
|
58
|
+
:initial="{ x: 10, opacity: 0 }"
|
|
59
|
+
:animate="{ x: 0, opacity: 1 }"
|
|
60
|
+
>
|
|
61
|
+
<Motion
|
|
62
|
+
as="div"
|
|
63
|
+
class="flex items-center gap-2"
|
|
64
|
+
layout
|
|
65
|
+
:initial="{ x: 10, opacity: 0 }"
|
|
66
|
+
:animate="{ x: 0, opacity: 1 }"
|
|
67
|
+
>
|
|
68
|
+
<Icon name="lucide:calendar" />
|
|
69
|
+
<span class="font-medium">Upcoming Events</span>
|
|
70
|
+
</Motion>
|
|
71
|
+
|
|
72
|
+
<div class="flex flex-wrap gap-4">
|
|
73
|
+
<Motion
|
|
74
|
+
v-for="event in calendarData[activeIndex].events"
|
|
75
|
+
:key="event.title + event.time + Math.random()"
|
|
76
|
+
as="div"
|
|
77
|
+
layout
|
|
78
|
+
class="w-full max-w-44 rounded-lg border p-3"
|
|
79
|
+
:initial="{ x: 10, opacity: 0 }"
|
|
80
|
+
:animate="{ x: 0, opacity: 1 }"
|
|
81
|
+
>
|
|
82
|
+
<p class="text-sm font-medium">{{ event.title }}</p>
|
|
83
|
+
<p class="text-xs text-muted-foreground">{{ event.day }}, {{ event.time }}</p>
|
|
84
|
+
</Motion>
|
|
85
|
+
</div>
|
|
86
|
+
</Motion>
|
|
87
|
+
|
|
88
|
+
<div class="flex flex-wrap gap-3">
|
|
89
|
+
<Motion
|
|
90
|
+
v-for="(day, index) in calendarData"
|
|
91
|
+
:key="day.date + '-' + index"
|
|
92
|
+
as="button"
|
|
93
|
+
layout
|
|
94
|
+
class="flex flex-col rounded-2xl border border-border p-3 text-center opacity-100 duration-200 hover:bg-muted-foreground/10"
|
|
95
|
+
:class="activeIndex === index ? 'bg-muted-foreground/5' : ''"
|
|
96
|
+
:while-hover="{ scale: 1.1 }"
|
|
97
|
+
:while-press="{ scale: 0.8 }"
|
|
98
|
+
:transition="{ duration: 0.01 }"
|
|
99
|
+
@click="setActive(index)"
|
|
100
|
+
>
|
|
101
|
+
<span class="text-xs font-medium uppercase">{{ day.month }}</span>
|
|
102
|
+
<span class="font-semibold">{{ day.date }}</span>
|
|
103
|
+
<span class="text-xs font-medium uppercase text-primary duration-200">
|
|
104
|
+
{{ day.day }}
|
|
105
|
+
</span>
|
|
106
|
+
</Motion>
|
|
107
|
+
</div>
|
|
108
|
+
</Motion>
|
|
109
|
+
</MotionConfig>
|
|
110
|
+
</template>
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { ref, watch, onMounted, onUnmounted } from "vue";
|
|
3
|
+
import { cn } from "@/lib/utils";
|
|
4
|
+
|
|
5
|
+
const TEXT_CLASSES = "absolute inset-x-0 top-0 m-auto inline-block w-full";
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
class?: string;
|
|
9
|
+
text: string;
|
|
10
|
+
morphTime?: number;
|
|
11
|
+
coolDownTime?: number;
|
|
12
|
+
}
|
|
13
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
14
|
+
morphTime: 1.5,
|
|
15
|
+
coolDownTime: 0.5,
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
const text1Ref = ref<HTMLSpanElement>();
|
|
19
|
+
const text2Ref = ref<HTMLSpanElement>();
|
|
20
|
+
|
|
21
|
+
const previousText = ref(props.text);
|
|
22
|
+
const currentText = ref(props.text);
|
|
23
|
+
const morph = ref(0);
|
|
24
|
+
const coolDown = ref(0);
|
|
25
|
+
const time = ref(new Date());
|
|
26
|
+
|
|
27
|
+
const isAnimating = ref(false);
|
|
28
|
+
|
|
29
|
+
let animationFrameId: number = 0;
|
|
30
|
+
|
|
31
|
+
function setStyles(fraction: number) {
|
|
32
|
+
if (!text1Ref.value || !text2Ref.value) return;
|
|
33
|
+
|
|
34
|
+
text2Ref.value.textContent = currentText.value;
|
|
35
|
+
text1Ref.value.textContent = previousText.value;
|
|
36
|
+
|
|
37
|
+
text2Ref.value.style.filter = `blur(${Math.min(8 / fraction - 8, 100)}px)`;
|
|
38
|
+
text2Ref.value.style.opacity = `${Math.pow(fraction, 0.4) * 100}%`;
|
|
39
|
+
|
|
40
|
+
const invertedFraction = 1 - fraction;
|
|
41
|
+
text1Ref.value.style.filter = `blur(${Math.min(8 / invertedFraction - 8, 100)}px)`;
|
|
42
|
+
text1Ref.value.style.opacity = `${Math.pow(invertedFraction, 0.4) * 100}%`;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function doMorph() {
|
|
46
|
+
morph.value -= coolDown.value;
|
|
47
|
+
coolDown.value = 0;
|
|
48
|
+
|
|
49
|
+
let fraction = morph.value / props.morphTime;
|
|
50
|
+
|
|
51
|
+
if (fraction > 1) {
|
|
52
|
+
coolDown.value = props.coolDownTime;
|
|
53
|
+
fraction = 1;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
setStyles(fraction);
|
|
57
|
+
|
|
58
|
+
if (fraction === 1) {
|
|
59
|
+
previousText.value = currentText.value;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function doCoolDown() {
|
|
64
|
+
morph.value = 0;
|
|
65
|
+
|
|
66
|
+
if (text1Ref.value && text2Ref.value) {
|
|
67
|
+
text2Ref.value.style.filter = "none";
|
|
68
|
+
text2Ref.value.style.opacity = "100%";
|
|
69
|
+
text1Ref.value.style.filter = "none";
|
|
70
|
+
text1Ref.value.style.opacity = "0%";
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function animate() {
|
|
75
|
+
animationFrameId = requestAnimationFrame(animate);
|
|
76
|
+
|
|
77
|
+
const newTime = new Date();
|
|
78
|
+
const dt = (newTime.getTime() - time.value.getTime()) / 1000;
|
|
79
|
+
time.value = newTime;
|
|
80
|
+
|
|
81
|
+
coolDown.value -= dt;
|
|
82
|
+
|
|
83
|
+
if (coolDown.value <= 0) {
|
|
84
|
+
doMorph();
|
|
85
|
+
|
|
86
|
+
// Stop if morphing is done
|
|
87
|
+
if (coolDown.value > 0) {
|
|
88
|
+
cancelAnimationFrame(animationFrameId);
|
|
89
|
+
isAnimating.value = false;
|
|
90
|
+
}
|
|
91
|
+
} else {
|
|
92
|
+
doCoolDown();
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
watch(
|
|
97
|
+
() => props.text,
|
|
98
|
+
(newText) => {
|
|
99
|
+
if (newText !== currentText.value) {
|
|
100
|
+
previousText.value = currentText.value;
|
|
101
|
+
currentText.value = newText;
|
|
102
|
+
morph.value = 0;
|
|
103
|
+
coolDown.value = 0;
|
|
104
|
+
time.value = new Date();
|
|
105
|
+
|
|
106
|
+
if (!isAnimating.value) {
|
|
107
|
+
isAnimating.value = true;
|
|
108
|
+
animate();
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
onMounted(() => {
|
|
115
|
+
animate();
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
onUnmounted(() => {
|
|
119
|
+
cancelAnimationFrame(animationFrameId);
|
|
120
|
+
});
|
|
121
|
+
</script>
|
|
122
|
+
|
|
123
|
+
<template>
|
|
124
|
+
<div
|
|
125
|
+
:class="
|
|
126
|
+
cn(
|
|
127
|
+
'relative h-16 w-full max-w-screen-md text-center text-[40pt] font-bold leading-none [filter:url(#threshold)_blur(0.6px)]',
|
|
128
|
+
props.class,
|
|
129
|
+
)
|
|
130
|
+
"
|
|
131
|
+
>
|
|
132
|
+
<span
|
|
133
|
+
ref="text1Ref"
|
|
134
|
+
:class="cn(TEXT_CLASSES)"
|
|
135
|
+
/>
|
|
136
|
+
<span
|
|
137
|
+
ref="text2Ref"
|
|
138
|
+
:class="cn(TEXT_CLASSES)"
|
|
139
|
+
/>
|
|
140
|
+
|
|
141
|
+
<svg
|
|
142
|
+
id="filters"
|
|
143
|
+
class="fixed size-0"
|
|
144
|
+
preserveAspectRatio="xMidYMid slice"
|
|
145
|
+
>
|
|
146
|
+
<defs>
|
|
147
|
+
<filter id="threshold">
|
|
148
|
+
<feColorMatrix
|
|
149
|
+
in="SourceGraphic"
|
|
150
|
+
type="matrix"
|
|
151
|
+
values="1 0 0 0 0
|
|
152
|
+
0 1 0 0 0
|
|
153
|
+
0 0 1 0 0
|
|
154
|
+
0 0 0 255 -140"
|
|
155
|
+
/>
|
|
156
|
+
</filter>
|
|
157
|
+
</defs>
|
|
158
|
+
</svg>
|
|
159
|
+
</div>
|
|
160
|
+
</template>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { cn } from '../../../lib/utils'
|
|
3
|
+
import {
|
|
4
|
+
SwitchRoot,
|
|
5
|
+
type SwitchRootEmits,
|
|
6
|
+
type SwitchRootProps,
|
|
7
|
+
SwitchThumb,
|
|
8
|
+
useForwardPropsEmits,
|
|
9
|
+
} from 'reka-ui'
|
|
10
|
+
import { computed, type HTMLAttributes } from 'vue'
|
|
11
|
+
|
|
12
|
+
const props = defineProps<SwitchRootProps & { class?: HTMLAttributes['class'] }>()
|
|
13
|
+
|
|
14
|
+
const emits = defineEmits<SwitchRootEmits>()
|
|
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
|
+
<SwitchRoot
|
|
27
|
+
data-slot="switch"
|
|
28
|
+
v-bind="forwarded"
|
|
29
|
+
:class="cn(
|
|
30
|
+
'peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50',
|
|
31
|
+
props.class,
|
|
32
|
+
)"
|
|
33
|
+
>
|
|
34
|
+
<SwitchThumb
|
|
35
|
+
data-slot="switch-thumb"
|
|
36
|
+
:class="cn('bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0')"
|
|
37
|
+
>
|
|
38
|
+
<slot name="thumb" />
|
|
39
|
+
</SwitchThumb>
|
|
40
|
+
</SwitchRoot>
|
|
41
|
+
</template>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Switch } from './Switch.vue'
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
<div data-slot="table-container" class="relative w-full overflow-auto">
|
|
12
|
+
<table data-slot="table" :class="cn('w-full caption-bottom text-sm', props.class)">
|
|
13
|
+
<slot />
|
|
14
|
+
</table>
|
|
15
|
+
</div>
|
|
16
|
+
</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
|
+
<tbody
|
|
12
|
+
data-slot="table-body"
|
|
13
|
+
:class="cn('[&_tr:last-child]:border-0', props.class)"
|
|
14
|
+
>
|
|
15
|
+
<slot />
|
|
16
|
+
</tbody>
|
|
17
|
+
</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
|
+
<caption
|
|
12
|
+
data-slot="table-caption"
|
|
13
|
+
:class="cn('text-muted-foreground mt-4 text-sm', props.class)"
|
|
14
|
+
>
|
|
15
|
+
<slot />
|
|
16
|
+
</caption>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
<td
|
|
12
|
+
data-slot="table-cell"
|
|
13
|
+
:class="
|
|
14
|
+
cn(
|
|
15
|
+
'p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',
|
|
16
|
+
props.class,
|
|
17
|
+
)
|
|
18
|
+
"
|
|
19
|
+
>
|
|
20
|
+
<slot />
|
|
21
|
+
</td>
|
|
22
|
+
</template>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { cn } from '../../../lib/utils'
|
|
3
|
+
import { computed, type HTMLAttributes } from 'vue'
|
|
4
|
+
import TableCell from './TableCell.vue'
|
|
5
|
+
import TableRow from './TableRow.vue'
|
|
6
|
+
|
|
7
|
+
const props = withDefaults(defineProps<{
|
|
8
|
+
class?: HTMLAttributes['class']
|
|
9
|
+
colspan?: number
|
|
10
|
+
}>(), {
|
|
11
|
+
colspan: 1,
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
const delegatedProps = computed(() => {
|
|
15
|
+
const { class: _, ...delegated } = props
|
|
16
|
+
|
|
17
|
+
return delegated
|
|
18
|
+
})
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<template>
|
|
22
|
+
<TableRow>
|
|
23
|
+
<TableCell
|
|
24
|
+
:class="
|
|
25
|
+
cn(
|
|
26
|
+
'p-4 whitespace-nowrap align-middle text-sm text-foreground',
|
|
27
|
+
props.class,
|
|
28
|
+
)
|
|
29
|
+
"
|
|
30
|
+
v-bind="delegatedProps"
|
|
31
|
+
>
|
|
32
|
+
<div class="flex items-center justify-center py-10">
|
|
33
|
+
<slot />
|
|
34
|
+
</div>
|
|
35
|
+
</TableCell>
|
|
36
|
+
</TableRow>
|
|
37
|
+
</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
|
+
<tfoot
|
|
12
|
+
data-slot="table-footer"
|
|
13
|
+
:class="cn('bg-muted/50 border-t font-medium [&>tr]:last:border-b-0', props.class)"
|
|
14
|
+
>
|
|
15
|
+
<slot />
|
|
16
|
+
</tfoot>
|
|
17
|
+
</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
|
+
<th
|
|
12
|
+
data-slot="table-head"
|
|
13
|
+
:class="cn('text-muted-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]', props.class)"
|
|
14
|
+
>
|
|
15
|
+
<slot />
|
|
16
|
+
</th>
|
|
17
|
+
</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
|
+
<thead
|
|
12
|
+
data-slot="table-header"
|
|
13
|
+
:class="cn('[&_tr]:border-b', props.class)"
|
|
14
|
+
>
|
|
15
|
+
<slot />
|
|
16
|
+
</thead>
|
|
17
|
+
</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
|
+
<tr
|
|
12
|
+
data-slot="table-row"
|
|
13
|
+
:class="cn('hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors', props.class)"
|
|
14
|
+
>
|
|
15
|
+
<slot />
|
|
16
|
+
</tr>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { default as Table } from './Table.vue'
|
|
2
|
+
export { default as TableBody } from './TableBody.vue'
|
|
3
|
+
export { default as TableCaption } from './TableCaption.vue'
|
|
4
|
+
export { default as TableCell } from './TableCell.vue'
|
|
5
|
+
export { default as TableEmpty } from './TableEmpty.vue'
|
|
6
|
+
export { default as TableFooter } from './TableFooter.vue'
|
|
7
|
+
export { default as TableHead } from './TableHead.vue'
|
|
8
|
+
export { default as TableHeader } from './TableHeader.vue'
|
|
9
|
+
export { default as TableRow } from './TableRow.vue'
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Updater } from '@tanstack/vue-table'
|
|
2
|
+
import type { Ref } from 'vue'
|
|
3
|
+
|
|
4
|
+
export function valueUpdater<T extends Updater<any>>(updaterOrValue: T, ref: Ref) {
|
|
5
|
+
ref.value
|
|
6
|
+
= typeof updaterOrValue === 'function'
|
|
7
|
+
? updaterOrValue(ref.value)
|
|
8
|
+
: updaterOrValue
|
|
9
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { TabsRootEmits, TabsRootProps } from 'reka-ui'
|
|
3
|
+
import { TabsRoot, useForwardPropsEmits } from 'reka-ui'
|
|
4
|
+
|
|
5
|
+
const props = defineProps<TabsRootProps>()
|
|
6
|
+
const emits = defineEmits<TabsRootEmits>()
|
|
7
|
+
|
|
8
|
+
const forwarded = useForwardPropsEmits(props, emits)
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<TabsRoot v-bind="forwarded">
|
|
13
|
+
<slot />
|
|
14
|
+
</TabsRoot>
|
|
15
|
+
</template>
|