vxui-re 1.0.5 → 1.0.7

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.
Files changed (96) hide show
  1. package/dist/index.cjs +2 -0
  2. package/dist/index.css +1 -0
  3. package/dist/index.d.ts +2 -0
  4. package/dist/index.js +17428 -0
  5. package/dist/src/components/Accordion.d.ts +14 -0
  6. package/dist/src/components/Alert.d.ts +10 -0
  7. package/dist/src/components/AppShell.d.ts +33 -0
  8. package/dist/src/components/Article.d.ts +72 -0
  9. package/dist/src/components/Avatar.d.ts +12 -0
  10. package/dist/src/components/Badge.d.ts +7 -0
  11. package/dist/src/components/Breadcrumb.d.ts +12 -0
  12. package/dist/src/components/Button.d.ts +18 -0
  13. package/dist/src/components/Calendar.d.ts +10 -0
  14. package/dist/src/components/Card.d.ts +17 -0
  15. package/dist/src/components/Carousel.d.ts +15 -0
  16. package/dist/src/components/Checkbox.d.ts +7 -0
  17. package/dist/src/components/CodeBlock.d.ts +9 -0
  18. package/dist/src/components/ColorPicker.d.ts +13 -0
  19. package/dist/src/components/CommandPalette.d.ts +22 -0
  20. package/dist/src/components/ContextMenu.d.ts +20 -0
  21. package/dist/src/components/DatePicker.d.ts +15 -0
  22. package/dist/src/components/Descriptions.d.ts +29 -0
  23. package/dist/src/components/Dialog.d.ts +49 -0
  24. package/dist/src/components/DropdownMenu.d.ts +55 -0
  25. package/dist/src/components/EmptyState.d.ts +9 -0
  26. package/dist/src/components/FileUpload.d.ts +17 -0
  27. package/dist/src/components/Form.d.ts +28 -0
  28. package/dist/src/components/Heading.d.ts +13 -0
  29. package/dist/src/components/HoverCard.d.ts +11 -0
  30. package/dist/src/components/Image.d.ts +30 -0
  31. package/dist/src/components/Input.d.ts +18 -0
  32. package/dist/src/components/Label.d.ts +5 -0
  33. package/dist/src/components/LanguageSwitcher.d.ts +9 -0
  34. package/dist/src/components/Menubar.d.ts +24 -0
  35. package/dist/src/components/MultiSelect.d.ts +27 -0
  36. package/dist/src/components/NavigationMenu.d.ts +20 -0
  37. package/dist/src/components/Notification.d.ts +30 -0
  38. package/dist/src/components/NumberInput.d.ts +12 -0
  39. package/dist/src/components/Pagination.d.ts +9 -0
  40. package/dist/src/components/PinInput.d.ts +37 -0
  41. package/dist/src/components/Popover.d.ts +13 -0
  42. package/dist/src/components/Progress.d.ts +11 -0
  43. package/dist/src/components/Radio.d.ts +12 -0
  44. package/dist/src/components/Rating.d.ts +14 -0
  45. package/dist/src/components/Resizable.d.ts +35 -0
  46. package/dist/src/components/Responsive.d.ts +25 -0
  47. package/dist/src/components/Result.d.ts +18 -0
  48. package/dist/src/components/ScrollArea.d.ts +21 -0
  49. package/dist/src/components/SegmentedControl.d.ts +16 -0
  50. package/dist/src/components/Select.d.ts +31 -0
  51. package/dist/src/components/Separator.d.ts +6 -0
  52. package/dist/src/components/Sheet/Sheet.d.ts +30 -0
  53. package/dist/src/components/Sheet/SheetPanel.d.ts +44 -0
  54. package/dist/src/components/Sheet/index.d.ts +2 -0
  55. package/dist/src/components/Sheet/useSheetState.d.ts +34 -0
  56. package/dist/src/components/Shell.d.ts +88 -0
  57. package/dist/src/components/Skeleton.d.ts +8 -0
  58. package/dist/src/components/Slider.d.ts +7 -0
  59. package/dist/src/components/Spinner.d.ts +8 -0
  60. package/dist/src/components/Stepper.d.ts +14 -0
  61. package/dist/src/components/Switch.d.ts +7 -0
  62. package/dist/src/components/Table.d.ts +90 -0
  63. package/dist/src/components/Tabs.d.ts +5 -0
  64. package/dist/src/components/TagInput.d.ts +18 -0
  65. package/dist/src/components/Text.d.ts +14 -0
  66. package/dist/src/components/Textarea.d.ts +7 -0
  67. package/dist/src/components/ThemeProvider.d.ts +51 -0
  68. package/dist/src/components/TimePicker.d.ts +14 -0
  69. package/dist/src/components/Timeline.d.ts +14 -0
  70. package/dist/src/components/Toast.d.ts +15 -0
  71. package/dist/src/components/Toggle.d.ts +24 -0
  72. package/dist/src/components/Tooltip.d.ts +11 -0
  73. package/dist/src/components/TreeView.d.ts +20 -0
  74. package/dist/src/components/mobile/ActionSheet.d.ts +15 -0
  75. package/dist/src/components/mobile/BottomNav.d.ts +23 -0
  76. package/dist/src/components/mobile/MobileApp.d.ts +1 -0
  77. package/dist/src/components/mobile/MobileDrawer.d.ts +31 -0
  78. package/dist/src/components/mobile/MobileList.d.ts +24 -0
  79. package/dist/src/components/mobile/MobilePreviewPage.d.ts +5 -0
  80. package/dist/src/components/mobile/MobileShell.d.ts +24 -0
  81. package/dist/src/components/pages/ErrorPage.d.ts +9 -0
  82. package/dist/src/components/pages/HomePage.d.ts +10 -0
  83. package/dist/src/components/pages/LoginPage.d.ts +12 -0
  84. package/dist/src/components/pages/PrivacyPolicyPage.d.ts +5 -0
  85. package/dist/src/components/pages/RegisterPage.d.ts +14 -0
  86. package/dist/src/components/pages/TermsOfServicePage.d.ts +5 -0
  87. package/dist/src/components/pages/homePageContent.d.ts +25 -0
  88. package/dist/src/components/pages/legalPageContent.d.ts +15 -0
  89. package/dist/src/lib/VXUIProvider.d.ts +29 -0
  90. package/dist/src/lib/breakpoints.d.ts +63 -0
  91. package/dist/src/lib/cx.d.ts +1 -0
  92. package/dist/src/lib/dialogPopover.d.ts +30 -0
  93. package/dist/src/lib/index.d.ts +152 -0
  94. package/dist/src/lib/version.d.ts +1 -0
  95. package/dist/src/lib/viewport.d.ts +21 -0
  96. package/package.json +18 -16
