@postxl/ui-components 1.5.5 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +26 -13
- package/dist/index.js +338 -89
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2525,7 +2525,6 @@ type SidebarTabDefinition = {
|
|
|
2525
2525
|
id: string;
|
|
2526
2526
|
icon: LucideIcon;
|
|
2527
2527
|
label: string;
|
|
2528
|
-
render: () => React$11.ReactNode;
|
|
2529
2528
|
order?: number;
|
|
2530
2529
|
badge?: SidebarTabBadge;
|
|
2531
2530
|
};
|
|
@@ -2535,6 +2534,8 @@ type SidebarTabsState = {
|
|
|
2535
2534
|
register: (side: SidebarSide, tab: SidebarTabDefinition) => void;
|
|
2536
2535
|
unregister: (side: SidebarSide, tabId: string) => void;
|
|
2537
2536
|
setActiveTab: (side: SidebarSide, tabId: string | null) => void;
|
|
2537
|
+
portalTargets: Partial<Record<SidebarSide, Map<string, HTMLElement>>>;
|
|
2538
|
+
setPortalTarget: (side: SidebarSide, tabId: string, element: HTMLElement | null) => void;
|
|
2538
2539
|
};
|
|
2539
2540
|
declare const SidebarTabsContext: React$11.Context<SidebarTabsState | null>;
|
|
2540
2541
|
declare function SidebarTabsProvider({
|
|
@@ -2558,12 +2559,13 @@ declare function SidebarTab({
|
|
|
2558
2559
|
id,
|
|
2559
2560
|
icon,
|
|
2560
2561
|
label,
|
|
2561
|
-
render,
|
|
2562
2562
|
order,
|
|
2563
|
-
badge
|
|
2563
|
+
badge,
|
|
2564
|
+
children
|
|
2564
2565
|
}: {
|
|
2565
2566
|
side: SidebarSide;
|
|
2566
|
-
|
|
2567
|
+
children: React$10.ReactNode;
|
|
2568
|
+
} & SidebarTabDefinition): React$10.ReactPortal | null;
|
|
2567
2569
|
declare function DynamicTabbedSidebar({
|
|
2568
2570
|
side,
|
|
2569
2571
|
orientation,
|
|
@@ -2894,7 +2896,11 @@ type TreeNode = {
|
|
|
2894
2896
|
className?: string;
|
|
2895
2897
|
icon?: React$2.ReactNode;
|
|
2896
2898
|
trailing?: React$2.ReactNode;
|
|
2899
|
+
/** When true, the node cannot be dragged or deleted. */
|
|
2900
|
+
locked?: boolean;
|
|
2897
2901
|
};
|
|
2902
|
+
/** Where a dragged node will be placed relative to the drop target. */
|
|
2903
|
+
type DropPosition = 'before' | 'after' | 'inside';
|
|
2898
2904
|
type Callbacks = {
|
|
2899
2905
|
onNodeSelect?: (node: TreeNode) => void;
|
|
2900
2906
|
onGroupSelect?: (node: TreeNode) => void;
|
|
@@ -2905,20 +2911,26 @@ type Callbacks = {
|
|
|
2905
2911
|
isExpanded: boolean;
|
|
2906
2912
|
node: TreeNode;
|
|
2907
2913
|
}) => void;
|
|
2914
|
+
onNodeDelete?: (node: TreeNode) => void;
|
|
2915
|
+
/** Called when a node is dropped. The consumer handles the actual tree mutation. */
|
|
2916
|
+
onNodeDrop?: (node: TreeNode, target: {
|
|
2917
|
+
node: TreeNode;
|
|
2918
|
+
position: DropPosition;
|
|
2919
|
+
}) => void;
|
|
2908
2920
|
};
|
|
2909
2921
|
type TreeViewProps = Callbacks & {
|
|
2910
2922
|
data: TreeNode[];
|
|
2911
2923
|
className?: string;
|
|
2912
2924
|
defaultExpandedIds?: string[];
|
|
2913
|
-
selectedId?: string
|
|
2925
|
+
selectedId?: string;
|
|
2914
2926
|
};
|
|
2915
2927
|
type TreeBranchProps = Callbacks & {
|
|
2916
2928
|
node: TreeNode;
|
|
2917
2929
|
level: number;
|
|
2918
|
-
isLast?: boolean;
|
|
2919
|
-
parentIsLast?: boolean[];
|
|
2920
2930
|
defaultExpandedIds?: string[];
|
|
2921
|
-
selectedId?: string
|
|
2931
|
+
selectedId?: string;
|
|
2932
|
+
/** Full top-level tree array, threaded down so drag-and-drop helpers can resolve nodes and ancestry across the entire tree. */
|
|
2933
|
+
rootData: TreeNode[];
|
|
2922
2934
|
};
|
|
2923
2935
|
declare const TreeBranch: ({
|
|
2924
2936
|
node,
|
|
@@ -2926,18 +2938,19 @@ declare const TreeBranch: ({
|
|
|
2926
2938
|
onNodeSelect,
|
|
2927
2939
|
onGroupSelect,
|
|
2928
2940
|
onToggleGroup,
|
|
2929
|
-
|
|
2930
|
-
|
|
2941
|
+
onNodeDelete,
|
|
2942
|
+
onNodeDrop,
|
|
2931
2943
|
defaultExpandedIds,
|
|
2932
|
-
selectedId
|
|
2944
|
+
selectedId,
|
|
2945
|
+
rootData
|
|
2933
2946
|
}: TreeBranchProps) => react_jsx_runtime0.JSX.Element;
|
|
2934
2947
|
declare const TreeView: React$2.ForwardRefExoticComponent<Callbacks & {
|
|
2935
2948
|
data: TreeNode[];
|
|
2936
2949
|
className?: string;
|
|
2937
2950
|
defaultExpandedIds?: string[];
|
|
2938
|
-
selectedId?: string
|
|
2951
|
+
selectedId?: string;
|
|
2939
2952
|
} & React$2.RefAttributes<HTMLDivElement>>;
|
|
2940
2953
|
|
|
2941
2954
|
//#endregion
|
|
2942
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, KanbanBoard as Board, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonProps, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, CarouselProps, Cell, CellHierarchyOption, CellPosition, CellRange, CellSelectOption, CellSelectOptionsMap, CellSelectOptionsUnion, CellVariantProps, Checkbox, CheckboxCell, Collapse, CollapseContent, CollapseTrigger, KanbanColumn as Column, KanbanColumnHandle as ColumnHandle, ColumnMenuRendererFunction, ComboboxDemo, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandInputProps, CommandItem, CommandList, CommandPalette, CommandPaletteDialog, CommandPaletteEmpty, CommandPaletteGroup, CommandPaletteInput, CommandPaletteItem, CommandPaletteList, CommandPaletteSeparator, CommandPaletteShortcut, CommandSeparator, CommandShortcut, CommentCallbacks, CommentCreate, CommentGroup, CommentItem, CommentList, CommentThread, ContentFrame, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuState, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataGrid, DataGridCell, DataGridCellWrapper, DataGridColumnHeader, DataGridContextMenu, DataGridRow, DataGridSearch, DataGridViewMenu, DataGridViewMenuProps, DateCell, DatePickerDemo, DeferredInput, DeferredInputProps, DeferredNumberInput, DeferredNumberInputProps, DeferredTextarea, DeferredTextareaProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DynamicTabbedSidebar, ExternalToast, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, GanttCell, GanttCellProps, GanttTimeline, GanttTimerangePicker, GanttTimerangePickerProps, HeaderComponents, HierarchyCell, HierarchyItem, HierarchyItemProps, HoverCard, HoverCardContent, HoverCardTrigger, ISODateRange, InfoCard, InfoCardVariant, Input, InputProps, KanbanItem as Item, KanbanItemHandle as ItemHandle, KanbanRoot as Kanban, KanbanBoard, KanbanColumn, KanbanColumnHandle, KanbanItem, KanbanItemHandle, KanbanOverlay, Label, Loader, LongTextCell, MarkValueRenderer, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Modal, MultiSelectCell, NavigationDirection, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NumberCell, NumberFormatConfig, NumberFormatter, NumberInput, NumberInputProps, KanbanOverlay as Overlay, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ReactNodeCell, ResizableHandle, ResizablePanel, ResizablePanelGroup, KanbanRoot as Root, RowHeightValue, SIDEBAR_KEYBOARD_SHORTCUT, SIDEBAR_KEYBOARD_SHORTCUT_RIGHT, SIDEBAR_MAX_WIDTH, SIDEBAR_MIN_WIDTH, SIDEBAR_WIDTH, SIDEBAR_WIDTH_ICON, SIDEBAR_WIDTH_MOBILE, SavedView, ScrollArea, ScrollBar, SearchState, Select, SelectCell, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SelectionState, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, ShortTextCell, Sidebar, SidebarContent, SidebarContext, SidebarContextProps, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarSide, SidebarSideContext, SidebarTab, SidebarTabBadge, SidebarTabDefinition, SidebarTabsContext, SidebarTabsProvider, SidebarTrigger, Skeleton, Slicer, SlicerFilterOption, SlicerHierarchyItem, Slider, Spinner, Stepper, StepperContent, StepperDescription, StepperIndicator, StepperItem, StepperList, StepperNext, StepperPrev, StepperProps, StepperSeparator, StepperTitle, StepperTrigger, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TreeBranch, TreeNode, TreeView, TreeViewProps, UpdateCell, UseDataGridProps, badgeVariants, buildLabelMap, buttonVariants, checkboxVariants, cn, commandInputVariants, createSelectColumn, findOptionById, getAllDescendantIds, getAllDescendantValues, getAllIds, getAncestorIds, getCellKey, getCommonPinningStyles, getInitialExpandedIds, getLabelPath, getLineCount, getRowHeightValue, inputVariants, isoToLocalDate, knobVariants, matchesSearch, navigationMenuTriggerStyle, parseCellKey, sliderVariants, testId, toast, toggleVariants, useCallbackRef, useDataGrid, useDebouncedCallback, useIsMobile, useRegisteredSidebars, useSidebar, useSidebarTabs, useStore as useStepper };
|
|
2955
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, KanbanBoard as Board, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonProps, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, CarouselProps, Cell, CellHierarchyOption, CellPosition, CellRange, CellSelectOption, CellSelectOptionsMap, CellSelectOptionsUnion, CellVariantProps, Checkbox, CheckboxCell, Collapse, CollapseContent, CollapseTrigger, KanbanColumn as Column, KanbanColumnHandle as ColumnHandle, ColumnMenuRendererFunction, ComboboxDemo, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandInputProps, CommandItem, CommandList, CommandPalette, CommandPaletteDialog, CommandPaletteEmpty, CommandPaletteGroup, CommandPaletteInput, CommandPaletteItem, CommandPaletteList, CommandPaletteSeparator, CommandPaletteShortcut, CommandSeparator, CommandShortcut, CommentCallbacks, CommentCreate, CommentGroup, CommentItem, CommentList, CommentThread, ContentFrame, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuState, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataGrid, DataGridCell, DataGridCellWrapper, DataGridColumnHeader, DataGridContextMenu, DataGridRow, DataGridSearch, DataGridViewMenu, DataGridViewMenuProps, DateCell, DatePickerDemo, DeferredInput, DeferredInputProps, DeferredNumberInput, DeferredNumberInputProps, DeferredTextarea, DeferredTextareaProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropPosition, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DynamicTabbedSidebar, ExternalToast, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, GanttCell, GanttCellProps, GanttTimeline, GanttTimerangePicker, GanttTimerangePickerProps, HeaderComponents, HierarchyCell, HierarchyItem, HierarchyItemProps, HoverCard, HoverCardContent, HoverCardTrigger, ISODateRange, InfoCard, InfoCardVariant, Input, InputProps, KanbanItem as Item, KanbanItemHandle as ItemHandle, KanbanRoot as Kanban, KanbanBoard, KanbanColumn, KanbanColumnHandle, KanbanItem, KanbanItemHandle, KanbanOverlay, Label, Loader, LongTextCell, MarkValueRenderer, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Modal, MultiSelectCell, NavigationDirection, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NumberCell, NumberFormatConfig, NumberFormatter, NumberInput, NumberInputProps, KanbanOverlay as Overlay, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ReactNodeCell, ResizableHandle, ResizablePanel, ResizablePanelGroup, KanbanRoot as Root, RowHeightValue, SIDEBAR_KEYBOARD_SHORTCUT, SIDEBAR_KEYBOARD_SHORTCUT_RIGHT, SIDEBAR_MAX_WIDTH, SIDEBAR_MIN_WIDTH, SIDEBAR_WIDTH, SIDEBAR_WIDTH_ICON, SIDEBAR_WIDTH_MOBILE, SavedView, ScrollArea, ScrollBar, SearchState, Select, SelectCell, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SelectionState, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, ShortTextCell, Sidebar, SidebarContent, SidebarContext, SidebarContextProps, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarSide, SidebarSideContext, SidebarTab, SidebarTabBadge, SidebarTabDefinition, SidebarTabsContext, SidebarTabsProvider, SidebarTrigger, Skeleton, Slicer, SlicerFilterOption, SlicerHierarchyItem, Slider, Spinner, Stepper, StepperContent, StepperDescription, StepperIndicator, StepperItem, StepperList, StepperNext, StepperPrev, StepperProps, StepperSeparator, StepperTitle, StepperTrigger, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TreeBranch, TreeNode, TreeView, TreeViewProps, UpdateCell, UseDataGridProps, badgeVariants, buildLabelMap, buttonVariants, checkboxVariants, cn, commandInputVariants, createSelectColumn, findOptionById, getAllDescendantIds, getAllDescendantValues, getAllIds, getAncestorIds, getCellKey, getCommonPinningStyles, getInitialExpandedIds, getLabelPath, getLineCount, getRowHeightValue, inputVariants, isoToLocalDate, knobVariants, matchesSearch, navigationMenuTriggerStyle, parseCellKey, sliderVariants, testId, toast, toggleVariants, useCallbackRef, useDataGrid, useDebouncedCallback, useIsMobile, useRegisteredSidebars, useSidebar, useSidebarTabs, useStore as useStepper };
|
|
2943
2956
|
//# sourceMappingURL=index.d.ts.map
|