@pactor-app/ui 1.17.1 → 1.18.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.
@@ -1239,6 +1239,44 @@ interface NavigationMenuProps {
1239
1239
  */
1240
1240
  declare function NavigationMenu({ items, className, style }: NavigationMenuProps): React.JSX.Element;
1241
1241
 
1242
+ interface NumberInputProps {
1243
+ /** 字段名;在 Form 内声明 name 即自动成为表单项 */
1244
+ name?: string;
1245
+ /** 表单项标签 */
1246
+ label?: string;
1247
+ /** 校验规则 */
1248
+ rules?: FieldRule[];
1249
+ /** 受控值(独立渲染时生效);Form 内作为字段初始值(优先于 Form initialValues) */
1250
+ value?: number;
1251
+ /** 最小值(输入越界时钳制) */
1252
+ min?: number;
1253
+ /** 最大值(输入越界时钳制) */
1254
+ max?: number;
1255
+ /** 步长(原生步进按钮步距),默认 1 */
1256
+ step?: number;
1257
+ /** 小数精度位数;声明后输入值按此精度四舍五入 */
1258
+ precision?: number;
1259
+ placeholder?: string;
1260
+ disabled?: boolean;
1261
+ /** 输入事件,传出 number;清空时传出 undefined */
1262
+ onChange?: (value: number | undefined) => void;
1263
+ /** 通用:根节点 class(Form 内为 form-item 容器,独立渲染时为控件包裹节点) */
1264
+ className?: string;
1265
+ /** 控件本体(input)class(无论是否在 Form 内都挂 input 节点) */
1266
+ controlClassName?: string;
1267
+ /** 通用:根节点内联样式(同 className 的挂载规则) */
1268
+ style?: CSSProperties;
1269
+ }
1270
+ /**
1271
+ * NumberInput 适配器(shadcn kit):数字输入框,右侧带增加/减少步进按钮。
1272
+ * 在 Form 内且声明 `name` 时自动成为表单项(label / rules 生效,
1273
+ * 值由 Form 上下文托管);否则渲染独立受控控件。
1274
+ * onChange 传出 number(DSL 语义值);输入过程保留中间文本(如 "-" / "1."),
1275
+ * 可解析时传出钳制 + 精度规整后的 number,清空时传出 undefined。
1276
+ * 步进按钮按 step 增减并以 min/max 钳制;到达边界或 disabled 时对应按钮禁用。
1277
+ */
1278
+ declare function NumberInput({ name, label, rules, value, min, max, step, precision, placeholder, disabled, onChange, className, controlClassName, style, }: NumberInputProps): React.JSX.Element;
1279
+
1242
1280
  interface PageProps {
1243
1281
  /** 页面标题,可选 */
1244
1282
  title?: string;
@@ -1673,6 +1711,8 @@ interface TableColumn {
1673
1711
  title?: string;
1674
1712
  dataIndex?: string;
1675
1713
  width?: number | string;
1714
+ /** 列内容水平对齐(表头与单元格同时生效),默认 left */
1715
+ align?: 'left' | 'center' | 'right';
1676
1716
  cell?: DslNode;
1677
1717
  }
1678
1718
  /** DSL 分页配置:false 关闭,`{ pageSize }` 简化映射 */
@@ -1895,6 +1935,7 @@ declare const builtinComponents: {
1895
1935
  readonly Table: typeof Table;
1896
1936
  readonly Form: typeof Form;
1897
1937
  readonly Input: typeof Input;
1938
+ readonly NumberInput: typeof NumberInput;
1898
1939
  readonly Select: typeof Select;
1899
1940
  readonly Layout: {
1900
1941
  readonly component: typeof Layout;
@@ -2004,4 +2045,4 @@ interface FormContextValue {
2004
2045
  /** 在字段组件内探测 Form 上下文;不在 Form 内时返回 null */
2005
2046
  declare function useFormContext(): FormContextValue | null;
2006
2047
 
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 };
2048
+ 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, NumberInput, type NumberInputProps, 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 };
@@ -1239,6 +1239,44 @@ interface NavigationMenuProps {
1239
1239
  */
1240
1240
  declare function NavigationMenu({ items, className, style }: NavigationMenuProps): React.JSX.Element;
1241
1241
 
1242
+ interface NumberInputProps {
1243
+ /** 字段名;在 Form 内声明 name 即自动成为表单项 */
1244
+ name?: string;
1245
+ /** 表单项标签 */
1246
+ label?: string;
1247
+ /** 校验规则 */
1248
+ rules?: FieldRule[];
1249
+ /** 受控值(独立渲染时生效);Form 内作为字段初始值(优先于 Form initialValues) */
1250
+ value?: number;
1251
+ /** 最小值(输入越界时钳制) */
1252
+ min?: number;
1253
+ /** 最大值(输入越界时钳制) */
1254
+ max?: number;
1255
+ /** 步长(原生步进按钮步距),默认 1 */
1256
+ step?: number;
1257
+ /** 小数精度位数;声明后输入值按此精度四舍五入 */
1258
+ precision?: number;
1259
+ placeholder?: string;
1260
+ disabled?: boolean;
1261
+ /** 输入事件,传出 number;清空时传出 undefined */
1262
+ onChange?: (value: number | undefined) => void;
1263
+ /** 通用:根节点 class(Form 内为 form-item 容器,独立渲染时为控件包裹节点) */
1264
+ className?: string;
1265
+ /** 控件本体(input)class(无论是否在 Form 内都挂 input 节点) */
1266
+ controlClassName?: string;
1267
+ /** 通用:根节点内联样式(同 className 的挂载规则) */
1268
+ style?: CSSProperties;
1269
+ }
1270
+ /**
1271
+ * NumberInput 适配器(shadcn kit):数字输入框,右侧带增加/减少步进按钮。
1272
+ * 在 Form 内且声明 `name` 时自动成为表单项(label / rules 生效,
1273
+ * 值由 Form 上下文托管);否则渲染独立受控控件。
1274
+ * onChange 传出 number(DSL 语义值);输入过程保留中间文本(如 "-" / "1."),
1275
+ * 可解析时传出钳制 + 精度规整后的 number,清空时传出 undefined。
1276
+ * 步进按钮按 step 增减并以 min/max 钳制;到达边界或 disabled 时对应按钮禁用。
1277
+ */
1278
+ declare function NumberInput({ name, label, rules, value, min, max, step, precision, placeholder, disabled, onChange, className, controlClassName, style, }: NumberInputProps): React.JSX.Element;
1279
+
1242
1280
  interface PageProps {
1243
1281
  /** 页面标题,可选 */
1244
1282
  title?: string;
@@ -1673,6 +1711,8 @@ interface TableColumn {
1673
1711
  title?: string;
1674
1712
  dataIndex?: string;
1675
1713
  width?: number | string;
1714
+ /** 列内容水平对齐(表头与单元格同时生效),默认 left */
1715
+ align?: 'left' | 'center' | 'right';
1676
1716
  cell?: DslNode;
1677
1717
  }
1678
1718
  /** DSL 分页配置:false 关闭,`{ pageSize }` 简化映射 */
@@ -1895,6 +1935,7 @@ declare const builtinComponents: {
1895
1935
  readonly Table: typeof Table;
1896
1936
  readonly Form: typeof Form;
1897
1937
  readonly Input: typeof Input;
1938
+ readonly NumberInput: typeof NumberInput;
1898
1939
  readonly Select: typeof Select;
1899
1940
  readonly Layout: {
1900
1941
  readonly component: typeof Layout;
@@ -2004,4 +2045,4 @@ interface FormContextValue {
2004
2045
  /** 在字段组件内探测 Form 上下文;不在 Form 内时返回 null */
2005
2046
  declare function useFormContext(): FormContextValue | null;
2006
2047
 
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 };
2048
+ 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, NumberInput, type NumberInputProps, 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 };
@@ -42,6 +42,7 @@ import {
42
42
  Link,
43
43
  Menubar,
44
44
  NavigationMenu,
45
+ NumberInput,
45
46
  Page,
46
47
  Pagination,
47
48
  Popover,
@@ -71,7 +72,7 @@ import {
71
72
  createComponentRegistry,
72
73
  registerBuiltinComponents,
73
74
  useFormContext
74
- } from "../chunk-GVBFVV7I.js";
75
+ } from "../chunk-MHM7LTV2.js";
75
76
  import {
76
77
  ICONS,
77
78
  Icon,
@@ -80,10 +81,10 @@ import {
80
81
  Sidebar,
81
82
  normalizeIconName,
82
83
  useSidebarDrawer
83
- } from "../chunk-IH67RZJ4.js";
84
- import "../chunk-64JZPHD3.js";
84
+ } from "../chunk-COMLXFWS.js";
85
+ import "../chunk-XA6OJ54X.js";
85
86
  import "../chunk-XUHJ5YSG.js";
86
- import "../chunk-OGNXKVGQ.js";
87
+ import "../chunk-RB7RCKAX.js";
87
88
  import "../chunk-WKJUCGV4.js";
88
89
  export {
89
90
  Accordion,
@@ -132,6 +133,7 @@ export {
132
133
  Menu,
133
134
  Menubar,
134
135
  NavigationMenu,
136
+ NumberInput,
135
137
  Page,
136
138
  Pagination,
137
139
  Popover,