@pactor-app/ui 1.14.0 → 1.15.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/{chunk-GQE62HDV.js → chunk-EDKF6SKZ.js} +1 -1
- package/dist/{chunk-L77EOXU3.js → chunk-LFV72DC2.js} +48 -11
- package/dist/{chunk-AUSWAD26.js → chunk-O7UAPVPB.js} +7 -8
- package/dist/{chunk-NQQAPB7Q.js → chunk-S6AHT3PD.js} +1 -1
- package/dist/{chunk-V2J6FHWX.js → chunk-VNKSGMTT.js} +2 -2
- package/dist/components/index.cjs +87 -51
- package/dist/components/index.d.cts +12 -6
- package/dist/components/index.d.ts +12 -6
- package/dist/components/index.js +4 -4
- package/dist/index.cjs +121 -85
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -5
- package/dist/layout/index.cjs +7 -8
- package/dist/layout/index.js +3 -3
- package/dist/ui/index.cjs +7 -8
- package/dist/ui/index.js +2 -2
- package/package.json +5 -5
- package/styles.css +3 -1
|
@@ -906,6 +906,8 @@ interface HeaderLocale {
|
|
|
906
906
|
label: string;
|
|
907
907
|
value: string;
|
|
908
908
|
}
|
|
909
|
+
/** 深浅色主题(themeToggle 切换结果) */
|
|
910
|
+
type HeaderTheme = 'light' | 'dark';
|
|
909
911
|
interface HeaderProps {
|
|
910
912
|
/** 品牌区 logo 图片地址(可含表达式) */
|
|
911
913
|
logo?: string;
|
|
@@ -921,6 +923,10 @@ interface HeaderProps {
|
|
|
921
923
|
user?: HeaderUser;
|
|
922
924
|
/** 国际化切换选项 */
|
|
923
925
|
locales?: HeaderLocale[];
|
|
926
|
+
/** 右侧展示深浅色切换按钮(缺省 false);点击切换 documentElement 的 data-pactor-theme */
|
|
927
|
+
themeToggle?: boolean;
|
|
928
|
+
/** 主题切换事件,传出切换后的主题('light' | 'dark') */
|
|
929
|
+
onThemeChange?: (theme: HeaderTheme) => void;
|
|
924
930
|
/** 菜单选中事件,传出选中项 key */
|
|
925
931
|
onMenuSelect?: (key: string) => void;
|
|
926
932
|
/** 通用下拉选中事件,传出选中项 value */
|
|
@@ -937,15 +943,15 @@ interface HeaderProps {
|
|
|
937
943
|
}
|
|
938
944
|
/**
|
|
939
945
|
* Header 顶部区域(shadcn kit,语义对齐 antd Layout.Header):
|
|
940
|
-
* 横向 flex、垂直居中、默认下边框。除 children
|
|
941
|
-
* 区域(品牌区 / 通用下拉 / 横向菜单 / 用户区 /
|
|
942
|
-
* props 缺省时退化为纯容器。
|
|
946
|
+
* 横向 flex、垂直居中、默认下边框。除 children 外可携带六个可选结构
|
|
947
|
+
* 区域(品牌区 / 通用下拉 / 横向菜单 / 深浅色切换 / 用户区 / 国际化切换);
|
|
948
|
+
* 全部区域 props 缺省时退化为纯容器。
|
|
943
949
|
*
|
|
944
950
|
* 排布固定:左区(品牌?→下拉?→菜单?)— flex-1 中区(children)—
|
|
945
|
-
*
|
|
951
|
+
* 右区(下拉?→品牌?→主题切换?→locales→user)。区域内部直接组合 src/ui 原语
|
|
946
952
|
* (dropdown-menu / avatar),事件值透传给 Header 自身的事件 props。
|
|
947
953
|
*/
|
|
948
|
-
declare function Header({ logo, title, brandPosition, dropdown, menu, user, locales, onMenuSelect, onDropdownSelect, onUserSelect, onLocaleChange, className, style, children, }: HeaderProps): React.JSX.Element;
|
|
954
|
+
declare function Header({ logo, title, brandPosition, dropdown, menu, user, locales, themeToggle, onThemeChange, onMenuSelect, onDropdownSelect, onUserSelect, onLocaleChange, className, style, children, }: HeaderProps): React.JSX.Element;
|
|
949
955
|
|
|
950
956
|
interface HoverCardProps {
|
|
951
957
|
/** 悬浮卡片内容:DSL 子树(对象,原样保留至渲染层求值)或纯文本 */
|
|
@@ -1998,4 +2004,4 @@ interface FormContextValue {
|
|
|
1998
2004
|
/** 在字段组件内探测 Form 上下文;不在 Form 内时返回 null */
|
|
1999
2005
|
declare function useFormContext(): FormContextValue | null;
|
|
2000
2006
|
|
|
2001
|
-
export { Accordion, type AccordionItemData, type AccordionProps, Alert, AlertDialog, type AlertDialogProps, type AlertProps, type AlertVariant, AspectRatio, type AspectRatioProps, Avatar, type AvatarProps, Badge, type BadgeProps, type BadgeVariant, Breadcrumb, type BreadcrumbItemData, type BreadcrumbProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, type CalendarProps, Card, type CardProps, Carousel, type CarouselImage, type CarouselItemData, type CarouselProps, Chart, type ChartProps, type ChartType, ChatInput, type ChatInputProps, Checkbox, type CheckboxProps, Collapsible, type CollapsibleProps, Combobox, type ComboboxOption, type ComboboxProps, Command, type CommandGroupData, type CommandItemData, type CommandProps, Content, type ContentProps, ContextMenu, type ContextMenuItemData, type ContextMenuProps, DataTable, type DataTableColumn, type DataTablePagination, type DataTableProps, type DataTableSort, type DataTableSortOrder, DatePicker, type DatePickerPreset, type DatePickerPresetKey, type DatePickerProps, type DatePickerRangeProps, type DatePickerSingleProps, type DateRangeValue, Dialog, type DialogProps, Drawer, type DrawerPlacement, type DrawerProps, DropdownMenu, type DropdownMenuItemData, type DropdownMenuProps, Empty, type EmptyProps, Field, type FieldProps, type FieldRule, Flex, type FlexProps, Footer, type FooterProps, Form, type FormContextValue, type FormProps, Grid, type GridProps, Header, type HeaderBrandPosition, type HeaderDropdown, type HeaderDropdownItem, type HeaderLocale, type HeaderMenuItem, type HeaderProps, type HeaderUser, type HeaderUserItem, HoverCard, type HoverCardProps, ICONS, Icon, type IconProps, type IconSize, Input, InputGroup, type InputGroupProps, InputOTP, type InputOTPProps, type InputProps, Item, type ItemProps, Kbd, type KbdProps, Label, type LabelProps, Layout, type LayoutProps, Link, type LinkProps, Menu, type MenuItem, type MenuProps, Menubar, type MenubarLeafItem, type MenubarMenuData, type MenubarProps, NavigationMenu, type NavigationMenuChildItem, type NavigationMenuItemData, type NavigationMenuProps, Page, type PageProps, Pagination, type PaginationProps, Popover, type PopoverProps, Progress, type ProgressProps, RadioGroup, type RadioGroupOption, type RadioGroupProps, RailTooltip, Resizable, type ResizablePanelData, type ResizableProps, ScrollArea, type ScrollAreaProps, Select, type SelectOption, type SelectProps, Separator, type SeparatorProps, Sheet, type SheetProps, type SheetSide, Sidebar, type SidebarBrand, type SidebarNavItem, type SidebarProps, Sider, type SiderProps, Skeleton, type SkeletonProps, type SkeletonShape, Slider, type SliderProps, Sonner, type SonnerProps, Spinner, type SpinnerProps, type SpinnerSize, Statistic, type StatisticProps, Switch, type SwitchProps, type TabItem, Table, type TableColumn, type TablePagination, type TablePaginationInfo, type TableProps, Tabs, type TabsProps, Text, type TextProps, type TextType, Textarea, type TextareaProps, Toggle, ToggleGroup, type ToggleGroupOption, type ToggleGroupProps, type ToggleProps, Tooltip, type TooltipProps, Typography, type TypographyProps, type TypographyVariant, builtinComponents, createComponentRegistry, normalizeIconName, registerBuiltinComponents, useFormContext, useSidebarDrawer };
|
|
2007
|
+
export { Accordion, type AccordionItemData, type AccordionProps, Alert, AlertDialog, type AlertDialogProps, type AlertProps, type AlertVariant, AspectRatio, type AspectRatioProps, Avatar, type AvatarProps, Badge, type BadgeProps, type BadgeVariant, Breadcrumb, type BreadcrumbItemData, type BreadcrumbProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, type CalendarProps, Card, type CardProps, Carousel, type CarouselImage, type CarouselItemData, type CarouselProps, Chart, type ChartProps, type ChartType, ChatInput, type ChatInputProps, Checkbox, type CheckboxProps, Collapsible, type CollapsibleProps, Combobox, type ComboboxOption, type ComboboxProps, Command, type CommandGroupData, type CommandItemData, type CommandProps, Content, type ContentProps, ContextMenu, type ContextMenuItemData, type ContextMenuProps, DataTable, type DataTableColumn, type DataTablePagination, type DataTableProps, type DataTableSort, type DataTableSortOrder, DatePicker, type DatePickerPreset, type DatePickerPresetKey, type DatePickerProps, type DatePickerRangeProps, type DatePickerSingleProps, type DateRangeValue, Dialog, type DialogProps, Drawer, type DrawerPlacement, type DrawerProps, DropdownMenu, type DropdownMenuItemData, type DropdownMenuProps, Empty, type EmptyProps, Field, type FieldProps, type FieldRule, Flex, type FlexProps, Footer, type FooterProps, Form, type FormContextValue, type FormProps, Grid, type GridProps, Header, type HeaderBrandPosition, type HeaderDropdown, type HeaderDropdownItem, type HeaderLocale, type HeaderMenuItem, type HeaderProps, type HeaderTheme, type HeaderUser, type HeaderUserItem, HoverCard, type HoverCardProps, ICONS, Icon, type IconProps, type IconSize, Input, InputGroup, type InputGroupProps, InputOTP, type InputOTPProps, type InputProps, Item, type ItemProps, Kbd, type KbdProps, Label, type LabelProps, Layout, type LayoutProps, Link, type LinkProps, Menu, type MenuItem, type MenuProps, Menubar, type MenubarLeafItem, type MenubarMenuData, type MenubarProps, NavigationMenu, type NavigationMenuChildItem, type NavigationMenuItemData, type NavigationMenuProps, Page, type PageProps, Pagination, type PaginationProps, Popover, type PopoverProps, Progress, type ProgressProps, RadioGroup, type RadioGroupOption, type RadioGroupProps, RailTooltip, Resizable, type ResizablePanelData, type ResizableProps, ScrollArea, type ScrollAreaProps, Select, type SelectOption, type SelectProps, Separator, type SeparatorProps, Sheet, type SheetProps, type SheetSide, Sidebar, type SidebarBrand, type SidebarNavItem, type SidebarProps, Sider, type SiderProps, Skeleton, type SkeletonProps, type SkeletonShape, Slider, type SliderProps, Sonner, type SonnerProps, Spinner, type SpinnerProps, type SpinnerSize, Statistic, type StatisticProps, Switch, type SwitchProps, type TabItem, Table, type TableColumn, type TablePagination, type TablePaginationInfo, type TableProps, Tabs, type TabsProps, Text, type TextProps, type TextType, Textarea, type TextareaProps, Toggle, ToggleGroup, type ToggleGroupOption, type ToggleGroupProps, type ToggleProps, Tooltip, type TooltipProps, Typography, type TypographyProps, type TypographyVariant, builtinComponents, createComponentRegistry, normalizeIconName, registerBuiltinComponents, useFormContext, useSidebarDrawer };
|
|
@@ -906,6 +906,8 @@ interface HeaderLocale {
|
|
|
906
906
|
label: string;
|
|
907
907
|
value: string;
|
|
908
908
|
}
|
|
909
|
+
/** 深浅色主题(themeToggle 切换结果) */
|
|
910
|
+
type HeaderTheme = 'light' | 'dark';
|
|
909
911
|
interface HeaderProps {
|
|
910
912
|
/** 品牌区 logo 图片地址(可含表达式) */
|
|
911
913
|
logo?: string;
|
|
@@ -921,6 +923,10 @@ interface HeaderProps {
|
|
|
921
923
|
user?: HeaderUser;
|
|
922
924
|
/** 国际化切换选项 */
|
|
923
925
|
locales?: HeaderLocale[];
|
|
926
|
+
/** 右侧展示深浅色切换按钮(缺省 false);点击切换 documentElement 的 data-pactor-theme */
|
|
927
|
+
themeToggle?: boolean;
|
|
928
|
+
/** 主题切换事件,传出切换后的主题('light' | 'dark') */
|
|
929
|
+
onThemeChange?: (theme: HeaderTheme) => void;
|
|
924
930
|
/** 菜单选中事件,传出选中项 key */
|
|
925
931
|
onMenuSelect?: (key: string) => void;
|
|
926
932
|
/** 通用下拉选中事件,传出选中项 value */
|
|
@@ -937,15 +943,15 @@ interface HeaderProps {
|
|
|
937
943
|
}
|
|
938
944
|
/**
|
|
939
945
|
* Header 顶部区域(shadcn kit,语义对齐 antd Layout.Header):
|
|
940
|
-
* 横向 flex、垂直居中、默认下边框。除 children
|
|
941
|
-
* 区域(品牌区 / 通用下拉 / 横向菜单 / 用户区 /
|
|
942
|
-
* props 缺省时退化为纯容器。
|
|
946
|
+
* 横向 flex、垂直居中、默认下边框。除 children 外可携带六个可选结构
|
|
947
|
+
* 区域(品牌区 / 通用下拉 / 横向菜单 / 深浅色切换 / 用户区 / 国际化切换);
|
|
948
|
+
* 全部区域 props 缺省时退化为纯容器。
|
|
943
949
|
*
|
|
944
950
|
* 排布固定:左区(品牌?→下拉?→菜单?)— flex-1 中区(children)—
|
|
945
|
-
*
|
|
951
|
+
* 右区(下拉?→品牌?→主题切换?→locales→user)。区域内部直接组合 src/ui 原语
|
|
946
952
|
* (dropdown-menu / avatar),事件值透传给 Header 自身的事件 props。
|
|
947
953
|
*/
|
|
948
|
-
declare function Header({ logo, title, brandPosition, dropdown, menu, user, locales, onMenuSelect, onDropdownSelect, onUserSelect, onLocaleChange, className, style, children, }: HeaderProps): React.JSX.Element;
|
|
954
|
+
declare function Header({ logo, title, brandPosition, dropdown, menu, user, locales, themeToggle, onThemeChange, onMenuSelect, onDropdownSelect, onUserSelect, onLocaleChange, className, style, children, }: HeaderProps): React.JSX.Element;
|
|
949
955
|
|
|
950
956
|
interface HoverCardProps {
|
|
951
957
|
/** 悬浮卡片内容:DSL 子树(对象,原样保留至渲染层求值)或纯文本 */
|
|
@@ -1998,4 +2004,4 @@ interface FormContextValue {
|
|
|
1998
2004
|
/** 在字段组件内探测 Form 上下文;不在 Form 内时返回 null */
|
|
1999
2005
|
declare function useFormContext(): FormContextValue | null;
|
|
2000
2006
|
|
|
2001
|
-
export { Accordion, type AccordionItemData, type AccordionProps, Alert, AlertDialog, type AlertDialogProps, type AlertProps, type AlertVariant, AspectRatio, type AspectRatioProps, Avatar, type AvatarProps, Badge, type BadgeProps, type BadgeVariant, Breadcrumb, type BreadcrumbItemData, type BreadcrumbProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, type CalendarProps, Card, type CardProps, Carousel, type CarouselImage, type CarouselItemData, type CarouselProps, Chart, type ChartProps, type ChartType, ChatInput, type ChatInputProps, Checkbox, type CheckboxProps, Collapsible, type CollapsibleProps, Combobox, type ComboboxOption, type ComboboxProps, Command, type CommandGroupData, type CommandItemData, type CommandProps, Content, type ContentProps, ContextMenu, type ContextMenuItemData, type ContextMenuProps, DataTable, type DataTableColumn, type DataTablePagination, type DataTableProps, type DataTableSort, type DataTableSortOrder, DatePicker, type DatePickerPreset, type DatePickerPresetKey, type DatePickerProps, type DatePickerRangeProps, type DatePickerSingleProps, type DateRangeValue, Dialog, type DialogProps, Drawer, type DrawerPlacement, type DrawerProps, DropdownMenu, type DropdownMenuItemData, type DropdownMenuProps, Empty, type EmptyProps, Field, type FieldProps, type FieldRule, Flex, type FlexProps, Footer, type FooterProps, Form, type FormContextValue, type FormProps, Grid, type GridProps, Header, type HeaderBrandPosition, type HeaderDropdown, type HeaderDropdownItem, type HeaderLocale, type HeaderMenuItem, type HeaderProps, type HeaderUser, type HeaderUserItem, HoverCard, type HoverCardProps, ICONS, Icon, type IconProps, type IconSize, Input, InputGroup, type InputGroupProps, InputOTP, type InputOTPProps, type InputProps, Item, type ItemProps, Kbd, type KbdProps, Label, type LabelProps, Layout, type LayoutProps, Link, type LinkProps, Menu, type MenuItem, type MenuProps, Menubar, type MenubarLeafItem, type MenubarMenuData, type MenubarProps, NavigationMenu, type NavigationMenuChildItem, type NavigationMenuItemData, type NavigationMenuProps, Page, type PageProps, Pagination, type PaginationProps, Popover, type PopoverProps, Progress, type ProgressProps, RadioGroup, type RadioGroupOption, type RadioGroupProps, RailTooltip, Resizable, type ResizablePanelData, type ResizableProps, ScrollArea, type ScrollAreaProps, Select, type SelectOption, type SelectProps, Separator, type SeparatorProps, Sheet, type SheetProps, type SheetSide, Sidebar, type SidebarBrand, type SidebarNavItem, type SidebarProps, Sider, type SiderProps, Skeleton, type SkeletonProps, type SkeletonShape, Slider, type SliderProps, Sonner, type SonnerProps, Spinner, type SpinnerProps, type SpinnerSize, Statistic, type StatisticProps, Switch, type SwitchProps, type TabItem, Table, type TableColumn, type TablePagination, type TablePaginationInfo, type TableProps, Tabs, type TabsProps, Text, type TextProps, type TextType, Textarea, type TextareaProps, Toggle, ToggleGroup, type ToggleGroupOption, type ToggleGroupProps, type ToggleProps, Tooltip, type TooltipProps, Typography, type TypographyProps, type TypographyVariant, builtinComponents, createComponentRegistry, normalizeIconName, registerBuiltinComponents, useFormContext, useSidebarDrawer };
|
|
2007
|
+
export { Accordion, type AccordionItemData, type AccordionProps, Alert, AlertDialog, type AlertDialogProps, type AlertProps, type AlertVariant, AspectRatio, type AspectRatioProps, Avatar, type AvatarProps, Badge, type BadgeProps, type BadgeVariant, Breadcrumb, type BreadcrumbItemData, type BreadcrumbProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, type CalendarProps, Card, type CardProps, Carousel, type CarouselImage, type CarouselItemData, type CarouselProps, Chart, type ChartProps, type ChartType, ChatInput, type ChatInputProps, Checkbox, type CheckboxProps, Collapsible, type CollapsibleProps, Combobox, type ComboboxOption, type ComboboxProps, Command, type CommandGroupData, type CommandItemData, type CommandProps, Content, type ContentProps, ContextMenu, type ContextMenuItemData, type ContextMenuProps, DataTable, type DataTableColumn, type DataTablePagination, type DataTableProps, type DataTableSort, type DataTableSortOrder, DatePicker, type DatePickerPreset, type DatePickerPresetKey, type DatePickerProps, type DatePickerRangeProps, type DatePickerSingleProps, type DateRangeValue, Dialog, type DialogProps, Drawer, type DrawerPlacement, type DrawerProps, DropdownMenu, type DropdownMenuItemData, type DropdownMenuProps, Empty, type EmptyProps, Field, type FieldProps, type FieldRule, Flex, type FlexProps, Footer, type FooterProps, Form, type FormContextValue, type FormProps, Grid, type GridProps, Header, type HeaderBrandPosition, type HeaderDropdown, type HeaderDropdownItem, type HeaderLocale, type HeaderMenuItem, type HeaderProps, type HeaderTheme, type HeaderUser, type HeaderUserItem, HoverCard, type HoverCardProps, ICONS, Icon, type IconProps, type IconSize, Input, InputGroup, type InputGroupProps, InputOTP, type InputOTPProps, type InputProps, Item, type ItemProps, Kbd, type KbdProps, Label, type LabelProps, Layout, type LayoutProps, Link, type LinkProps, Menu, type MenuItem, type MenuProps, Menubar, type MenubarLeafItem, type MenubarMenuData, type MenubarProps, NavigationMenu, type NavigationMenuChildItem, type NavigationMenuItemData, type NavigationMenuProps, Page, type PageProps, Pagination, type PaginationProps, Popover, type PopoverProps, Progress, type ProgressProps, RadioGroup, type RadioGroupOption, type RadioGroupProps, RailTooltip, Resizable, type ResizablePanelData, type ResizableProps, ScrollArea, type ScrollAreaProps, Select, type SelectOption, type SelectProps, Separator, type SeparatorProps, Sheet, type SheetProps, type SheetSide, Sidebar, type SidebarBrand, type SidebarNavItem, type SidebarProps, Sider, type SiderProps, Skeleton, type SkeletonProps, type SkeletonShape, Slider, type SliderProps, Sonner, type SonnerProps, Spinner, type SpinnerProps, type SpinnerSize, Statistic, type StatisticProps, Switch, type SwitchProps, type TabItem, Table, type TableColumn, type TablePagination, type TablePaginationInfo, type TableProps, Tabs, type TabsProps, Text, type TextProps, type TextType, Textarea, type TextareaProps, Toggle, ToggleGroup, type ToggleGroupOption, type ToggleGroupProps, type ToggleProps, Tooltip, type TooltipProps, Typography, type TypographyProps, type TypographyVariant, builtinComponents, createComponentRegistry, normalizeIconName, registerBuiltinComponents, useFormContext, useSidebarDrawer };
|
package/dist/components/index.js
CHANGED
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
createComponentRegistry,
|
|
72
72
|
registerBuiltinComponents,
|
|
73
73
|
useFormContext
|
|
74
|
-
} from "../chunk-
|
|
74
|
+
} from "../chunk-LFV72DC2.js";
|
|
75
75
|
import {
|
|
76
76
|
ICONS,
|
|
77
77
|
Icon,
|
|
@@ -80,10 +80,10 @@ import {
|
|
|
80
80
|
Sidebar,
|
|
81
81
|
normalizeIconName,
|
|
82
82
|
useSidebarDrawer
|
|
83
|
-
} from "../chunk-
|
|
84
|
-
import "../chunk-
|
|
83
|
+
} from "../chunk-EDKF6SKZ.js";
|
|
84
|
+
import "../chunk-S6AHT3PD.js";
|
|
85
85
|
import "../chunk-XUHJ5YSG.js";
|
|
86
|
-
import "../chunk-
|
|
86
|
+
import "../chunk-O7UAPVPB.js";
|
|
87
87
|
import "../chunk-WKJUCGV4.js";
|
|
88
88
|
export {
|
|
89
89
|
Accordion,
|