@@ -0,0 +1,30 @@
1
+ /**
2
+ * DialogContentContext — 允许 Dialog 组件将 content ref 传递给子组件,
3
+ * 替代通过 CSS 类名选择器查找 DOM 节点的脆弱方式。
4
+ *
5
+ * Select、MultiSelect、DatePicker 等组件通过此 context 获取 dialog content
6
+ * 元素,将 dropdown 面板 portal 到 dialog 内部以避免 z-index 裁剪问题。
7
+ */
8
+ export declare const DialogContentContext: import('react').Context<HTMLElement | null>;
9
+ /**
10
+ * 获取 dialog content 元素引用。
11
+ * 优先使用 React Context,回退到 DOM 选择器方式以保持向后兼容。
12
+ */
13
+ export declare function getDialogContent(node: HTMLElement | null): HTMLElement | null;
14
+ /**
15
+ * Determine if a popover/dropdown should be rendered inline or portaled.
16
+ *
17
+ * On mobile, dropdowns use Sheet component which always portals to body,
18
+ * so shouldInline is always false. On desktop, dropdowns use fixed-position
19
+ * popovers that should be portaled into the dialog content if inside a dialog
20
+ * to avoid z-index clipping issues.
21
+ */
22
+ export declare function getDialogPopoverContext(node: HTMLElement | null): {
23
+ dialogContent: HTMLElement | null;
24
+ shouldInline: boolean;
25
+ };
26
+ /**
27
+ * Hook for components that need to portal their dropdown into a dialog.
28
+ * Prefer this over getDialogPopoverContext for new code.
29
+ */
30
+ export declare function useDialogContentRef(): HTMLElement | null;
@@ -0,0 +1,152 @@
1
+ export { BREAKPOINTS, PHONE_MAX_WIDTH, PHONE_ASPECT_RATIO_THRESHOLD, TABLET_ASPECT_RATIO_THRESHOLD } from './breakpoints';
2
+ export type { ViewportType, ViewportContextValue, ViewportProviderProps } from './viewport';
3
+ export { ViewportProvider, useViewport } from './viewport';
4
+ export { Responsive } from '../components/Responsive';
5
+ export type { ResponsiveProps } from '../components/Responsive';
6
+ export { VXUIProvider } from './VXUIProvider';
7
+ export type { VXUIProviderProps } from './VXUIProvider';
8
+ export { AppShell } from '../components/AppShell';
9
+ export type { AppShellProps, AppShellNavItem, AppShellNavSection } from '../components/AppShell';
10
+ export { Shell, ShellSidebar, ShellNav, ShellNavSection, ShellNavItem, ShellOverlay, ShellMain, ShellTopbar, ShellContent, } from '../components/Shell';
11
+ export type { ShellProps, ShellSidebarProps, ShellNavProps, ShellNavSectionProps, ShellNavItemProps, ShellOverlayProps, ShellMainProps, ShellTopbarProps, ShellContentProps, ShellNavItem as ShellNavItemType, ShellNavSection as ShellNavSectionType, } from '../components/Shell';
12
+ export { Badge } from '../components/Badge';
13
+ export { Button } from '../components/Button';
14
+ export { Card, CardContent, CardDescription, CardHeader, CardTitle } from '../components/Card';
15
+ export { Dialog, DialogClose } from '../components/Dialog';
16
+ export type { DialogProps, DialogSize, DialogPadding, DialogPlacement } from '../components/Dialog';
17
+ export { Input } from '../components/Input';
18
+ export { Switch } from '../components/Switch';
19
+ export { Tabs, TabsContent, TabsList, TabsTrigger } from '../components/Tabs';
20
+ export { ThemeProvider, createTheme, themePresets, useTheme, } from '../components/ThemeProvider';
21
+ export type { ThemeDefinition, ThemeMode, ThemeRegistry, ThemeTokens, } from '../components/ThemeProvider';
22
+ export { ToastProvider, useToast } from '../components/Toast';
23
+ export { Text } from '../components/Text';
24
+ export type { TextProps } from '../components/Text';
25
+ export { Heading } from '../components/Heading';
26
+ export type { HeadingProps } from '../components/Heading';
27
+ export { Select } from '../components/Select';
28
+ export type { SelectProps, SelectOption } from '../components/Select';
29
+ export { Checkbox } from '../components/Checkbox';
30
+ export type { CheckboxProps } from '../components/Checkbox';
31
+ export { SegmentedControl } from '../components/SegmentedControl';
32
+ export type { SegmentedControlProps, SegmentedControlOption } from '../components/SegmentedControl';
33
+ export { Radio, RadioGroup } from '../components/Radio';
34
+ export type { RadioProps, RadioGroupProps } from '../components/Radio';
35
+ export { Textarea } from '../components/Textarea';
36
+ export type { TextareaProps } from '../components/Textarea';
37
+ export { Slider } from '../components/Slider';
38
+ export type { SliderProps } from '../components/Slider';
39
+ export { Spinner } from '../components/Spinner';
40
+ export type { SpinnerProps } from '../components/Spinner';
41
+ export { Progress } from '../components/Progress';
42
+ export type { ProgressProps } from '../components/Progress';
43
+ export { Alert } from '../components/Alert';
44
+ export type { AlertProps } from '../components/Alert';
45
+ export { Skeleton } from '../components/Skeleton';
46
+ export type { SkeletonProps } from '../components/Skeleton';
47
+ export { Tooltip } from '../components/Tooltip';
48
+ export type { TooltipProps } from '../components/Tooltip';
49
+ export { Popover } from '../components/Popover';
50
+ export type { PopoverProps } from '../components/Popover';
51
+ export { DropdownMenu } from '../components/DropdownMenu';
52
+ export type { DropdownMenuProps, DropdownMenuItemProps, DropdownMenuGroupProps, DropdownMenuItemType } from '../components/DropdownMenu';
53
+ export { Breadcrumb } from '../components/Breadcrumb';
54
+ export type { BreadcrumbProps, BreadcrumbItem } from '../components/Breadcrumb';
55
+ export { Pagination } from '../components/Pagination';
56
+ export type { PaginationProps } from '../components/Pagination';
57
+ export { Accordion } from '../components/Accordion';
58
+ export type { AccordionProps, AccordionItem } from '../components/Accordion';
59
+ export { Separator } from '../components/Separator';
60
+ export type { SeparatorProps } from '../components/Separator';
61
+ export { Avatar } from '../components/Avatar';
62
+ export type { AvatarProps } from '../components/Avatar';
63
+ export { Table } from '../components/Table';
64
+ export type { TableProps, TableColumn, SortDirection } from '../components/Table';
65
+ export { MobileShell, MobileTopBar, MobileIconButton } from '../components/mobile/MobileShell';
66
+ export type { MobileShellProps, MobileTopBarProps, MobileIconButtonProps } from '../components/mobile/MobileShell';
67
+ export { BottomNav } from '../components/mobile/BottomNav';
68
+ export type { BottomNavProps, BottomNavItem } from '../components/mobile/BottomNav';
69
+ export { MobileList, MobileListSection, MobileListItem } from '../components/mobile/MobileList';
70
+ export type { MobileListSectionProps, MobileListItemProps } from '../components/mobile/MobileList';
71
+ export { Label } from '../components/Label';
72
+ export type { LabelProps } from '../components/Label';
73
+ export { Form, FormField, FormLabel, FormDescription, FormMessage, useFormField } from '../components/Form';
74
+ export type { FormProps, FormFieldProps, FormLabelProps, FormDescriptionProps, FormMessageProps } from '../components/Form';
75
+ export { NumberInput } from '../components/NumberInput';
76
+ export type { NumberInputProps } from '../components/NumberInput';
77
+ export { Calendar } from '../components/Calendar';
78
+ export type { CalendarProps } from '../components/Calendar';
79
+ export { DatePicker } from '../components/DatePicker';
80
+ export type { DatePickerProps } from '../components/DatePicker';
81
+ export { MultiSelect } from '../components/MultiSelect';
82
+ export type { MultiSelectProps, MultiSelectOption } from '../components/MultiSelect';
83
+ export { TimePicker } from '../components/TimePicker';
84
+ export type { TimePickerProps } from '../components/TimePicker';
85
+ export { FileUpload } from '../components/FileUpload';
86
+ export type { FileUploadProps, UploadedFile } from '../components/FileUpload';
87
+ export { Sheet } from '../components/Sheet';
88
+ export type { SheetProps, SheetSide, SheetVariant, SheetActionItemProps } from '../components/Sheet';
89
+ /**
90
+ * @deprecated 使用统一的 Sheet 组件替代。
91
+ * ActionSheet 将在下一个 major 版本中移除,请迁移到 Sheet 组件:
92
+ * <Sheet variant="action" side="bottom">
93
+ * @see {@link Sheet} 统一 Sheet 组件
94
+ */
95
+ export { ActionSheet, ActionSheetItem } from '../components/mobile/ActionSheet';
96
+ export type { ActionSheetProps, ActionSheetItemProps } from '../components/mobile/ActionSheet';
97
+ /**
98
+ * @deprecated 使用统一的 Sheet 组件替代。
99
+ * MobileDrawer 将在下一个 major 版本中移除,请迁移到 Sheet 组件:
100
+ * <Sheet side="left">
101
+ * @see {@link Sheet} 统一 Sheet 组件
102
+ */
103
+ export { MobileDrawer, DrawerNavItem, DrawerNavSection } from '../components/mobile/MobileDrawer';
104
+ export type { MobileDrawerProps, DrawerNavItemProps, DrawerNavSectionProps } from '../components/mobile/MobileDrawer';
105
+ export { ScrollArea } from '../components/ScrollArea';
106
+ export type { ScrollAreaProps } from '../components/ScrollArea';
107
+ export { Toggle, ToggleGroup } from '../components/Toggle';
108
+ export type { ToggleProps, ToggleGroupProps, ToggleGroupItem } from '../components/Toggle';
109
+ export { ContextMenu } from '../components/ContextMenu';
110
+ export type { ContextMenuProps, ContextMenuItemProps, ContextMenuGroupProps } from '../components/ContextMenu';
111
+ export { HoverCard } from '../components/HoverCard';
112
+ export type { HoverCardProps, HoverCardPlacement } from '../components/HoverCard';
113
+ export { Menubar } from '../components/Menubar';
114
+ export type { MenubarProps, MenubarMenuProps, MenubarGroupProps, MenubarItemProps } from '../components/Menubar';
115
+ export { NavigationMenu } from '../components/NavigationMenu';
116
+ export type { NavigationMenuProps, NavMenuItem, NavMenuSubItem } from '../components/NavigationMenu';
117
+ export { Stepper } from '../components/Stepper';
118
+ export type { StepperProps, StepItem, StepStatus } from '../components/Stepper';
119
+ export { Timeline } from '../components/Timeline';
120
+ export type { TimelineProps, TimelineItem, TimelineItemStatus } from '../components/Timeline';
121
+ export { EmptyState } from '../components/EmptyState';
122
+ export type { EmptyStateProps } from '../components/EmptyState';
123
+ export { Carousel } from '../components/Carousel';
124
+ export type { CarouselProps } from '../components/Carousel';
125
+ export { Rating } from '../components/Rating';
126
+ export type { RatingProps } from '../components/Rating';
127
+ export { TreeView } from '../components/TreeView';
128
+ export type { TreeViewProps, TreeNode } from '../components/TreeView';
129
+ export { TagInput } from '../components/TagInput';
130
+ export type { TagInputProps } from '../components/TagInput';
131
+ export { ColorPicker } from '../components/ColorPicker';
132
+ export type { ColorPickerProps } from '../components/ColorPicker';
133
+ export { ResizablePanelGroup, ResizablePanel, ResizableHandle } from '../components/Resizable';
134
+ export type { ResizablePanelGroupProps, ResizablePanelProps, ResizableHandleProps, ResizableDirection } from '../components/Resizable';
135
+ export { CommandPalette } from '../components/CommandPalette';
136
+ export type { CommandPaletteProps, SearchEntry } from '../components/CommandPalette';
137
+ export { CodeBlock } from '../components/CodeBlock';
138
+ export type { CodeBlockProps, CodeBlockLanguage } from '../components/CodeBlock';
139
+ export { LanguageSwitcher } from '../components/LanguageSwitcher';
140
+ export type { LanguageSwitcherProps } from '../components/LanguageSwitcher';
141
+ export { Article, ArticleHeader, ArticleTitle, ArticleBody, Section, SectionHeading, Pager, PropsTable, ArticleEmptyState, StatsGrid, } from '../components/Article';
142
+ export type { ArticleProps, ArticleHeaderProps, ArticleTitleProps, ArticleBodyProps, SectionProps, SectionHeadingProps, PagerProps, PagerItem, PropsTableProps, PropsTableColumn, ArticleEmptyStateProps, StatsGridProps, StatItem, } from '../components/Article';
143
+ export { Image } from '../components/Image';
144
+ export type { ImageProps } from '../components/Image';
145
+ export { PinInput } from '../components/PinInput';
146
+ export type { PinInputProps } from '../components/PinInput';
147
+ export { Descriptions } from '../components/Descriptions';
148
+ export type { DescriptionsProps, DescriptionsItem } from '../components/Descriptions';
149
+ export { NotificationProvider, useNotification } from '../components/Notification';
150
+ export type { NotificationProviderProps } from '../components/Notification';
151
+ export { Result } from '../components/Result';
152
+ export type { ResultProps } from '../components/Result';
@@ -0,0 +1 @@
1
+ export declare const APP_VERSION: string;
@@ -0,0 +1,21 @@
1
+ import { ReactNode } from 'react';
2
+ export type ViewportType = 'phone' | 'tablet' | 'desktop';
3
+ export interface ViewportContextValue {
4
+ viewport: ViewportType;
5
+ isPhone: boolean;
6
+ isTablet: boolean;
7
+ /** True when the device is in the tablet width range AND screen orientation is portrait */
8
+ isTabletPortrait: boolean;
9
+ isDesktop: boolean;
10
+ /** The actual screen width in CSS pixels */
11
+ screenWidth: number;
12
+ /** The actual screen height in CSS pixels */
13
+ screenHeight: number;
14
+ /** Aspect ratio: width / height (0-1 for portrait, >1 for landscape) */
15
+ aspectRatio: number;
16
+ }
17
+ export interface ViewportProviderProps {
18
+ children: ReactNode;
19
+ }
20
+ export declare function ViewportProvider({ children }: ViewportProviderProps): import("react").JSX.Element;
21
+ export declare function useViewport(): ViewportContextValue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vxui-re",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "A general-purpose React UI framework rebuilt from VXUI principles.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -49,7 +49,8 @@
49
49
  "test:watch": "vitest",
