@open-dy/vibecoding-sdk-taro 0.0.1-beta.5 → 0.0.1-beta.6
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/dist/adapters/interest-card/eslint/eslint-plugin-custom-navigation.mjs +2 -290
- package/dist/adapters/interest-card/eslint/taro.mjs +8 -42
- package/dist/components/miniapp-open-card.d.ts +46 -1
- package/dist/components/miniapp-open-card.js +14 -1
- package/dist/components/miniapp-open-card.js.map +1 -1
- package/dist/eslint/eslint-plugin-custom-navigation.mjs +290 -0
- package/dist/eslint/taro.mjs +11 -0
- package/dist/reference/llms.txt +76 -34
- package/dist/reference/sdk-api/build/taro/BuildContext.md +7 -2
- package/dist/reference/sdk-api/build/taro/CreateMicroappTaroConfigOptions.md +1 -2
- package/dist/reference/sdk-api/build/taro/createMicroappTaroConfig.md +1 -2
- package/dist/reference/sdk-api/components/miniapp-open-card/MiniappOpenCard.md +109 -0
- package/dist/reference/sdk-api/components/miniapp-open-card/MiniappOpenCardEnvVersion.md +38 -0
- package/dist/reference/sdk-api/components/miniapp-open-card/MiniappOpenCardErrorDetail.md +52 -0
- package/dist/reference/sdk-api/components/miniapp-open-card/MiniappOpenCardProps.md +76 -0
- package/dist/reference/sdk-api/components/miniapp-open-card/index.md +12 -0
- package/dist/reference/sdk-api/libraries/lucide-taro.md +151 -0
- package/dist/reference/sdk-api/runtime/CreateMicroappClientOptions.md +7 -2
- package/dist/reference/sdk-api/runtime/createMicroappClient.md +8 -3
- package/dist/reference/sdk-api/ui/accordion/Accordion.md +114 -0
- package/dist/reference/sdk-api/ui/accordion/AccordionContent.md +100 -0
- package/dist/reference/sdk-api/ui/accordion/AccordionItem.md +107 -0
- package/dist/reference/sdk-api/ui/accordion/AccordionTrigger.md +100 -0
- package/dist/reference/sdk-api/ui/accordion/index.md +12 -0
- package/dist/reference/sdk-api/ui/alert/Alert.md +106 -0
- package/dist/reference/sdk-api/ui/alert/AlertAction.md +100 -0
- package/dist/reference/sdk-api/ui/alert/AlertDescription.md +100 -0
- package/dist/reference/sdk-api/ui/alert/AlertTitle.md +100 -0
- package/dist/reference/sdk-api/ui/alert/index.md +12 -0
- package/dist/reference/sdk-api/ui/alert-dialog/AlertDialog.md +58 -0
- package/dist/reference/sdk-api/ui/alert-dialog/AlertDialogAction.md +107 -0
- package/dist/reference/sdk-api/ui/alert-dialog/AlertDialogCancel.md +107 -0
- package/dist/reference/sdk-api/ui/alert-dialog/AlertDialogContent.md +106 -0
- package/dist/reference/sdk-api/ui/alert-dialog/AlertDialogDescription.md +100 -0
- package/dist/reference/sdk-api/ui/alert-dialog/AlertDialogFooter.md +100 -0
- package/dist/reference/sdk-api/ui/alert-dialog/AlertDialogHeader.md +100 -0
- package/dist/reference/sdk-api/ui/alert-dialog/AlertDialogOverlay.md +100 -0
- package/dist/reference/sdk-api/ui/alert-dialog/AlertDialogPortal.md +55 -0
- package/dist/reference/sdk-api/ui/alert-dialog/AlertDialogTitle.md +100 -0
- package/dist/reference/sdk-api/ui/alert-dialog/AlertDialogTrigger.md +118 -0
- package/dist/reference/sdk-api/ui/alert-dialog/index.md +19 -0
- package/dist/reference/sdk-api/ui/aspect-ratio/AspectRatio.md +106 -0
- package/dist/reference/sdk-api/ui/aspect-ratio/index.md +9 -0
- package/dist/reference/sdk-api/ui/avatar/Avatar.md +106 -0
- package/dist/reference/sdk-api/ui/avatar/AvatarBadge.md +100 -0
- package/dist/reference/sdk-api/ui/avatar/AvatarFallback.md +100 -0
- package/dist/reference/sdk-api/ui/avatar/AvatarGroup.md +100 -0
- package/dist/reference/sdk-api/ui/avatar/AvatarGroupCount.md +100 -0
- package/dist/reference/sdk-api/ui/avatar/AvatarImage.md +108 -0
- package/dist/reference/sdk-api/ui/avatar/index.md +14 -0
- package/dist/reference/sdk-api/ui/badge/Badge.md +114 -0
- package/dist/reference/sdk-api/ui/badge/badgeVariants.md +70 -0
- package/dist/reference/sdk-api/ui/badge/index.md +10 -0
- package/dist/reference/sdk-api/ui/button/Button.md +210 -0
- package/dist/reference/sdk-api/ui/button/ButtonProps.md +188 -0
- package/dist/reference/sdk-api/ui/button/buttonVariants.md +84 -0
- package/dist/reference/sdk-api/ui/button/index.md +11 -0
- package/dist/reference/sdk-api/ui/button-group/ButtonGroup.md +106 -0
- package/dist/reference/sdk-api/ui/button-group/ButtonGroupSeparator.md +106 -0
- package/dist/reference/sdk-api/ui/button-group/ButtonGroupText.md +106 -0
- package/dist/reference/sdk-api/ui/button-group/buttonGroupVariants.md +70 -0
- package/dist/reference/sdk-api/ui/button-group/index.md +12 -0
- package/dist/reference/sdk-api/ui/calendar/Calendar.md +144 -0
- package/dist/reference/sdk-api/ui/calendar/CalendarProps.md +118 -0
- package/dist/reference/sdk-api/ui/calendar/index.md +10 -0
- package/dist/reference/sdk-api/ui/card/Card.md +106 -0
- package/dist/reference/sdk-api/ui/card/CardAction.md +100 -0
- package/dist/reference/sdk-api/ui/card/CardContent.md +100 -0
- package/dist/reference/sdk-api/ui/card/CardDescription.md +100 -0
- package/dist/reference/sdk-api/ui/card/CardFooter.md +100 -0
- package/dist/reference/sdk-api/ui/card/CardHeader.md +100 -0
- package/dist/reference/sdk-api/ui/card/CardTitle.md +100 -0
- package/dist/reference/sdk-api/ui/card/index.md +15 -0
- package/dist/reference/sdk-api/ui/carousel/Carousel.md +108 -0
- package/dist/reference/sdk-api/ui/carousel/CarouselContent.md +100 -0
- package/dist/reference/sdk-api/ui/carousel/CarouselItem.md +100 -0
- package/dist/reference/sdk-api/ui/carousel/CarouselNext.md +219 -0
- package/dist/reference/sdk-api/ui/carousel/CarouselPrevious.md +219 -0
- package/dist/reference/sdk-api/ui/carousel/index.md +14 -0
- package/dist/reference/sdk-api/ui/carousel/useCarousel.md +46 -0
- package/dist/reference/sdk-api/ui/checkbox/Checkbox.md +109 -0
- package/dist/reference/sdk-api/ui/checkbox/index.md +9 -0
- package/dist/reference/sdk-api/ui/collapsible/Collapsible.md +108 -0
- package/dist/reference/sdk-api/ui/collapsible/CollapsibleContent.md +100 -0
- package/dist/reference/sdk-api/ui/collapsible/CollapsibleTrigger.md +119 -0
- package/dist/reference/sdk-api/ui/collapsible/index.md +11 -0
- package/dist/reference/sdk-api/ui/combobox/Combobox.md +124 -0
- package/dist/reference/sdk-api/ui/combobox/ComboboxChip.md +107 -0
- package/dist/reference/sdk-api/ui/combobox/ComboboxChips.md +100 -0
- package/dist/reference/sdk-api/ui/combobox/ComboboxChipsInput.md +107 -0
- package/dist/reference/sdk-api/ui/combobox/ComboboxCollection.md +100 -0
- package/dist/reference/sdk-api/ui/combobox/ComboboxContent.md +106 -0
- package/dist/reference/sdk-api/ui/combobox/ComboboxEmpty.md +100 -0
- package/dist/reference/sdk-api/ui/combobox/ComboboxGroup.md +100 -0
- package/dist/reference/sdk-api/ui/combobox/ComboboxInput.md +113 -0
- package/dist/reference/sdk-api/ui/combobox/ComboboxItem.md +106 -0
- package/dist/reference/sdk-api/ui/combobox/ComboboxLabel.md +100 -0
- package/dist/reference/sdk-api/ui/combobox/ComboboxList.md +105 -0
- package/dist/reference/sdk-api/ui/combobox/ComboboxSeparator.md +100 -0
- package/dist/reference/sdk-api/ui/combobox/ComboboxTrigger.md +100 -0
- package/dist/reference/sdk-api/ui/combobox/ComboboxValue.md +105 -0
- package/dist/reference/sdk-api/ui/combobox/index.md +24 -0
- package/dist/reference/sdk-api/ui/combobox/useComboboxAnchor.md +43 -0
- package/dist/reference/sdk-api/ui/dialog/Dialog.md +58 -0
- package/dist/reference/sdk-api/ui/dialog/DialogClose.md +100 -0
- package/dist/reference/sdk-api/ui/dialog/DialogContent.md +107 -0
- package/dist/reference/sdk-api/ui/dialog/DialogDescription.md +100 -0
- package/dist/reference/sdk-api/ui/dialog/DialogFooter.md +100 -0
- package/dist/reference/sdk-api/ui/dialog/DialogHeader.md +100 -0
- package/dist/reference/sdk-api/ui/dialog/DialogOverlay.md +100 -0
- package/dist/reference/sdk-api/ui/dialog/DialogPortal.md +55 -0
- package/dist/reference/sdk-api/ui/dialog/DialogTitle.md +100 -0
- package/dist/reference/sdk-api/ui/dialog/DialogTrigger.md +106 -0
- package/dist/reference/sdk-api/ui/dialog/index.md +18 -0
- package/dist/reference/sdk-api/ui/drawer/Drawer.md +59 -0
- package/dist/reference/sdk-api/ui/drawer/DrawerClose.md +100 -0
- package/dist/reference/sdk-api/ui/drawer/DrawerContent.md +100 -0
- package/dist/reference/sdk-api/ui/drawer/DrawerDescription.md +100 -0
- package/dist/reference/sdk-api/ui/drawer/DrawerFooter.md +100 -0
- package/dist/reference/sdk-api/ui/drawer/DrawerHeader.md +100 -0
- package/dist/reference/sdk-api/ui/drawer/DrawerOverlay.md +100 -0
- package/dist/reference/sdk-api/ui/drawer/DrawerPortal.md +55 -0
- package/dist/reference/sdk-api/ui/drawer/DrawerTitle.md +100 -0
- package/dist/reference/sdk-api/ui/drawer/DrawerTrigger.md +100 -0
- package/dist/reference/sdk-api/ui/drawer/index.md +18 -0
- package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenu.md +58 -0
- package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuCheckboxItem.md +107 -0
- package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuContent.md +106 -0
- package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuGroup.md +100 -0
- package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuItem.md +107 -0
- package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuLabel.md +106 -0
- package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuPortal.md +55 -0
- package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuRadioGroup.md +100 -0
- package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuRadioItem.md +106 -0
- package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuSeparator.md +100 -0
- package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuShortcut.md +100 -0
- package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuSub.md +58 -0
- package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuSubContent.md +100 -0
- package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuSubTrigger.md +106 -0
- package/dist/reference/sdk-api/ui/dropdown-menu/DropdownMenuTrigger.md +119 -0
- package/dist/reference/sdk-api/ui/dropdown-menu/index.md +23 -0
- package/dist/reference/sdk-api/ui/empty/Empty.md +100 -0
- package/dist/reference/sdk-api/ui/empty/EmptyContent.md +100 -0
- package/dist/reference/sdk-api/ui/empty/EmptyDescription.md +100 -0
- package/dist/reference/sdk-api/ui/empty/EmptyHeader.md +100 -0
- package/dist/reference/sdk-api/ui/empty/EmptyMedia.md +106 -0
- package/dist/reference/sdk-api/ui/empty/EmptyTitle.md +100 -0
- package/dist/reference/sdk-api/ui/empty/index.md +14 -0
- package/dist/reference/sdk-api/ui/field/Field.md +106 -0
- package/dist/reference/sdk-api/ui/field/FieldContent.md +100 -0
- package/dist/reference/sdk-api/ui/field/FieldDescription.md +100 -0
- package/dist/reference/sdk-api/ui/field/FieldError.md +112 -0
- package/dist/reference/sdk-api/ui/field/FieldGroup.md +100 -0
- package/dist/reference/sdk-api/ui/field/FieldLabel.md +85 -0
- package/dist/reference/sdk-api/ui/field/FieldLegend.md +106 -0
- package/dist/reference/sdk-api/ui/field/FieldSeparator.md +105 -0
- package/dist/reference/sdk-api/ui/field/FieldSet.md +100 -0
- package/dist/reference/sdk-api/ui/field/FieldTitle.md +100 -0
- package/dist/reference/sdk-api/ui/field/index.md +18 -0
- package/dist/reference/sdk-api/ui/helpers/collectDataIconState.md +66 -0
- package/dist/reference/sdk-api/ui/helpers/index.md +9 -0
- package/dist/reference/sdk-api/ui/index.md +57 -0
- package/dist/reference/sdk-api/ui/input/Input.md +141 -0
- package/dist/reference/sdk-api/ui/input/index.md +9 -0
- package/dist/reference/sdk-api/ui/input-group/InputGroup.md +100 -0
- package/dist/reference/sdk-api/ui/input-group/InputGroupAddon.md +109 -0
- package/dist/reference/sdk-api/ui/input-group/InputGroupButton.md +220 -0
- package/dist/reference/sdk-api/ui/input-group/InputGroupInput.md +135 -0
- package/dist/reference/sdk-api/ui/input-group/InputGroupText.md +100 -0
- package/dist/reference/sdk-api/ui/input-group/InputGroupTextarea.md +126 -0
- package/dist/reference/sdk-api/ui/input-group/index.md +14 -0
- package/dist/reference/sdk-api/ui/input-otp/InputOTP.md +111 -0
- package/dist/reference/sdk-api/ui/input-otp/InputOTPGroup.md +100 -0
- package/dist/reference/sdk-api/ui/input-otp/InputOTPSeparator.md +100 -0
- package/dist/reference/sdk-api/ui/input-otp/InputOTPSlot.md +107 -0
- package/dist/reference/sdk-api/ui/input-otp/index.md +12 -0
- package/dist/reference/sdk-api/ui/item/Item.md +115 -0
- package/dist/reference/sdk-api/ui/item/ItemActions.md +100 -0
- package/dist/reference/sdk-api/ui/item/ItemContent.md +100 -0
- package/dist/reference/sdk-api/ui/item/ItemDescription.md +100 -0
- package/dist/reference/sdk-api/ui/item/ItemFooter.md +100 -0
- package/dist/reference/sdk-api/ui/item/ItemGroup.md +100 -0
- package/dist/reference/sdk-api/ui/item/ItemHeader.md +100 -0
- package/dist/reference/sdk-api/ui/item/ItemMedia.md +106 -0
- package/dist/reference/sdk-api/ui/item/ItemSeparator.md +106 -0
- package/dist/reference/sdk-api/ui/item/ItemTitle.md +100 -0
- package/dist/reference/sdk-api/ui/item/index.md +18 -0
- package/dist/reference/sdk-api/ui/label/Label.md +85 -0
- package/dist/reference/sdk-api/ui/label/index.md +9 -0
- package/dist/reference/sdk-api/ui/menubar/Menubar.md +100 -0
- package/dist/reference/sdk-api/ui/menubar/MenubarCheckboxItem.md +111 -0
- package/dist/reference/sdk-api/ui/menubar/MenubarContent.md +108 -0
- package/dist/reference/sdk-api/ui/menubar/MenubarGroup.md +100 -0
- package/dist/reference/sdk-api/ui/menubar/MenubarItem.md +109 -0
- package/dist/reference/sdk-api/ui/menubar/MenubarLabel.md +106 -0
- package/dist/reference/sdk-api/ui/menubar/MenubarMenu.md +55 -0
- package/dist/reference/sdk-api/ui/menubar/MenubarPortal.md +55 -0
- package/dist/reference/sdk-api/ui/menubar/MenubarRadioGroup.md +108 -0
- package/dist/reference/sdk-api/ui/menubar/MenubarRadioItem.md +110 -0
- package/dist/reference/sdk-api/ui/menubar/MenubarSeparator.md +100 -0
- package/dist/reference/sdk-api/ui/menubar/MenubarShortcut.md +100 -0
- package/dist/reference/sdk-api/ui/menubar/MenubarSub.md +58 -0
- package/dist/reference/sdk-api/ui/menubar/MenubarSubContent.md +108 -0
- package/dist/reference/sdk-api/ui/menubar/MenubarSubTrigger.md +107 -0
- package/dist/reference/sdk-api/ui/menubar/MenubarTrigger.md +100 -0
- package/dist/reference/sdk-api/ui/menubar/index.md +24 -0
- package/dist/reference/sdk-api/ui/navigation-menu/NavigationMenu.md +100 -0
- package/dist/reference/sdk-api/ui/navigation-menu/NavigationMenuContent.md +106 -0
- package/dist/reference/sdk-api/ui/navigation-menu/NavigationMenuIndicator.md +100 -0
- package/dist/reference/sdk-api/ui/navigation-menu/NavigationMenuItem.md +106 -0
- package/dist/reference/sdk-api/ui/navigation-menu/NavigationMenuLink.md +106 -0
- package/dist/reference/sdk-api/ui/navigation-menu/NavigationMenuList.md +100 -0
- package/dist/reference/sdk-api/ui/navigation-menu/NavigationMenuPositioner.md +100 -0
- package/dist/reference/sdk-api/ui/navigation-menu/NavigationMenuTrigger.md +120 -0
- package/dist/reference/sdk-api/ui/navigation-menu/index.md +17 -0
- package/dist/reference/sdk-api/ui/navigation-menu/navigationMenuTriggerStyle.md +64 -0
- package/dist/reference/sdk-api/ui/pagination/Pagination.md +100 -0
- package/dist/reference/sdk-api/ui/pagination/PaginationContent.md +100 -0
- package/dist/reference/sdk-api/ui/pagination/PaginationEllipsis.md +100 -0
- package/dist/reference/sdk-api/ui/pagination/PaginationItem.md +100 -0
- package/dist/reference/sdk-api/ui/pagination/PaginationLink.md +107 -0
- package/dist/reference/sdk-api/ui/pagination/PaginationNext.md +121 -0
- package/dist/reference/sdk-api/ui/pagination/PaginationPrevious.md +121 -0
- package/dist/reference/sdk-api/ui/pagination/index.md +15 -0
- package/dist/reference/sdk-api/ui/popover/Popover.md +58 -0
- package/dist/reference/sdk-api/ui/popover/PopoverAnchor.md +100 -0
- package/dist/reference/sdk-api/ui/popover/PopoverContent.md +108 -0
- package/dist/reference/sdk-api/ui/popover/PopoverDescription.md +100 -0
- package/dist/reference/sdk-api/ui/popover/PopoverHeader.md +100 -0
- package/dist/reference/sdk-api/ui/popover/PopoverTitle.md +100 -0
- package/dist/reference/sdk-api/ui/popover/PopoverTrigger.md +119 -0
- package/dist/reference/sdk-api/ui/popover/index.md +15 -0
- package/dist/reference/sdk-api/ui/portal/Portal.md +55 -0
- package/dist/reference/sdk-api/ui/portal/index.md +9 -0
- package/dist/reference/sdk-api/ui/progress/Progress.md +109 -0
- package/dist/reference/sdk-api/ui/progress/ProgressIndicator.md +107 -0
- package/dist/reference/sdk-api/ui/progress/ProgressLabel.md +100 -0
- package/dist/reference/sdk-api/ui/progress/ProgressTrack.md +100 -0
- package/dist/reference/sdk-api/ui/progress/ProgressValue.md +105 -0
- package/dist/reference/sdk-api/ui/progress/index.md +13 -0
- package/dist/reference/sdk-api/ui/radio-group/RadioGroup.md +108 -0
- package/dist/reference/sdk-api/ui/radio-group/RadioGroupItem.md +107 -0
- package/dist/reference/sdk-api/ui/radio-group/index.md +10 -0
- package/dist/reference/sdk-api/ui/resizable/ResizableHandle.md +107 -0
- package/dist/reference/sdk-api/ui/resizable/ResizablePanel.md +108 -0
- package/dist/reference/sdk-api/ui/resizable/ResizablePanelGroup.md +107 -0
- package/dist/reference/sdk-api/ui/resizable/index.md +11 -0
- package/dist/reference/sdk-api/ui/scroll-area/ScrollArea.md +159 -0
- package/dist/reference/sdk-api/ui/scroll-area/ScrollBar.md +106 -0
- package/dist/reference/sdk-api/ui/scroll-area/index.md +10 -0
- package/dist/reference/sdk-api/ui/select/Select.md +80 -0
- package/dist/reference/sdk-api/ui/select/SelectContent.md +106 -0
- package/dist/reference/sdk-api/ui/select/SelectGroup.md +100 -0
- package/dist/reference/sdk-api/ui/select/SelectItem.md +106 -0
- package/dist/reference/sdk-api/ui/select/SelectLabel.md +100 -0
- package/dist/reference/sdk-api/ui/select/SelectScrollDownButton.md +100 -0
- package/dist/reference/sdk-api/ui/select/SelectScrollUpButton.md +100 -0
- package/dist/reference/sdk-api/ui/select/SelectSeparator.md +100 -0
- package/dist/reference/sdk-api/ui/select/SelectTrigger.md +106 -0
- package/dist/reference/sdk-api/ui/select/SelectValue.md +106 -0
- package/dist/reference/sdk-api/ui/select/index.md +18 -0
- package/dist/reference/sdk-api/ui/separator/Separator.md +106 -0
- package/dist/reference/sdk-api/ui/separator/index.md +9 -0
- package/dist/reference/sdk-api/ui/sheet/Sheet.md +58 -0
- package/dist/reference/sdk-api/ui/sheet/SheetClose.md +100 -0
- package/dist/reference/sdk-api/ui/sheet/SheetContent.md +113 -0
- package/dist/reference/sdk-api/ui/sheet/SheetDescription.md +100 -0
- package/dist/reference/sdk-api/ui/sheet/SheetFooter.md +100 -0
- package/dist/reference/sdk-api/ui/sheet/SheetHeader.md +100 -0
- package/dist/reference/sdk-api/ui/sheet/SheetOverlay.md +100 -0
- package/dist/reference/sdk-api/ui/sheet/SheetPortal.md +55 -0
- package/dist/reference/sdk-api/ui/sheet/SheetTitle.md +100 -0
- package/dist/reference/sdk-api/ui/sheet/SheetTrigger.md +100 -0
- package/dist/reference/sdk-api/ui/sheet/index.md +18 -0
- package/dist/reference/sdk-api/ui/skeleton/Skeleton.md +100 -0
- package/dist/reference/sdk-api/ui/skeleton/index.md +9 -0
- package/dist/reference/sdk-api/ui/slider/Slider.md +116 -0
- package/dist/reference/sdk-api/ui/slider/index.md +9 -0
- package/dist/reference/sdk-api/ui/sonner/Toaster.md +43 -0
- package/dist/reference/sdk-api/ui/sonner/index.md +10 -0
- package/dist/reference/sdk-api/ui/sonner/toast.md +58 -0
- package/dist/reference/sdk-api/ui/spinner/Spinner.md +100 -0
- package/dist/reference/sdk-api/ui/spinner/index.md +9 -0
- package/dist/reference/sdk-api/ui/switch/Switch.md +110 -0
- package/dist/reference/sdk-api/ui/switch/index.md +9 -0
- package/dist/reference/sdk-api/ui/table/Table.md +100 -0
- package/dist/reference/sdk-api/ui/table/TableBody.md +100 -0
- package/dist/reference/sdk-api/ui/table/TableCaption.md +100 -0
- package/dist/reference/sdk-api/ui/table/TableCell.md +106 -0
- package/dist/reference/sdk-api/ui/table/TableFooter.md +100 -0
- package/dist/reference/sdk-api/ui/table/TableHead.md +106 -0
- package/dist/reference/sdk-api/ui/table/TableHeader.md +100 -0
- package/dist/reference/sdk-api/ui/table/TableRow.md +100 -0
- package/dist/reference/sdk-api/ui/table/index.md +16 -0
- package/dist/reference/sdk-api/ui/tabs/Tabs.md +109 -0
- package/dist/reference/sdk-api/ui/tabs/TabsContent.md +106 -0
- package/dist/reference/sdk-api/ui/tabs/TabsList.md +106 -0
- package/dist/reference/sdk-api/ui/tabs/TabsTrigger.md +107 -0
- package/dist/reference/sdk-api/ui/tabs/index.md +13 -0
- package/dist/reference/sdk-api/ui/tabs/tabsListVariants.md +70 -0
- package/dist/reference/sdk-api/ui/textarea/Textarea.md +126 -0
- package/dist/reference/sdk-api/ui/textarea/index.md +9 -0
- package/dist/reference/sdk-api/ui/toggle/Toggle.md +118 -0
- package/dist/reference/sdk-api/ui/toggle/index.md +10 -0
- package/dist/reference/sdk-api/ui/toggle/toggleVariants.md +71 -0
- package/dist/reference/sdk-api/ui/toggle-group/ToggleGroup.md +122 -0
- package/dist/reference/sdk-api/ui/toggle-group/ToggleGroupItem.md +116 -0
- package/dist/reference/sdk-api/ui/toggle-group/index.md +10 -0
- package/dist/reference/sdk-api.json +74470 -146
- package/dist/reference/sdk-api.md +62 -3
- package/dist/ui/accordion.d.ts +48 -0
- package/dist/ui/accordion.js +40 -0
- package/dist/ui/accordion.js.map +1 -1
- package/dist/ui/alert-dialog.d.ts +123 -0
- package/dist/ui/alert-dialog.js +114 -0
- package/dist/ui/alert-dialog.js.map +1 -1
- package/dist/ui/alert.d.ts +41 -0
- package/dist/ui/alert.js +41 -0
- package/dist/ui/alert.js.map +1 -1
- package/dist/ui/aspect-ratio.d.ts +11 -0
- package/dist/ui/aspect-ratio.js +10 -0
- package/dist/ui/aspect-ratio.js.map +1 -1
- package/dist/ui/avatar.d.ts +65 -0
- package/dist/ui/avatar.js +63 -0
- package/dist/ui/avatar.js.map +1 -1
- package/dist/ui/badge.d.ts +22 -0
- package/dist/ui/badge.js +22 -0
- package/dist/ui/badge.js.map +1 -1
- package/dist/ui/button-group.d.ts +45 -0
- package/dist/ui/button-group.js +43 -0
- package/dist/ui/button-group.js.map +1 -1
- package/dist/ui/button.d.ts +52 -0
- package/dist/ui/button.js +30 -0
- package/dist/ui/button.js.map +1 -1
- package/dist/ui/calendar.d.ts +44 -0
- package/dist/ui/calendar.js +19 -0
- package/dist/ui/calendar.js.map +1 -1
- package/dist/ui/card.d.ts +71 -0
- package/dist/ui/card.js +70 -0
- package/dist/ui/card.js.map +1 -1
- package/dist/ui/carousel.d.ts +71 -0
- package/dist/ui/carousel.js +66 -0
- package/dist/ui/carousel.js.map +1 -1
- package/dist/ui/checkbox.d.ts +14 -0
- package/dist/ui/checkbox.js +10 -0
- package/dist/ui/checkbox.js.map +1 -1
- package/dist/ui/collapsible.d.ts +37 -0
- package/dist/ui/collapsible.js +30 -0
- package/dist/ui/collapsible.js.map +1 -1
- package/dist/ui/combobox.d.ts +190 -0
- package/dist/ui/combobox.js +167 -0
- package/dist/ui/combobox.js.map +1 -1
- package/dist/ui/dialog.d.ts +109 -0
- package/dist/ui/dialog.js +100 -0
- package/dist/ui/dialog.js.map +1 -1
- package/dist/ui/drawer.d.ts +106 -0
- package/dist/ui/drawer.js +100 -0
- package/dist/ui/drawer.js.map +1 -1
- package/dist/ui/dropdown-menu.d.ts +171 -0
- package/dist/ui/dropdown-menu.js +150 -0
- package/dist/ui/dropdown-menu.js.map +1 -1
- package/dist/ui/empty.d.ts +61 -0
- package/dist/ui/empty.js +61 -0
- package/dist/ui/empty.js.map +1 -1
- package/dist/ui/field.d.ts +105 -0
- package/dist/ui/field.js +101 -0
- package/dist/ui/field.js.map +1 -1
- package/dist/ui/helpers.d.ts +11 -0
- package/dist/ui/helpers.js +11 -0
- package/dist/ui/helpers.js.map +1 -1
- package/dist/ui/input-group.d.ts +65 -0
- package/dist/ui/input-group.js +65 -0
- package/dist/ui/input-group.js.map +1 -1
- package/dist/ui/input-otp.d.ts +48 -0
- package/dist/ui/input-otp.js +40 -0
- package/dist/ui/input-otp.js.map +1 -1
- package/dist/ui/input.d.ts +24 -2
- package/dist/ui/input.js +20 -0
- package/dist/ui/input.js.map +1 -1
- package/dist/ui/item.d.ts +103 -0
- package/dist/ui/item.js +103 -0
- package/dist/ui/item.js.map +1 -1
- package/dist/ui/label.d.ts +10 -0
- package/dist/ui/label.js +10 -0
- package/dist/ui/label.js.map +1 -1
- package/dist/ui/menubar.d.ts +193 -0
- package/dist/ui/menubar.js +160 -0
- package/dist/ui/menubar.js.map +1 -1
- package/dist/ui/navigation-menu.d.ts +98 -0
- package/dist/ui/navigation-menu.js +90 -0
- package/dist/ui/navigation-menu.js.map +1 -1
- package/dist/ui/pagination.d.ts +76 -0
- package/dist/ui/pagination.js +73 -0
- package/dist/ui/pagination.js.map +1 -1
- package/dist/ui/popover.d.ts +81 -0
- package/dist/ui/popover.js +70 -0
- package/dist/ui/popover.js.map +1 -1
- package/dist/ui/portal.d.ts +11 -0
- package/dist/ui/portal.js +10 -0
- package/dist/ui/portal.js.map +1 -1
- package/dist/ui/progress.d.ts +53 -26
- package/dist/ui/progress.js +50 -26
- package/dist/ui/progress.js.map +1 -1
- package/dist/ui/radio-group.d.ts +25 -0
- package/dist/ui/radio-group.js +20 -0
- package/dist/ui/radio-group.js.map +1 -1
- package/dist/ui/resizable.d.ts +37 -0
- package/dist/ui/resizable.js +30 -0
- package/dist/ui/resizable.js.map +1 -1
- package/dist/ui/scroll-area.d.ts +22 -0
- package/dist/ui/scroll-area.js +21 -0
- package/dist/ui/scroll-area.js.map +1 -1
- package/dist/ui/select.d.ts +122 -0
- package/dist/ui/select.js +108 -0
- package/dist/ui/select.js.map +1 -1
- package/dist/ui/separator.d.ts +11 -0
- package/dist/ui/separator.js +10 -0
- package/dist/ui/separator.js.map +1 -1
- package/dist/ui/sheet.d.ts +107 -0
- package/dist/ui/sheet.js +101 -0
- package/dist/ui/sheet.js.map +1 -1
- package/dist/ui/skeleton.d.ts +10 -0
- package/dist/ui/skeleton.js +10 -0
- package/dist/ui/skeleton.js.map +1 -1
- package/dist/ui/slider.d.ts +21 -0
- package/dist/ui/slider.js +14 -0
- package/dist/ui/slider.js.map +1 -1
- package/dist/ui/sonner.d.ts +23 -0
- package/dist/ui/sonner.js +21 -0
- package/dist/ui/sonner.js.map +1 -1
- package/dist/ui/spinner.d.ts +10 -0
- package/dist/ui/spinner.js +10 -0
- package/dist/ui/spinner.js.map +1 -1
- package/dist/ui/switch.d.ts +15 -0
- package/dist/ui/switch.js +10 -0
- package/dist/ui/switch.js.map +1 -1
- package/dist/ui/table.d.ts +81 -0
- package/dist/ui/table.js +80 -0
- package/dist/ui/table.js.map +1 -1
- package/dist/ui/tabs.d.ts +59 -0
- package/dist/ui/tabs.js +51 -0
- package/dist/ui/tabs.js.map +1 -1
- package/dist/ui/textarea.d.ts +13 -0
- package/dist/ui/textarea.js +13 -0
- package/dist/ui/textarea.js.map +1 -1
- package/dist/ui/toggle-group.d.ts +34 -0
- package/dist/ui/toggle-group.js +24 -0
- package/dist/ui/toggle-group.js.map +1 -1
- package/dist/ui/toggle.d.ts +28 -0
- package/dist/ui/toggle.js +24 -0
- package/dist/ui/toggle.js.map +1 -1
- package/package.json +4 -2
- package/release-provenance.json +15 -0
- package/src/adapters/interest-card/eslint/eslint-plugin-custom-navigation.mjs +2 -0
- package/src/adapters/interest-card/eslint/taro.mjs +21 -0
- package/src/adapters/interest-card/runtime/microapp.ts +11 -0
- package/src/adapters/interest-card/types/taro.d.ts +28 -0
- package/src/build/config-overrides.ts +39 -0
- package/src/build/index.ts +5 -0
- package/src/build/plugins/app-config.ts +47 -0
- package/src/build/plugins/depend-card/analyze.ts +122 -0
- package/src/build/plugins/depend-card/source.ts +97 -0
- package/src/build/plugins/vite-depend-card.ts +168 -0
- package/src/build/plugins/vite-image-asset-import.ts +178 -0
- package/src/build/plugins/vite-inline-json.ts +149 -0
- package/src/build/plugins/vite-taro-source-location.ts +224 -0
- package/src/build/plugins/vite-tt-components-entry.ts +33 -0
- package/src/build/taro.ts +830 -0
- package/src/components/miniapp-open-card.ts +94 -0
- package/src/components/native-miniapp-open-card.ts +7 -0
- package/src/eslint/eslint-plugin-custom-navigation.mjs +290 -0
- package/src/eslint/eslint-plugin-microapp-pages.mjs +659 -0
- package/src/eslint/server.mjs +69 -0
- package/src/eslint/taro.mjs +564 -0
- package/src/index.ts +2 -0
- package/src/internal/runtime/douyin-open-button.d.ts +29 -0
- package/src/internal/runtime/iframe-auth/identity.ts +236 -0
- package/src/internal/runtime/iframe-auth/index.ts +2 -0
- package/src/internal/runtime/iframe-auth/sync.ts +37 -0
- package/src/internal/vendor-modules.d.ts +8 -0
- package/src/lib/measure.ts +115 -0
- package/src/lib/platform.ts +11 -0
- package/src/lib/utils.ts +6 -0
- package/src/runtime/client.ts +246 -0
- package/src/runtime/default-client.ts +26 -0
- package/src/runtime/default-iframe-auth.ts +13 -0
- package/src/runtime/douyin-container-request.ts +367 -0
- package/src/runtime/douyin-login-request.ts +514 -0
- package/src/runtime/globals.d.ts +342 -0
- package/src/runtime/index.ts +4 -0
- package/src/runtime/network-url.ts +63 -0
- package/src/ui/accordion.tsx +226 -0
- package/src/ui/alert-dialog.tsx +407 -0
- package/src/ui/alert.tsx +149 -0
- package/src/ui/aspect-ratio.tsx +37 -0
- package/src/ui/avatar.tsx +238 -0
- package/src/ui/badge.tsx +77 -0
- package/src/ui/button-group.tsx +173 -0
- package/src/ui/button.tsx +215 -0
- package/src/ui/calendar.tsx +353 -0
- package/src/ui/card.tsx +217 -0
- package/src/ui/carousel.tsx +259 -0
- package/src/ui/checkbox.tsx +62 -0
- package/src/ui/collapsible.tsx +148 -0
- package/src/ui/combobox.tsx +650 -0
- package/src/ui/dialog.tsx +290 -0
- package/src/ui/drawer.tsx +272 -0
- package/src/ui/dropdown-menu.tsx +547 -0
- package/src/ui/empty.tsx +166 -0
- package/src/ui/field.tsx +427 -0
- package/src/ui/helpers.tsx +39 -0
- package/src/ui/index.ts +47 -0
- package/src/ui/input-group.tsx +320 -0
- package/src/ui/input-otp.tsx +189 -0
- package/src/ui/input.tsx +60 -0
- package/src/ui/item.tsx +338 -0
- package/src/ui/label.tsx +31 -0
- package/src/ui/menubar.tsx +835 -0
- package/src/ui/navigation-menu.tsx +341 -0
- package/src/ui/pagination.tsx +195 -0
- package/src/ui/popover.tsx +363 -0
- package/src/ui/portal.tsx +31 -0
- package/src/ui/progress.tsx +182 -0
- package/src/ui/radio-group.tsx +111 -0
- package/src/ui/resizable.tsx +410 -0
- package/src/ui/scroll-area.tsx +102 -0
- package/src/ui/select.tsx +471 -0
- package/src/ui/separator.tsx +37 -0
- package/src/ui/sheet.tsx +289 -0
- package/src/ui/skeleton.tsx +25 -0
- package/src/ui/slider.tsx +176 -0
- package/src/ui/sonner.tsx +40 -0
- package/src/ui/spinner.tsx +23 -0
- package/src/ui/switch.tsx +94 -0
- package/src/ui/table.tsx +240 -0
- package/src/ui/tabs.tsx +233 -0
- package/src/ui/tailwind.css +2 -0
- package/src/ui/textarea.tsx +49 -0
- package/src/ui/theme.css +234 -0
- package/src/ui/toggle-group.tsx +215 -0
- package/src/ui/toggle.tsx +113 -0
package/src/ui/table.tsx
ADDED
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import type { CSSProperties } from "react"
|
|
2
|
+
import { View, type ViewProps } from "@tarojs/components"
|
|
3
|
+
|
|
4
|
+
import { cn } from "../lib/utils"
|
|
5
|
+
|
|
6
|
+
type TableCellProps = ViewProps & {
|
|
7
|
+
/** @desc 兼容的列占比参数;TableCell 仅在传入 style 且未用 w-* 类固定宽度时转换为 flexGrow,并非原生表格合并。TableHead 不做此转换。 */
|
|
8
|
+
colSpan?: number
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function getColSpanStyle(
|
|
12
|
+
colSpan: number | undefined,
|
|
13
|
+
className: ViewProps["className"],
|
|
14
|
+
style: ViewProps["style"]
|
|
15
|
+
) {
|
|
16
|
+
if (
|
|
17
|
+
colSpan == null ||
|
|
18
|
+
typeof className === "string" && /(^|\s)w-/.test(className) ||
|
|
19
|
+
style == null
|
|
20
|
+
) {
|
|
21
|
+
return style
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (typeof style === "string") {
|
|
25
|
+
return `flex-grow: ${colSpan}; ${style}`
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (typeof style === "object" && !Array.isArray(style)) {
|
|
29
|
+
return {
|
|
30
|
+
...(style as CSSProperties),
|
|
31
|
+
flexGrow: colSpan,
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return style
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @desc 表格组件。
|
|
40
|
+
* @param {Parameters<typeof Table>[0]} props 组件属性;自有字段的用途及默认行为见下表,继承属性另列。
|
|
41
|
+
* @return {ReturnType<typeof Table>} 组件渲染结果;类型见返回值契约。
|
|
42
|
+
* @example
|
|
43
|
+
* ```tsx
|
|
44
|
+
* import { Table } from '@open-dy/vibecoding-sdk-taro/ui/table'
|
|
45
|
+
* <Table />
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
function Table({ className, ...props }: ViewProps) {
|
|
49
|
+
return (
|
|
50
|
+
<View
|
|
51
|
+
data-slot="table-container"
|
|
52
|
+
className="relative w-full overflow-x-auto"
|
|
53
|
+
>
|
|
54
|
+
<View
|
|
55
|
+
data-slot="table"
|
|
56
|
+
className={cn("w-full caption-bottom text-sm", className)}
|
|
57
|
+
{...props}
|
|
58
|
+
/>
|
|
59
|
+
</View>
|
|
60
|
+
)
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @desc 表格头部布局。
|
|
65
|
+
* @param {Parameters<typeof TableHeader>[0]} props 组件属性;自有字段的用途及默认行为见下表,继承属性另列。
|
|
66
|
+
* @return {ReturnType<typeof TableHeader>} 组件渲染结果;类型见返回值契约。
|
|
67
|
+
* @example
|
|
68
|
+
* ```tsx
|
|
69
|
+
* import { Table, TableHeader } from '@open-dy/vibecoding-sdk-taro/ui/table'
|
|
70
|
+
* <Table><TableHeader /></Table>
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
function TableHeader({ className, ...props }: ViewProps) {
|
|
74
|
+
return (
|
|
75
|
+
<View
|
|
76
|
+
data-slot="table-header"
|
|
77
|
+
className={cn("[&>*]:border-b", className)}
|
|
78
|
+
{...props}
|
|
79
|
+
/>
|
|
80
|
+
)
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* @desc 表格主体区域。
|
|
85
|
+
* @param {Parameters<typeof TableBody>[0]} props 组件属性;自有字段的用途及默认行为见下表,继承属性另列。
|
|
86
|
+
* @return {ReturnType<typeof TableBody>} 组件渲染结果;类型见返回值契约。
|
|
87
|
+
* @example
|
|
88
|
+
* ```tsx
|
|
89
|
+
* import { Table, TableBody } from '@open-dy/vibecoding-sdk-taro/ui/table'
|
|
90
|
+
* <Table><TableBody /></Table>
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
function TableBody({ className, ...props }: ViewProps) {
|
|
94
|
+
return (
|
|
95
|
+
<View
|
|
96
|
+
data-slot="table-body"
|
|
97
|
+
className={cn("[&>*:last-child]:border-0", className)}
|
|
98
|
+
{...props}
|
|
99
|
+
/>
|
|
100
|
+
)
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* @desc 表格底部布局。
|
|
105
|
+
* @param {Parameters<typeof TableFooter>[0]} props 组件属性;自有字段的用途及默认行为见下表,继承属性另列。
|
|
106
|
+
* @return {ReturnType<typeof TableFooter>} 组件渲染结果;类型见返回值契约。
|
|
107
|
+
* @example
|
|
108
|
+
* ```tsx
|
|
109
|
+
* import { Table, TableFooter } from '@open-dy/vibecoding-sdk-taro/ui/table'
|
|
110
|
+
* <Table><TableFooter /></Table>
|
|
111
|
+
* ```
|
|
112
|
+
*/
|
|
113
|
+
function TableFooter({ className, ...props }: ViewProps) {
|
|
114
|
+
return (
|
|
115
|
+
<View
|
|
116
|
+
data-slot="table-footer"
|
|
117
|
+
className={cn(
|
|
118
|
+
"border-t bg-muted/50 font-medium [&>*:last-child]:border-b-0",
|
|
119
|
+
className
|
|
120
|
+
)}
|
|
121
|
+
{...props}
|
|
122
|
+
/>
|
|
123
|
+
)
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* @desc 表格行容器。
|
|
128
|
+
* @param {Parameters<typeof TableRow>[0]} props 组件属性;自有字段的用途及默认行为见下表,继承属性另列。
|
|
129
|
+
* @return {ReturnType<typeof TableRow>} 组件渲染结果;类型见返回值契约。
|
|
130
|
+
* @example
|
|
131
|
+
* ```tsx
|
|
132
|
+
* import { Table, TableRow } from '@open-dy/vibecoding-sdk-taro/ui/table'
|
|
133
|
+
* <Table><TableRow /></Table>
|
|
134
|
+
* ```
|
|
135
|
+
*/
|
|
136
|
+
function TableRow({ className, ...props }: ViewProps) {
|
|
137
|
+
return (
|
|
138
|
+
<View
|
|
139
|
+
data-slot="table-row"
|
|
140
|
+
className={cn(
|
|
141
|
+
"flex border-b transition-colors hover:bg-muted/50 aria-selected:bg-muted",
|
|
142
|
+
className
|
|
143
|
+
)}
|
|
144
|
+
{...props}
|
|
145
|
+
/>
|
|
146
|
+
)
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* @desc 表格表头单元格。
|
|
151
|
+
* @param {Parameters<typeof TableHead>[0]} props 组件属性;自有字段的用途及默认行为见下表,继承属性另列。
|
|
152
|
+
* @return {ReturnType<typeof TableHead>} 组件渲染结果;类型见返回值契约。
|
|
153
|
+
* @example
|
|
154
|
+
* ```tsx
|
|
155
|
+
* import { Table, TableHead } from '@open-dy/vibecoding-sdk-taro/ui/table'
|
|
156
|
+
* <Table><TableHead /></Table>
|
|
157
|
+
* ```
|
|
158
|
+
*/
|
|
159
|
+
function TableHead({ className, ...props }: TableCellProps) {
|
|
160
|
+
return (
|
|
161
|
+
<View
|
|
162
|
+
data-slot="table-head"
|
|
163
|
+
className={cn(
|
|
164
|
+
"h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground flex flex-1 basis-0 min-w-0 items-center justify-start",
|
|
165
|
+
typeof className === "string" && /(^|\s)text-right(\s|$)/.test(className)
|
|
166
|
+
? "justify-end"
|
|
167
|
+
: null,
|
|
168
|
+
typeof className === "string" && /(^|\s)w-/.test(className)
|
|
169
|
+
? "flex-none basis-auto"
|
|
170
|
+
: null,
|
|
171
|
+
className
|
|
172
|
+
)}
|
|
173
|
+
{...props}
|
|
174
|
+
/>
|
|
175
|
+
)
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* @desc 表格单元格。
|
|
180
|
+
* @param {Parameters<typeof TableCell>[0]} props 组件属性;自有字段的用途及默认行为见下表,继承属性另列。
|
|
181
|
+
* @return {ReturnType<typeof TableCell>} 组件渲染结果;类型见返回值契约。
|
|
182
|
+
* @example
|
|
183
|
+
* ```tsx
|
|
184
|
+
* import { Table, TableCell } from '@open-dy/vibecoding-sdk-taro/ui/table'
|
|
185
|
+
* <Table><TableCell /></Table>
|
|
186
|
+
* ```
|
|
187
|
+
*/
|
|
188
|
+
function TableCell({ className, colSpan, style, ...props }: TableCellProps) {
|
|
189
|
+
return (
|
|
190
|
+
<View
|
|
191
|
+
data-slot="table-cell"
|
|
192
|
+
style={getColSpanStyle(colSpan, className, style)}
|
|
193
|
+
className={cn(
|
|
194
|
+
"p-2 align-middle whitespace-nowrap flex flex-1 basis-0 min-w-0 items-center justify-start",
|
|
195
|
+
typeof className === "string" && /(^|\s)text-right(\s|$)/.test(className)
|
|
196
|
+
? "justify-end"
|
|
197
|
+
: null,
|
|
198
|
+
typeof className === "string" && /(^|\s)w-/.test(className)
|
|
199
|
+
? "flex-none basis-auto"
|
|
200
|
+
: null,
|
|
201
|
+
className
|
|
202
|
+
)}
|
|
203
|
+
{...props}
|
|
204
|
+
/>
|
|
205
|
+
)
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* @desc 表格的说明文本。
|
|
210
|
+
* @param {Parameters<typeof TableCaption>[0]} props 组件属性;自有字段的用途及默认行为见下表,继承属性另列。
|
|
211
|
+
* @return {ReturnType<typeof TableCaption>} 组件渲染结果;类型见返回值契约。
|
|
212
|
+
* @example
|
|
213
|
+
* ```tsx
|
|
214
|
+
* import { Table, TableCaption } from '@open-dy/vibecoding-sdk-taro/ui/table'
|
|
215
|
+
* <Table><TableCaption /></Table>
|
|
216
|
+
* ```
|
|
217
|
+
*/
|
|
218
|
+
function TableCaption({
|
|
219
|
+
className,
|
|
220
|
+
...props
|
|
221
|
+
}: ViewProps) {
|
|
222
|
+
return (
|
|
223
|
+
<View
|
|
224
|
+
data-slot="table-caption"
|
|
225
|
+
className={cn("mt-4 text-sm text-muted-foreground", className)}
|
|
226
|
+
{...props}
|
|
227
|
+
/>
|
|
228
|
+
)
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export {
|
|
232
|
+
Table,
|
|
233
|
+
TableHeader,
|
|
234
|
+
TableBody,
|
|
235
|
+
TableFooter,
|
|
236
|
+
TableHead,
|
|
237
|
+
TableRow,
|
|
238
|
+
TableCell,
|
|
239
|
+
TableCaption,
|
|
240
|
+
}
|
package/src/ui/tabs.tsx
ADDED
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import { View, type ViewProps } from "@tarojs/components"
|
|
3
|
+
import { cva, type VariantProps } from "class-variance-authority"
|
|
4
|
+
|
|
5
|
+
import { cn } from "../lib/utils"
|
|
6
|
+
import { collectDataIconState } from "./helpers"
|
|
7
|
+
|
|
8
|
+
const TabsContext = React.createContext<{
|
|
9
|
+
value?: string
|
|
10
|
+
onValueChange?: (value: string) => void
|
|
11
|
+
orientation?: "horizontal" | "vertical"
|
|
12
|
+
}>({})
|
|
13
|
+
|
|
14
|
+
const TabsListContext = React.createContext<{
|
|
15
|
+
variant?: "default" | "line"
|
|
16
|
+
}>({})
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @desc 标签页组件。
|
|
20
|
+
* @param {Parameters<typeof Tabs>[0]} props 组件属性;自有字段的用途及默认行为见下表,继承属性另列。
|
|
21
|
+
* @return {ReturnType<typeof Tabs>} 组件渲染结果;类型见返回值契约。
|
|
22
|
+
* @example
|
|
23
|
+
* ```tsx
|
|
24
|
+
* import { Tabs } from '@open-dy/vibecoding-sdk-taro/ui/tabs'
|
|
25
|
+
* <Tabs />
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
function Tabs({
|
|
29
|
+
className,
|
|
30
|
+
orientation = "horizontal",
|
|
31
|
+
value: valueProp,
|
|
32
|
+
defaultValue,
|
|
33
|
+
onValueChange,
|
|
34
|
+
children,
|
|
35
|
+
...props
|
|
36
|
+
}: ViewProps & {
|
|
37
|
+
/** @desc 页签排列方向:horizontal 横排、vertical 竖排;默认 horizontal,同时影响触发器和内容区布局。 */
|
|
38
|
+
orientation?: "horizontal" | "vertical"
|
|
39
|
+
/** @desc 受控选中项的标识;传入后以该值为准,需在 onValueChange 中更新。省略时由内部状态管理。 */
|
|
40
|
+
value?: string
|
|
41
|
+
/** @desc 非受控模式的初始选中页签,默认空字符串(没有选中项);传入 value 后不生效。 */
|
|
42
|
+
defaultValue?: string
|
|
43
|
+
/** @desc 用户选择项目时调用,参数为下一选中项标识;受控模式需由调用方同步 value。 */
|
|
44
|
+
onValueChange?: (value: string) => void
|
|
45
|
+
}) {
|
|
46
|
+
const [internal, setInternal] = React.useState(defaultValue ?? "")
|
|
47
|
+
const controlled = valueProp !== undefined
|
|
48
|
+
const value = controlled ? valueProp : internal
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<TabsContext.Provider
|
|
52
|
+
value={{
|
|
53
|
+
value,
|
|
54
|
+
onValueChange: (v) => {
|
|
55
|
+
if (!controlled) setInternal(v)
|
|
56
|
+
onValueChange?.(v)
|
|
57
|
+
},
|
|
58
|
+
orientation,
|
|
59
|
+
}}
|
|
60
|
+
>
|
|
61
|
+
<View
|
|
62
|
+
data-slot="tabs"
|
|
63
|
+
className={cn(
|
|
64
|
+
"group/tabs flex gap-2",
|
|
65
|
+
orientation === "horizontal" && "flex-col",
|
|
66
|
+
className
|
|
67
|
+
)}
|
|
68
|
+
{...props}
|
|
69
|
+
>
|
|
70
|
+
{children}
|
|
71
|
+
</View>
|
|
72
|
+
</TabsContext.Provider>
|
|
73
|
+
)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* @desc 生成标签页列表的样式类名;接受其声明的样式变体。
|
|
78
|
+
* @param {Parameters<typeof tabsListVariants>[0]} props 样式变体以及附加的 class 或 className。
|
|
79
|
+
* @param {Parameters<typeof tabsListVariants>[0]["variant"]} props.variant 列表样式,默认 default(圆角底色),line 为透明底;同时通过上下文控制触发器的选中下划线。
|
|
80
|
+
* @return {string} 合并后的样式类名。
|
|
81
|
+
* @example
|
|
82
|
+
* ```tsx
|
|
83
|
+
* import { tabsListVariants } from '@open-dy/vibecoding-sdk-taro/ui/tabs'
|
|
84
|
+
* tabsListVariants()
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
const tabsListVariants = cva(
|
|
88
|
+
"group/tabs-list inline-flex w-fit items-center justify-center p-1 text-muted-foreground",
|
|
89
|
+
{
|
|
90
|
+
variants: {
|
|
91
|
+
variant: {
|
|
92
|
+
default: "rounded-lg bg-muted",
|
|
93
|
+
line: "gap-1 rounded-none bg-transparent",
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
defaultVariants: {
|
|
97
|
+
variant: "default",
|
|
98
|
+
},
|
|
99
|
+
}
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* @desc 标签页列表容器。
|
|
104
|
+
* @param {Parameters<typeof TabsList>[0]} props 组件属性;自有字段的用途及默认行为见下表,继承属性另列。
|
|
105
|
+
* @return {ReturnType<typeof TabsList>} 组件渲染结果;类型见返回值契约。
|
|
106
|
+
* @example
|
|
107
|
+
* ```tsx
|
|
108
|
+
* import { Tabs, TabsList } from '@open-dy/vibecoding-sdk-taro/ui/tabs'
|
|
109
|
+
* <Tabs><TabsList /></Tabs>
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
112
|
+
function TabsList({
|
|
113
|
+
className,
|
|
114
|
+
variant = "default",
|
|
115
|
+
...props
|
|
116
|
+
}: ViewProps & VariantProps<typeof tabsListVariants> & {
|
|
117
|
+
/** @desc 页签列表样式,默认 default(圆角底色),line 为透明底和选中下划线;由上下文影响 TabsTrigger。 */
|
|
118
|
+
variant?: "default" | "line" }) {
|
|
119
|
+
const tabs = React.useContext(TabsContext)
|
|
120
|
+
|
|
121
|
+
return (
|
|
122
|
+
<TabsListContext.Provider value={{ variant }}>
|
|
123
|
+
<View
|
|
124
|
+
data-slot="tabs-list"
|
|
125
|
+
className={cn(
|
|
126
|
+
tabsListVariants({ variant }),
|
|
127
|
+
tabs.orientation === "horizontal" && "h-8",
|
|
128
|
+
tabs.orientation === "vertical" && "h-fit flex-col",
|
|
129
|
+
className
|
|
130
|
+
)}
|
|
131
|
+
{...props}
|
|
132
|
+
/>
|
|
133
|
+
</TabsListContext.Provider>
|
|
134
|
+
)
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* @desc 标签页触发器。
|
|
139
|
+
* @param {Parameters<typeof TabsTrigger>[0]} props 组件属性;自有字段的用途及默认行为见下表,继承属性另列。
|
|
140
|
+
* @return {ReturnType<typeof TabsTrigger>} 组件渲染结果;类型见返回值契约。
|
|
141
|
+
* @example
|
|
142
|
+
* ```tsx
|
|
143
|
+
* import { Tabs, TabsTrigger } from '@open-dy/vibecoding-sdk-taro/ui/tabs'
|
|
144
|
+
* <Tabs><TabsTrigger value="one" /></Tabs>
|
|
145
|
+
* ```
|
|
146
|
+
*/
|
|
147
|
+
function TabsTrigger({
|
|
148
|
+
className,
|
|
149
|
+
value,
|
|
150
|
+
children,
|
|
151
|
+
disabled,
|
|
152
|
+
...props
|
|
153
|
+
}: ViewProps & {
|
|
154
|
+
/** @desc 当前项目的唯一标识;必须与父组件的 value/defaultValue 对应,不同项目使用不同值。 */
|
|
155
|
+
value: string;
|
|
156
|
+
/** @desc 是否禁用当前页签;默认可操作,禁用后不执行内部页签切换。 */
|
|
157
|
+
disabled?: boolean }) {
|
|
158
|
+
const ctx = React.useContext(TabsContext)
|
|
159
|
+
const list = React.useContext(TabsListContext)
|
|
160
|
+
const isActive = ctx.value === value
|
|
161
|
+
const { hasInlineStartIcon, hasInlineEndIcon } = React.useMemo(
|
|
162
|
+
() => collectDataIconState(children),
|
|
163
|
+
[children]
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
return (
|
|
167
|
+
<View
|
|
168
|
+
data-slot="tabs-trigger"
|
|
169
|
+
aria-disabled={disabled || undefined}
|
|
170
|
+
className={cn(
|
|
171
|
+
"relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
172
|
+
ctx.orientation === "vertical" && "w-full justify-start",
|
|
173
|
+
list.variant === "line" && "bg-transparent",
|
|
174
|
+
hasInlineStartIcon && "pl-1",
|
|
175
|
+
hasInlineEndIcon && "pr-1",
|
|
176
|
+
isActive &&
|
|
177
|
+
"bg-background text-foreground dark:border-input dark:bg-input/30 dark:text-foreground",
|
|
178
|
+
list.variant === "default" && isActive && "shadow-sm",
|
|
179
|
+
list.variant === "line" &&
|
|
180
|
+
isActive &&
|
|
181
|
+
"bg-transparent shadow-none dark:border-transparent dark:bg-transparent",
|
|
182
|
+
"after:absolute after:bg-foreground after:opacity-0 after:transition-opacity",
|
|
183
|
+
ctx.orientation === "horizontal" &&
|
|
184
|
+
"after:inset-x-0 after:bottom-[-5px] after:h-0.5",
|
|
185
|
+
ctx.orientation === "vertical" &&
|
|
186
|
+
"after:inset-y-0 after:-right-1 after:w-0.5",
|
|
187
|
+
list.variant === "line" && isActive && "after:opacity-100",
|
|
188
|
+
className
|
|
189
|
+
)}
|
|
190
|
+
onClick={() => {
|
|
191
|
+
if (disabled) return
|
|
192
|
+
ctx.onValueChange?.(value)
|
|
193
|
+
}}
|
|
194
|
+
{...props}
|
|
195
|
+
>
|
|
196
|
+
{children}
|
|
197
|
+
</View>
|
|
198
|
+
)
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* @desc 标签页内容容器。
|
|
203
|
+
* @param {Parameters<typeof TabsContent>[0]} props 组件属性;自有字段的用途及默认行为见下表,继承属性另列。
|
|
204
|
+
* @return {ReturnType<typeof TabsContent>} 组件渲染结果;类型见返回值契约。
|
|
205
|
+
* @example
|
|
206
|
+
* ```tsx
|
|
207
|
+
* import { Tabs, TabsContent } from '@open-dy/vibecoding-sdk-taro/ui/tabs'
|
|
208
|
+
* <Tabs><TabsContent value="one" /></Tabs>
|
|
209
|
+
* ```
|
|
210
|
+
*/
|
|
211
|
+
function TabsContent({
|
|
212
|
+
className,
|
|
213
|
+
value,
|
|
214
|
+
children,
|
|
215
|
+
...props
|
|
216
|
+
}: ViewProps & {
|
|
217
|
+
/** @desc 内容区对应的页签标识;须与 TabsTrigger.value 相同,仅父 Tabs.value 匹配时渲染。 */
|
|
218
|
+
value: string }) {
|
|
219
|
+
const ctx = React.useContext(TabsContext)
|
|
220
|
+
if (ctx.value !== value) return null
|
|
221
|
+
|
|
222
|
+
return (
|
|
223
|
+
<View
|
|
224
|
+
data-slot="tabs-content"
|
|
225
|
+
className={cn("flex-1 text-sm outline-none", className)}
|
|
226
|
+
{...props}
|
|
227
|
+
>
|
|
228
|
+
{children}
|
|
229
|
+
</View>
|
|
230
|
+
)
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants }
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Textarea as TaroTextarea, View } from "@tarojs/components"
|
|
2
|
+
|
|
3
|
+
import { cn } from "../lib/utils"
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @desc 多行输入框组件。
|
|
7
|
+
* @param {Parameters<typeof Textarea>[0]} props 组件属性;自有字段的用途及默认行为见下表,继承属性另列。
|
|
8
|
+
* @param {Parameters<typeof Textarea>[0]["className"]} props.className 外层 View 的附加类名;内部 Textarea 使用自己的填满容器样式。
|
|
9
|
+
* @param {Parameters<typeof Textarea>[0]["style"]} props.style 外层 View 的内联样式;不会原样传给内部 Textarea。
|
|
10
|
+
* @param {Parameters<typeof Textarea>[0]["onInput"]} props.onInput 原生 Textarea 输入事件,文字值从 event.detail.value 读取;调用方自行同步输入状态。
|
|
11
|
+
* @return {ReturnType<typeof Textarea>} 组件渲染结果;类型见返回值契约。
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* import { Textarea } from '@open-dy/vibecoding-sdk-taro/ui/textarea'
|
|
15
|
+
* <Textarea />
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
function Textarea({
|
|
19
|
+
className,
|
|
20
|
+
style,
|
|
21
|
+
...props
|
|
22
|
+
}: React.ComponentPropsWithoutRef<typeof TaroTextarea>) {
|
|
23
|
+
const disabled = !!(props as any).disabled
|
|
24
|
+
const ariaInvalid = (props as any)["aria-invalid"]
|
|
25
|
+
const invalid =
|
|
26
|
+
ariaInvalid !== undefined &&
|
|
27
|
+
ariaInvalid !== false &&
|
|
28
|
+
ariaInvalid !== "false"
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<View
|
|
32
|
+
data-slot="textarea"
|
|
33
|
+
style={style}
|
|
34
|
+
className={cn(
|
|
35
|
+
"flex h-20 field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 md:text-sm dark:bg-input/30",
|
|
36
|
+
disabled && "cursor-not-allowed bg-input/50 opacity-50 dark:bg-input/80",
|
|
37
|
+
invalid && "border-destructive ring-3 ring-destructive/20 dark:border-destructive/50 dark:ring-destructive/40",
|
|
38
|
+
className
|
|
39
|
+
)}
|
|
40
|
+
>
|
|
41
|
+
<TaroTextarea
|
|
42
|
+
className="w-full flex-1 !h-full bg-transparent text-sm outline-none resize-none"
|
|
43
|
+
{...props}
|
|
44
|
+
/>
|
|
45
|
+
</View>
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export { Textarea }
|