@pactor-app/ui 1.3.0 → 1.8.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/dist/{chunk-P54Y23AP.js → chunk-7YOIAVV6.js} +587 -282
- package/dist/{chunk-EVGIS2ZE.js → chunk-PECP7DJB.js} +120 -7
- package/dist/{chunk-TDVG7MZ5.js → chunk-TAJXMOEX.js} +2 -2
- package/dist/{chunk-L4Z7MNYY.js → chunk-VM4FESQB.js} +16 -2
- package/dist/{chunk-UKA7C3JP.js → chunk-XUIXZJDQ.js} +4 -4
- package/dist/components/index.cjs +1024 -605
- package/dist/components/index.d.cts +91 -5
- package/dist/components/index.d.ts +91 -5
- package/dist/components/index.js +6 -4
- package/dist/index.cjs +1177 -758
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +7 -5
- package/dist/layout/index.cjs +138 -12
- package/dist/layout/index.js +3 -3
- package/dist/{typography-DsGdDBc2.d.cts → typography-BYDh5oku.d.cts} +14 -1
- package/dist/{typography-DsGdDBc2.d.ts → typography-BYDh5oku.d.ts} +14 -1
- package/dist/ui/index.cjs +19 -5
- package/dist/ui/index.d.cts +3 -12
- package/dist/ui/index.d.ts +3 -12
- package/dist/ui/index.js +2 -2
- package/package.json +5 -5
- package/styles.css +58 -29
package/dist/index.d.cts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { Accordion, AccordionItemData, AccordionProps, Alert, AlertDialog, AlertDialogProps, AlertProps, AlertVariant, AspectRatio, AspectRatioProps, Avatar, AvatarProps, Badge, BadgeProps, BadgeVariant, Breadcrumb, BreadcrumbItemData, BreadcrumbProps, Button, ButtonGroup, ButtonGroupProps, ButtonProps, ButtonSize, ButtonVariant, Calendar, CalendarProps, Card, CardProps, Carousel, CarouselImage, CarouselItemData, CarouselProps, Chart, ChartProps, ChartType, ChatInput, ChatInputProps, Checkbox, CheckboxProps, Collapsible, CollapsibleProps, Combobox, ComboboxOption, ComboboxProps, Command, CommandGroupData, CommandItemData, CommandProps, Content, ContentProps, ContextMenu, ContextMenuItemData, ContextMenuProps, DataTable, DataTableColumn, DataTablePagination, DataTableProps, DataTableSort, DataTableSortOrder, Dialog, DialogProps, Drawer, DrawerPlacement, DrawerProps, DropdownMenu, DropdownMenuItemData, DropdownMenuProps, Empty, EmptyProps, Field, FieldProps, FieldRule, Flex, FlexProps, Footer, FooterProps, Form, FormContextValue, FormProps, Grid, GridProps, Header, HeaderBrandPosition, HeaderDropdown, HeaderDropdownItem, HeaderLocale, HeaderMenuItem, HeaderProps, HeaderUser, HeaderUserItem, HoverCard, HoverCardProps, ICONS, Icon, IconProps, IconSize, Input, InputGroup, InputGroupProps, InputOTP, InputOTPProps, InputProps, Item, ItemProps, Kbd, KbdProps, Label, LabelProps, Layout, LayoutProps, Link, LinkProps, Menu, MenuItem, MenuProps, Menubar, MenubarLeafItem, MenubarMenuData, MenubarProps, NavigationMenu, NavigationMenuChildItem, NavigationMenuItemData, NavigationMenuProps, Page, PageProps, Pagination, PaginationProps, Popover, PopoverProps, Progress, ProgressProps, RadioGroup, RadioGroupOption, RadioGroupProps, RailTooltip, Resizable, ResizablePanelData, ResizableProps, ScrollArea, ScrollAreaProps, Select, SelectOption, SelectProps, Separator, SeparatorProps, Sheet, SheetProps, SheetSide, Sidebar, SidebarBrand, SidebarNavItem, SidebarProps, Sider, SiderProps, Skeleton, SkeletonProps, SkeletonShape, Slider, SliderProps, Sonner, SonnerProps, Spinner, SpinnerProps, SpinnerSize, Statistic, StatisticProps, Switch, SwitchProps, TabItem, Table, TableColumn, TablePagination, TablePaginationInfo, TableProps, Tabs, TabsProps, Text, TextProps, TextType, Textarea, TextareaProps, Toggle, ToggleGroup, ToggleGroupOption, ToggleGroupProps, ToggleProps, Tooltip, TooltipProps, Typography, TypographyProps, TypographyVariant, builtinComponents, createComponentRegistry, normalizeIconName, registerBuiltinComponents, useFormContext, useSidebarDrawer } from './components/index.cjs';
|
|
1
|
+
export { Accordion, AccordionItemData, AccordionProps, Alert, AlertDialog, AlertDialogProps, AlertProps, AlertVariant, AspectRatio, AspectRatioProps, Avatar, AvatarProps, Badge, BadgeProps, BadgeVariant, Breadcrumb, BreadcrumbItemData, BreadcrumbProps, Button, ButtonGroup, ButtonGroupProps, ButtonProps, ButtonSize, ButtonVariant, Calendar, CalendarProps, Card, CardProps, Carousel, CarouselImage, CarouselItemData, CarouselProps, Chart, ChartProps, ChartType, ChatInput, ChatInputProps, Checkbox, CheckboxProps, Collapsible, CollapsibleProps, Combobox, ComboboxOption, ComboboxProps, Command, CommandGroupData, CommandItemData, CommandProps, Content, ContentProps, ContextMenu, ContextMenuItemData, ContextMenuProps, DataTable, DataTableColumn, DataTablePagination, DataTableProps, DataTableSort, DataTableSortOrder, DatePicker, DatePickerPreset, DatePickerPresetKey, DatePickerProps, DatePickerRangeProps, DatePickerSingleProps, DateRangeValue, Dialog, DialogProps, Drawer, DrawerPlacement, DrawerProps, DropdownMenu, DropdownMenuItemData, DropdownMenuProps, Empty, EmptyProps, Field, FieldProps, FieldRule, Flex, FlexProps, Footer, FooterProps, Form, FormContextValue, FormProps, Grid, GridProps, Header, HeaderBrandPosition, HeaderDropdown, HeaderDropdownItem, HeaderLocale, HeaderMenuItem, HeaderProps, HeaderUser, HeaderUserItem, HoverCard, HoverCardProps, ICONS, Icon, IconProps, IconSize, Input, InputGroup, InputGroupProps, InputOTP, InputOTPProps, InputProps, Item, ItemProps, Kbd, KbdProps, Label, LabelProps, Layout, LayoutProps, Link, LinkProps, Menu, MenuItem, MenuProps, Menubar, MenubarLeafItem, MenubarMenuData, MenubarProps, NavigationMenu, NavigationMenuChildItem, NavigationMenuItemData, NavigationMenuProps, Page, PageProps, Pagination, PaginationProps, Popover, PopoverProps, Progress, ProgressProps, RadioGroup, RadioGroupOption, RadioGroupProps, RailTooltip, Resizable, ResizablePanelData, ResizableProps, ScrollArea, ScrollAreaProps, Select, SelectOption, SelectProps, Separator, SeparatorProps, Sheet, SheetProps, SheetSide, Sidebar, SidebarBrand, SidebarNavItem, SidebarProps, Sider, SiderProps, Skeleton, SkeletonProps, SkeletonShape, Slider, SliderProps, Sonner, SonnerProps, Spinner, SpinnerProps, SpinnerSize, Statistic, StatisticProps, Switch, SwitchProps, TabItem, Table, TableColumn, TablePagination, TablePaginationInfo, TableProps, Tabs, TabsProps, Text, TextProps, TextType, Textarea, TextareaProps, Toggle, ToggleGroup, ToggleGroupOption, ToggleGroupProps, ToggleProps, Tooltip, TooltipProps, Typography, TypographyProps, TypographyVariant, builtinComponents, createComponentRegistry, normalizeIconName, registerBuiltinComponents, useFormContext, useSidebarDrawer } from './components/index.cjs';
|
|
2
2
|
export { AdminBrand, AdminLayout, AdminLayoutBreakpoint, AdminLayoutConfig, AdminLayoutMode, AdminLayoutProps, BlankLayout, BlankLayoutProps, ChatLayout, ChatLayoutBrand, ChatLayoutMenuItem, ChatLayoutProps, LandingLayout, LandingLayoutProps, LayoutComponent, LayoutRegistry, LoginBrand, LoginLayout, LoginLayoutProps, collectDefaultOpenKeys, createLayoutRegistry, findMenuChain, registerBuiltinLayouts, resolveLayout } from './layout/index.cjs';
|
|
3
3
|
export { InteractionProvider, InteractionProviderProps, OVERLAY_CANCEL_PAYLOAD, OverlayConfig, OverlayEntry, OverlayHost, OverlayHostProps, OverlayListener, OverlayManager, ResolvePageFn, UiBridge, UiMessage, UiModal, createUiBridge, registerInteractionActions } from './interaction/index.cjs';
|
|
4
4
|
import '@pactor-app/runtime';
|
|
5
5
|
import 'react';
|
|
6
6
|
import '@pactor-app/core';
|
|
7
|
-
import '
|
|
8
|
-
import './typography-DsGdDBc2.cjs';
|
|
7
|
+
import './typography-BYDh5oku.cjs';
|
|
9
8
|
import 'class-variance-authority/types';
|
|
10
9
|
import '@base-ui/react/toggle';
|
|
11
10
|
import 'class-variance-authority';
|
|
11
|
+
import 'lucide-react';
|
|
12
12
|
import '@pactor-app/permission';
|
|
13
13
|
import '@pactor-app/router';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { Accordion, AccordionItemData, AccordionProps, Alert, AlertDialog, AlertDialogProps, AlertProps, AlertVariant, AspectRatio, AspectRatioProps, Avatar, AvatarProps, Badge, BadgeProps, BadgeVariant, Breadcrumb, BreadcrumbItemData, BreadcrumbProps, Button, ButtonGroup, ButtonGroupProps, ButtonProps, ButtonSize, ButtonVariant, Calendar, CalendarProps, Card, CardProps, Carousel, CarouselImage, CarouselItemData, CarouselProps, Chart, ChartProps, ChartType, ChatInput, ChatInputProps, Checkbox, CheckboxProps, Collapsible, CollapsibleProps, Combobox, ComboboxOption, ComboboxProps, Command, CommandGroupData, CommandItemData, CommandProps, Content, ContentProps, ContextMenu, ContextMenuItemData, ContextMenuProps, DataTable, DataTableColumn, DataTablePagination, DataTableProps, DataTableSort, DataTableSortOrder, Dialog, DialogProps, Drawer, DrawerPlacement, DrawerProps, DropdownMenu, DropdownMenuItemData, DropdownMenuProps, Empty, EmptyProps, Field, FieldProps, FieldRule, Flex, FlexProps, Footer, FooterProps, Form, FormContextValue, FormProps, Grid, GridProps, Header, HeaderBrandPosition, HeaderDropdown, HeaderDropdownItem, HeaderLocale, HeaderMenuItem, HeaderProps, HeaderUser, HeaderUserItem, HoverCard, HoverCardProps, ICONS, Icon, IconProps, IconSize, Input, InputGroup, InputGroupProps, InputOTP, InputOTPProps, InputProps, Item, ItemProps, Kbd, KbdProps, Label, LabelProps, Layout, LayoutProps, Link, LinkProps, Menu, MenuItem, MenuProps, Menubar, MenubarLeafItem, MenubarMenuData, MenubarProps, NavigationMenu, NavigationMenuChildItem, NavigationMenuItemData, NavigationMenuProps, Page, PageProps, Pagination, PaginationProps, Popover, PopoverProps, Progress, ProgressProps, RadioGroup, RadioGroupOption, RadioGroupProps, RailTooltip, Resizable, ResizablePanelData, ResizableProps, ScrollArea, ScrollAreaProps, Select, SelectOption, SelectProps, Separator, SeparatorProps, Sheet, SheetProps, SheetSide, Sidebar, SidebarBrand, SidebarNavItem, SidebarProps, Sider, SiderProps, Skeleton, SkeletonProps, SkeletonShape, Slider, SliderProps, Sonner, SonnerProps, Spinner, SpinnerProps, SpinnerSize, Statistic, StatisticProps, Switch, SwitchProps, TabItem, Table, TableColumn, TablePagination, TablePaginationInfo, TableProps, Tabs, TabsProps, Text, TextProps, TextType, Textarea, TextareaProps, Toggle, ToggleGroup, ToggleGroupOption, ToggleGroupProps, ToggleProps, Tooltip, TooltipProps, Typography, TypographyProps, TypographyVariant, builtinComponents, createComponentRegistry, normalizeIconName, registerBuiltinComponents, useFormContext, useSidebarDrawer } from './components/index.js';
|
|
1
|
+
export { Accordion, AccordionItemData, AccordionProps, Alert, AlertDialog, AlertDialogProps, AlertProps, AlertVariant, AspectRatio, AspectRatioProps, Avatar, AvatarProps, Badge, BadgeProps, BadgeVariant, Breadcrumb, BreadcrumbItemData, BreadcrumbProps, Button, ButtonGroup, ButtonGroupProps, ButtonProps, ButtonSize, ButtonVariant, Calendar, CalendarProps, Card, CardProps, Carousel, CarouselImage, CarouselItemData, CarouselProps, Chart, ChartProps, ChartType, ChatInput, ChatInputProps, Checkbox, CheckboxProps, Collapsible, CollapsibleProps, Combobox, ComboboxOption, ComboboxProps, Command, CommandGroupData, CommandItemData, CommandProps, Content, ContentProps, ContextMenu, ContextMenuItemData, ContextMenuProps, DataTable, DataTableColumn, DataTablePagination, DataTableProps, DataTableSort, DataTableSortOrder, DatePicker, DatePickerPreset, DatePickerPresetKey, DatePickerProps, DatePickerRangeProps, DatePickerSingleProps, DateRangeValue, Dialog, DialogProps, Drawer, DrawerPlacement, DrawerProps, DropdownMenu, DropdownMenuItemData, DropdownMenuProps, Empty, EmptyProps, Field, FieldProps, FieldRule, Flex, FlexProps, Footer, FooterProps, Form, FormContextValue, FormProps, Grid, GridProps, Header, HeaderBrandPosition, HeaderDropdown, HeaderDropdownItem, HeaderLocale, HeaderMenuItem, HeaderProps, HeaderUser, HeaderUserItem, HoverCard, HoverCardProps, ICONS, Icon, IconProps, IconSize, Input, InputGroup, InputGroupProps, InputOTP, InputOTPProps, InputProps, Item, ItemProps, Kbd, KbdProps, Label, LabelProps, Layout, LayoutProps, Link, LinkProps, Menu, MenuItem, MenuProps, Menubar, MenubarLeafItem, MenubarMenuData, MenubarProps, NavigationMenu, NavigationMenuChildItem, NavigationMenuItemData, NavigationMenuProps, Page, PageProps, Pagination, PaginationProps, Popover, PopoverProps, Progress, ProgressProps, RadioGroup, RadioGroupOption, RadioGroupProps, RailTooltip, Resizable, ResizablePanelData, ResizableProps, ScrollArea, ScrollAreaProps, Select, SelectOption, SelectProps, Separator, SeparatorProps, Sheet, SheetProps, SheetSide, Sidebar, SidebarBrand, SidebarNavItem, SidebarProps, Sider, SiderProps, Skeleton, SkeletonProps, SkeletonShape, Slider, SliderProps, Sonner, SonnerProps, Spinner, SpinnerProps, SpinnerSize, Statistic, StatisticProps, Switch, SwitchProps, TabItem, Table, TableColumn, TablePagination, TablePaginationInfo, TableProps, Tabs, TabsProps, Text, TextProps, TextType, Textarea, TextareaProps, Toggle, ToggleGroup, ToggleGroupOption, ToggleGroupProps, ToggleProps, Tooltip, TooltipProps, Typography, TypographyProps, TypographyVariant, builtinComponents, createComponentRegistry, normalizeIconName, registerBuiltinComponents, useFormContext, useSidebarDrawer } from './components/index.js';
|
|
2
2
|
export { AdminBrand, AdminLayout, AdminLayoutBreakpoint, AdminLayoutConfig, AdminLayoutMode, AdminLayoutProps, BlankLayout, BlankLayoutProps, ChatLayout, ChatLayoutBrand, ChatLayoutMenuItem, ChatLayoutProps, LandingLayout, LandingLayoutProps, LayoutComponent, LayoutRegistry, LoginBrand, LoginLayout, LoginLayoutProps, collectDefaultOpenKeys, createLayoutRegistry, findMenuChain, registerBuiltinLayouts, resolveLayout } from './layout/index.js';
|
|
3
3
|
export { InteractionProvider, InteractionProviderProps, OVERLAY_CANCEL_PAYLOAD, OverlayConfig, OverlayEntry, OverlayHost, OverlayHostProps, OverlayListener, OverlayManager, ResolvePageFn, UiBridge, UiMessage, UiModal, createUiBridge, registerInteractionActions } from './interaction/index.js';
|
|
4
4
|
import '@pactor-app/runtime';
|
|
5
5
|
import 'react';
|
|
6
6
|
import '@pactor-app/core';
|
|
7
|
-
import '
|
|
8
|
-
import './typography-DsGdDBc2.js';
|
|
7
|
+
import './typography-BYDh5oku.js';
|
|
9
8
|
import 'class-variance-authority/types';
|
|
10
9
|
import '@base-ui/react/toggle';
|
|
11
10
|
import 'class-variance-authority';
|
|
11
|
+
import 'lucide-react';
|
|
12
12
|
import '@pactor-app/permission';
|
|
13
13
|
import '@pactor-app/router';
|
package/dist/index.js
CHANGED
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
Content,
|
|
21
21
|
ContextMenu,
|
|
22
22
|
DataTable,
|
|
23
|
+
DatePicker,
|
|
23
24
|
Dialog,
|
|
24
25
|
Drawer,
|
|
25
26
|
DropdownMenu,
|
|
@@ -70,7 +71,7 @@ import {
|
|
|
70
71
|
createComponentRegistry,
|
|
71
72
|
registerBuiltinComponents,
|
|
72
73
|
useFormContext
|
|
73
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-7YOIAVV6.js";
|
|
74
75
|
import {
|
|
75
76
|
InteractionProvider,
|
|
76
77
|
OVERLAY_CANCEL_PAYLOAD,
|
|
@@ -90,7 +91,7 @@ import {
|
|
|
90
91
|
findMenuChain,
|
|
91
92
|
registerBuiltinLayouts,
|
|
92
93
|
resolveLayout
|
|
93
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-TAJXMOEX.js";
|
|
94
95
|
import {
|
|
95
96
|
ICONS,
|
|
96
97
|
Icon,
|
|
@@ -99,10 +100,10 @@ import {
|
|
|
99
100
|
Sidebar,
|
|
100
101
|
normalizeIconName,
|
|
101
102
|
useSidebarDrawer
|
|
102
|
-
} from "./chunk-
|
|
103
|
-
import "./chunk-
|
|
103
|
+
} from "./chunk-PECP7DJB.js";
|
|
104
|
+
import "./chunk-XUIXZJDQ.js";
|
|
104
105
|
import "./chunk-F42SGQNW.js";
|
|
105
|
-
import "./chunk-
|
|
106
|
+
import "./chunk-VM4FESQB.js";
|
|
106
107
|
import "./chunk-WKJUCGV4.js";
|
|
107
108
|
export {
|
|
108
109
|
Accordion,
|
|
@@ -129,6 +130,7 @@ export {
|
|
|
129
130
|
Content,
|
|
130
131
|
ContextMenu,
|
|
131
132
|
DataTable,
|
|
133
|
+
DatePicker,
|
|
132
134
|
Dialog,
|
|
133
135
|
Drawer,
|
|
134
136
|
DropdownMenu,
|
package/dist/layout/index.cjs
CHANGED
|
@@ -931,6 +931,9 @@ function BlankLayout({ children }) {
|
|
|
931
931
|
|
|
932
932
|
// src/layout/chat/ChatLayout.tsx
|
|
933
933
|
var import_permission2 = require("@pactor-app/permission");
|
|
934
|
+
var import_react6 = require("react");
|
|
935
|
+
|
|
936
|
+
// src/components/components/Menu/index.tsx
|
|
934
937
|
var import_react5 = require("react");
|
|
935
938
|
|
|
936
939
|
// src/ui/tooltip.tsx
|
|
@@ -1698,16 +1701,49 @@ function SidebarInner({
|
|
|
1698
1701
|
|
|
1699
1702
|
// src/components/components/Menu/index.tsx
|
|
1700
1703
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1704
|
+
function collectAncestors(items, target, into, trail = []) {
|
|
1705
|
+
for (const item of items) {
|
|
1706
|
+
if (item.key === target) {
|
|
1707
|
+
for (const key of trail) into.add(key);
|
|
1708
|
+
return true;
|
|
1709
|
+
}
|
|
1710
|
+
if (item.children?.length && collectAncestors(item.children, target, into, [...trail, item.key])) {
|
|
1711
|
+
return true;
|
|
1712
|
+
}
|
|
1713
|
+
}
|
|
1714
|
+
return false;
|
|
1715
|
+
}
|
|
1701
1716
|
function Menu2({
|
|
1702
1717
|
items = [],
|
|
1703
1718
|
mode = "inline",
|
|
1704
1719
|
selectedKey,
|
|
1720
|
+
collapsible = false,
|
|
1721
|
+
defaultExpandedKeys,
|
|
1705
1722
|
onSelect,
|
|
1706
1723
|
className,
|
|
1707
1724
|
style
|
|
1708
1725
|
}) {
|
|
1709
1726
|
const drawer = useSidebarDrawer();
|
|
1710
1727
|
const collapsed = mode === "inline" && drawer?.collapsed === true;
|
|
1728
|
+
const collapsibleOn = collapsible && mode === "inline" && !collapsed;
|
|
1729
|
+
const [expandedKeys, setExpandedKeys] = (0, import_react5.useState)(() => {
|
|
1730
|
+
const initial = new Set(defaultExpandedKeys ?? []);
|
|
1731
|
+
if (selectedKey !== void 0) {
|
|
1732
|
+
collectAncestors(items, selectedKey, initial);
|
|
1733
|
+
}
|
|
1734
|
+
return initial;
|
|
1735
|
+
});
|
|
1736
|
+
const toggleExpanded = (key) => {
|
|
1737
|
+
setExpandedKeys((prev) => {
|
|
1738
|
+
const next = new Set(prev);
|
|
1739
|
+
if (next.has(key)) {
|
|
1740
|
+
next.delete(key);
|
|
1741
|
+
} else {
|
|
1742
|
+
next.add(key);
|
|
1743
|
+
}
|
|
1744
|
+
return next;
|
|
1745
|
+
});
|
|
1746
|
+
};
|
|
1711
1747
|
let previousGroup;
|
|
1712
1748
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1713
1749
|
"nav",
|
|
@@ -1743,7 +1779,10 @@ function Menu2({
|
|
|
1743
1779
|
depth: 0,
|
|
1744
1780
|
selectedKey,
|
|
1745
1781
|
onSelect,
|
|
1746
|
-
collapsed
|
|
1782
|
+
collapsed,
|
|
1783
|
+
collapsible: collapsibleOn,
|
|
1784
|
+
expandedKeys,
|
|
1785
|
+
onToggle: toggleExpanded
|
|
1747
1786
|
}
|
|
1748
1787
|
)
|
|
1749
1788
|
] }, item.key);
|
|
@@ -1757,15 +1796,34 @@ function MenuEntry({
|
|
|
1757
1796
|
depth,
|
|
1758
1797
|
selectedKey,
|
|
1759
1798
|
onSelect,
|
|
1760
|
-
collapsed = false
|
|
1799
|
+
collapsed = false,
|
|
1800
|
+
collapsible = false,
|
|
1801
|
+
expandedKeys,
|
|
1802
|
+
onToggle
|
|
1761
1803
|
}) {
|
|
1762
1804
|
const selected = item.key === selectedKey;
|
|
1805
|
+
const hasChildren = (item.children?.length ?? 0) > 0;
|
|
1806
|
+
const isDirectory = collapsible && hasChildren;
|
|
1807
|
+
const expanded = isDirectory && expandedKeys?.has(item.key) === true;
|
|
1808
|
+
const railDirectory = collapsed && hasChildren;
|
|
1809
|
+
const [flyoutOpen, setFlyoutOpen] = (0, import_react5.useState)(false);
|
|
1810
|
+
const flyoutTimer = (0, import_react5.useRef)(void 0);
|
|
1811
|
+
const flyoutOpenNow = () => {
|
|
1812
|
+
window.clearTimeout(flyoutTimer.current);
|
|
1813
|
+
setFlyoutOpen(true);
|
|
1814
|
+
};
|
|
1815
|
+
const flyoutCloseLater = () => {
|
|
1816
|
+
window.clearTimeout(flyoutTimer.current);
|
|
1817
|
+
flyoutTimer.current = window.setTimeout(() => setFlyoutOpen(false), 200);
|
|
1818
|
+
};
|
|
1819
|
+
(0, import_react5.useEffect)(() => () => window.clearTimeout(flyoutTimer.current), []);
|
|
1763
1820
|
const button = /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
1764
1821
|
"button",
|
|
1765
1822
|
{
|
|
1766
1823
|
type: "button",
|
|
1767
1824
|
"data-slot": "menu-item",
|
|
1768
1825
|
"aria-current": selected ? "page" : void 0,
|
|
1826
|
+
"aria-expanded": isDirectory ? expanded : railDirectory ? flyoutOpen : void 0,
|
|
1769
1827
|
disabled: item.disabled,
|
|
1770
1828
|
className: cn(
|
|
1771
1829
|
"flex w-full items-center gap-2 rounded-md text-sm transition-colors",
|
|
@@ -1775,8 +1833,14 @@ function MenuEntry({
|
|
|
1775
1833
|
item.disabled && "cursor-not-allowed opacity-50 hover:bg-transparent hover:text-muted-foreground"
|
|
1776
1834
|
),
|
|
1777
1835
|
style: mode === "inline" && depth > 0 && !collapsed ? { paddingLeft: 12 + depth * 16 } : void 0,
|
|
1836
|
+
onMouseEnter: railDirectory ? flyoutOpenNow : void 0,
|
|
1837
|
+
onMouseLeave: railDirectory ? flyoutCloseLater : void 0,
|
|
1778
1838
|
onClick: () => {
|
|
1779
|
-
if (
|
|
1839
|
+
if (item.disabled) return;
|
|
1840
|
+
if (railDirectory) return;
|
|
1841
|
+
if (isDirectory) {
|
|
1842
|
+
onToggle?.(item.key);
|
|
1843
|
+
} else {
|
|
1780
1844
|
onSelect?.(item.key);
|
|
1781
1845
|
}
|
|
1782
1846
|
},
|
|
@@ -1791,13 +1855,58 @@ function MenuEntry({
|
|
|
1791
1855
|
className: "shrink-0 rounded-full bg-muted px-1.5 py-0.5 text-xs text-muted-foreground",
|
|
1792
1856
|
children: item.badge
|
|
1793
1857
|
}
|
|
1858
|
+
) : null,
|
|
1859
|
+
isDirectory ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1860
|
+
"span",
|
|
1861
|
+
{
|
|
1862
|
+
"data-slot": "menu-item-chevron",
|
|
1863
|
+
className: cn(
|
|
1864
|
+
"shrink-0 transition-transform",
|
|
1865
|
+
expanded && "rotate-180"
|
|
1866
|
+
),
|
|
1867
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Icon, { name: "chevron-down", size: "sm" })
|
|
1868
|
+
}
|
|
1794
1869
|
) : null
|
|
1795
1870
|
]
|
|
1796
1871
|
}
|
|
1797
1872
|
);
|
|
1798
1873
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { "data-slot": "menu-entry", "data-key": item.key, children: [
|
|
1799
|
-
|
|
1800
|
-
|
|
1874
|
+
railDirectory ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Popover, { open: flyoutOpen, onOpenChange: setFlyoutOpen, children: [
|
|
1875
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PopoverTrigger, { render: button }),
|
|
1876
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
1877
|
+
PopoverContent,
|
|
1878
|
+
{
|
|
1879
|
+
"data-slot": "menu-flyout",
|
|
1880
|
+
side: "right",
|
|
1881
|
+
align: "start",
|
|
1882
|
+
sideOffset: 8,
|
|
1883
|
+
className: "max-h-[70vh] w-48 overflow-auto p-1",
|
|
1884
|
+
initialFocus: false,
|
|
1885
|
+
onMouseEnter: flyoutOpenNow,
|
|
1886
|
+
onMouseLeave: flyoutCloseLater,
|
|
1887
|
+
onClick: (event) => {
|
|
1888
|
+
if (event.target.closest("[data-slot=menu-item]")) {
|
|
1889
|
+
setFlyoutOpen(false);
|
|
1890
|
+
}
|
|
1891
|
+
},
|
|
1892
|
+
children: [
|
|
1893
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "px-3 pt-2 pb-1 text-xs font-semibold text-muted-foreground", children: item.label }),
|
|
1894
|
+
item.children?.map((child) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1895
|
+
MenuEntry,
|
|
1896
|
+
{
|
|
1897
|
+
item: child,
|
|
1898
|
+
mode: "inline",
|
|
1899
|
+
depth: 0,
|
|
1900
|
+
selectedKey,
|
|
1901
|
+
onSelect
|
|
1902
|
+
},
|
|
1903
|
+
child.key
|
|
1904
|
+
))
|
|
1905
|
+
]
|
|
1906
|
+
}
|
|
1907
|
+
)
|
|
1908
|
+
] }) : collapsed ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(RailTooltip, { label: item.label, children: button }) : button,
|
|
1909
|
+
railDirectory || isDirectory && !expanded ? null : item.children?.map((child) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1801
1910
|
MenuEntry,
|
|
1802
1911
|
{
|
|
1803
1912
|
item: child,
|
|
@@ -1805,7 +1914,10 @@ function MenuEntry({
|
|
|
1805
1914
|
depth: depth + 1,
|
|
1806
1915
|
selectedKey,
|
|
1807
1916
|
onSelect,
|
|
1808
|
-
collapsed
|
|
1917
|
+
collapsed,
|
|
1918
|
+
collapsible,
|
|
1919
|
+
expandedKeys,
|
|
1920
|
+
onToggle
|
|
1809
1921
|
},
|
|
1810
1922
|
child.key
|
|
1811
1923
|
))
|
|
@@ -1828,7 +1940,7 @@ function ChatLayout({
|
|
|
1828
1940
|
sidebarFooter,
|
|
1829
1941
|
children
|
|
1830
1942
|
}) {
|
|
1831
|
-
const registryMenus = (0,
|
|
1943
|
+
const registryMenus = (0, import_react6.useMemo)(() => {
|
|
1832
1944
|
if (menu !== void 0 || registry === void 0) {
|
|
1833
1945
|
return [];
|
|
1834
1946
|
}
|
|
@@ -1837,10 +1949,10 @@ function ChatLayout({
|
|
|
1837
1949
|
return visible.flatMap((item) => menuItemToMenuData(item));
|
|
1838
1950
|
}, [menu, registry, permissionChecker]);
|
|
1839
1951
|
const menuItems = menu ?? registryMenus;
|
|
1840
|
-
const [bridgePath, setBridgePath] = (0,
|
|
1952
|
+
const [bridgePath, setBridgePath] = (0, import_react6.useState)(
|
|
1841
1953
|
() => bridge?.getLocation().pathname ?? "/"
|
|
1842
1954
|
);
|
|
1843
|
-
(0,
|
|
1955
|
+
(0, import_react6.useEffect)(() => {
|
|
1844
1956
|
if (bridge === void 0) {
|
|
1845
1957
|
return;
|
|
1846
1958
|
}
|
|
@@ -1848,7 +1960,7 @@ function ChatLayout({
|
|
|
1848
1960
|
setBridgePath(location.pathname);
|
|
1849
1961
|
});
|
|
1850
1962
|
}, [bridge]);
|
|
1851
|
-
const activeKey = (0,
|
|
1963
|
+
const activeKey = (0, import_react6.useMemo)(() => {
|
|
1852
1964
|
if (activeMenuKey !== void 0) {
|
|
1853
1965
|
return activeMenuKey;
|
|
1854
1966
|
}
|
|
@@ -1939,13 +2051,27 @@ function menuItemToMenuData(item) {
|
|
|
1939
2051
|
|
|
1940
2052
|
// src/ui/card.tsx
|
|
1941
2053
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1942
|
-
|
|
2054
|
+
var cardRoundedClasses = {
|
|
2055
|
+
none: "rounded-none",
|
|
2056
|
+
sm: "rounded-sm",
|
|
2057
|
+
md: "rounded-md",
|
|
2058
|
+
lg: "rounded-lg",
|
|
2059
|
+
xl: "rounded-xl",
|
|
2060
|
+
"2xl": "rounded-2xl",
|
|
2061
|
+
"3xl": "rounded-3xl"
|
|
2062
|
+
};
|
|
2063
|
+
function Card({
|
|
2064
|
+
className,
|
|
2065
|
+
rounded = "lg",
|
|
2066
|
+
...props
|
|
2067
|
+
}) {
|
|
1943
2068
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1944
2069
|
"div",
|
|
1945
2070
|
{
|
|
1946
2071
|
"data-slot": "card",
|
|
1947
2072
|
className: cn(
|
|
1948
|
-
"flex flex-col gap-6
|
|
2073
|
+
"flex flex-col gap-6 border border-border bg-card py-6 text-card-foreground shadow-(--card-shadow)",
|
|
2074
|
+
cardRoundedClasses[rounded],
|
|
1949
2075
|
className
|
|
1950
2076
|
),
|
|
1951
2077
|
...props
|
package/dist/layout/index.js
CHANGED
|
@@ -9,9 +9,9 @@ import {
|
|
|
9
9
|
findMenuChain,
|
|
10
10
|
registerBuiltinLayouts,
|
|
11
11
|
resolveLayout
|
|
12
|
-
} from "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
12
|
+
} from "../chunk-TAJXMOEX.js";
|
|
13
|
+
import "../chunk-PECP7DJB.js";
|
|
14
|
+
import "../chunk-VM4FESQB.js";
|
|
15
15
|
import "../chunk-WKJUCGV4.js";
|
|
16
16
|
export {
|
|
17
17
|
AdminLayout,
|
|
@@ -3,6 +3,19 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
|
|
|
3
3
|
import { Toggle as Toggle$1 } from '@base-ui/react/toggle';
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
|
|
6
|
+
/** shadcn/ui Card(vendored 源码) */
|
|
7
|
+
/** 圆角档位(静态映射:Tailwind 预编译扫描源码,动态拼接类名不进产物) */
|
|
8
|
+
type CardRounded = 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
|
|
9
|
+
declare function Card({ className, rounded, ...props }: React.ComponentProps<'div'> & {
|
|
10
|
+
rounded?: CardRounded;
|
|
11
|
+
}): React.JSX.Element;
|
|
12
|
+
declare function CardHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
13
|
+
declare function CardTitle({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
14
|
+
declare function CardDescription({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
15
|
+
declare function CardAction({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
16
|
+
declare function CardContent({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
17
|
+
declare function CardFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
18
|
+
|
|
6
19
|
/** shadcn/ui Toggle(vendored 源码,Base UI 原语):按下态切换按钮 */
|
|
7
20
|
declare const toggleVariants: (props?: ({
|
|
8
21
|
variant?: "default" | "outline" | null | undefined;
|
|
@@ -21,4 +34,4 @@ interface TypographyProps extends React.HTMLAttributes<HTMLElement>, VariantProp
|
|
|
21
34
|
}
|
|
22
35
|
declare function Typography({ className, variant, ...props }: TypographyProps): React.JSX.Element;
|
|
23
36
|
|
|
24
|
-
export { Toggle as T,
|
|
37
|
+
export { Card as C, Toggle as T, CardAction as a, CardContent as b, CardDescription as c, CardFooter as d, CardHeader as e, CardTitle as f, Typography as g, typographyVariants as h, type CardRounded as i, toggleVariants as t };
|
|
@@ -3,6 +3,19 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
|
|
|
3
3
|
import { Toggle as Toggle$1 } from '@base-ui/react/toggle';
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
|
|
6
|
+
/** shadcn/ui Card(vendored 源码) */
|
|
7
|
+
/** 圆角档位(静态映射:Tailwind 预编译扫描源码,动态拼接类名不进产物) */
|
|
8
|
+
type CardRounded = 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
|
|
9
|
+
declare function Card({ className, rounded, ...props }: React.ComponentProps<'div'> & {
|
|
10
|
+
rounded?: CardRounded;
|
|
11
|
+
}): React.JSX.Element;
|
|
12
|
+
declare function CardHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
13
|
+
declare function CardTitle({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
14
|
+
declare function CardDescription({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
15
|
+
declare function CardAction({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
16
|
+
declare function CardContent({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
17
|
+
declare function CardFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
18
|
+
|
|
6
19
|
/** shadcn/ui Toggle(vendored 源码,Base UI 原语):按下态切换按钮 */
|
|
7
20
|
declare const toggleVariants: (props?: ({
|
|
8
21
|
variant?: "default" | "outline" | null | undefined;
|
|
@@ -21,4 +34,4 @@ interface TypographyProps extends React.HTMLAttributes<HTMLElement>, VariantProp
|
|
|
21
34
|
}
|
|
22
35
|
declare function Typography({ className, variant, ...props }: TypographyProps): React.JSX.Element;
|
|
23
36
|
|
|
24
|
-
export { Toggle as T,
|
|
37
|
+
export { Card as C, Toggle as T, CardAction as a, CardContent as b, CardDescription as c, CardFooter as d, CardHeader as e, CardTitle as f, Typography as g, typographyVariants as h, type CardRounded as i, toggleVariants as t };
|
package/dist/ui/index.cjs
CHANGED
|
@@ -1201,11 +1201,11 @@ function Calendar({
|
|
|
1201
1201
|
defaultClassNames.day_button
|
|
1202
1202
|
),
|
|
1203
1203
|
selected: cn(
|
|
1204
|
-
"[&>button]:bg-(--calendar-selected-background) [&>button]:text-(--calendar-selected-foreground) [&>button]:hover:bg-(--calendar-selected-background)",
|
|
1204
|
+
"[&>button]:bg-(--calendar-selected-background) [&>button]:text-(--calendar-selected-foreground) [&>button]:hover:bg-(--calendar-selected-background) [&>button]:hover:text-(--calendar-selected-foreground)",
|
|
1205
1205
|
defaultClassNames.selected
|
|
1206
1206
|
),
|
|
1207
1207
|
today: cn(
|
|
1208
|
-
"[&>button]:bg-(--calendar-today-background) [&>button]:text-(--calendar-today-foreground)",
|
|
1208
|
+
"[&>button]:bg-(--calendar-today-background) [&>button]:text-(--calendar-today-foreground) [&>button]:hover:bg-(--calendar-today-background) [&>button]:hover:text-(--calendar-today-foreground) [&>button]:border [&>button]:border-(--calendar-today-border)",
|
|
1209
1209
|
defaultClassNames.today
|
|
1210
1210
|
),
|
|
1211
1211
|
outside: cn(
|
|
@@ -2648,13 +2648,27 @@ function TooltipContent({
|
|
|
2648
2648
|
|
|
2649
2649
|
// src/ui/card.tsx
|
|
2650
2650
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2651
|
-
|
|
2651
|
+
var cardRoundedClasses = {
|
|
2652
|
+
none: "rounded-none",
|
|
2653
|
+
sm: "rounded-sm",
|
|
2654
|
+
md: "rounded-md",
|
|
2655
|
+
lg: "rounded-lg",
|
|
2656
|
+
xl: "rounded-xl",
|
|
2657
|
+
"2xl": "rounded-2xl",
|
|
2658
|
+
"3xl": "rounded-3xl"
|
|
2659
|
+
};
|
|
2660
|
+
function Card({
|
|
2661
|
+
className,
|
|
2662
|
+
rounded = "lg",
|
|
2663
|
+
...props
|
|
2664
|
+
}) {
|
|
2652
2665
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2653
2666
|
"div",
|
|
2654
2667
|
{
|
|
2655
2668
|
"data-slot": "card",
|
|
2656
2669
|
className: cn(
|
|
2657
|
-
"flex flex-col gap-6
|
|
2670
|
+
"flex flex-col gap-6 border border-border bg-card py-6 text-card-foreground shadow-(--card-shadow)",
|
|
2671
|
+
cardRoundedClasses[rounded],
|
|
2658
2672
|
className
|
|
2659
2673
|
),
|
|
2660
2674
|
...props
|
|
@@ -4682,7 +4696,7 @@ function ToggleGroup({
|
|
|
4682
4696
|
"data-variant": variant,
|
|
4683
4697
|
"data-size": size,
|
|
4684
4698
|
className: cn(
|
|
4685
|
-
"group/toggle-group flex w-fit items-center
|
|
4699
|
+
"group/toggle-group flex w-fit items-center gap-1 rounded-md",
|
|
4686
4700
|
className
|
|
4687
4701
|
),
|
|
4688
4702
|
...props,
|
package/dist/ui/index.d.cts
CHANGED
|
@@ -19,6 +19,8 @@ import { NavigationMenu as NavigationMenu$1 } from '@base-ui/react/navigation-me
|
|
|
19
19
|
import { Dialog as Dialog$1 } from '@base-ui/react/dialog';
|
|
20
20
|
import * as _base_ui_react from '@base-ui/react';
|
|
21
21
|
import { Tooltip as Tooltip$1 } from '@base-ui/react/tooltip';
|
|
22
|
+
import { t as toggleVariants } from '../typography-BYDh5oku.cjs';
|
|
23
|
+
export { C as Card, a as CardAction, b as CardContent, c as CardDescription, d as CardFooter, e as CardHeader, f as CardTitle, T as Toggle, g as Typography, h as typographyVariants } from '../typography-BYDh5oku.cjs';
|
|
22
24
|
import { Field as Field$1 } from '@base-ui/react/field';
|
|
23
25
|
import { OTPInput } from 'input-otp';
|
|
24
26
|
import { Progress as Progress$1 } from '@base-ui/react/progress';
|
|
@@ -31,8 +33,6 @@ import { Separator as Separator$2 } from '@base-ui/react/separator';
|
|
|
31
33
|
import { Slider as Slider$1 } from '@base-ui/react/slider';
|
|
32
34
|
import { Switch as Switch$1 } from '@base-ui/react/switch';
|
|
33
35
|
import { Tabs as Tabs$1 } from '@base-ui/react/tabs';
|
|
34
|
-
import { t as toggleVariants } from '../typography-DsGdDBc2.cjs';
|
|
35
|
-
export { T as Toggle, a as Typography, b as typographyVariants } from '../typography-DsGdDBc2.cjs';
|
|
36
36
|
import { Toggle } from '@base-ui/react/toggle';
|
|
37
37
|
import { ToggleGroup as ToggleGroup$1 } from '@base-ui/react/toggle-group';
|
|
38
38
|
|
|
@@ -424,15 +424,6 @@ declare function Tooltip({ ...props }: Tooltip$1.Root.Props): React.JSX.Element;
|
|
|
424
424
|
declare function TooltipTrigger({ ...props }: Tooltip$1.Trigger.Props): React.JSX.Element;
|
|
425
425
|
declare function TooltipContent({ className, side, sideOffset, align, children, ...props }: Tooltip$1.Popup.Props & Pick<Tooltip$1.Positioner.Props, 'align' | 'side' | 'sideOffset'>): React.JSX.Element;
|
|
426
426
|
|
|
427
|
-
/** shadcn/ui Card(vendored 源码) */
|
|
428
|
-
declare function Card({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
429
|
-
declare function CardHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
430
|
-
declare function CardTitle({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
431
|
-
declare function CardDescription({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
432
|
-
declare function CardAction({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
433
|
-
declare function CardContent({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
434
|
-
declare function CardFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
435
|
-
|
|
436
427
|
/**
|
|
437
428
|
* shadcn/ui Dialog(vendored 源码,Base UI 原语)。
|
|
438
429
|
* 官方源码:https://ui.shadcn.com/r/styles/base-nova/dialog.json
|
|
@@ -679,4 +670,4 @@ declare function Textarea({ className, ...props }: React.ComponentProps<'textare
|
|
|
679
670
|
declare function ToggleGroup({ className, variant, size, children, ...props }: ToggleGroup$1.Props & VariantProps<typeof toggleVariants>): React.JSX.Element;
|
|
680
671
|
declare function ToggleGroupItem({ className, children, variant, size, ...props }: Toggle.Props & VariantProps<typeof toggleVariants>): React.JSX.Element;
|
|
681
672
|
|
|
682
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle, AttachmentTrigger, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Bubble, BubbleContent, BubbleGroup, BubbleReactions, Button, ButtonGroup, CHART_TOKEN_COLORS, Calendar,
|
|
673
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle, AttachmentTrigger, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Bubble, BubbleContent, BubbleGroup, BubbleReactions, Button, ButtonGroup, CHART_TOKEN_COLORS, Calendar, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxContent, ComboboxTrigger, Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, ContextMenu, ContextMenuContent, ContextMenuItem, ContextMenuSeparator, ContextMenuTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyTitle, Field, FieldDescription, FieldError, FieldLabel, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputGroup, InputGroupAddon, InputGroupInput, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemMedia, ItemTitle, Kbd, Label, Menubar, MenubarContent, MenubarItem, MenubarMenu, MenubarSeparator, MenubarTrigger, Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Panel, PanelGroup, Popover, PopoverContent, PopoverTrigger, Progress, ProgressIndicator, ProgressTrack, RadioGroup, RadioGroupItem, ResizableHandle, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarContent as SidebarContentArea, SidebarFooter as SidebarFooterArea, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader as SidebarHeaderArea, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarRoot, SidebarSeparator, SidebarTrigger, Skeleton, Slider, SliderControl, SliderIndicator, SliderThumb, SliderTrack, Spinner, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type ToastOptions, type ToastVariant, Toaster, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, chartColor, navigationMenuTriggerStyle, toast, toastManager, toggleVariants, useCarousel, useSidebar };
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -19,6 +19,8 @@ import { NavigationMenu as NavigationMenu$1 } from '@base-ui/react/navigation-me
|
|
|
19
19
|
import { Dialog as Dialog$1 } from '@base-ui/react/dialog';
|
|
20
20
|
import * as _base_ui_react from '@base-ui/react';
|
|
21
21
|
import { Tooltip as Tooltip$1 } from '@base-ui/react/tooltip';
|
|
22
|
+
import { t as toggleVariants } from '../typography-BYDh5oku.js';
|
|
23
|
+
export { C as Card, a as CardAction, b as CardContent, c as CardDescription, d as CardFooter, e as CardHeader, f as CardTitle, T as Toggle, g as Typography, h as typographyVariants } from '../typography-BYDh5oku.js';
|
|
22
24
|
import { Field as Field$1 } from '@base-ui/react/field';
|
|
23
25
|
import { OTPInput } from 'input-otp';
|
|
24
26
|
import { Progress as Progress$1 } from '@base-ui/react/progress';
|
|
@@ -31,8 +33,6 @@ import { Separator as Separator$2 } from '@base-ui/react/separator';
|
|
|
31
33
|
import { Slider as Slider$1 } from '@base-ui/react/slider';
|
|
32
34
|
import { Switch as Switch$1 } from '@base-ui/react/switch';
|
|
33
35
|
import { Tabs as Tabs$1 } from '@base-ui/react/tabs';
|
|
34
|
-
import { t as toggleVariants } from '../typography-DsGdDBc2.js';
|
|
35
|
-
export { T as Toggle, a as Typography, b as typographyVariants } from '../typography-DsGdDBc2.js';
|
|
36
36
|
import { Toggle } from '@base-ui/react/toggle';
|
|
37
37
|
import { ToggleGroup as ToggleGroup$1 } from '@base-ui/react/toggle-group';
|
|
38
38
|
|
|
@@ -424,15 +424,6 @@ declare function Tooltip({ ...props }: Tooltip$1.Root.Props): React.JSX.Element;
|
|
|
424
424
|
declare function TooltipTrigger({ ...props }: Tooltip$1.Trigger.Props): React.JSX.Element;
|
|
425
425
|
declare function TooltipContent({ className, side, sideOffset, align, children, ...props }: Tooltip$1.Popup.Props & Pick<Tooltip$1.Positioner.Props, 'align' | 'side' | 'sideOffset'>): React.JSX.Element;
|
|
426
426
|
|
|
427
|
-
/** shadcn/ui Card(vendored 源码) */
|
|
428
|
-
declare function Card({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
429
|
-
declare function CardHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
430
|
-
declare function CardTitle({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
431
|
-
declare function CardDescription({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
432
|
-
declare function CardAction({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
433
|
-
declare function CardContent({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
434
|
-
declare function CardFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
435
|
-
|
|
436
427
|
/**
|
|
437
428
|
* shadcn/ui Dialog(vendored 源码,Base UI 原语)。
|
|
438
429
|
* 官方源码:https://ui.shadcn.com/r/styles/base-nova/dialog.json
|
|
@@ -679,4 +670,4 @@ declare function Textarea({ className, ...props }: React.ComponentProps<'textare
|
|
|
679
670
|
declare function ToggleGroup({ className, variant, size, children, ...props }: ToggleGroup$1.Props & VariantProps<typeof toggleVariants>): React.JSX.Element;
|
|
680
671
|
declare function ToggleGroupItem({ className, children, variant, size, ...props }: Toggle.Props & VariantProps<typeof toggleVariants>): React.JSX.Element;
|
|
681
672
|
|
|
682
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle, AttachmentTrigger, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Bubble, BubbleContent, BubbleGroup, BubbleReactions, Button, ButtonGroup, CHART_TOKEN_COLORS, Calendar,
|
|
673
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle, AttachmentTrigger, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Bubble, BubbleContent, BubbleGroup, BubbleReactions, Button, ButtonGroup, CHART_TOKEN_COLORS, Calendar, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxContent, ComboboxTrigger, Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, ContextMenu, ContextMenuContent, ContextMenuItem, ContextMenuSeparator, ContextMenuTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyTitle, Field, FieldDescription, FieldError, FieldLabel, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputGroup, InputGroupAddon, InputGroupInput, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemMedia, ItemTitle, Kbd, Label, Menubar, MenubarContent, MenubarItem, MenubarMenu, MenubarSeparator, MenubarTrigger, Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Panel, PanelGroup, Popover, PopoverContent, PopoverTrigger, Progress, ProgressIndicator, ProgressTrack, RadioGroup, RadioGroupItem, ResizableHandle, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarContent as SidebarContentArea, SidebarFooter as SidebarFooterArea, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader as SidebarHeaderArea, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarRoot, SidebarSeparator, SidebarTrigger, Skeleton, Slider, SliderControl, SliderIndicator, SliderThumb, SliderTrack, Spinner, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type ToastOptions, type ToastVariant, Toaster, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, chartColor, navigationMenuTriggerStyle, toast, toastManager, toggleVariants, useCarousel, useSidebar };
|
package/dist/ui/index.js
CHANGED
|
@@ -160,7 +160,7 @@ import {
|
|
|
160
160
|
toggleVariants,
|
|
161
161
|
typographyVariants,
|
|
162
162
|
useCarousel
|
|
163
|
-
} from "../chunk-
|
|
163
|
+
} from "../chunk-XUIXZJDQ.js";
|
|
164
164
|
import {
|
|
165
165
|
Dialog,
|
|
166
166
|
DialogClose,
|
|
@@ -239,7 +239,7 @@ import {
|
|
|
239
239
|
TooltipProvider,
|
|
240
240
|
TooltipTrigger,
|
|
241
241
|
useSidebar
|
|
242
|
-
} from "../chunk-
|
|
242
|
+
} from "../chunk-VM4FESQB.js";
|
|
243
243
|
import {
|
|
244
244
|
Button,
|
|
245
245
|
buttonVariants,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pactor-app/ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "Pactor UI kit (shadcn): the single built-in UI kit — vendored shadcn/ui components (Base UI primitives + cva + tailwind-merge + lucide-react), props contracts, interaction core (OverlayManager / UiBridge) and layouts, with build-time Tailwind v4 prebuilt styles.css (zero consumer-side Tailwind config)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pactor",
|
|
@@ -105,10 +105,10 @@
|
|
|
105
105
|
"recharts": "^3.10.1",
|
|
106
106
|
"tailwind-merge": "^3.6.0",
|
|
107
107
|
"vaul": "^1.1.2",
|
|
108
|
-
"@pactor-app/core": "1.
|
|
109
|
-
"@pactor-app/
|
|
110
|
-
"@pactor-app/
|
|
111
|
-
"@pactor-app/
|
|
108
|
+
"@pactor-app/core": "1.8.0",
|
|
109
|
+
"@pactor-app/runtime": "1.8.0",
|
|
110
|
+
"@pactor-app/permission": "1.8.0",
|
|
111
|
+
"@pactor-app/router": "1.8.0"
|
|
112
112
|
},
|
|
113
113
|
"peerDependencies": {
|
|
114
114
|
"react": ">=18",
|