@polymarbot/nuxt-layer-shadcn-ui 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/assets/styles/animate.css +71 -0
- package/app/assets/styles/colors.css +116 -0
- package/app/assets/styles/globals.css +43 -0
- package/app/assets/styles/index.stories.ts +211 -0
- package/app/assets/styles/transition.css +34 -0
- package/app/assets/styles/utilities.css +26 -0
- package/app/components/shadcn/accordion/Accordion.vue +18 -0
- package/app/components/shadcn/accordion/AccordionContent.vue +23 -0
- package/app/components/shadcn/accordion/AccordionItem.vue +24 -0
- package/app/components/shadcn/accordion/AccordionTrigger.vue +37 -0
- package/app/components/shadcn/accordion/index.ts +4 -0
- package/app/components/shadcn/alert/Alert.vue +21 -0
- package/app/components/shadcn/alert/AlertDescription.vue +17 -0
- package/app/components/shadcn/alert/AlertTitle.vue +17 -0
- package/app/components/shadcn/alert/index.ts +24 -0
- package/app/components/shadcn/avatar/Avatar.vue +18 -0
- package/app/components/shadcn/avatar/AvatarFallback.vue +21 -0
- package/app/components/shadcn/avatar/AvatarImage.vue +16 -0
- package/app/components/shadcn/avatar/index.ts +3 -0
- package/app/components/shadcn/badge/Badge.vue +26 -0
- package/app/components/shadcn/badge/index.ts +26 -0
- package/app/components/shadcn/breadcrumb/Breadcrumb.vue +17 -0
- package/app/components/shadcn/breadcrumb/BreadcrumbEllipsis.vue +23 -0
- package/app/components/shadcn/breadcrumb/BreadcrumbItem.vue +17 -0
- package/app/components/shadcn/breadcrumb/BreadcrumbLink.vue +21 -0
- package/app/components/shadcn/breadcrumb/BreadcrumbList.vue +17 -0
- package/app/components/shadcn/breadcrumb/BreadcrumbPage.vue +20 -0
- package/app/components/shadcn/breadcrumb/BreadcrumbSeparator.vue +22 -0
- package/app/components/shadcn/breadcrumb/index.ts +7 -0
- package/app/components/shadcn/button/Button.vue +31 -0
- package/app/components/shadcn/button/index.ts +38 -0
- package/app/components/shadcn/card/Card.vue +22 -0
- package/app/components/shadcn/card/CardAction.vue +17 -0
- package/app/components/shadcn/card/CardContent.vue +17 -0
- package/app/components/shadcn/card/CardDescription.vue +17 -0
- package/app/components/shadcn/card/CardFooter.vue +17 -0
- package/app/components/shadcn/card/CardHeader.vue +17 -0
- package/app/components/shadcn/card/CardTitle.vue +17 -0
- package/app/components/shadcn/card/index.ts +7 -0
- package/app/components/shadcn/checkbox/Checkbox.vue +35 -0
- package/app/components/shadcn/checkbox/index.ts +1 -0
- package/app/components/shadcn/collapsible/Collapsible.vue +19 -0
- package/app/components/shadcn/collapsible/CollapsibleContent.vue +15 -0
- package/app/components/shadcn/collapsible/CollapsibleTrigger.vue +15 -0
- package/app/components/shadcn/collapsible/index.ts +3 -0
- package/app/components/shadcn/command/Command.vue +87 -0
- package/app/components/shadcn/command/CommandDialog.vue +31 -0
- package/app/components/shadcn/command/CommandEmpty.vue +27 -0
- package/app/components/shadcn/command/CommandGroup.vue +45 -0
- package/app/components/shadcn/command/CommandInput.vue +39 -0
- package/app/components/shadcn/command/CommandItem.vue +76 -0
- package/app/components/shadcn/command/CommandList.vue +25 -0
- package/app/components/shadcn/command/CommandSeparator.vue +21 -0
- package/app/components/shadcn/command/CommandShortcut.vue +17 -0
- package/app/components/shadcn/command/index.ts +25 -0
- package/app/components/shadcn/dialog/Dialog.vue +19 -0
- package/app/components/shadcn/dialog/DialogClose.vue +15 -0
- package/app/components/shadcn/dialog/DialogContent.vue +53 -0
- package/app/components/shadcn/dialog/DialogDescription.vue +23 -0
- package/app/components/shadcn/dialog/DialogFooter.vue +27 -0
- package/app/components/shadcn/dialog/DialogHeader.vue +17 -0
- package/app/components/shadcn/dialog/DialogOverlay.vue +21 -0
- package/app/components/shadcn/dialog/DialogScrollContent.vue +59 -0
- package/app/components/shadcn/dialog/DialogTitle.vue +23 -0
- package/app/components/shadcn/dialog/DialogTrigger.vue +15 -0
- package/app/components/shadcn/dialog/index.ts +10 -0
- package/app/components/shadcn/dropdown-menu/DropdownMenu.vue +19 -0
- package/app/components/shadcn/dropdown-menu/DropdownMenuCheckboxItem.vue +39 -0
- package/app/components/shadcn/dropdown-menu/DropdownMenuContent.vue +39 -0
- package/app/components/shadcn/dropdown-menu/DropdownMenuGroup.vue +15 -0
- package/app/components/shadcn/dropdown-menu/DropdownMenuItem.vue +31 -0
- package/app/components/shadcn/dropdown-menu/DropdownMenuLabel.vue +23 -0
- package/app/components/shadcn/dropdown-menu/DropdownMenuRadioGroup.vue +21 -0
- package/app/components/shadcn/dropdown-menu/DropdownMenuRadioItem.vue +40 -0
- package/app/components/shadcn/dropdown-menu/DropdownMenuSeparator.vue +23 -0
- package/app/components/shadcn/dropdown-menu/DropdownMenuShortcut.vue +17 -0
- package/app/components/shadcn/dropdown-menu/DropdownMenuSub.vue +18 -0
- package/app/components/shadcn/dropdown-menu/DropdownMenuSubContent.vue +27 -0
- package/app/components/shadcn/dropdown-menu/DropdownMenuSubTrigger.vue +31 -0
- package/app/components/shadcn/dropdown-menu/DropdownMenuTrigger.vue +17 -0
- package/app/components/shadcn/dropdown-menu/index.ts +16 -0
- package/app/components/shadcn/field/Field.vue +25 -0
- package/app/components/shadcn/field/FieldContent.vue +20 -0
- package/app/components/shadcn/field/FieldDescription.vue +22 -0
- package/app/components/shadcn/field/FieldError.vue +53 -0
- package/app/components/shadcn/field/FieldGroup.vue +20 -0
- package/app/components/shadcn/field/FieldLabel.vue +23 -0
- package/app/components/shadcn/field/FieldLegend.vue +24 -0
- package/app/components/shadcn/field/FieldSeparator.vue +29 -0
- package/app/components/shadcn/field/FieldSet.vue +21 -0
- package/app/components/shadcn/field/FieldTitle.vue +20 -0
- package/app/components/shadcn/field/index.ts +39 -0
- package/app/components/shadcn/input/Input.vue +33 -0
- package/app/components/shadcn/input/index.ts +1 -0
- package/app/components/shadcn/input-group/InputGroup.vue +35 -0
- package/app/components/shadcn/input-group/InputGroupAddon.vue +36 -0
- package/app/components/shadcn/input-group/InputGroupButton.vue +29 -0
- package/app/components/shadcn/input-group/InputGroupInput.vue +19 -0
- package/app/components/shadcn/input-group/InputGroupText.vue +19 -0
- package/app/components/shadcn/input-group/InputGroupTextarea.vue +19 -0
- package/app/components/shadcn/input-group/index.ts +51 -0
- package/app/components/shadcn/label/Label.vue +26 -0
- package/app/components/shadcn/label/index.ts +1 -0
- package/app/components/shadcn/number-field/NumberField.vue +20 -0
- package/app/components/shadcn/number-field/NumberFieldContent.vue +14 -0
- package/app/components/shadcn/number-field/NumberFieldDecrement.vue +22 -0
- package/app/components/shadcn/number-field/NumberFieldIncrement.vue +22 -0
- package/app/components/shadcn/number-field/NumberFieldInput.vue +16 -0
- package/app/components/shadcn/number-field/index.ts +5 -0
- package/app/components/shadcn/pagination/Pagination.vue +26 -0
- package/app/components/shadcn/pagination/PaginationContent.vue +22 -0
- package/app/components/shadcn/pagination/PaginationEllipsis.vue +25 -0
- package/app/components/shadcn/pagination/PaginationFirst.vue +33 -0
- package/app/components/shadcn/pagination/PaginationItem.vue +34 -0
- package/app/components/shadcn/pagination/PaginationLast.vue +33 -0
- package/app/components/shadcn/pagination/PaginationNext.vue +33 -0
- package/app/components/shadcn/pagination/PaginationPrevious.vue +33 -0
- package/app/components/shadcn/pagination/index.ts +8 -0
- package/app/components/shadcn/pin-input/PinInput.vue +26 -0
- package/app/components/shadcn/pin-input/PinInputGroup.vue +21 -0
- package/app/components/shadcn/pin-input/PinInputSeparator.vue +19 -0
- package/app/components/shadcn/pin-input/PinInputSlot.vue +21 -0
- package/app/components/shadcn/pin-input/index.ts +4 -0
- package/app/components/shadcn/popover/Popover.vue +19 -0
- package/app/components/shadcn/popover/PopoverAnchor.vue +15 -0
- package/app/components/shadcn/popover/PopoverContent.vue +45 -0
- package/app/components/shadcn/popover/PopoverTrigger.vue +15 -0
- package/app/components/shadcn/popover/index.ts +4 -0
- package/app/components/shadcn/progress/Progress.vue +38 -0
- package/app/components/shadcn/progress/index.ts +1 -0
- package/app/components/shadcn/radio-group/RadioGroup.vue +25 -0
- package/app/components/shadcn/radio-group/RadioGroupItem.vue +40 -0
- package/app/components/shadcn/radio-group/index.ts +2 -0
- package/app/components/shadcn/scroll-area/ScrollArea.vue +33 -0
- package/app/components/shadcn/scroll-area/ScrollBar.vue +32 -0
- package/app/components/shadcn/scroll-area/index.ts +2 -0
- package/app/components/shadcn/select/Select.vue +19 -0
- package/app/components/shadcn/select/SelectContent.vue +51 -0
- package/app/components/shadcn/select/SelectGroup.vue +15 -0
- package/app/components/shadcn/select/SelectItem.vue +44 -0
- package/app/components/shadcn/select/SelectItemText.vue +15 -0
- package/app/components/shadcn/select/SelectLabel.vue +17 -0
- package/app/components/shadcn/select/SelectScrollDownButton.vue +26 -0
- package/app/components/shadcn/select/SelectScrollUpButton.vue +26 -0
- package/app/components/shadcn/select/SelectSeparator.vue +19 -0
- package/app/components/shadcn/select/SelectTrigger.vue +33 -0
- package/app/components/shadcn/select/SelectValue.vue +15 -0
- package/app/components/shadcn/select/index.ts +11 -0
- package/app/components/shadcn/separator/Separator.vue +29 -0
- package/app/components/shadcn/separator/index.ts +1 -0
- package/app/components/shadcn/sheet/Sheet.vue +19 -0
- package/app/components/shadcn/sheet/SheetClose.vue +15 -0
- package/app/components/shadcn/sheet/SheetContent.vue +62 -0
- package/app/components/shadcn/sheet/SheetDescription.vue +21 -0
- package/app/components/shadcn/sheet/SheetFooter.vue +16 -0
- package/app/components/shadcn/sheet/SheetHeader.vue +15 -0
- package/app/components/shadcn/sheet/SheetOverlay.vue +21 -0
- package/app/components/shadcn/sheet/SheetTitle.vue +21 -0
- package/app/components/shadcn/sheet/SheetTrigger.vue +15 -0
- package/app/components/shadcn/sheet/index.ts +8 -0
- package/app/components/shadcn/sidebar/Sidebar.vue +96 -0
- package/app/components/shadcn/sidebar/SidebarContent.vue +18 -0
- package/app/components/shadcn/sidebar/SidebarFooter.vue +18 -0
- package/app/components/shadcn/sidebar/SidebarGroup.vue +18 -0
- package/app/components/shadcn/sidebar/SidebarGroupAction.vue +27 -0
- package/app/components/shadcn/sidebar/SidebarGroupContent.vue +18 -0
- package/app/components/shadcn/sidebar/SidebarGroupLabel.vue +25 -0
- package/app/components/shadcn/sidebar/SidebarHeader.vue +18 -0
- package/app/components/shadcn/sidebar/SidebarInput.vue +22 -0
- package/app/components/shadcn/sidebar/SidebarInset.vue +21 -0
- package/app/components/shadcn/sidebar/SidebarMenu.vue +18 -0
- package/app/components/shadcn/sidebar/SidebarMenuAction.vue +35 -0
- package/app/components/shadcn/sidebar/SidebarMenuBadge.vue +26 -0
- package/app/components/shadcn/sidebar/SidebarMenuButton.vue +48 -0
- package/app/components/shadcn/sidebar/SidebarMenuButtonChild.vue +36 -0
- package/app/components/shadcn/sidebar/SidebarMenuItem.vue +18 -0
- package/app/components/shadcn/sidebar/SidebarMenuSkeleton.vue +35 -0
- package/app/components/shadcn/sidebar/SidebarMenuSub.vue +22 -0
- package/app/components/shadcn/sidebar/SidebarMenuSubButton.vue +36 -0
- package/app/components/shadcn/sidebar/SidebarMenuSubItem.vue +18 -0
- package/app/components/shadcn/sidebar/SidebarProvider.vue +82 -0
- package/app/components/shadcn/sidebar/SidebarRail.vue +33 -0
- package/app/components/shadcn/sidebar/SidebarSeparator.vue +19 -0
- package/app/components/shadcn/sidebar/SidebarTrigger.vue +27 -0
- package/app/components/shadcn/sidebar/index.ts +60 -0
- package/app/components/shadcn/sidebar/utils.ts +19 -0
- package/app/components/shadcn/skeleton/Skeleton.vue +17 -0
- package/app/components/shadcn/skeleton/index.ts +1 -0
- package/app/components/shadcn/slider/Slider.vue +43 -0
- package/app/components/shadcn/slider/index.ts +1 -0
- package/app/components/shadcn/sonner/Sonner.vue +42 -0
- package/app/components/shadcn/sonner/index.ts +1 -0
- package/app/components/shadcn/switch/Switch.vue +38 -0
- package/app/components/shadcn/switch/index.ts +1 -0
- package/app/components/shadcn/table/Table.vue +16 -0
- package/app/components/shadcn/table/TableBody.vue +17 -0
- package/app/components/shadcn/table/TableCaption.vue +17 -0
- package/app/components/shadcn/table/TableCell.vue +22 -0
- package/app/components/shadcn/table/TableEmpty.vue +34 -0
- package/app/components/shadcn/table/TableFooter.vue +17 -0
- package/app/components/shadcn/table/TableHead.vue +17 -0
- package/app/components/shadcn/table/TableHeader.vue +17 -0
- package/app/components/shadcn/table/TableRow.vue +17 -0
- package/app/components/shadcn/table/index.ts +9 -0
- package/app/components/shadcn/table/utils.ts +10 -0
- package/app/components/shadcn/tabs/Tabs.vue +24 -0
- package/app/components/shadcn/tabs/TabsContent.vue +21 -0
- package/app/components/shadcn/tabs/TabsList.vue +24 -0
- package/app/components/shadcn/tabs/TabsTrigger.vue +26 -0
- package/app/components/shadcn/tabs/index.ts +4 -0
- package/app/components/shadcn/textarea/Textarea.vue +28 -0
- package/app/components/shadcn/textarea/index.ts +1 -0
- package/app/components/shadcn/toggle/Toggle.vue +35 -0
- package/app/components/shadcn/toggle/index.ts +28 -0
- package/app/components/shadcn/toggle-group/ToggleGroup.vue +49 -0
- package/app/components/shadcn/toggle-group/ToggleGroupItem.vue +46 -0
- package/app/components/shadcn/toggle-group/index.ts +2 -0
- package/app/components/shadcn/tooltip/Tooltip.vue +19 -0
- package/app/components/shadcn/tooltip/TooltipContent.vue +34 -0
- package/app/components/shadcn/tooltip/TooltipProvider.vue +14 -0
- package/app/components/shadcn/tooltip/TooltipTrigger.vue +15 -0
- package/app/components/shadcn/tooltip/index.ts +4 -0
- package/app/components/ui/Accordion/index.stories.ts +108 -0
- package/app/components/ui/Accordion/index.vue +80 -0
- package/app/components/ui/Accordion/types.ts +27 -0
- package/app/components/ui/Alert/index.stories.ts +53 -0
- package/app/components/ui/Alert/index.vue +61 -0
- package/app/components/ui/Alert/types.ts +9 -0
- package/app/components/ui/AlertDialog/index.stories.ts +108 -0
- package/app/components/ui/AlertDialog/index.vue +25 -0
- package/app/components/ui/AsyncDataTable/en.json +3 -0
- package/app/components/ui/AsyncDataTable/index.stories.ts +141 -0
- package/app/components/ui/AsyncDataTable/index.vue +312 -0
- package/app/components/ui/AsyncDataTable/types.ts +53 -0
- package/app/components/ui/Avatar/index.stories.ts +84 -0
- package/app/components/ui/Avatar/index.vue +52 -0
- package/app/components/ui/Avatar/types.ts +8 -0
- package/app/components/ui/Badge/index.stories.ts +67 -0
- package/app/components/ui/Badge/index.vue +12 -0
- package/app/components/ui/Badge/types.ts +3 -0
- package/app/components/ui/Breadcrumb/index.stories.ts +52 -0
- package/app/components/ui/Breadcrumb/index.vue +61 -0
- package/app/components/ui/Breadcrumb/types.ts +11 -0
- package/app/components/ui/Button/index.stories.ts +145 -0
- package/app/components/ui/Button/index.vue +63 -0
- package/app/components/ui/Button/types.ts +14 -0
- package/app/components/ui/ButtonGroup/index.stories.ts +75 -0
- package/app/components/ui/ButtonGroup/index.vue +22 -0
- package/app/components/ui/ButtonGroup/types.ts +3 -0
- package/app/components/ui/Card/index.stories.ts +65 -0
- package/app/components/ui/Card/index.vue +28 -0
- package/app/components/ui/Card/types.ts +3 -0
- package/app/components/ui/Checkbox/index.stories.ts +68 -0
- package/app/components/ui/Checkbox/index.vue +23 -0
- package/app/components/ui/Checkbox/types.ts +3 -0
- package/app/components/ui/CopyButton/en.json +4 -0
- package/app/components/ui/CopyButton/index.stories.ts +55 -0
- package/app/components/ui/CopyButton/index.vue +98 -0
- package/app/components/ui/CopyButton/types.ts +10 -0
- package/app/components/ui/DataTable/en.json +3 -0
- package/app/components/ui/DataTable/index.stories.ts +231 -0
- package/app/components/ui/DataTable/index.vue +505 -0
- package/app/components/ui/DataTable/types.ts +42 -0
- package/app/components/ui/DatePicker/en.json +9 -0
- package/app/components/ui/DatePicker/index.stories.ts +70 -0
- package/app/components/ui/DatePicker/index.vue +127 -0
- package/app/components/ui/DatePicker/style.css +88 -0
- package/app/components/ui/DatePicker/types.ts +41 -0
- package/app/components/ui/DateRangePicker/en.json +5 -0
- package/app/components/ui/DateRangePicker/index.stories.ts +67 -0
- package/app/components/ui/DateRangePicker/index.vue +138 -0
- package/app/components/ui/DateRangePicker/types.ts +31 -0
- package/app/components/ui/Divider/index.stories.ts +42 -0
- package/app/components/ui/Divider/index.vue +16 -0
- package/app/components/ui/Divider/types.ts +3 -0
- package/app/components/ui/Drawer/index.stories.ts +124 -0
- package/app/components/ui/Drawer/index.vue +197 -0
- package/app/components/ui/Drawer/types.ts +22 -0
- package/app/components/ui/Dropdown/index.stories.ts +145 -0
- package/app/components/ui/Dropdown/index.vue +258 -0
- package/app/components/ui/Dropdown/types.ts +87 -0
- package/app/components/ui/FormItem/index.stories.ts +70 -0
- package/app/components/ui/FormItem/index.vue +56 -0
- package/app/components/ui/FormItem/types.ts +14 -0
- package/app/components/ui/Help/index.stories.ts +54 -0
- package/app/components/ui/Help/index.vue +35 -0
- package/app/components/ui/Help/types.ts +8 -0
- package/app/components/ui/Icon/index.stories.ts +68 -0
- package/app/components/ui/Icon/index.vue +30 -0
- package/app/components/ui/Icon/types.ts +5 -0
- package/app/components/ui/Input/index.stories.ts +73 -0
- package/app/components/ui/Input/index.vue +92 -0
- package/app/components/ui/Input/types.ts +9 -0
- package/app/components/ui/InputCurrency/index.stories.ts +75 -0
- package/app/components/ui/InputCurrency/index.vue +31 -0
- package/app/components/ui/InputCurrency/types.ts +4 -0
- package/app/components/ui/InputNumber/index.stories.ts +56 -0
- package/app/components/ui/InputNumber/index.vue +76 -0
- package/app/components/ui/InputNumber/types.ts +10 -0
- package/app/components/ui/InputOtp/index.stories.ts +39 -0
- package/app/components/ui/InputOtp/index.vue +45 -0
- package/app/components/ui/InputOtp/types.ts +5 -0
- package/app/components/ui/InputPercent/index.stories.ts +32 -0
- package/app/components/ui/InputPercent/index.vue +8 -0
- package/app/components/ui/InputRange/index.stories.ts +37 -0
- package/app/components/ui/InputRange/index.vue +49 -0
- package/app/components/ui/InputRange/types.ts +8 -0
- package/app/components/ui/Loading/index.stories.ts +36 -0
- package/app/components/ui/Loading/index.vue +15 -0
- package/app/components/ui/Loading/types.ts +3 -0
- package/app/components/ui/Markdown/index.stories.ts +52 -0
- package/app/components/ui/Markdown/index.vue +22 -0
- package/app/components/ui/Markdown/themes/github.css +1248 -0
- package/app/components/ui/Markdown/types.ts +3 -0
- package/app/components/ui/Modal/index.stories.ts +124 -0
- package/app/components/ui/Modal/index.vue +202 -0
- package/app/components/ui/Modal/types.ts +23 -0
- package/app/components/ui/ModalContent/index.stories.ts +47 -0
- package/app/components/ui/ModalContent/index.vue +79 -0
- package/app/components/ui/ModalContent/types.ts +9 -0
- package/app/components/ui/PageCard/index.stories.ts +106 -0
- package/app/components/ui/PageCard/index.vue +135 -0
- package/app/components/ui/PageCard/types.ts +16 -0
- package/app/components/ui/Pagination/en.json +3 -0
- package/app/components/ui/Pagination/index.stories.ts +82 -0
- package/app/components/ui/Pagination/index.vue +173 -0
- package/app/components/ui/Pagination/types.ts +18 -0
- package/app/components/ui/Popover/index.stories.ts +67 -0
- package/app/components/ui/Popover/index.vue +21 -0
- package/app/components/ui/Popover/types.ts +5 -0
- package/app/components/ui/Qrcode/index.stories.ts +57 -0
- package/app/components/ui/Qrcode/index.vue +40 -0
- package/app/components/ui/Qrcode/types.ts +3 -0
- package/app/components/ui/Radio/index.stories.ts +71 -0
- package/app/components/ui/Radio/index.vue +10 -0
- package/app/components/ui/Radio/types.ts +3 -0
- package/app/components/ui/RadioCardGroup/index.stories.ts +90 -0
- package/app/components/ui/RadioCardGroup/index.vue +64 -0
- package/app/components/ui/RadioCardGroup/types.ts +13 -0
- package/app/components/ui/ScrollArea/index.stories.ts +66 -0
- package/app/components/ui/ScrollArea/index.vue +64 -0
- package/app/components/ui/ScrollArea/types.ts +5 -0
- package/app/components/ui/SearchSelect/en.json +5 -0
- package/app/components/ui/SearchSelect/index.stories.ts +126 -0
- package/app/components/ui/SearchSelect/index.vue +259 -0
- package/app/components/ui/SearchSelect/types.ts +39 -0
- package/app/components/ui/Select/en.json +6 -0
- package/app/components/ui/Select/index.stories.ts +128 -0
- package/app/components/ui/Select/index.vue +267 -0
- package/app/components/ui/Select/types.ts +34 -0
- package/app/components/ui/Skeleton/index.stories.ts +56 -0
- package/app/components/ui/Skeleton/index.vue +12 -0
- package/app/components/ui/Skeleton/types.ts +4 -0
- package/app/components/ui/Slider/index.stories.ts +60 -0
- package/app/components/ui/Slider/index.vue +27 -0
- package/app/components/ui/Slider/types.ts +5 -0
- package/app/components/ui/Surface/index.stories.ts +50 -0
- package/app/components/ui/Surface/index.vue +108 -0
- package/app/components/ui/Surface/types.ts +8 -0
- package/app/components/ui/Switch/index.stories.ts +32 -0
- package/app/components/ui/Switch/index.vue +10 -0
- package/app/components/ui/Switch/types.ts +3 -0
- package/app/components/ui/Tabs/index.stories.ts +116 -0
- package/app/components/ui/Tabs/index.vue +94 -0
- package/app/components/ui/Tabs/types.ts +19 -0
- package/app/components/ui/Tag/index.stories.ts +51 -0
- package/app/components/ui/Tag/index.vue +108 -0
- package/app/components/ui/Tag/types.ts +8 -0
- package/app/components/ui/Textarea/index.stories.ts +35 -0
- package/app/components/ui/Textarea/index.vue +50 -0
- package/app/components/ui/Textarea/types.ts +8 -0
- package/app/components/ui/Toast/index.stories.ts +48 -0
- package/app/components/ui/Toast/index.vue +21 -0
- package/app/components/ui/Toast/types.ts +5 -0
- package/app/components/ui/Tooltip/index.stories.ts +62 -0
- package/app/components/ui/Tooltip/index.vue +72 -0
- package/app/components/ui/Tooltip/types.ts +7 -0
- package/app/components/ui/WebLink/index.stories.ts +59 -0
- package/app/components/ui/WebLink/index.vue +61 -0
- package/app/components/ui/WebLink/types.ts +11 -0
- package/app/composables/index.ts +9 -0
- package/app/composables/useDialog.ts +76 -0
- package/app/composables/useToast.ts +49 -0
- package/app/en.json +23 -0
- package/app/types/index.ts +7 -0
- package/app/utils/index.ts +6 -0
- package/i18n/messages/ar.json +65 -0
- package/i18n/messages/de.json +65 -0
- package/i18n/messages/en.json +65 -0
- package/i18n/messages/es.json +65 -0
- package/i18n/messages/fr.json +65 -0
- package/i18n/messages/hi.json +65 -0
- package/i18n/messages/id.json +65 -0
- package/i18n/messages/it.json +65 -0
- package/i18n/messages/ja.json +65 -0
- package/i18n/messages/ko.json +65 -0
- package/i18n/messages/nl.json +65 -0
- package/i18n/messages/pl.json +65 -0
- package/i18n/messages/pt.json +65 -0
- package/i18n/messages/ru.json +65 -0
- package/i18n/messages/th.json +65 -0
- package/i18n/messages/tr.json +65 -0
- package/i18n/messages/vi.json +65 -0
- package/i18n/messages/zh-CN.json +65 -0
- package/i18n/messages/zh-TW.json +65 -0
- package/i18n.config.ts +19 -0
- package/nuxt.config.ts +62 -0
- package/package.json +46 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { CopyButtonProps } from './types'
|
|
3
|
+
|
|
4
|
+
defineOptions({ inheritAttrs: false })
|
|
5
|
+
|
|
6
|
+
const props = defineProps<CopyButtonProps>()
|
|
7
|
+
|
|
8
|
+
const T = useTranslations('components.ui.CopyButton')
|
|
9
|
+
|
|
10
|
+
const isCopied = ref(false)
|
|
11
|
+
|
|
12
|
+
const tooltipText = computed(() => {
|
|
13
|
+
if (isCopied.value) {
|
|
14
|
+
return props.afterCopyText || T('copied')
|
|
15
|
+
}
|
|
16
|
+
return props.beforeCopyText || T('copyToClipboard')
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
async function copyToClipboard () {
|
|
20
|
+
if (!props.copy) return
|
|
21
|
+
|
|
22
|
+
try {
|
|
23
|
+
await navigator.clipboard.writeText(props.copy)
|
|
24
|
+
} catch (err) {
|
|
25
|
+
console.error('Clipboard API failed, falling back to execCommand:', err)
|
|
26
|
+
const textarea = document.createElement('textarea')
|
|
27
|
+
textarea.value = props.copy
|
|
28
|
+
textarea.style.position = 'absolute'
|
|
29
|
+
textarea.style.opacity = '0'
|
|
30
|
+
textarea.style.pointerEvents = 'none'
|
|
31
|
+
document.body.appendChild(textarea)
|
|
32
|
+
textarea.select()
|
|
33
|
+
document.execCommand('copy')
|
|
34
|
+
textarea.remove()
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
isCopied.value = true
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function resetCopiedState () {
|
|
41
|
+
// Delay reset until tooltip exit animation (150ms) completes
|
|
42
|
+
setTimeout(() => {
|
|
43
|
+
isCopied.value = false
|
|
44
|
+
}, 150)
|
|
45
|
+
}
|
|
46
|
+
</script>
|
|
47
|
+
|
|
48
|
+
<template>
|
|
49
|
+
<Tooltip
|
|
50
|
+
:text="tooltipText"
|
|
51
|
+
disableClosingTrigger
|
|
52
|
+
@close="resetCopiedState"
|
|
53
|
+
>
|
|
54
|
+
<Button
|
|
55
|
+
:size="$slots.default ? undefined : 'icon'"
|
|
56
|
+
v-bind="$attrs"
|
|
57
|
+
@click="copyToClipboard"
|
|
58
|
+
>
|
|
59
|
+
<div
|
|
60
|
+
v-if="$slots.default"
|
|
61
|
+
class="flex-1"
|
|
62
|
+
>
|
|
63
|
+
<slot />
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
<div class="pointer-events-none flex w-[1em] items-center justify-center">
|
|
67
|
+
<Transition
|
|
68
|
+
name="copy-icon-fade"
|
|
69
|
+
mode="out-in"
|
|
70
|
+
>
|
|
71
|
+
<Icon
|
|
72
|
+
v-if="isCopied"
|
|
73
|
+
key="check"
|
|
74
|
+
name="check"
|
|
75
|
+
/>
|
|
76
|
+
<Icon
|
|
77
|
+
v-else
|
|
78
|
+
key="copy"
|
|
79
|
+
name="copy"
|
|
80
|
+
/>
|
|
81
|
+
</Transition>
|
|
82
|
+
</div>
|
|
83
|
+
</Button>
|
|
84
|
+
</Tooltip>
|
|
85
|
+
</template>
|
|
86
|
+
|
|
87
|
+
<style scoped>
|
|
88
|
+
.copy-icon-fade-enter-active {
|
|
89
|
+
transition-duration: 200ms;
|
|
90
|
+
transition-property: opacity, transform;
|
|
91
|
+
transition-timing-function: ease;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.copy-icon-fade-enter-from {
|
|
95
|
+
opacity: 0;
|
|
96
|
+
transform: scale(0.5);
|
|
97
|
+
}
|
|
98
|
+
</style>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ButtonProps } from '../Button/types'
|
|
2
|
+
|
|
3
|
+
export interface CopyButtonProps extends /* @vue-ignore */ ButtonProps {
|
|
4
|
+
/** The text content to copy to clipboard */
|
|
5
|
+
copy?: string
|
|
6
|
+
/** Custom tooltip text shown before copy action */
|
|
7
|
+
beforeCopyText?: string
|
|
8
|
+
/** Custom tooltip text shown after successful copy */
|
|
9
|
+
afterCopyText?: string
|
|
10
|
+
}
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
|
+
import type { DataTableColumn } from './types'
|
|
3
|
+
import DataTableRaw from './index.vue'
|
|
4
|
+
|
|
5
|
+
// Cast generic component for Storybook compatibility
|
|
6
|
+
const DataTable = DataTableRaw as any
|
|
7
|
+
|
|
8
|
+
interface User {
|
|
9
|
+
id: number
|
|
10
|
+
name: string
|
|
11
|
+
email: string
|
|
12
|
+
role: string
|
|
13
|
+
status: string
|
|
14
|
+
amount: number
|
|
15
|
+
createdAt: string
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const sampleData: User[] = [
|
|
19
|
+
{ id: 1, name: 'Alice', email: 'alice@example.com', role: 'Admin', status: 'active', amount: 1234.56, createdAt: '2024-01-15T10:30:00Z' },
|
|
20
|
+
{ id: 2, name: 'Bob', email: 'bob@example.com', role: 'User', status: 'active', amount: 789.0, createdAt: '2024-02-20T14:15:00Z' },
|
|
21
|
+
{ id: 3, name: 'Charlie', email: 'charlie@example.com', role: 'Editor', status: 'inactive', amount: 2345.67, createdAt: '2024-03-10T09:00:00Z' },
|
|
22
|
+
{ id: 4, name: 'Diana', email: 'diana@example.com', role: 'Admin', status: 'active', amount: 456.78, createdAt: '2024-04-05T16:45:00Z' },
|
|
23
|
+
{ id: 5, name: 'Eve', email: 'eve@example.com', role: 'User', status: 'inactive', amount: 3456.89, createdAt: '2024-05-12T11:20:00Z' },
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
const basicColumns: DataTableColumn[] = [
|
|
27
|
+
{ field: 'name', title: 'Name', width: '120px' },
|
|
28
|
+
{ field: 'email', title: 'Email', minWidth: '200px' },
|
|
29
|
+
{ field: 'role', title: 'Role', width: '100px' },
|
|
30
|
+
{ field: 'status', title: 'Status', width: '100px' },
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
const meta = {
|
|
34
|
+
title: 'UI/DataTable',
|
|
35
|
+
component: DataTable,
|
|
36
|
+
argTypes: {
|
|
37
|
+
loading: { control: 'boolean' },
|
|
38
|
+
},
|
|
39
|
+
args: {
|
|
40
|
+
loading: false,
|
|
41
|
+
},
|
|
42
|
+
} satisfies Meta
|
|
43
|
+
|
|
44
|
+
export default meta
|
|
45
|
+
type Story = StoryObj<typeof meta>
|
|
46
|
+
|
|
47
|
+
export const Default: Story = {
|
|
48
|
+
render: args => ({
|
|
49
|
+
components: { DataTable },
|
|
50
|
+
setup () {
|
|
51
|
+
const singleSelection = ref(null)
|
|
52
|
+
const multipleSelection = ref([])
|
|
53
|
+
const sortBy = ref<string | null>(null)
|
|
54
|
+
const sortOrder = ref<number | null>(null)
|
|
55
|
+
|
|
56
|
+
const sortableColumns: DataTableColumn[] = [
|
|
57
|
+
{ field: 'name', title: 'Name', width: '120px', sortable: true },
|
|
58
|
+
{ field: 'email', title: 'Email', minWidth: '200px' },
|
|
59
|
+
{ field: 'role', title: 'Role', width: '100px', sortable: true },
|
|
60
|
+
{ field: 'amount', title: 'Amount', width: '120px', type: 'currency', sortable: true },
|
|
61
|
+
{ field: 'createdAt', title: 'Created', width: '140px', type: 'date', sortable: true },
|
|
62
|
+
]
|
|
63
|
+
|
|
64
|
+
const sortedData = computed(() => {
|
|
65
|
+
if (!sortBy.value || !sortOrder.value) return sampleData
|
|
66
|
+
return [ ...sampleData ].sort((a, b) => {
|
|
67
|
+
const av = a[sortBy.value as keyof User]
|
|
68
|
+
const bv = b[sortBy.value as keyof User]
|
|
69
|
+
if (av < bv) return -1 * sortOrder.value!
|
|
70
|
+
if (av > bv) return 1 * sortOrder.value!
|
|
71
|
+
return 0
|
|
72
|
+
})
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
const typeColumns: DataTableColumn[] = [
|
|
76
|
+
{ field: 'name', title: 'Name', width: '120px' },
|
|
77
|
+
{ field: 'amount', title: 'Amount', width: '120px', type: 'currency' },
|
|
78
|
+
{ field: 'createdAt', title: 'Date', width: '140px', type: 'date' },
|
|
79
|
+
{ field: 'status', title: 'Empty', width: '100px', type: 'empty' },
|
|
80
|
+
]
|
|
81
|
+
|
|
82
|
+
const slotColumns: DataTableColumn[] = [
|
|
83
|
+
{ field: 'name', title: 'Name', width: '120px' },
|
|
84
|
+
{ field: 'email', title: 'Email', minWidth: '200px' },
|
|
85
|
+
{ field: 'status', title: 'Status', width: '120px' },
|
|
86
|
+
{ field: 'amount', title: 'Amount', width: '120px' },
|
|
87
|
+
]
|
|
88
|
+
|
|
89
|
+
const frozenColumns: DataTableColumn[] = [
|
|
90
|
+
{ field: 'name', title: 'Name', width: '120px', fixed: 'left' },
|
|
91
|
+
{ field: 'email', title: 'Email', width: '250px', fixed: 'left' },
|
|
92
|
+
{ field: 'role', title: 'Role', width: '150px' },
|
|
93
|
+
{ field: 'status', title: 'Status', width: '150px' },
|
|
94
|
+
{ field: 'amount', title: 'Amount', width: '150px', type: 'currency' },
|
|
95
|
+
{ field: 'createdAt', title: 'Created', width: '180px', type: 'date' },
|
|
96
|
+
{ field: 'id', title: 'Actions', width: '100px', fixed: 'right' },
|
|
97
|
+
]
|
|
98
|
+
|
|
99
|
+
return {
|
|
100
|
+
args,
|
|
101
|
+
data: sampleData,
|
|
102
|
+
basicColumns,
|
|
103
|
+
sortableColumns,
|
|
104
|
+
typeColumns,
|
|
105
|
+
slotColumns,
|
|
106
|
+
frozenColumns,
|
|
107
|
+
singleSelection,
|
|
108
|
+
multipleSelection,
|
|
109
|
+
sortBy,
|
|
110
|
+
sortOrder,
|
|
111
|
+
sortedData,
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
template: `
|
|
115
|
+
<div class="w-full space-y-10">
|
|
116
|
+
<!-- Controlled -->
|
|
117
|
+
<section>
|
|
118
|
+
<h3 class="mb-4 text-lg font-medium">Controlled</h3>
|
|
119
|
+
<DataTable :data="data" :columns="basicColumns" v-bind="args" />
|
|
120
|
+
</section>
|
|
121
|
+
|
|
122
|
+
<!-- Single Selection -->
|
|
123
|
+
<section>
|
|
124
|
+
<h3 class="mb-4 text-lg font-medium">Single Selection</h3>
|
|
125
|
+
<DataTable
|
|
126
|
+
:data="data"
|
|
127
|
+
:columns="basicColumns"
|
|
128
|
+
selectionMode="single"
|
|
129
|
+
v-model:selection="singleSelection"
|
|
130
|
+
/>
|
|
131
|
+
<div class="mt-2 text-sm text-muted-foreground">
|
|
132
|
+
Selected: {{ singleSelection?.name ?? 'none' }}
|
|
133
|
+
</div>
|
|
134
|
+
</section>
|
|
135
|
+
|
|
136
|
+
<!-- Multiple Selection -->
|
|
137
|
+
<section>
|
|
138
|
+
<h3 class="mb-4 text-lg font-medium">Multiple Selection</h3>
|
|
139
|
+
<DataTable
|
|
140
|
+
:data="data"
|
|
141
|
+
:columns="basicColumns"
|
|
142
|
+
selectionMode="multiple"
|
|
143
|
+
v-model:selection="multipleSelection"
|
|
144
|
+
/>
|
|
145
|
+
<div class="mt-2 text-sm text-muted-foreground">
|
|
146
|
+
Selected: {{ multipleSelection.length > 0 ? multipleSelection.map(r => r.name).join(', ') : 'none' }}
|
|
147
|
+
</div>
|
|
148
|
+
</section>
|
|
149
|
+
|
|
150
|
+
<!-- Sortable -->
|
|
151
|
+
<section>
|
|
152
|
+
<h3 class="mb-4 text-lg font-medium">Sortable Columns</h3>
|
|
153
|
+
<DataTable
|
|
154
|
+
:data="sortedData"
|
|
155
|
+
:columns="sortableColumns"
|
|
156
|
+
v-model:sortBy="sortBy"
|
|
157
|
+
v-model:sortOrder="sortOrder"
|
|
158
|
+
/>
|
|
159
|
+
<div class="mt-2 text-sm text-muted-foreground">
|
|
160
|
+
Sort: {{ sortBy ?? 'none' }} / {{ sortOrder ?? 'none' }}
|
|
161
|
+
</div>
|
|
162
|
+
</section>
|
|
163
|
+
|
|
164
|
+
<!-- Column Types -->
|
|
165
|
+
<section>
|
|
166
|
+
<h3 class="mb-4 text-lg font-medium">Column Types (text, currency, date, empty)</h3>
|
|
167
|
+
<DataTable :data="data" :columns="typeColumns" />
|
|
168
|
+
</section>
|
|
169
|
+
|
|
170
|
+
<!-- Custom Slots -->
|
|
171
|
+
<section>
|
|
172
|
+
<h3 class="mb-4 text-lg font-medium">Custom Cell Slots</h3>
|
|
173
|
+
<DataTable :data="data" :columns="slotColumns">
|
|
174
|
+
<template #status="{ value }">
|
|
175
|
+
<span
|
|
176
|
+
:class="[
|
|
177
|
+
'inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium',
|
|
178
|
+
value === 'active'
|
|
179
|
+
? 'bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200'
|
|
180
|
+
: 'bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-200',
|
|
181
|
+
]"
|
|
182
|
+
>
|
|
183
|
+
{{ value }}
|
|
184
|
+
</span>
|
|
185
|
+
</template>
|
|
186
|
+
<template #amount="{ value }">
|
|
187
|
+
<span class="font-mono font-medium">\${{ Number(value).toFixed(2) }}</span>
|
|
188
|
+
</template>
|
|
189
|
+
</DataTable>
|
|
190
|
+
</section>
|
|
191
|
+
|
|
192
|
+
<!-- Empty State -->
|
|
193
|
+
<section>
|
|
194
|
+
<h3 class="mb-4 text-lg font-medium">Empty State</h3>
|
|
195
|
+
<DataTable :data="[]" :columns="basicColumns" />
|
|
196
|
+
</section>
|
|
197
|
+
|
|
198
|
+
<!-- Footer Slot -->
|
|
199
|
+
<section>
|
|
200
|
+
<h3 class="mb-4 text-lg font-medium">Footer Slot</h3>
|
|
201
|
+
<DataTable :data="data" :columns="slotColumns">
|
|
202
|
+
<template #footer>
|
|
203
|
+
<tr class="h-12 border-t text-sm font-medium">
|
|
204
|
+
<td class="px-4">Total</td>
|
|
205
|
+
<td class="px-4" colspan="2"></td>
|
|
206
|
+
<td class="px-4 font-mono">\${{ data.reduce((sum, r) => sum + r.amount, 0).toFixed(2) }}</td>
|
|
207
|
+
</tr>
|
|
208
|
+
</template>
|
|
209
|
+
</DataTable>
|
|
210
|
+
</section>
|
|
211
|
+
|
|
212
|
+
<!-- Frozen Columns -->
|
|
213
|
+
<section>
|
|
214
|
+
<h3 class="mb-4 text-lg font-medium">Frozen Columns (scroll horizontally)</h3>
|
|
215
|
+
<div class="max-w-[600px]">
|
|
216
|
+
<DataTable
|
|
217
|
+
:data="data"
|
|
218
|
+
:columns="frozenColumns"
|
|
219
|
+
selectionMode="multiple"
|
|
220
|
+
v-model:selection="multipleSelection"
|
|
221
|
+
>
|
|
222
|
+
<template #id>
|
|
223
|
+
<button class="text-sm text-primary underline">Edit</button>
|
|
224
|
+
</template>
|
|
225
|
+
</DataTable>
|
|
226
|
+
</div>
|
|
227
|
+
</section>
|
|
228
|
+
</div>
|
|
229
|
+
`,
|
|
230
|
+
}),
|
|
231
|
+
}
|