@aaas-pro/library 0.0.0-stage → 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/README.md +107 -2
- package/dist/components/address-picker.d.ts +18 -0
- package/dist/components/address-picker.js +46 -0
- package/dist/components/card-date-filter.d.ts +12 -0
- package/dist/components/card-date-filter.js +95 -0
- package/dist/components/date-time-picker.d.ts +12 -0
- package/dist/components/date-time-picker.js +96 -0
- package/dist/components/detail-dialog.d.ts +48 -0
- package/dist/components/detail-dialog.js +97 -0
- package/dist/components/document-links.d.ts +13 -0
- package/dist/components/document-links.js +19 -0
- package/dist/components/draft-row-actions.d.ts +14 -0
- package/dist/components/draft-row-actions.js +70 -0
- package/dist/components/error-boundary.d.ts +14 -0
- package/dist/components/error-boundary.js +35 -0
- package/dist/components/glow-card.d.ts +13 -0
- package/dist/components/glow-card.js +48 -0
- package/dist/components/org-picker.d.ts +17 -0
- package/dist/components/org-picker.js +56 -0
- package/dist/components/overflow-row-actions.d.ts +29 -0
- package/dist/components/overflow-row-actions.js +135 -0
- package/dist/components/page-header.d.ts +21 -0
- package/dist/components/page-header.js +21 -0
- package/dist/components/permission-button.d.ts +4 -0
- package/dist/components/permission-button.js +17 -0
- package/dist/components/permission-context.d.ts +12 -0
- package/dist/components/permission-context.js +17 -0
- package/dist/components/person-picker.d.ts +20 -0
- package/dist/components/person-picker.js +38 -0
- package/dist/components/process-flow-bar.d.ts +15 -0
- package/dist/components/process-flow-bar.js +19 -0
- package/dist/components/product-picker.d.ts +19 -0
- package/dist/components/product-picker.js +155 -0
- package/dist/components/ref-doc-picker.d.ts +24 -0
- package/dist/components/ref-doc-picker.js +139 -0
- package/dist/components/scroll-to-top.d.ts +1 -0
- package/dist/components/scroll-to-top.js +20 -0
- package/dist/components/state-view.d.ts +26 -0
- package/dist/components/state-view.js +75 -0
- package/dist/components/theme-switcher.d.ts +27 -0
- package/dist/components/theme-switcher.js +77 -0
- package/dist/components/time-filter.d.ts +7 -0
- package/dist/components/time-filter.js +65 -0
- package/dist/components/ui/accordion.d.ts +7 -0
- package/dist/components/ui/accordion.js +64 -0
- package/dist/components/ui/alert-dialog.d.ts +15 -0
- package/dist/components/ui/alert-dialog.js +160 -0
- package/dist/components/ui/alert.d.ts +12 -0
- package/dist/components/ui/alert.js +66 -0
- package/dist/components/ui/aspect-ratio.d.ts +3 -0
- package/dist/components/ui/aspect-ratio.js +10 -0
- package/dist/components/ui/avatar.d.ts +6 -0
- package/dist/components/ui/avatar.js +53 -0
- package/dist/components/ui/badge.d.ts +12 -0
- package/dist/components/ui/badge.js +44 -0
- package/dist/components/ui/breadcrumb.d.ts +11 -0
- package/dist/components/ui/breadcrumb.js +103 -0
- package/dist/components/ui/button-group.d.ts +14 -0
- package/dist/components/ui/button-group.js +76 -0
- package/dist/components/ui/button.d.ts +20 -0
- package/dist/components/ui/button.js +93 -0
- package/dist/components/ui/calendar.d.ts +73 -0
- package/dist/components/ui/calendar.js +103 -0
- package/dist/components/ui/card.d.ts +9 -0
- package/dist/components/ui/card.js +90 -0
- package/dist/components/ui/carousel.d.ts +14 -0
- package/dist/components/ui/carousel.js +200 -0
- package/dist/components/ui/chart.d.ts +43 -0
- package/dist/components/ui/chart.js +252 -0
- package/dist/components/ui/checkbox.d.ts +4 -0
- package/dist/components/ui/checkbox.js +31 -0
- package/dist/components/ui/collapsible.d.ts +5 -0
- package/dist/components/ui/collapsible.js +34 -0
- package/dist/components/ui/command.d.ts +18 -0
- package/dist/components/ui/command.js +170 -0
- package/dist/components/ui/context-menu.d.ts +26 -0
- package/dist/components/ui/context-menu.js +237 -0
- package/dist/components/ui/dialog.d.ts +17 -0
- package/dist/components/ui/dialog.js +139 -0
- package/dist/components/ui/drawer.d.ts +13 -0
- package/dist/components/ui/drawer.js +129 -0
- package/dist/components/ui/dropdown-menu.d.ts +26 -0
- package/dist/components/ui/dropdown-menu.js +245 -0
- package/dist/components/ui/empty.d.ts +14 -0
- package/dist/components/ui/empty.js +102 -0
- package/dist/components/ui/field.d.ts +27 -0
- package/dist/components/ui/field.js +229 -0
- package/dist/components/ui/form.d.ts +26 -0
- package/dist/components/ui/form.js +118 -0
- package/dist/components/ui/hover-card.d.ts +6 -0
- package/dist/components/ui/hover-card.js +39 -0
- package/dist/components/ui/input-group.d.ts +22 -0
- package/dist/components/ui/input-group.js +156 -0
- package/dist/components/ui/input-otp.d.ts +11 -0
- package/dist/components/ui/input-otp.js +66 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/input.js +21 -0
- package/dist/components/ui/item.d.ts +29 -0
- package/dist/components/ui/item.js +187 -0
- package/dist/components/ui/kbd.d.ts +3 -0
- package/dist/components/ui/kbd.js +31 -0
- package/dist/components/ui/label.d.ts +4 -0
- package/dist/components/ui/label.js +22 -0
- package/dist/components/ui/menubar.d.ts +26 -0
- package/dist/components/ui/menubar.js +252 -0
- package/dist/components/ui/navigation-menu.d.ts +17 -0
- package/dist/components/ui/navigation-menu.js +170 -0
- package/dist/components/ui/pagination.d.ts +13 -0
- package/dist/components/ui/pagination.js +118 -0
- package/dist/components/ui/popover.d.ts +8 -0
- package/dist/components/ui/popover.js +47 -0
- package/dist/components/ui/progress.d.ts +4 -0
- package/dist/components/ui/progress.js +34 -0
- package/dist/components/ui/radio-group.d.ts +5 -0
- package/dist/components/ui/radio-group.js +45 -0
- package/dist/components/ui/resizable.d.ts +7 -0
- package/dist/components/ui/resizable.js +49 -0
- package/dist/components/ui/scroll-area.d.ts +5 -0
- package/dist/components/ui/scroll-area.js +60 -0
- package/dist/components/ui/select.d.ts +17 -0
- package/dist/components/ui/select.js +215 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/separator.js +26 -0
- package/dist/components/ui/sheet.d.ts +13 -0
- package/dist/components/ui/sheet.js +127 -0
- package/dist/components/ui/sidebar.d.ts +72 -0
- package/dist/components/ui/sidebar.js +656 -0
- package/dist/components/ui/skeleton.d.ts +2 -0
- package/dist/components/ui/skeleton.js +15 -0
- package/dist/components/ui/slider.d.ts +4 -0
- package/dist/components/ui/slider.js +63 -0
- package/dist/components/ui/sonner.d.ts +4 -0
- package/dist/components/ui/sonner.js +34 -0
- package/dist/components/ui/spinner.d.ts +2 -0
- package/dist/components/ui/spinner.js +17 -0
- package/dist/components/ui/switch.d.ts +4 -0
- package/dist/components/ui/switch.js +31 -0
- package/dist/components/ui/table.d.ts +10 -0
- package/dist/components/ui/table.js +114 -0
- package/dist/components/ui/tabs.d.ts +7 -0
- package/dist/components/ui/tabs.js +67 -0
- package/dist/components/ui/textarea.d.ts +3 -0
- package/dist/components/ui/textarea.js +18 -0
- package/dist/components/ui/toggle-group.d.ts +9 -0
- package/dist/components/ui/toggle-group.js +68 -0
- package/dist/components/ui/toggle.d.ts +12 -0
- package/dist/components/ui/toggle.js +43 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/components/ui/tooltip.js +56 -0
- package/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/hooks/use-mobile.js +18 -0
- package/dist/icons/index.d.ts +57 -0
- package/dist/icons/index.js +115 -0
- package/dist/icons/paths.d.ts +556 -0
- package/dist/icons/paths.js +231 -0
- package/dist/index.d.ts +68 -0
- package/dist/index.js +399 -0
- package/dist/internal/selection-base.d.ts +37 -0
- package/dist/internal/selection-base.js +40 -0
- package/dist/lib/class-names.d.ts +6 -0
- package/dist/lib/class-names.js +159 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.js +7 -0
- package/dist/lib/variants.d.ts +21 -0
- package/dist/lib/variants.js +21 -0
- package/dist/primitives/accordion.d.ts +29 -0
- package/dist/primitives/accordion.js +49 -0
- package/dist/primitives/alert-dialog.d.ts +10 -0
- package/dist/primitives/alert-dialog.js +22 -0
- package/dist/primitives/aspect-ratio.d.ts +4 -0
- package/dist/primitives/aspect-ratio.js +7 -0
- package/dist/primitives/avatar.d.ts +8 -0
- package/dist/primitives/avatar.js +45 -0
- package/dist/primitives/carousel.d.ts +22 -0
- package/dist/primitives/carousel.js +78 -0
- package/dist/primitives/chart.d.ts +71 -0
- package/dist/primitives/chart.js +125 -0
- package/dist/primitives/checkbox.d.ts +13 -0
- package/dist/primitives/checkbox.js +24 -0
- package/dist/primitives/collapsible.d.ts +14 -0
- package/dist/primitives/collapsible.js +29 -0
- package/dist/primitives/command.d.ts +43 -0
- package/dist/primitives/command.js +98 -0
- package/dist/primitives/context-menu.d.ts +24 -0
- package/dist/primitives/context-menu.js +19 -0
- package/dist/primitives/core.d.ts +25 -0
- package/dist/primitives/core.js +89 -0
- package/dist/primitives/dialog.d.ts +7 -0
- package/dist/primitives/dialog.js +15 -0
- package/dist/primitives/drawer.d.ts +30 -0
- package/dist/primitives/drawer.js +39 -0
- package/dist/primitives/dropdown-menu.d.ts +24 -0
- package/dist/primitives/dropdown-menu.js +19 -0
- package/dist/primitives/form.d.ts +154 -0
- package/dist/primitives/form.js +139 -0
- package/dist/primitives/hover-card.d.ts +4 -0
- package/dist/primitives/hover-card.js +8 -0
- package/dist/primitives/input-otp.d.ts +21 -0
- package/dist/primitives/input-otp.js +78 -0
- package/dist/primitives/label.d.ts +2 -0
- package/dist/primitives/label.js +7 -0
- package/dist/primitives/layer.d.ts +84 -0
- package/dist/primitives/layer.js +300 -0
- package/dist/primitives/menu.d.ts +56 -0
- package/dist/primitives/menu.js +126 -0
- package/dist/primitives/menubar.d.ts +91 -0
- package/dist/primitives/menubar.js +44 -0
- package/dist/primitives/navigation-menu.d.ts +32 -0
- package/dist/primitives/navigation-menu.js +121 -0
- package/dist/primitives/popover.d.ts +4 -0
- package/dist/primitives/popover.js +12 -0
- package/dist/primitives/progress.d.ts +7 -0
- package/dist/primitives/progress.js +13 -0
- package/dist/primitives/radio-group.d.ts +18 -0
- package/dist/primitives/radio-group.js +36 -0
- package/dist/primitives/resizable.d.ts +19 -0
- package/dist/primitives/resizable.js +91 -0
- package/dist/primitives/scroll-area.d.ts +12 -0
- package/dist/primitives/scroll-area.js +26 -0
- package/dist/primitives/select.d.ts +42 -0
- package/dist/primitives/select.js +167 -0
- package/dist/primitives/separator.d.ts +5 -0
- package/dist/primitives/separator.js +7 -0
- package/dist/primitives/slider.d.ts +25 -0
- package/dist/primitives/slider.js +98 -0
- package/dist/primitives/slot.d.ts +1 -0
- package/dist/primitives/slot.js +4 -0
- package/dist/primitives/switch.d.ts +11 -0
- package/dist/primitives/switch.js +22 -0
- package/dist/primitives/tabs.d.ts +23 -0
- package/dist/primitives/tabs.js +38 -0
- package/dist/primitives/toast.d.ts +55 -0
- package/dist/primitives/toast.js +86 -0
- package/dist/primitives/toggle-group.d.ts +24 -0
- package/dist/primitives/toggle-group.js +33 -0
- package/dist/primitives/toggle.d.ts +7 -0
- package/dist/primitives/toggle.js +13 -0
- package/dist/primitives/tooltip.d.ts +7 -0
- package/dist/primitives/tooltip.js +10 -0
- package/dist/style-entry.d.ts +1 -0
- package/dist/style-entry.js +1 -0
- package/dist/styles.css +7016 -0
- package/dist/styles.js +1 -0
- package/dist/theme/index.d.ts +110 -0
- package/dist/theme/index.js +199 -0
- package/licenses/Lucide.txt +15 -0
- package/package.json +67 -4
package/dist/index.js
ADDED
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
import { ConfigProvider, ThemeProvider, darkNavTokens, navStyleLabels, resolveTheme, themeDescriptions, themeLabels, themeNames, themePresets, themeVariables, useLibraryTheme, useTheme, useThemePortalContainer } from "./theme/index.js";
|
|
2
|
+
import { DateTimePicker } from "./components/date-time-picker.js";
|
|
3
|
+
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "./components/ui/accordion.js";
|
|
4
|
+
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger } from "./components/ui/alert-dialog.js";
|
|
5
|
+
import { Alert, AlertDescription, AlertTitle } from "./components/ui/alert.js";
|
|
6
|
+
import { AspectRatio } from "./components/ui/aspect-ratio.js";
|
|
7
|
+
import { Avatar, AvatarFallback, AvatarImage } from "./components/ui/avatar.js";
|
|
8
|
+
import { Badge, badgeVariants } from "./components/ui/badge.js";
|
|
9
|
+
import { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "./components/ui/breadcrumb.js";
|
|
10
|
+
import { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants } from "./components/ui/button-group.js";
|
|
11
|
+
import { Button, buttonVariants } from "./components/ui/button.js";
|
|
12
|
+
import { Calendar, CalendarDayButton } from "./components/ui/calendar.js";
|
|
13
|
+
import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "./components/ui/card.js";
|
|
14
|
+
import { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from "./components/ui/carousel.js";
|
|
15
|
+
import { ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent } from "./components/ui/chart.js";
|
|
16
|
+
import { Checkbox } from "./components/ui/checkbox.js";
|
|
17
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "./components/ui/collapsible.js";
|
|
18
|
+
import { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut } from "./components/ui/command.js";
|
|
19
|
+
import { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger } from "./components/ui/context-menu.js";
|
|
20
|
+
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from "./components/ui/dialog.js";
|
|
21
|
+
import { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger } from "./components/ui/drawer.js";
|
|
22
|
+
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "./components/ui/dropdown-menu.js";
|
|
23
|
+
import { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "./components/ui/empty.js";
|
|
24
|
+
import { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle } from "./components/ui/field.js";
|
|
25
|
+
import { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField } from "./components/ui/form.js";
|
|
26
|
+
import { HoverCard, HoverCardContent, HoverCardTrigger } from "./components/ui/hover-card.js";
|
|
27
|
+
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea } from "./components/ui/input-group.js";
|
|
28
|
+
import { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot } from "./components/ui/input-otp.js";
|
|
29
|
+
import { Input } from "./components/ui/input.js";
|
|
30
|
+
import { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle } from "./components/ui/item.js";
|
|
31
|
+
import { Kbd, KbdGroup } from "./components/ui/kbd.js";
|
|
32
|
+
import { Label } from "./components/ui/label.js";
|
|
33
|
+
import { Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger } from "./components/ui/menubar.js";
|
|
34
|
+
import { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, navigationMenuTriggerStyle } from "./components/ui/navigation-menu.js";
|
|
35
|
+
import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "./components/ui/pagination.js";
|
|
36
|
+
import { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger } from "./components/ui/popover.js";
|
|
37
|
+
import { Progress } from "./components/ui/progress.js";
|
|
38
|
+
import { RadioGroup, RadioGroupItem } from "./components/ui/radio-group.js";
|
|
39
|
+
import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "./components/ui/resizable.js";
|
|
40
|
+
import { ScrollArea, ScrollBar } from "./components/ui/scroll-area.js";
|
|
41
|
+
import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from "./components/ui/select.js";
|
|
42
|
+
import { Separator } from "./components/ui/separator.js";
|
|
43
|
+
import { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger } from "./components/ui/sheet.js";
|
|
44
|
+
import { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar } from "./components/ui/sidebar.js";
|
|
45
|
+
import { Skeleton } from "./components/ui/skeleton.js";
|
|
46
|
+
import { Slider } from "./components/ui/slider.js";
|
|
47
|
+
import { Toaster } from "./components/ui/sonner.js";
|
|
48
|
+
import { Spinner } from "./components/ui/spinner.js";
|
|
49
|
+
import { Switch } from "./components/ui/switch.js";
|
|
50
|
+
import { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow } from "./components/ui/table.js";
|
|
51
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from "./components/ui/tabs.js";
|
|
52
|
+
import { Textarea } from "./components/ui/textarea.js";
|
|
53
|
+
import { ToggleGroup, ToggleGroupItem } from "./components/ui/toggle-group.js";
|
|
54
|
+
import { Toggle, toggleVariants } from "./components/ui/toggle.js";
|
|
55
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./components/ui/tooltip.js";
|
|
56
|
+
import { CardDateFilter, defaultCardDateRange } from "./components/card-date-filter.js";
|
|
57
|
+
import { DetailDialog } from "./components/detail-dialog.js";
|
|
58
|
+
import { OrgPicker } from "./components/org-picker.js";
|
|
59
|
+
import { PersonPicker } from "./components/person-picker.js";
|
|
60
|
+
import { AddressPicker } from "./components/address-picker.js";
|
|
61
|
+
import { ProcessFlowBar } from "./components/process-flow-bar.js";
|
|
62
|
+
import { DocumentLinks } from "./components/document-links.js";
|
|
63
|
+
import { DraftRowActions } from "./components/draft-row-actions.js";
|
|
64
|
+
import { ProductPickerDialog } from "./components/product-picker.js";
|
|
65
|
+
import { DetailRow, RefDocPicker } from "./components/ref-doc-picker.js";
|
|
66
|
+
import { StateView } from "./components/state-view.js";
|
|
67
|
+
import { PageHeader } from "./components/page-header.js";
|
|
68
|
+
import { ThemeSwatch, ThemeSwitcher } from "./components/theme-switcher.js";
|
|
69
|
+
import { Area, AreaChart, Bar, BarChart, CartesianGrid, Line, LineChart, XAxis, YAxis } from "./primitives/chart.js";
|
|
70
|
+
import { toast } from "./primitives/toast.js";
|
|
71
|
+
import { useForm } from "./primitives/form.js";
|
|
72
|
+
export {
|
|
73
|
+
Accordion,
|
|
74
|
+
AccordionContent,
|
|
75
|
+
AccordionItem,
|
|
76
|
+
AccordionTrigger,
|
|
77
|
+
AddressPicker,
|
|
78
|
+
Alert,
|
|
79
|
+
AlertDescription,
|
|
80
|
+
AlertDialog,
|
|
81
|
+
AlertDialogAction,
|
|
82
|
+
AlertDialogCancel,
|
|
83
|
+
AlertDialogContent,
|
|
84
|
+
AlertDialogDescription,
|
|
85
|
+
AlertDialogFooter,
|
|
86
|
+
AlertDialogHeader,
|
|
87
|
+
AlertDialogOverlay,
|
|
88
|
+
AlertDialogPortal,
|
|
89
|
+
AlertDialogTitle,
|
|
90
|
+
AlertDialogTrigger,
|
|
91
|
+
AlertTitle,
|
|
92
|
+
Area,
|
|
93
|
+
AreaChart,
|
|
94
|
+
AspectRatio,
|
|
95
|
+
Avatar,
|
|
96
|
+
AvatarFallback,
|
|
97
|
+
AvatarImage,
|
|
98
|
+
Badge,
|
|
99
|
+
Bar,
|
|
100
|
+
BarChart,
|
|
101
|
+
Breadcrumb,
|
|
102
|
+
BreadcrumbEllipsis,
|
|
103
|
+
BreadcrumbItem,
|
|
104
|
+
BreadcrumbLink,
|
|
105
|
+
BreadcrumbList,
|
|
106
|
+
BreadcrumbPage,
|
|
107
|
+
BreadcrumbSeparator,
|
|
108
|
+
Button,
|
|
109
|
+
ButtonGroup,
|
|
110
|
+
ButtonGroupSeparator,
|
|
111
|
+
ButtonGroupText,
|
|
112
|
+
Calendar,
|
|
113
|
+
CalendarDayButton,
|
|
114
|
+
Card,
|
|
115
|
+
CardAction,
|
|
116
|
+
CardContent,
|
|
117
|
+
CardDateFilter,
|
|
118
|
+
CardDescription,
|
|
119
|
+
CardFooter,
|
|
120
|
+
CardHeader,
|
|
121
|
+
CardTitle,
|
|
122
|
+
Carousel,
|
|
123
|
+
CarouselContent,
|
|
124
|
+
CarouselItem,
|
|
125
|
+
CarouselNext,
|
|
126
|
+
CarouselPrevious,
|
|
127
|
+
CartesianGrid,
|
|
128
|
+
ChartContainer,
|
|
129
|
+
ChartLegend,
|
|
130
|
+
ChartLegendContent,
|
|
131
|
+
ChartStyle,
|
|
132
|
+
ChartTooltip,
|
|
133
|
+
ChartTooltipContent,
|
|
134
|
+
Checkbox,
|
|
135
|
+
Collapsible,
|
|
136
|
+
CollapsibleContent,
|
|
137
|
+
CollapsibleTrigger,
|
|
138
|
+
Command,
|
|
139
|
+
CommandDialog,
|
|
140
|
+
CommandEmpty,
|
|
141
|
+
CommandGroup,
|
|
142
|
+
CommandInput,
|
|
143
|
+
CommandItem,
|
|
144
|
+
CommandList,
|
|
145
|
+
CommandSeparator,
|
|
146
|
+
CommandShortcut,
|
|
147
|
+
ConfigProvider,
|
|
148
|
+
ContextMenu,
|
|
149
|
+
ContextMenuCheckboxItem,
|
|
150
|
+
ContextMenuContent,
|
|
151
|
+
ContextMenuGroup,
|
|
152
|
+
ContextMenuItem,
|
|
153
|
+
ContextMenuLabel,
|
|
154
|
+
ContextMenuPortal,
|
|
155
|
+
ContextMenuRadioGroup,
|
|
156
|
+
ContextMenuRadioItem,
|
|
157
|
+
ContextMenuSeparator,
|
|
158
|
+
ContextMenuShortcut,
|
|
159
|
+
ContextMenuSub,
|
|
160
|
+
ContextMenuSubContent,
|
|
161
|
+
ContextMenuSubTrigger,
|
|
162
|
+
ContextMenuTrigger,
|
|
163
|
+
DateTimePicker,
|
|
164
|
+
DetailDialog,
|
|
165
|
+
DetailRow,
|
|
166
|
+
Dialog,
|
|
167
|
+
DialogClose,
|
|
168
|
+
DialogContent,
|
|
169
|
+
DialogDescription,
|
|
170
|
+
DialogFooter,
|
|
171
|
+
DialogHeader,
|
|
172
|
+
DialogOverlay,
|
|
173
|
+
DialogPortal,
|
|
174
|
+
DialogTitle,
|
|
175
|
+
DialogTrigger,
|
|
176
|
+
DocumentLinks,
|
|
177
|
+
DraftRowActions,
|
|
178
|
+
Drawer,
|
|
179
|
+
DrawerClose,
|
|
180
|
+
DrawerContent,
|
|
181
|
+
DrawerDescription,
|
|
182
|
+
DrawerFooter,
|
|
183
|
+
DrawerHeader,
|
|
184
|
+
DrawerOverlay,
|
|
185
|
+
DrawerPortal,
|
|
186
|
+
DrawerTitle,
|
|
187
|
+
DrawerTrigger,
|
|
188
|
+
DropdownMenu,
|
|
189
|
+
DropdownMenuCheckboxItem,
|
|
190
|
+
DropdownMenuContent,
|
|
191
|
+
DropdownMenuGroup,
|
|
192
|
+
DropdownMenuItem,
|
|
193
|
+
DropdownMenuLabel,
|
|
194
|
+
DropdownMenuPortal,
|
|
195
|
+
DropdownMenuRadioGroup,
|
|
196
|
+
DropdownMenuRadioItem,
|
|
197
|
+
DropdownMenuSeparator,
|
|
198
|
+
DropdownMenuShortcut,
|
|
199
|
+
DropdownMenuSub,
|
|
200
|
+
DropdownMenuSubContent,
|
|
201
|
+
DropdownMenuSubTrigger,
|
|
202
|
+
DropdownMenuTrigger,
|
|
203
|
+
Empty,
|
|
204
|
+
EmptyContent,
|
|
205
|
+
EmptyDescription,
|
|
206
|
+
EmptyHeader,
|
|
207
|
+
EmptyMedia,
|
|
208
|
+
EmptyTitle,
|
|
209
|
+
Field,
|
|
210
|
+
FieldContent,
|
|
211
|
+
FieldDescription,
|
|
212
|
+
FieldError,
|
|
213
|
+
FieldGroup,
|
|
214
|
+
FieldLabel,
|
|
215
|
+
FieldLegend,
|
|
216
|
+
FieldSeparator,
|
|
217
|
+
FieldSet,
|
|
218
|
+
FieldTitle,
|
|
219
|
+
Form,
|
|
220
|
+
FormControl,
|
|
221
|
+
FormDescription,
|
|
222
|
+
FormField,
|
|
223
|
+
FormItem,
|
|
224
|
+
FormLabel,
|
|
225
|
+
FormMessage,
|
|
226
|
+
HoverCard,
|
|
227
|
+
HoverCardContent,
|
|
228
|
+
HoverCardTrigger,
|
|
229
|
+
Input,
|
|
230
|
+
InputGroup,
|
|
231
|
+
InputGroupAddon,
|
|
232
|
+
InputGroupButton,
|
|
233
|
+
InputGroupInput,
|
|
234
|
+
InputGroupText,
|
|
235
|
+
InputGroupTextarea,
|
|
236
|
+
InputOTP,
|
|
237
|
+
InputOTPGroup,
|
|
238
|
+
InputOTPSeparator,
|
|
239
|
+
InputOTPSlot,
|
|
240
|
+
Item,
|
|
241
|
+
ItemActions,
|
|
242
|
+
ItemContent,
|
|
243
|
+
ItemDescription,
|
|
244
|
+
ItemFooter,
|
|
245
|
+
ItemGroup,
|
|
246
|
+
ItemHeader,
|
|
247
|
+
ItemMedia,
|
|
248
|
+
ItemSeparator,
|
|
249
|
+
ItemTitle,
|
|
250
|
+
Kbd,
|
|
251
|
+
KbdGroup,
|
|
252
|
+
Label,
|
|
253
|
+
Line,
|
|
254
|
+
LineChart,
|
|
255
|
+
Menubar,
|
|
256
|
+
MenubarCheckboxItem,
|
|
257
|
+
MenubarContent,
|
|
258
|
+
MenubarGroup,
|
|
259
|
+
MenubarItem,
|
|
260
|
+
MenubarLabel,
|
|
261
|
+
MenubarMenu,
|
|
262
|
+
MenubarPortal,
|
|
263
|
+
MenubarRadioGroup,
|
|
264
|
+
MenubarRadioItem,
|
|
265
|
+
MenubarSeparator,
|
|
266
|
+
MenubarShortcut,
|
|
267
|
+
MenubarSub,
|
|
268
|
+
MenubarSubContent,
|
|
269
|
+
MenubarSubTrigger,
|
|
270
|
+
MenubarTrigger,
|
|
271
|
+
NavigationMenu,
|
|
272
|
+
NavigationMenuContent,
|
|
273
|
+
NavigationMenuIndicator,
|
|
274
|
+
NavigationMenuItem,
|
|
275
|
+
NavigationMenuLink,
|
|
276
|
+
NavigationMenuList,
|
|
277
|
+
NavigationMenuTrigger,
|
|
278
|
+
NavigationMenuViewport,
|
|
279
|
+
OrgPicker,
|
|
280
|
+
PageHeader,
|
|
281
|
+
Pagination,
|
|
282
|
+
PaginationContent,
|
|
283
|
+
PaginationEllipsis,
|
|
284
|
+
PaginationItem,
|
|
285
|
+
PaginationLink,
|
|
286
|
+
PaginationNext,
|
|
287
|
+
PaginationPrevious,
|
|
288
|
+
PersonPicker,
|
|
289
|
+
Popover,
|
|
290
|
+
PopoverAnchor,
|
|
291
|
+
PopoverClose,
|
|
292
|
+
PopoverContent,
|
|
293
|
+
PopoverTrigger,
|
|
294
|
+
ProcessFlowBar,
|
|
295
|
+
ProductPickerDialog,
|
|
296
|
+
Progress,
|
|
297
|
+
RadioGroup,
|
|
298
|
+
RadioGroupItem,
|
|
299
|
+
RefDocPicker,
|
|
300
|
+
ResizableHandle,
|
|
301
|
+
ResizablePanel,
|
|
302
|
+
ResizablePanelGroup,
|
|
303
|
+
ScrollArea,
|
|
304
|
+
ScrollBar,
|
|
305
|
+
Select,
|
|
306
|
+
SelectContent,
|
|
307
|
+
SelectGroup,
|
|
308
|
+
SelectItem,
|
|
309
|
+
SelectLabel,
|
|
310
|
+
SelectScrollDownButton,
|
|
311
|
+
SelectScrollUpButton,
|
|
312
|
+
SelectSeparator,
|
|
313
|
+
SelectTrigger,
|
|
314
|
+
SelectValue,
|
|
315
|
+
Separator,
|
|
316
|
+
Sheet,
|
|
317
|
+
SheetClose,
|
|
318
|
+
SheetContent,
|
|
319
|
+
SheetDescription,
|
|
320
|
+
SheetFooter,
|
|
321
|
+
SheetHeader,
|
|
322
|
+
SheetTitle,
|
|
323
|
+
SheetTrigger,
|
|
324
|
+
Sidebar,
|
|
325
|
+
SidebarContent,
|
|
326
|
+
SidebarFooter,
|
|
327
|
+
SidebarGroup,
|
|
328
|
+
SidebarGroupAction,
|
|
329
|
+
SidebarGroupContent,
|
|
330
|
+
SidebarGroupLabel,
|
|
331
|
+
SidebarHeader,
|
|
332
|
+
SidebarInput,
|
|
333
|
+
SidebarInset,
|
|
334
|
+
SidebarMenu,
|
|
335
|
+
SidebarMenuAction,
|
|
336
|
+
SidebarMenuBadge,
|
|
337
|
+
SidebarMenuButton,
|
|
338
|
+
SidebarMenuItem,
|
|
339
|
+
SidebarMenuSkeleton,
|
|
340
|
+
SidebarMenuSub,
|
|
341
|
+
SidebarMenuSubButton,
|
|
342
|
+
SidebarMenuSubItem,
|
|
343
|
+
SidebarProvider,
|
|
344
|
+
SidebarRail,
|
|
345
|
+
SidebarSeparator,
|
|
346
|
+
SidebarTrigger,
|
|
347
|
+
Skeleton,
|
|
348
|
+
Slider,
|
|
349
|
+
Spinner,
|
|
350
|
+
StateView,
|
|
351
|
+
Switch,
|
|
352
|
+
Table,
|
|
353
|
+
TableBody,
|
|
354
|
+
TableCaption,
|
|
355
|
+
TableCell,
|
|
356
|
+
TableFooter,
|
|
357
|
+
TableHead,
|
|
358
|
+
TableHeader,
|
|
359
|
+
TableRow,
|
|
360
|
+
Tabs,
|
|
361
|
+
TabsContent,
|
|
362
|
+
TabsList,
|
|
363
|
+
TabsTrigger,
|
|
364
|
+
Textarea,
|
|
365
|
+
ThemeProvider,
|
|
366
|
+
ThemeSwatch,
|
|
367
|
+
ThemeSwitcher,
|
|
368
|
+
Toaster,
|
|
369
|
+
Toggle,
|
|
370
|
+
ToggleGroup,
|
|
371
|
+
ToggleGroupItem,
|
|
372
|
+
Tooltip,
|
|
373
|
+
TooltipContent,
|
|
374
|
+
TooltipProvider,
|
|
375
|
+
TooltipTrigger,
|
|
376
|
+
XAxis,
|
|
377
|
+
YAxis,
|
|
378
|
+
badgeVariants,
|
|
379
|
+
buttonGroupVariants,
|
|
380
|
+
buttonVariants,
|
|
381
|
+
darkNavTokens,
|
|
382
|
+
defaultCardDateRange,
|
|
383
|
+
navStyleLabels,
|
|
384
|
+
navigationMenuTriggerStyle,
|
|
385
|
+
resolveTheme,
|
|
386
|
+
themeDescriptions,
|
|
387
|
+
themeLabels,
|
|
388
|
+
themeNames,
|
|
389
|
+
themePresets,
|
|
390
|
+
themeVariables,
|
|
391
|
+
toast,
|
|
392
|
+
toggleVariants,
|
|
393
|
+
useForm,
|
|
394
|
+
useFormField,
|
|
395
|
+
useLibraryTheme,
|
|
396
|
+
useSidebar,
|
|
397
|
+
useTheme,
|
|
398
|
+
useThemePortalContainer
|
|
399
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
/** Shared controlled selection states. Data and requests belong to the host application. */
|
|
3
|
+
export interface SelectionStateProps {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
/** An error message. It replaces the options until the host clears it. */
|
|
7
|
+
error?: string;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
/** Allow resetting the controlled value. Default: true. */
|
|
10
|
+
allowClear?: boolean;
|
|
11
|
+
className?: string;
|
|
12
|
+
'aria-label'?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function SelectionFrame({ label, placeholder, disabled, open, onOpenChange, clear, children, className, name }: {
|
|
15
|
+
label: string;
|
|
16
|
+
placeholder: string;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
open: boolean;
|
|
19
|
+
onOpenChange: (open: boolean) => void;
|
|
20
|
+
clear?: () => void;
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
className?: string;
|
|
23
|
+
name: string;
|
|
24
|
+
}): import("react").JSX.Element;
|
|
25
|
+
export declare function SelectionSearch({ value, onChange, label }: {
|
|
26
|
+
value: string;
|
|
27
|
+
onChange: (v: string) => void;
|
|
28
|
+
label: string;
|
|
29
|
+
}): import("react").JSX.Element;
|
|
30
|
+
export declare function SelectionMessage({ loading, error, empty }: {
|
|
31
|
+
loading?: boolean;
|
|
32
|
+
error?: string;
|
|
33
|
+
empty: boolean;
|
|
34
|
+
}): import("react").JSX.Element | null;
|
|
35
|
+
export declare function SelectionCheck({ selected }: {
|
|
36
|
+
selected: boolean;
|
|
37
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect } from "react";
|
|
3
|
+
import { Check, ChevronDown, XIcon, Search } from "../icons/index.js";
|
|
4
|
+
import { Button } from "../components/ui/button.js";
|
|
5
|
+
import { Input } from "../components/ui/input.js";
|
|
6
|
+
import { Popover, PopoverTrigger, PopoverContent } from "../components/ui/popover.js";
|
|
7
|
+
import { cn } from "../lib/utils.js";
|
|
8
|
+
function SelectionFrame({ label, placeholder, disabled, open, onOpenChange, clear, children, className, name }) {
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
if (disabled && open) onOpenChange(false);
|
|
11
|
+
}, [disabled, open, onOpenChange]);
|
|
12
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("group relative flex min-w-0 items-center", className), children: [
|
|
13
|
+
/* @__PURE__ */ jsxs(Popover, { open, onOpenChange, children: [
|
|
14
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { type: "button", variant: "outline", color: "default", disabled, "aria-label": name, className: "h-9 min-w-0 flex-1 justify-between bg-card font-normal shadow-none", children: [
|
|
15
|
+
/* @__PURE__ */ jsx("span", { className: cn("truncate text-foreground", !label && "text-muted-foreground", clear && "pr-6"), children: label || placeholder }),
|
|
16
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: cn("size-3.5 shrink-0 text-muted-foreground transition-transform duration-150", open && "rotate-180") })
|
|
17
|
+
] }) }),
|
|
18
|
+
/* @__PURE__ */ jsx(PopoverContent, { align: "start", "aria-label": name, className: "w-[min(480px,calc(100vw-32px))] p-0", children })
|
|
19
|
+
] }),
|
|
20
|
+
clear && !disabled && /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon", color: "default", "aria-label": `清空${name}`, "data-slot": "selection-clear", className: "absolute right-8 top-1/2 size-5 -translate-y-1/2 rounded-full text-muted-foreground opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 focus-visible:opacity-100", onClick: clear, children: /* @__PURE__ */ jsx(XIcon, { className: "size-3" }) })
|
|
21
|
+
] });
|
|
22
|
+
}
|
|
23
|
+
function SelectionSearch({ value, onChange, label }) {
|
|
24
|
+
return /* @__PURE__ */ jsxs("div", { className: "relative border-b border-border p-3", children: [
|
|
25
|
+
/* @__PURE__ */ jsx(Search, { className: "pointer-events-none absolute top-[22px] left-6 size-4 text-muted-foreground" }),
|
|
26
|
+
/* @__PURE__ */ jsx(Input, { "aria-label": label, value, onChange: (e) => onChange(e.target.value), placeholder: label, className: "pl-9" })
|
|
27
|
+
] });
|
|
28
|
+
}
|
|
29
|
+
function SelectionMessage({ loading, error, empty }) {
|
|
30
|
+
return loading ? /* @__PURE__ */ jsx("p", { role: "status", className: "p-6 text-center text-sm text-muted-foreground", children: "正在加载…" }) : error ? /* @__PURE__ */ jsx("p", { role: "alert", className: "p-6 text-sm text-destructive", children: error }) : empty ? /* @__PURE__ */ jsx("p", { role: "status", className: "p-6 text-center text-sm text-muted-foreground", children: "暂无匹配选项" }) : null;
|
|
31
|
+
}
|
|
32
|
+
function SelectionCheck({ selected }) {
|
|
33
|
+
return /* @__PURE__ */ jsx(Check, { className: cn("size-4 shrink-0 text-primary", !selected && "invisible") });
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
SelectionCheck,
|
|
37
|
+
SelectionFrame,
|
|
38
|
+
SelectionMessage,
|
|
39
|
+
SelectionSearch
|
|
40
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type ClassValue = string | number | bigint | boolean | null | undefined | ClassValue[] | {
|
|
2
|
+
[key: string]: unknown;
|
|
3
|
+
};
|
|
4
|
+
/** Accept nested conditional class values without a runtime dependency. */
|
|
5
|
+
export declare function classNames(...values: ClassValue[]): string;
|
|
6
|
+
export declare function mergeClasses(classes: string): string;
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
function classNames(...values) {
|
|
2
|
+
const result = [];
|
|
3
|
+
function append(value) {
|
|
4
|
+
if (!value) return;
|
|
5
|
+
if (typeof value === "string" || typeof value === "number" || typeof value === "bigint") result.push(String(value));
|
|
6
|
+
else if (Array.isArray(value)) value.forEach(append);
|
|
7
|
+
else if (typeof value === "object") {
|
|
8
|
+
for (const key of Object.keys(value)) if (value[key]) result.push(key);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
values.forEach(append);
|
|
12
|
+
return result.join(" ");
|
|
13
|
+
}
|
|
14
|
+
function splitOutside(value, separator) {
|
|
15
|
+
const parts = [];
|
|
16
|
+
let depth = 0, start = 0, quote = "";
|
|
17
|
+
for (let i = 0; i < value.length; i++) {
|
|
18
|
+
const ch = value[i];
|
|
19
|
+
if (ch === "\\") {
|
|
20
|
+
i++;
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
if (quote) {
|
|
24
|
+
if (ch === quote) quote = "";
|
|
25
|
+
continue;
|
|
26
|
+
}
|
|
27
|
+
if (ch === '"' || ch === "'") {
|
|
28
|
+
quote = ch;
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
if (ch === "[" || ch === "(") depth++;
|
|
32
|
+
else if (ch === "]" || ch === ")") depth--;
|
|
33
|
+
else if (!depth && ch === separator) {
|
|
34
|
+
parts.push(value.slice(start, i));
|
|
35
|
+
start = i + 1;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
parts.push(value.slice(start));
|
|
39
|
+
return parts;
|
|
40
|
+
}
|
|
41
|
+
const sides = { "": ["top", "right", "bottom", "left"], x: ["left", "right"], y: ["top", "bottom"], t: ["top"], r: ["right"], b: ["bottom"], l: ["left"], s: ["start"], e: ["end"] };
|
|
42
|
+
const corners = { "": ["tl", "tr", "br", "bl"], t: ["tl", "tr"], r: ["tr", "br"], b: ["bl", "br"], l: ["tl", "bl"], tl: ["tl"], tr: ["tr"], br: ["br"], bl: ["bl"], s: ["ss", "es"], e: ["se", "ee"], ss: ["ss"], se: ["se"], es: ["es"], ee: ["ee"] };
|
|
43
|
+
const length = (value) => /^(?:\d+(?:\.\d+)?|\[(?:length:|number:)|\[(?:[-+]?(?:\d|\.\d)|calc\(|min\(|max\(|clamp\())/.test(value);
|
|
44
|
+
const fontSize = (value) => /^(?:xs|sm|base|lg|xl|\d+xl)$/.test(value) || length(value);
|
|
45
|
+
const one = (value) => [value];
|
|
46
|
+
const families = ["grid-cols", "grid-rows", "auto-cols", "auto-rows", "grid-flow", "col-span", "col-start", "col-end", "row-span", "row-start", "row-end", "items", "justify-items", "justify-self", "justify", "content", "self", "place-items", "place-content", "place-self", "object", "aspect", "order", "z", "float", "clear", "box", "leading", "tracking", "whitespace", "break", "hyphens", "indent", "align", "underline-offset", "opacity", "mix-blend", "isolation", "transition", "duration", "delay", "ease", "animate", "origin", "rotate", "transform", "perspective", "backface", "blur", "brightness", "contrast", "drop-shadow", "grayscale", "hue-rotate", "invert", "saturate", "sepia", "backdrop-blur", "backdrop-brightness", "backdrop-contrast", "backdrop-grayscale", "backdrop-hue-rotate", "backdrop-invert", "backdrop-opacity", "backdrop-saturate", "backdrop-sepia", "cursor", "pointer-events", "resize", "select", "touch", "accent", "caret", "appearance", "fill", "stroke", "scroll-m", "scroll-p", "snap", "list", "line-clamp"];
|
|
47
|
+
function properties(raw) {
|
|
48
|
+
const value = raw.replace(/^-/, "");
|
|
49
|
+
const [utility] = splitOutside(value, "/");
|
|
50
|
+
let match;
|
|
51
|
+
if (match = utility.match(/^([pm])([xytrblse]?)-/)) return sides[match[2]].map((side) => `${match[1]}-${side}`);
|
|
52
|
+
if (match = utility.match(/^(inset)(?:-([xy]))?-/)) return sides[match[2] ?? ""].map((side) => `position-${side}`);
|
|
53
|
+
if (match = utility.match(/^(top|right|bottom|left|start|end)-/)) return one(`position-${match[1]}`);
|
|
54
|
+
if (match = utility.match(/^(w|h|min-w|max-w|min-h|max-h|size)-/)) return match[1] === "size" ? ["width", "height"] : one({ w: "width", h: "height" }[match[1]] ?? match[1]);
|
|
55
|
+
if (match = utility.match(/^gap(?:-([xy]))?-/)) return match[1] ? one(`gap-${match[1]}`) : ["gap-x", "gap-y"];
|
|
56
|
+
if (match = utility.match(/^space-([xy])-(.+)$/)) return one(`space-${match[1]}${match[2] === "reverse" ? "-reverse" : ""}`);
|
|
57
|
+
if (match = utility.match(/^rounded(?:-([trblse]|tl|tr|bl|br|ss|se|es|ee))?(?:-|$)/)) return corners[match[1] ?? ""].map((corner) => `radius-${corner}`);
|
|
58
|
+
if (match = utility.match(/^border(?:-([xytrblse]))?(?:-(.+))?$/)) {
|
|
59
|
+
const rest = match[2] ?? "";
|
|
60
|
+
if (/^(solid|dashed|dotted|double|hidden|none)$/.test(rest)) return one("border-style");
|
|
61
|
+
return sides[match[1] ?? ""].map((side) => `border-${side}-${!rest || length(rest) ? "width" : "color"}`);
|
|
62
|
+
}
|
|
63
|
+
if (match = utility.match(/^text-(.+)$/)) {
|
|
64
|
+
const rest = match[1];
|
|
65
|
+
if (fontSize(rest)) return ["font-size", "line-height"];
|
|
66
|
+
if (/^(left|center|right|justify|start|end)$/.test(rest)) return one("text-align");
|
|
67
|
+
if (/^(wrap|nowrap|balance|pretty)$/.test(rest)) return one("text-wrap");
|
|
68
|
+
if (/^(ellipsis|clip)$/.test(rest)) return one("text-overflow");
|
|
69
|
+
return one("text-color");
|
|
70
|
+
}
|
|
71
|
+
if (match = utility.match(/^font-(.+)$/)) return one(/^(thin|extralight|light|normal|medium|semibold|bold|extrabold|black|\d+|\[(?:weight:|number:|\d))/.test(match[1]) ? "font-weight" : "font-family");
|
|
72
|
+
if (match = utility.match(/^bg-(.+)$/)) {
|
|
73
|
+
const rest = match[1];
|
|
74
|
+
if (/^(?:gradient-to-|linear-|radial|conic|none$|\[(?:image:|url\(|(?:linear|radial|conic)-gradient\())/.test(rest)) return one("bg-image");
|
|
75
|
+
if (/^(?:cover|contain|auto|\[size:)/.test(rest)) return one("bg-size");
|
|
76
|
+
if (/^(?:center|top|bottom|left|right|\[position:)/.test(rest)) return one("bg-position");
|
|
77
|
+
if (/^(fixed|local|scroll)$/.test(rest)) return one("bg-attachment");
|
|
78
|
+
if (/^(clip|origin|repeat|blend)-/.test(rest)) return one("bg-" + rest.split("-")[0]);
|
|
79
|
+
return one("bg-color");
|
|
80
|
+
}
|
|
81
|
+
if (match = utility.match(/^(ring|outline|shadow|inset-shadow)(?:-(.+))?$/)) {
|
|
82
|
+
const [, family2, rest = ""] = match;
|
|
83
|
+
if (family2 === "ring" && /^offset-/.test(rest)) return one(length(rest.slice(7)) ? "ring-offset-width" : "ring-offset-color");
|
|
84
|
+
if (family2 === "ring" && rest === "inset") return one("ring-inset");
|
|
85
|
+
if (family2 === "outline" && /^offset-/.test(rest)) return one("outline-offset");
|
|
86
|
+
if (family2 === "outline" && /^(none|hidden|solid|dashed|dotted|double)$/.test(rest)) return one("outline-style");
|
|
87
|
+
const arbitraryShape = /^\[(?!color:)[^\]]*_/.test(rest);
|
|
88
|
+
const dimension = !rest || length(rest) || arbitraryShape || /^(none|(?:2)?xs|sm|md|lg|xl|\d+xl|inner)$/.test(rest);
|
|
89
|
+
return one(`${family2}-${dimension ? "size" : "color"}`);
|
|
90
|
+
}
|
|
91
|
+
if (match = utility.match(/^(overflow|overscroll)(?:-([xy]))?-/)) return match[2] ? one(`${match[1]}-${match[2]}`) : [`${match[1]}-x`, `${match[1]}-y`];
|
|
92
|
+
if (match = utility.match(/^flex-(.+)$/)) {
|
|
93
|
+
if (/^(row|col)(-reverse)?$/.test(match[1])) return one("flex-direction");
|
|
94
|
+
if (/^(wrap|nowrap|wrap-reverse)$/.test(match[1])) return one("flex-wrap");
|
|
95
|
+
return ["flex-grow", "flex-shrink", "flex-basis"];
|
|
96
|
+
}
|
|
97
|
+
if (/^(grow|shrink)(-|$)/.test(utility)) return one("flex-" + utility.split("-")[0]);
|
|
98
|
+
if (/^basis-/.test(utility)) return one("flex-basis");
|
|
99
|
+
if (/^(static|fixed|absolute|relative|sticky)$/.test(utility)) return one("position");
|
|
100
|
+
if (/^(block|inline-block|inline|flex|inline-flex|grid|inline-grid|flow-root|contents|hidden|table|inline-table|table-row|table-cell|list-item)$/.test(utility)) return one("display");
|
|
101
|
+
if (/^(visible|invisible|collapse)$/.test(utility)) return one("visibility");
|
|
102
|
+
if (/^(italic|not-italic)$/.test(utility)) return one("font-style");
|
|
103
|
+
if (/^(uppercase|lowercase|capitalize|normal-case)$/.test(utility)) return one("text-transform");
|
|
104
|
+
if (/^(underline|overline|line-through|no-underline)$/.test(utility)) return one("text-decoration-line");
|
|
105
|
+
if (/^(sr-only|not-sr-only)$/.test(utility)) return one("screen-reader");
|
|
106
|
+
if (/^truncate$/.test(utility)) return ["text-overflow", "whitespace", "overflow-x", "overflow-y"];
|
|
107
|
+
if (match = utility.match(/^decoration-(.+)$/)) return one(/^(solid|double|dotted|dashed|wavy)$/.test(match[1]) ? "decoration-style" : length(match[1]) || match[1] === "auto" || match[1] === "from-font" ? "decoration-width" : "decoration-color");
|
|
108
|
+
if (match = utility.match(/^divide-(.+)$/)) return one(/^[xy](-|$)/.test(match[1]) ? "divide-" + match[1][0] + (match[1].endsWith("-reverse") ? "-reverse" : "") : /^(solid|dashed|dotted|double|none)$/.test(match[1]) ? "divide-style" : "divide-color");
|
|
109
|
+
if (match = utility.match(/^scale(?:-([xyz]))?-/)) return match[1] ? one("scale-" + match[1]) : ["scale-x", "scale-y"];
|
|
110
|
+
if (match = utility.match(/^translate(?:-([xyz]))?-/)) return match[1] ? one("translate-" + match[1]) : ["translate-x", "translate-y"];
|
|
111
|
+
if (match = utility.match(/^(rotate|skew)-([xy])-?/)) return one(`${match[1]}-${match[2]}`);
|
|
112
|
+
if (match = utility.match(/^(animate-(?:in|out)|fade-(?:in|out)|zoom-(?:in|out)|slide-(?:in-from|out-to)-(?:top|bottom|left|right))(?:-|$)/)) {
|
|
113
|
+
if (match[1].startsWith("animate")) return one("animation");
|
|
114
|
+
return one(match[1].replace(/-(top|bottom|left|right)$/, (side) => /top|bottom/.test(side) ? "-y" : "-x"));
|
|
115
|
+
}
|
|
116
|
+
if (/^\[[\w-]+:/.test(utility)) return one("css-" + utility.slice(1, utility.indexOf(":")));
|
|
117
|
+
const family = families.find((prefix) => utility === prefix || utility.startsWith(prefix + "-"));
|
|
118
|
+
if (!family) return void 0;
|
|
119
|
+
if (family === "leading") return one("line-height");
|
|
120
|
+
if (family === "animate") return one("animation");
|
|
121
|
+
if (family === "object") return one(/^object-(contain|cover|fill|none|scale-down)$/.test(utility) ? "object-fit" : "object-position");
|
|
122
|
+
if (family === "stroke") return one(length(utility.slice(7)) ? "stroke-width" : "stroke-color");
|
|
123
|
+
if (family === "list") return one(/^list-(inside|outside)$/.test(utility) ? "list-position" : "list-style");
|
|
124
|
+
if (family === "snap") return one(/^snap-(start|end|center|align-none)$/.test(utility) ? "snap-align" : /^snap-(normal|always)$/.test(utility) ? "snap-stop" : /^snap-(mandatory|proximity)$/.test(utility) ? "snap-strictness" : "snap-type");
|
|
125
|
+
return one(family);
|
|
126
|
+
}
|
|
127
|
+
function mergeClasses(classes) {
|
|
128
|
+
const tokens = classes.trim().split(/\s+/), covered = /* @__PURE__ */ new Map(), result = [];
|
|
129
|
+
for (let i = tokens.length - 1; i >= 0; i--) {
|
|
130
|
+
const token = tokens[i];
|
|
131
|
+
if (!token) continue;
|
|
132
|
+
const parts = splitOutside(token, ":"), base = parts.pop();
|
|
133
|
+
const important = base.startsWith("!") || base.endsWith("!");
|
|
134
|
+
const props = properties(base.replace(/^!|!$/g, ""));
|
|
135
|
+
if (!props) {
|
|
136
|
+
result.push(token);
|
|
137
|
+
continue;
|
|
138
|
+
}
|
|
139
|
+
let run = [];
|
|
140
|
+
const modifiers = [];
|
|
141
|
+
for (const modifier of parts) {
|
|
142
|
+
if (modifier.startsWith("[") || /^(before|after|first-letter|first-line|marker|placeholder|file|\*|\*\*)$/.test(modifier)) {
|
|
143
|
+
modifiers.push(...run.sort(), modifier);
|
|
144
|
+
run = [];
|
|
145
|
+
} else run.push(modifier);
|
|
146
|
+
}
|
|
147
|
+
modifiers.push(...run.sort());
|
|
148
|
+
const key = modifiers.join(":") + (important ? ":!" : ""), seen = covered.get(key) ?? /* @__PURE__ */ new Set();
|
|
149
|
+
if (props.every((property) => seen.has(property))) continue;
|
|
150
|
+
props.forEach((property) => seen.add(property));
|
|
151
|
+
covered.set(key, seen);
|
|
152
|
+
result.push(token);
|
|
153
|
+
}
|
|
154
|
+
return result.reverse().join(" ");
|
|
155
|
+
}
|
|
156
|
+
export {
|
|
157
|
+
classNames,
|
|
158
|
+
mergeClasses
|
|
159
|
+
};
|