50
50
  "test:coverage": "vitest run --coverage",
51
51
  "preview": "npm run build && wrangler dev",
52
- "pub": "npm run build && npm publish",
52
+ "pub": "npm publish",
53
+ "prepublishOnly": "npm run build",
53
54
  "deploy": "npm run build:pages && wrangler deploy",
54
55
  "security:audit": "npm audit --audit-level=high"
55
56
  },
@@ -58,29 +59,30 @@
58
59
  "react-dom": "^19.0.0"
59
60
  },
60
61
  "dependencies": {
61
- "@radix-ui/react-switch": "^1.1.3",
62
- "@radix-ui/react-tabs": "^1.1.3",
63
- "@radix-ui/react-toast": "^1.2.6",
62
+ "@radix-ui/react-switch": "1.3.3",
63
+ "@radix-ui/react-tabs": "1.1.17",
64
+ "@radix-ui/react-toast": "1.2.19",
64
65
  "@types/prismjs": "^1.26.6",
65
- "lucide-react": "^0.511.0",
66
+ "lucide-react": "1.24.0",
66
67
  "prismjs": "^1.30.0"
67
68
  },
68
69
  "devDependencies": {
69
- "@cloudflare/vite-plugin": "^1.40.2",
70
+ "@cloudflare/vite-plugin": "1.45.0",
70
71
  "@testing-library/jest-dom": "^6.9.1",
71
72
  "@testing-library/react": "^16.3.2",
72
73
  "@testing-library/user-event": "^14.6.1",
73
- "@types/node": "^25.9.1",
74
- "@types/react": "^19.1.2",
74
+ "@types/node": "26.1.1",
75
+ "@types/react": "19.2.17",
75
76
  "@types/react-dom": "^19.1.2",
76
- "@vitejs/plugin-react": "^4.4.1",
77
- "@vitest/coverage-v8": "^4.1.6",
77
+ "@typescript/typescript6": "^6.0.2",
78
+ "@vitejs/plugin-react": "6.0.3",
79
+ "@vitest/coverage-v8": "4.1.10",
78
80
  "jsdom": "^29.1.1",
79
81
  "rollup-plugin-visualizer": "^7.0.1",
80
- "typescript": "^5.8.3",
81
- "vite": "^6.3.5",
82
- "vite-plugin-dts": "^4.5.4",
83
- "vitest": "^4.1.6",
84
- "wrangler": "^4.100.0"
82
+ "typescript": "7.0.2",
83
+ "vite": "8.1.4",
84
+ "vite-plugin-dts": "5.0.3",
85
+ "vitest": "4.1.10",
86
+ "wrangler": "4.111.0"
85
87
  }
86
88
  }