vxui-re 1.0.2

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 (173) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +159 -0
  3. package/README.zh.md +159 -0
  4. package/dist/.assetsignore +2 -0
  5. package/dist/404.html +18 -0
  6. package/dist/colorful_flat_icon.ico +0 -0
  7. package/dist/colorful_flat_icon.svg +46 -0
  8. package/dist/index.cjs +144 -0
  9. package/dist/index.css +1 -0
  10. package/dist/index.d.ts +2 -0
  11. package/dist/index.js +13289 -0
  12. package/dist/src/components/Accordion.d.ts +14 -0
  13. package/dist/src/components/Alert.d.ts +10 -0
  14. package/dist/src/components/AppShell.d.ts +33 -0
  15. package/dist/src/components/Article.d.ts +72 -0
  16. package/dist/src/components/Avatar.d.ts +12 -0
  17. package/dist/src/components/Badge.d.ts +7 -0
  18. package/dist/src/components/Breadcrumb.d.ts +12 -0
  19. package/dist/src/components/Button.d.ts +18 -0
  20. package/dist/src/components/Calendar.d.ts +10 -0
  21. package/dist/src/components/Card.d.ts +17 -0
  22. package/dist/src/components/Carousel.d.ts +15 -0
  23. package/dist/src/components/Checkbox.d.ts +7 -0
  24. package/dist/src/components/CodeBlock.d.ts +9 -0
  25. package/dist/src/components/ColorPicker.d.ts +13 -0
  26. package/dist/src/components/CommandPalette.d.ts +22 -0
  27. package/dist/src/components/ContextMenu.d.ts +20 -0
  28. package/dist/src/components/DatePicker.d.ts +15 -0
  29. package/dist/src/components/Descriptions.d.ts +29 -0
  30. package/dist/src/components/Dialog.d.ts +49 -0
  31. package/dist/src/components/DropdownMenu.d.ts +55 -0
  32. package/dist/src/components/EmptyState.d.ts +9 -0
  33. package/dist/src/components/FileUpload.d.ts +17 -0
  34. package/dist/src/components/Form.d.ts +28 -0
  35. package/dist/src/components/Heading.d.ts +13 -0
  36. package/dist/src/components/HoverCard.d.ts +11 -0
  37. package/dist/src/components/Image.d.ts +30 -0
  38. package/dist/src/components/Input.d.ts +18 -0
  39. package/dist/src/components/Label.d.ts +5 -0
  40. package/dist/src/components/LanguageSwitcher.d.ts +9 -0
  41. package/dist/src/components/Menubar.d.ts +24 -0
  42. package/dist/src/components/MultiSelect.d.ts +27 -0
  43. package/dist/src/components/NavigationMenu.d.ts +20 -0
  44. package/dist/src/components/Notification.d.ts +30 -0
  45. package/dist/src/components/NumberInput.d.ts +12 -0
  46. package/dist/src/components/Pagination.d.ts +9 -0
  47. package/dist/src/components/PinInput.d.ts +37 -0
  48. package/dist/src/components/Popover.d.ts +13 -0
  49. package/dist/src/components/Progress.d.ts +11 -0
  50. package/dist/src/components/Radio.d.ts +12 -0
  51. package/dist/src/components/Rating.d.ts +14 -0
  52. package/dist/src/components/Resizable.d.ts +35 -0
  53. package/dist/src/components/Responsive.d.ts +25 -0
  54. package/dist/src/components/Result.d.ts +18 -0
  55. package/dist/src/components/ScrollArea.d.ts +21 -0
  56. package/dist/src/components/SegmentedControl.d.ts +16 -0
  57. package/dist/src/components/Select.d.ts +31 -0
  58. package/dist/src/components/Separator.d.ts +6 -0
  59. package/dist/src/components/Sheet/Sheet.d.ts +30 -0
  60. package/dist/src/components/Sheet/SheetPanel.d.ts +44 -0
  61. package/dist/src/components/Sheet/index.d.ts +2 -0
  62. package/dist/src/components/Sheet/useSheetState.d.ts +34 -0
  63. package/dist/src/components/Shell.d.ts +88 -0
  64. package/dist/src/components/Skeleton.d.ts +8 -0
  65. package/dist/src/components/Slider.d.ts +7 -0
  66. package/dist/src/components/Spinner.d.ts +8 -0
  67. package/dist/src/components/Stepper.d.ts +14 -0
  68. package/dist/src/components/Switch.d.ts +7 -0
  69. package/dist/src/components/Table.d.ts +90 -0
  70. package/dist/src/components/Tabs.d.ts +5 -0
  71. package/dist/src/components/TagInput.d.ts +18 -0
  72. package/dist/src/components/Text.d.ts +14 -0
  73. package/dist/src/components/Textarea.d.ts +7 -0
  74. package/dist/src/components/ThemeProvider.d.ts +51 -0
  75. package/dist/src/components/TimePicker.d.ts +14 -0
  76. package/dist/src/components/Timeline.d.ts +14 -0
  77. package/dist/src/components/Toast.d.ts +15 -0
  78. package/dist/src/components/Toggle.d.ts +24 -0
  79. package/dist/src/components/Tooltip.d.ts +11 -0
  80. package/dist/src/components/TreeView.d.ts +20 -0
  81. package/dist/src/components/__tests__/Accordion.test.d.ts +1 -0
  82. package/dist/src/components/__tests__/ActionSheet.test.d.ts +1 -0
  83. package/dist/src/components/__tests__/Alert.test.d.ts +1 -0
  84. package/dist/src/components/__tests__/AlertDialog.test.d.ts +1 -0
  85. package/dist/src/components/__tests__/AppShell.test.d.ts +1 -0
  86. package/dist/src/components/__tests__/Avatar.test.d.ts +1 -0
  87. package/dist/src/components/__tests__/Badge.test.d.ts +1 -0
  88. package/dist/src/components/__tests__/BottomNav.test.d.ts +1 -0
  89. package/dist/src/components/__tests__/Breadcrumb.test.d.ts +1 -0
  90. package/dist/src/components/__tests__/Button.test.d.ts +1 -0
  91. package/dist/src/components/__tests__/Calendar.test.d.ts +1 -0
  92. package/dist/src/components/__tests__/Card.test.d.ts +1 -0
  93. package/dist/src/components/__tests__/Carousel.test.d.ts +1 -0
  94. package/dist/src/components/__tests__/Checkbox.test.d.ts +1 -0
  95. package/dist/src/components/__tests__/CodeBlock.test.d.ts +1 -0
  96. package/dist/src/components/__tests__/ColorPicker.test.d.ts +1 -0
  97. package/dist/src/components/__tests__/CommandPalette.test.d.ts +1 -0
  98. package/dist/src/components/__tests__/ContextMenu.test.d.ts +1 -0
  99. package/dist/src/components/__tests__/DatePicker.test.d.ts +1 -0
  100. package/dist/src/components/__tests__/Dialog.test.d.ts +1 -0
  101. package/dist/src/components/__tests__/DialogFormControls.test.d.ts +1 -0
  102. package/dist/src/components/__tests__/DropdownMenu.test.d.ts +1 -0
  103. package/dist/src/components/__tests__/EmptyState.test.d.ts +1 -0
  104. package/dist/src/components/__tests__/FileUpload.test.d.ts +1 -0
  105. package/dist/src/components/__tests__/Form.test.d.ts +1 -0
  106. package/dist/src/components/__tests__/Heading.test.d.ts +1 -0
  107. package/dist/src/components/__tests__/HoverCard.test.d.ts +1 -0
  108. package/dist/src/components/__tests__/Input.test.d.ts +1 -0
  109. package/dist/src/components/__tests__/Label.test.d.ts +1 -0
  110. package/dist/src/components/__tests__/LanguageSwitcher.test.d.ts +1 -0
  111. package/dist/src/components/__tests__/Menubar.test.d.ts +1 -0
  112. package/dist/src/components/__tests__/MobileDrawer.test.d.ts +1 -0
  113. package/dist/src/components/__tests__/MobileList.test.d.ts +1 -0
  114. package/dist/src/components/__tests__/MultiSelect.test.d.ts +1 -0
  115. package/dist/src/components/__tests__/NavigationMenu.test.d.ts +1 -0
  116. package/dist/src/components/__tests__/NumberInput.test.d.ts +1 -0
  117. package/dist/src/components/__tests__/Pagination.test.d.ts +1 -0
  118. package/dist/src/components/__tests__/Popover.test.d.ts +1 -0
  119. package/dist/src/components/__tests__/Progress.test.d.ts +1 -0
  120. package/dist/src/components/__tests__/Radio.test.d.ts +1 -0
  121. package/dist/src/components/__tests__/Rating.test.d.ts +1 -0
  122. package/dist/src/components/__tests__/Resizable.test.d.ts +1 -0
  123. package/dist/src/components/__tests__/Responsive.test.d.ts +1 -0
  124. package/dist/src/components/__tests__/ScrollArea.test.d.ts +1 -0
  125. package/dist/src/components/__tests__/SegmentedControl.test.d.ts +1 -0
  126. package/dist/src/components/__tests__/Select.test.d.ts +1 -0
  127. package/dist/src/components/__tests__/Separator.test.d.ts +1 -0
  128. package/dist/src/components/__tests__/Sheet.test.d.ts +1 -0
  129. package/dist/src/components/__tests__/Shell.test.d.ts +1 -0
  130. package/dist/src/components/__tests__/Skeleton.test.d.ts +1 -0
  131. package/dist/src/components/__tests__/Slider.test.d.ts +1 -0
  132. package/dist/src/components/__tests__/Spinner.test.d.ts +1 -0
  133. package/dist/src/components/__tests__/Stepper.test.d.ts +1 -0
  134. package/dist/src/components/__tests__/Switch.test.d.ts +1 -0
  135. package/dist/src/components/__tests__/Table.test.d.ts +1 -0
  136. package/dist/src/components/__tests__/Tabs.test.d.ts +1 -0
  137. package/dist/src/components/__tests__/TagInput.test.d.ts +1 -0
  138. package/dist/src/components/__tests__/Text.test.d.ts +1 -0
  139. package/dist/src/components/__tests__/Textarea.test.d.ts +1 -0
  140. package/dist/src/components/__tests__/ThemeProvider.test.d.ts +1 -0
  141. package/dist/src/components/__tests__/TimePicker.test.d.ts +1 -0
  142. package/dist/src/components/__tests__/Timeline.test.d.ts +1 -0
  143. package/dist/src/components/__tests__/Toast.test.d.ts +1 -0
  144. package/dist/src/components/__tests__/Toggle.test.d.ts +1 -0
  145. package/dist/src/components/__tests__/Tooltip.test.d.ts +1 -0
  146. package/dist/src/components/__tests__/TreeView.test.d.ts +1 -0
  147. package/dist/src/components/mobile/ActionSheet.d.ts +15 -0
  148. package/dist/src/components/mobile/BottomNav.d.ts +23 -0
  149. package/dist/src/components/mobile/MobileApp.d.ts +1 -0
  150. package/dist/src/components/mobile/MobileDrawer.d.ts +31 -0
  151. package/dist/src/components/mobile/MobileList.d.ts +24 -0
  152. package/dist/src/components/mobile/MobilePreviewPage.d.ts +5 -0
  153. package/dist/src/components/mobile/MobileShell.d.ts +24 -0
  154. package/dist/src/components/pages/ErrorPage.d.ts +9 -0
  155. package/dist/src/components/pages/HomePage.d.ts +10 -0
  156. package/dist/src/components/pages/LoginPage.d.ts +12 -0
  157. package/dist/src/components/pages/PrivacyPolicyPage.d.ts +5 -0
  158. package/dist/src/components/pages/RegisterPage.d.ts +14 -0
  159. package/dist/src/components/pages/TermsOfServicePage.d.ts +5 -0
  160. package/dist/src/components/pages/homePageContent.d.ts +25 -0
  161. package/dist/src/components/pages/legalPageContent.d.ts +15 -0
  162. package/dist/src/lib/VXUIProvider.d.ts +29 -0
  163. package/dist/src/lib/__tests__/cx.test.d.ts +1 -0
  164. package/dist/src/lib/__tests__/viewport.test.d.ts +1 -0
  165. package/dist/src/lib/breakpoints.d.ts +63 -0
  166. package/dist/src/lib/cx.d.ts +1 -0
  167. package/dist/src/lib/dialogPopover.d.ts +30 -0
  168. package/dist/src/lib/index.d.ts +152 -0
  169. package/dist/src/lib/version.d.ts +1 -0
  170. package/dist/src/lib/viewport.d.ts +21 -0
  171. package/dist/wrangler.json +1 -0
  172. package/llms.txt +672 -0
  173. package/package.json +86 -0
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,159 @@
1
+ # VXUI 2
2
+
3
+ **Website**: [ui.vx.link](https://ui.vx.link)  |  **GitHub**: [tmplink/vxui_react](https://github.com/tmplink/vxui_react)  |  [中文文档](README.zh.md)
4
+
5
+ A general-purpose React UI component library for admin panels, ops dashboards, internal tools, and data-heavy interfaces. Built on CSS custom properties (design tokens) for theming and Radix UI primitives for accessibility. v1.0.0.
6
+
7
+ > **Security Notice**: 1.0.0 is a clean-slate release following the removal of a supply-chain attack vector discovered in the git history. The malicious `postinstall` script (commits `9c15fc0` / `fd8700d`) and self-referencing dependency (`c2bc8b9`) have been neutralized. This version also renames the package from `vxui-re` to `vxui-re`. See [CHANGELOG.md](CHANGELOG.md) for details.
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ npm install vxui-re
13
+ ```
14
+
15
+ `react` and `react-dom` (both ^19.0.0) must be provided by the host application.
16
+
17
+ ## Quick Start
18
+
19
+ ```tsx
20
+ import ReactDOM from 'react-dom/client';
21
+ import {
22
+ ThemeProvider,
23
+ ToastProvider,
24
+ themePresets,
25
+ AppShell,
26
+ Button,
27
+ Card,
28
+ CardContent,
29
+ CardHeader,
30
+ CardTitle,
31
+ Input,
32
+ } from 'vxui-re';
33
+ import 'vxui-re/styles.css';
34
+
35
+ ReactDOM.createRoot(document.getElementById('root')!).render(
36
+ <ThemeProvider themes={themePresets} defaultTheme="light">
37
+ <ToastProvider>
38
+ <AppShell
39
+ brand="Acme Ops"
40
+ title="Dashboard"
41
+ navSections={[
42
+ {
43
+ title: 'Workspace',
44
+ items: [{ key: 'overview', label: 'Overview', active: true }],
45
+ },
46
+ ]}
47
+ headerActions={<Button size="sm">New Project</Button>}
48
+ >
49
+ <Card>
50
+ <CardHeader>
51
+ <CardTitle>Queue Health</CardTitle>
52
+ </CardHeader>
53
+ <CardContent>
54
+ <Input label="Search orders" placeholder="PO-1024" />
55
+ </CardContent>
56
+ </Card>
57
+ </AppShell>
58
+ </ToastProvider>
59
+ </ThemeProvider>,
60
+ );
61
+ ```
62
+
63
+ ## Theming
64
+
65
+ VXUI 2 uses CSS custom properties. Override any token to rebrand in minutes:
66
+
67
+ ```css
68
+ :root {
69
+ --vx-primary: #7c3aed;
70
+ --vx-primary-strong: #6d28d9;
71
+ --vx-primary-soft: rgba(124, 58, 237, 0.1);
72
+ --vx-bg: #f8fafc;
73
+ --vx-surface: #ffffff;
74
+ --vx-border: #e2e8f0;
75
+ --vx-text: #0f172a;
76
+ --vx-radius: 10px;
77
+ --vx-sidebar-width: 240px;
78
+ }
79
+ ```
80
+
81
+ Dark mode tokens apply automatically when `<html>` has `class="dark"` or `data-theme="dark"`.
82
+
83
+ Create custom themes at runtime:
84
+
85
+ ```tsx
86
+ import { ThemeProvider, createTheme, themePresets } from 'vxui-re';
87
+
88
+ const themes = {
89
+ ...themePresets,
90
+ ocean: createTheme('dark', {
91
+ label: 'Ocean',
92
+ tokens: {
93
+ '--vx-primary': '#38bdf8',
94
+ '--vx-primary-strong': '#0ea5e9',
95
+ '--vx-primary-soft': 'rgba(56, 189, 248, 0.16)',
96
+ '--vx-bg': '#06131f',
97
+ '--vx-surface': '#0d2236',
98
+ },
99
+ }),
100
+ };
101
+
102
+ <ThemeProvider themes={themes} defaultTheme="ocean">
103
+ <App />
104
+ </ThemeProvider>
105
+ ```
106
+
107
+ Use `useTheme()` to read the current theme or call `setTheme('ocean')` to switch at runtime.
108
+
109
+ ## Components
110
+
111
+ ### Layout & Navigation
112
+ **AppShell**, **Shell** / ShellSidebar / ShellContent, **NavigationMenu**, **Breadcrumb**, **Pagination**, **Tabs**, **Menubar**, **Stepper**, **Resizable**, **ScrollArea**, **Separator**
113
+
114
+ ### Buttons & Actions
115
+ **Button**, **Toggle**, **SegmentedControl**, **DropdownMenu**, **ContextMenu**
116
+
117
+ ### Forms & Inputs
118
+ **Input**, **Textarea**, **Checkbox**, **Radio**, **Switch**, **Slider**, **NumberInput**, **TagInput**, **Rating**, **DatePicker**, **ColorPicker**, **Select**, **MultiSelect**, **PinInput**, **TimePicker**, **Form**, **FileUpload**
119
+
120
+ ### Overlays & Popovers
121
+ **Dialog**, **Sheet**, **Popover**, **Tooltip**, **HoverCard**, **CommandPalette**
122
+
123
+ ### Feedback & Status
124
+ **Toast**, **Notification**, **Alert**, **Progress**, **Spinner**, **Skeleton**, **EmptyState**, **Result**
125
+
126
+ ### Data Display
127
+ **Table**, **Card**, **Badge**, **Avatar**, **Accordion**, **Calendar**, **Image**, **Carousel**, **TreeView**, **Timeline**, **Descriptions**
128
+
129
+ ### Typography
130
+ **Heading**, **Text**, **Label**, **CodeBlock**, **Article**
131
+
132
+ ### Mobile (`vxui-re/mobile`)
133
+ **MobileShell**, **MobileDrawer**, **BottomNav**, **MobileList**, **ActionSheet**
134
+
135
+ ### Utility
136
+ **ThemeProvider**, **useTheme**, **Responsive**, **LanguageSwitcher**, **VXUIProvider**
137
+
138
+ ## Design Principles
139
+
140
+ - **Token-first theming** — All visual decisions are CSS variables. No Tailwind, no CSS-in-JS.
141
+ - **Accessible by default** — Overlays and interactive components use Radix UI primitives with keyboard nav and ARIA.
142
+ - **No global side-effects** — CSS is scoped to `.vx-*` class names. Won't override your styles.
143
+ - **Mobile-first responsive** — Sidebar collapses to overlay on narrow viewports. Mobile components in a separate import path.
144
+ - **No runtime CSS injection** — Styles ship as a single static stylesheet. No FOUC.
145
+
146
+ ## Development
147
+
148
+ ```bash
149
+ npm install
150
+ npm run dev # Start dev server
151
+ npm run typecheck # TypeScript type check
152
+ npm run build # Build library (for npm publish)
153
+ npm run test # Run tests
154
+ npm run security:audit # Security audit
155
+ ```
156
+
157
+ ## License
158
+
159
+ Apache-2.0
package/README.zh.md ADDED
@@ -0,0 +1,159 @@
1
+ # VXUI 2
2
+
3
+ **官网**:[ui.vx.link](https://ui.vx.link) &nbsp;|&nbsp; **GitHub**:[tmplink/vxui_react](https://github.com/tmplink/vxui_react) &nbsp;|&nbsp; [English Version](README.md)
4
+
5
+ 一套适用于后台、运营台、仪表盘和内部工具的通用 React UI 组件库。基于 CSS 自定义属性(设计令牌)做主题化,基于 Radix UI 基元做无障碍支持。版本 1.0.0。
6
+
7
+ > **安全公告**:1.0.0 是彻底清除供应链攻击痕迹后的安全版本。git 历史中发现的恶意 `postinstall` 脚本(提交 `9c15fc0` / `fd8700d`)和自引用依赖(`c2bc8b9`)均已清除。本版本同时将包名从 `vxui-re` 更名为 `vxui-re`。详见 [CHANGELOG.md](CHANGELOG.md)。
8
+
9
+ ## 安装
10
+
11
+ ```bash
12
+ npm install vxui-re
13
+ ```
14
+
15
+ `react` 和 `react-dom`(均要求 ^19.0.0)需要由宿主应用提供。
16
+
17
+ ## 快速开始
18
+
19
+ ```tsx
20
+ import ReactDOM from 'react-dom/client';
21
+ import {
22
+ ThemeProvider,
23
+ ToastProvider,
24
+ themePresets,
25
+ AppShell,
26
+ Button,
27
+ Card,
28
+ CardContent,
29
+ CardHeader,
30
+ CardTitle,
31
+ Input,
32
+ } from 'vxui-re';
33
+ import 'vxui-re/styles.css';
34
+
35
+ ReactDOM.createRoot(document.getElementById('root')!).render(
36
+ <ThemeProvider themes={themePresets} defaultTheme="light">
37
+ <ToastProvider>
38
+ <AppShell
39
+ brand="Acme Ops"
40
+ title="概览"
41
+ navSections={[
42
+ {
43
+ title: '工作空间',
44
+ items: [{ key: 'overview', label: '概览', active: true }],
45
+ },
46
+ ]}
47
+ headerActions={<Button size="sm">新建项目</Button>}
48
+ >
49
+ <Card>
50
+ <CardHeader>
51
+ <CardTitle>队列健康</CardTitle>
52
+ </CardHeader>
53
+ <CardContent>
54
+ <Input label="搜索订单" placeholder="PO-1024" />
55
+ </CardContent>
56
+ </Card>
57
+ </AppShell>
58
+ </ToastProvider>
59
+ </ThemeProvider>,
60
+ );
61
+ ```
62
+
63
+ ## 主题定制
64
+
65
+ VXUI 2 使用 CSS 自定义属性。只需覆盖少量变量即可几分钟内完成品牌化改造:
66
+
67
+ ```css
68
+ :root {
69
+ --vx-primary: #7c3aed;
70
+ --vx-primary-strong: #6d28d9;
71
+ --vx-primary-soft: rgba(124, 58, 237, 0.1);
72
+ --vx-bg: #f8fafc;
73
+ --vx-surface: #ffffff;
74
+ --vx-border: #e2e8f0;
75
+ --vx-text: #0f172a;
76
+ --vx-radius: 10px;
77
+ --vx-sidebar-width: 240px;
78
+ }
79
+ ```
80
+
81
+ 当 `<html>` 带有 `class="dark"` 或 `data-theme="dark"` 时,深色模式令牌会自动生效。
82
+
83
+ 运行时创建自定义主题:
84
+
85
+ ```tsx
86
+ import { ThemeProvider, createTheme, themePresets } from 'vxui-re';
87
+
88
+ const themes = {
89
+ ...themePresets,
90
+ ocean: createTheme('dark', {
91
+ label: 'Ocean',
92
+ tokens: {
93
+ '--vx-primary': '#38bdf8',
94
+ '--vx-primary-strong': '#0ea5e9',
95
+ '--vx-primary-soft': 'rgba(56, 189, 248, 0.16)',
96
+ '--vx-bg': '#06131f',
97
+ '--vx-surface': '#0d2236',
98
+ },
99
+ }),
100
+ };
101
+
102
+ <ThemeProvider themes={themes} defaultTheme="ocean">
103
+ <App />
104
+ </ThemeProvider>
105
+ ```
106
+
107
+ 通过 `useTheme()` 读取当前主题并调用 `setTheme('ocean')` 在线切换。
108
+
109
+ ## 组件列表
110
+
111
+ ### 布局与导航
112
+ **AppShell**(应用框架)、**Shell** / ShellSidebar / ShellContent(底层布局)、**NavigationMenu**(导航菜单)、**Breadcrumb**(面包屑)、**Pagination**(分页)、**Tabs**(标签页)、**Menubar**(菜单栏)、**Stepper**(步骤)、**Resizable**(可调整面板)、**ScrollArea**(滚动区域)、**Separator**(分隔线)
113
+
114
+ ### 按钮与操作
115
+ **Button**(按钮)、**Toggle**(切换)、**SegmentedControl**(分段控制器)、**DropdownMenu**(下拉菜单)、**ContextMenu**(右键菜单)
116
+
117
+ ### 表单与输入
118
+ **Input**(输入框)、**Textarea**(多行文本)、**Checkbox**(复选框)、**Radio**(单选按钮)、**Switch**(开关)、**Slider**(滑块)、**NumberInput**(数字输入)、**TagInput**(标签输入)、**Rating**(星级评分)、**DatePicker**(日期选择)、**ColorPicker**(颜色选择)、**Select**(单选下拉)、**MultiSelect**(多选下拉)、**PinInput**(PIN 输入)、**TimePicker**(时间选择)、**Form**(表单)、**FileUpload**(文件上传)
119
+
120
+ ### 浮层与弹出
121
+ **Dialog**(模态框)、**Sheet**(侧边面板)、**Popover**(弹出内容)、**Tooltip**(提示)、**HoverCard**(悬浮卡片)、**CommandPalette**(命令面板)
122
+
123
+ ### 反馈与状态
124
+ **Toast**(轻通知)、**Notification**(全局通知)、**Alert**(内联警告)、**Progress**(进度条)、**Spinner**(加载指示器)、**Skeleton**(骨架屏)、**EmptyState**(空状态)、**Result**(结果页)
125
+
126
+ ### 数据展示
127
+ **Table**(表格)、**Card**(卡片)、**Badge**(徽章)、**Avatar**(头像)、**Accordion**(折叠面板)、**Calendar**(日历)、**Image**(图片)、**Carousel**(轮播)、**TreeView**(树形列表)、**Timeline**(时间线)、**Descriptions**(描述列表)
128
+
129
+ ### 排版
130
+ **Heading**(标题)、**Text**(文本)、**Label**(标签)、**CodeBlock**(代码块)、**Article**(文章布局)
131
+
132
+ ### 移动端 (`vxui-re/mobile`)
133
+ **MobileShell**(移动端框架)、**MobileDrawer**(底部抽屉)、**BottomNav**(底部导航)、**MobileList**(移动端列表)、**ActionSheet**(操作面板)
134
+
135
+ ### 工具
136
+ **ThemeProvider**(主题提供者)、**useTheme**(主题钩子)、**Responsive**(响应式条件渲染)、**LanguageSwitcher**(语言切换)、**VXUIProvider**(顶层组合提供者)
137
+
138
+ ## 设计原则
139
+
140
+ - **令牌优先主题化** — 所有视觉决策都使用 CSS 变量。不依赖 Tailwind,不使用 CSS-in-JS。
141
+ - **默认无障碍** — 浮层和交互组件基于 Radix UI 基元构建,开箱支持键盘导航和 ARIA 语义。
142
+ - **无全局副作用** — CSS 都限定在 `.vx-*` 类名中,不会覆盖你的样式。
143
+ - **移动优先响应式** — 窄视口下侧边栏自动折叠为浮层。移动端组件单独导入。
144
+ - **无运行时 CSS 注入** — 样式作为单个静态样式表发布,没有未样式内容闪烁(FOUC)。
145
+
146
+ ## 本地开发
147
+
148
+ ```bash
149
+ npm install
150
+ npm run dev # 启动开发服务器
151
+ npm run typecheck # TypeScript 类型检查
152
+ npm run build # 构建组件库(用于 npm publish)
153
+ npm run test # 运行测试
154
+ npm run security:audit # 安全审计
155
+ ```
156
+
157
+ ## 许可证
158
+
159
+ Apache-2.0
@@ -0,0 +1,2 @@
1
+ wrangler.json
2
+ .dev.vars
package/dist/404.html ADDED
@@ -0,0 +1,18 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <title>VXUI React</title>
6
+ <script>
7
+ // GitHub Pages SPA redirect hack.
8
+ // Redirects all 404s back to index.html, preserving the full path as a
9
+ // query-string so the SPA router can restore it client-side.
10
+ var l = window.location;
11
+ l.replace(
12
+ l.protocol + '//' + l.host + '/?p=' +
13
+ encodeURIComponent(l.pathname + l.search) + l.hash
14
+ );
15
+ </script>
16
+ </head>
17
+ <body></body>
18
+ </html>
Binary file
@@ -0,0 +1,46 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" id="层_1" data-name="层 1" viewBox="0 0 192 192">
2
+ <defs>
3
+ <!-- 日落橙金渐变背景 -->
4
+ <linearGradient id="bgGradient" x1="0%" y1="0%" x2="100%" y2="100%">
5
+ <stop offset="0%" stop-color="#C0392B"/>
6
+ <stop offset="30%" stop-color="#E8541A"/>
7
+ <stop offset="65%" stop-color="#F39C12"/>
8
+ <stop offset="100%" stop-color="#F1C40F"/>
9
+ </linearGradient>
10
+ <!-- 左侧形状:白色微暖 -->
11
+ <linearGradient id="shapeGrad1" x1="0%" y1="0%" x2="100%" y2="100%">
12
+ <stop offset="0%" stop-color="#FFFFFF" stop-opacity="1"/>
13
+ <stop offset="100%" stop-color="#FFF5E0" stop-opacity="0.93"/>
14
+ </linearGradient>
15
+ <!-- 右侧形状:白色微暖 -->
16
+ <linearGradient id="shapeGrad2" x1="100%" y1="0%" x2="0%" y2="100%">
17
+ <stop offset="0%" stop-color="#FFFFFF" stop-opacity="1"/>
18
+ <stop offset="100%" stop-color="#FFF8E7" stop-opacity="0.93"/>
19
+ </linearGradient>
20
+ </defs>
21
+
22
+ <!-- 圆角矩形背景:炫彩渐变 -->
23
+ <rect width="192" height="192" rx="22.88" fill="url(#bgGradient)"/>
24
+
25
+ <!-- 左侧 X 字形 -->
26
+ <polygon
27
+ points="45 36.75 28.5 36.75 61.5 90.75 26.25 144 42.75 144 79.5 91.5 45 36.75"
28
+ fill="url(#shapeGrad1)"/>
29
+
30
+ <!-- 右侧 XX 字形 -->
31
+ <polygon
32
+ points="162.75 36.75 141 36.75 115.5 81 91.5 37.5 68.25 37.5 102.75 91.5 66 144 88.5 144 114 102.75 138.75 144.75 161.25 144.75 126.75 90.75 162.75 36.75"
33
+ fill="url(#shapeGrad2)"/>
34
+
35
+ <!-- 底部装饰:暖色圆点 -->
36
+ <circle cx="31.5" cy="170.63" r="3.75" fill="#FF4D4D"/>
37
+ <circle cx="42.75" cy="170.63" r="3.75" fill="#FF8C00"/>
38
+ <circle cx="54" cy="170.63" r="3.75" fill="#FFC300"/>
39
+ <circle cx="131.25" cy="170.63" r="3.75" fill="#FF6B35"/>
40
+ <circle cx="142.5" cy="170.63" r="3.75" fill="#FFD700"/>
41
+
42
+ <!-- 底部装饰:短横条(暖色) -->
43
+ <rect x="60.75" y="166.88" width="18.75" height="7.5" rx="3.75" fill="#E74C3C"/>
44
+ <rect x="105" y="166.88" width="18.75" height="7.5" rx="3.75" fill="#F39C12"/>
45
+ <rect x="149.25" y="166.88" width="18.75" height="7.5" rx="3.75" fill="#FFEAA7"/>
46
+ </svg>