@runlume/admin-ui 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +7 -0
  3. package/README.en.md +171 -0
  4. package/README.md +160 -0
  5. package/dist-package/admin-ui.d.ts +41 -0
  6. package/dist-package/admin-ui.d.ts.map +1 -0
  7. package/dist-package/components/ui/alert-dialog.d.ts +13 -0
  8. package/dist-package/components/ui/alert-dialog.d.ts.map +1 -0
  9. package/dist-package/components/ui/alert.d.ts +14 -0
  10. package/dist-package/components/ui/alert.d.ts.map +1 -0
  11. package/dist-package/components/ui/avatar.d.ts +15 -0
  12. package/dist-package/components/ui/avatar.d.ts.map +1 -0
  13. package/dist-package/components/ui/badge.d.ts +13 -0
  14. package/dist-package/components/ui/badge.d.ts.map +1 -0
  15. package/dist-package/components/ui/breadcrumb.d.ts +12 -0
  16. package/dist-package/components/ui/breadcrumb.d.ts.map +1 -0
  17. package/dist-package/components/ui/button.d.ts +13 -0
  18. package/dist-package/components/ui/button.d.ts.map +1 -0
  19. package/dist-package/components/ui/card.d.ts +10 -0
  20. package/dist-package/components/ui/card.d.ts.map +1 -0
  21. package/dist-package/components/ui/checkbox.d.ts +7 -0
  22. package/dist-package/components/ui/checkbox.d.ts.map +1 -0
  23. package/dist-package/components/ui/collapsible.d.ts +7 -0
  24. package/dist-package/components/ui/collapsible.d.ts.map +1 -0
  25. package/dist-package/components/ui/context-menu.d.ts +10 -0
  26. package/dist-package/components/ui/context-menu.d.ts.map +1 -0
  27. package/dist-package/components/ui/date-input.d.ts +3 -0
  28. package/dist-package/components/ui/date-input.d.ts.map +1 -0
  29. package/dist-package/components/ui/date-range-input.d.ts +13 -0
  30. package/dist-package/components/ui/date-range-input.d.ts.map +1 -0
  31. package/dist-package/components/ui/date-time-input.d.ts +13 -0
  32. package/dist-package/components/ui/date-time-input.d.ts.map +1 -0
  33. package/dist-package/components/ui/dialog.d.ts +27 -0
  34. package/dist-package/components/ui/dialog.d.ts.map +1 -0
  35. package/dist-package/components/ui/dropdown-menu.d.ts +29 -0
  36. package/dist-package/components/ui/dropdown-menu.d.ts.map +1 -0
  37. package/dist-package/components/ui/file-upload.d.ts +31 -0
  38. package/dist-package/components/ui/file-upload.d.ts.map +1 -0
  39. package/dist-package/components/ui/hover-card.d.ts +7 -0
  40. package/dist-package/components/ui/hover-card.d.ts.map +1 -0
  41. package/dist-package/components/ui/input-otp.d.ts +21 -0
  42. package/dist-package/components/ui/input-otp.d.ts.map +1 -0
  43. package/dist-package/components/ui/input.d.ts +18 -0
  44. package/dist-package/components/ui/input.d.ts.map +1 -0
  45. package/dist-package/components/ui/kbd.d.ts +9 -0
  46. package/dist-package/components/ui/kbd.d.ts.map +1 -0
  47. package/dist-package/components/ui/label.d.ts +5 -0
  48. package/dist-package/components/ui/label.d.ts.map +1 -0
  49. package/dist-package/components/ui/native-select.d.ts +10 -0
  50. package/dist-package/components/ui/native-select.d.ts.map +1 -0
  51. package/dist-package/components/ui/number-field.d.ts +15 -0
  52. package/dist-package/components/ui/number-field.d.ts.map +1 -0
  53. package/dist-package/components/ui/progress.d.ts +15 -0
  54. package/dist-package/components/ui/progress.d.ts.map +1 -0
  55. package/dist-package/components/ui/radio-group.d.ts +5 -0
  56. package/dist-package/components/ui/radio-group.d.ts.map +1 -0
  57. package/dist-package/components/ui/scroll-area.d.ts +5 -0
  58. package/dist-package/components/ui/scroll-area.d.ts.map +1 -0
  59. package/dist-package/components/ui/select.d.ts +14 -0
  60. package/dist-package/components/ui/select.d.ts.map +1 -0
  61. package/dist-package/components/ui/separator.d.ts +5 -0
  62. package/dist-package/components/ui/separator.d.ts.map +1 -0
  63. package/dist-package/components/ui/sheet.d.ts +15 -0
  64. package/dist-package/components/ui/sheet.d.ts.map +1 -0
  65. package/dist-package/components/ui/sidebar.d.ts +74 -0
  66. package/dist-package/components/ui/sidebar.d.ts.map +1 -0
  67. package/dist-package/components/ui/skeleton.d.ts +3 -0
  68. package/dist-package/components/ui/skeleton.d.ts.map +1 -0
  69. package/dist-package/components/ui/slider.d.ts +9 -0
  70. package/dist-package/components/ui/slider.d.ts.map +1 -0
  71. package/dist-package/components/ui/switch.d.ts +5 -0
  72. package/dist-package/components/ui/switch.d.ts.map +1 -0
  73. package/dist-package/components/ui/table.d.ts +11 -0
  74. package/dist-package/components/ui/table.d.ts.map +1 -0
  75. package/dist-package/components/ui/tabs.d.ts +12 -0
  76. package/dist-package/components/ui/tabs.d.ts.map +1 -0
  77. package/dist-package/components/ui/tag-variants.d.ts +5 -0
  78. package/dist-package/components/ui/tag-variants.d.ts.map +1 -0
  79. package/dist-package/components/ui/tag.d.ts +12 -0
  80. package/dist-package/components/ui/tag.d.ts.map +1 -0
  81. package/dist-package/components/ui/textarea.d.ts +3 -0
  82. package/dist-package/components/ui/textarea.d.ts.map +1 -0
  83. package/dist-package/components/ui/time-input.d.ts +3 -0
  84. package/dist-package/components/ui/time-input.d.ts.map +1 -0
  85. package/dist-package/components/ui/tooltip.d.ts +8 -0
  86. package/dist-package/components/ui/tooltip.d.ts.map +1 -0
  87. package/dist-package/hooks/use-mobile.d.ts +2 -0
  88. package/dist-package/hooks/use-mobile.d.ts.map +1 -0
  89. package/dist-package/index.js +12212 -0
  90. package/dist-package/lib/dialog-focus.d.ts +2 -0
  91. package/dist-package/lib/dialog-focus.d.ts.map +1 -0
  92. package/dist-package/lib/range.d.ts +19 -0
  93. package/dist-package/lib/range.d.ts.map +1 -0
  94. package/dist-package/lib/utils.d.ts +3 -0
  95. package/dist-package/lib/utils.d.ts.map +1 -0
  96. package/dist-package/styles.css +3 -0
  97. package/package.json +109 -0
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/NOTICE ADDED
@@ -0,0 +1,7 @@
1
+ Runlume Admin Design
2
+ Copyright 2026 Runlume
3
+
4
+ 本产品包含由 Runlume 开发的软件,并以 Apache License 2.0 授权(见 LICENSE)。
5
+
6
+ 第三方依赖与字体各自遵循自身协议:完整清点与许可文本见 public/licenses/,
7
+ 分发 dist 等构建产物时需一并保留其中的 licenses 目录。
package/README.en.md ADDED
@@ -0,0 +1,171 @@
1
+ <a href="https://runlume.app">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="public/brand/wordmark-dark.svg" />
4
+ <img src="public/brand/wordmark-light.svg" alt="Runlume" width="220" />
5
+ </picture>
6
+ </a>
7
+
8
+ # Admin Frontend
9
+
10
+ [![License](https://img.shields.io/github/license/runlume/admin-design?style=flat-square&label=license&color=blue)](LICENSE)
11
+ [![Version](https://img.shields.io/github/package-json/v/runlume/admin-design?style=flat-square&label=version&color=007ec6)](https://github.com/runlume/admin-design/releases)
12
+ [![Stack](https://img.shields.io/badge/React%2019%20%C2%B7%20TypeScript%20%C2%B7%20Vite%20%2B%20Tailwind-1f6feb?style=flat-square)](docs/guide/intro.md)
13
+ [![Checks](https://img.shields.io/badge/pnpm%20check-passing-2ea44f?style=flat-square)](#verification)
14
+
15
+ Site: <https://adesign.runlume.app> · Docs: <https://adoc.runlume.app> · Live demo: <https://ago.runlume.app> · [中文](README.md)
16
+
17
+ The "standard admin" template extracted from the [Runlume](https://runlume.app) platform frontend: semantic tokens, the app shell, shared
18
+ components, standard page types and a full component gallery. A product team only has to plug in its own menu,
19
+ copy, identity and APIs — the interface language, interaction details and visual rules come from this one copy.
20
+
21
+ Its backend counterpart is [Standard Admin Backend](https://github.com/runlume/admin-java): wired for the platform
22
+ integration SDK with local user management and sign-in, providing the API contract, sessions, permissions, tenant
23
+ isolation and platform integration.
24
+
25
+ React 19 + TypeScript + Vite + Tailwind CSS + Radix UI, with **no chart library, UI framework or component-kit
26
+ dependency** (charts and motion are hand-drawn SVG / CSS).
27
+
28
+ ## Quick start
29
+
30
+ Node.js 24 and pnpm 11.21.0. Only `pnpm-lock.yaml` is maintained — do not mix in npm or yarn.
31
+
32
+ ```bash
33
+ pnpm install
34
+ pnpm dev # http://localhost:3200
35
+ pnpm build # output in dist/
36
+ pnpm preview # http://localhost:3201 to preview the build
37
+ ```
38
+
39
+ ## Use as an npm component library
40
+
41
+ The base controls are also built as `@runlume/admin-ui`; the complete template and demo app remain in this
42
+ repository. After the package is published, install it with:
43
+
44
+ ```bash
45
+ pnpm add @runlume/admin-ui
46
+ ```
47
+
48
+ ```tsx
49
+ import { Button, Table } from '@runlume/admin-ui'
50
+ import '@runlume/admin-ui/styles.css'
51
+ ```
52
+
53
+ The package requires React 19. Maintainers run `pnpm pack --dry-run` before publishing; it rebuilds
54
+ `dist-package/` and lists the exact package contents. Brand assets, example pages, app sessions, and notification
55
+ state are not part of the library exports.
56
+
57
+ For a release, run `docs/scripts/publish-admin-ui-npm.sh`. It collects a npm Granular Access Token with
58
+ `Bypass 2FA` through a hidden macOS dialog and never stores the credential in the repository or normal logs.
59
+
60
+ `pnpm dev` prints a branded banner once per process and lists both the Local and Network URLs
61
+ (`server.host: true`, so a phone on the same network can open the Network address). Brand copy lives in
62
+ `src/lib/brand-info.ts`, the terminal banner in `scripts/banner.ts`, and the F12 console output in
63
+ `src/lib/brand-console.ts`.
64
+
65
+ ## Verification
66
+
67
+ ```bash
68
+ pnpm typecheck # tsc -b
69
+ pnpm lint # oxlint
70
+ pnpm test # Vitest (unit / component)
71
+ pnpm test:e2e # Playwright (real browser)
72
+ pnpm check # the four above + production build
73
+ ```
74
+
75
+ Screenshot review (not a regression suite, skipped by default):
76
+
77
+ ```bash
78
+ SCREENSHOTS=1 pnpm test:e2e # screenshots land in /tmp/admin-design-shots
79
+ ```
80
+
81
+ When several people or sessions run Playwright in parallel, isolate the output directory with
82
+ `pnpm test:e2e -- --output=/tmp/pw-admin-out` to avoid sharing `test-results/` and hitting false failures.
83
+
84
+ ## Documentation site
85
+
86
+ `docs/` is a standalone VitePress site (`vitepress` is a devDependency only and never ships with the app),
87
+ structured as `index.md` + `guide/` (guides) + `components/` (component reference):
88
+
89
+ ```bash
90
+ pnpm docs:dev # http://localhost:3210
91
+ pnpm docs:build # output in docs/.vitepress/dist, dead links fail the build
92
+ pnpm docs:preview # http://localhost:3211 to preview the built docs
93
+ ```
94
+
95
+ The docs site reuses brand assets through the `docs/public/brand` symlink pointing at `public/brand`, so
96
+ rebranding is a single change.
97
+
98
+ ## Project structure
99
+
100
+ ```text
101
+ src/
102
+ ├── app/ # Shell wiring: routes, layout, providers, example menu
103
+ ├── components/ # Shared components (shell, page parts, charts, settings panels)
104
+ │ └── ui/ # Base controls (button/input/table/tabs/dialog…)
105
+ ├── hooks/ # Shared hooks
106
+ ├── lib/ # Pure logic: appearance, i18n, tree, pager, metrics, table prefs…
107
+ ├── pages/ # Standard page types: dashboard, list, detail, settings, notifications, auth
108
+ │ └── design-system/ # Component gallery, split by category (below)
109
+ └── test/ # All tests: unit / components / e2e
110
+ ```
111
+
112
+ ## Component gallery
113
+
114
+ Everything sits under the "Design system" sidebar group, split by category, and every control is interactive:
115
+
116
+ | Page | Path | Contents |
117
+ | ------------------- | --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
118
+ | Overview | `/design-system` | Brand, semantic palette, category entry points |
119
+ | Basic controls | `/design-system/basic` | Button, input, select, checkbox, tag, progress, number field, slider, scroll area, collapsible |
120
+ | Forms & pickers | `/design-system/form` | Forms, date-time, OTP, password strength, combobox, cascader, multi-select, upload, mention |
121
+ | Data display | `/design-system/data` | Table (sort, columns, density, pinned, expandable rows, virtual scroll), tree, tree table, descriptions, timeline, layout container |
122
+ | Feedback & overlays | `/design-system/feedback` | Alert, dialog, sheet, confirm, menus, tooltip, multi-step loader, context menu, hover card, states |
123
+ | Navigation & flows | `/design-system/navigation` | Breadcrumb, tabs, steps, shortcuts, page entry points |
124
+ | Metrics & charts | `/design-system/metrics` | Metric cards, line, column, donut, mini bars, bar list, heatmap, radar, funnel, gantt, code block |
125
+ | Icons | `/design-system/icons` | Full lucide set (lazy loaded), click to copy the component name |
126
+ | Theme & settings | `/design-system/theme` | Palette, notification preferences, accessibility, brand |
127
+
128
+ Component capabilities, props and usage live in the docs site: [components/](docs/components/index.md)
129
+ (or run `pnpm docs:dev`).
130
+
131
+ ## Using this as a template
132
+
133
+ 1. **Copy the whole directory** into your product repository and rename `package.json` `name`.
134
+ 2. **Swap the menu**: edit `src/app/navigation.ts` (`navigation` plus the `paths` of `navigationGroups` decide groups and order). Menus may also come from a backend — see `src/app/remote-menu.ts`.
135
+ 3. **Swap identity**: replace `demoAccounts` in `src/app/session.ts` with your session data, and make the sign-out callback call your identity service.
136
+ 4. **Wire APIs**: replace the sample data (`src/pages/sample-data.ts`, `src/lib/notifications.ts`) with real queries, and use `LoadingState` / `EmptyState` / `ErrorState` for the three boundary states.
137
+ 5. **Swap copy**: `src/lib/i18n.ts` is the single language entry; Chinese and English must stay in sync. Menu items may start as plain text — unregistered keys render as-is.
138
+ 6. **Swap brand**: overwrite `mark.svg`, `mark-dark.svg`, `wordmark-light.svg`, `wordmark-dark.svg` in `public/brand/`; no component changes needed.
139
+ 7. **Swap environment variables**: in `.env.development` / `.env.production` / `.env.test`, set `VITE_APP_TITLE`, `VITE_APP_STORAGE_PREFIX` (storage prefix — always change it), `VITE_APP_PLATFORM_WEB_BASEURL` (terminal banner, console output, sidebar link), `VITE_APP_DISABLE_DEVTOOL`, `VITE_BUILD_SOURCEMAP` and `VITE_BUILD_COMPRESS` (pre-compression, off by default).
140
+
141
+ ## Key conventions
142
+
143
+ - **Semantic tokens only for color**: `bg-card`, `text-muted-foreground`, `border-border`, `text-success` … Semantic colors (success / warning / info / danger) stay separate from the brand color (`brand-lime`).
144
+ - **Light and dark, six palettes**: `palettes.css` (presets) + `custom-palettes.css` (base color × theme color) + `accessibility.css` (high contrast, grayscale, color-weak).
145
+ - **Preferences stay in the browser**: theme, palette, accessibility, notifications, header action order, sidebar width/radius/animation/layout mode, table column widths, filter presets and shortcuts live in `localStorage`, all keyed with `VITE_APP_STORAGE_PREFIX`.
146
+ - **Menus can come from the backend**: replace `fetchRemoteMenu()` in `src/app/remote-menu.ts`; items support **nesting (`children`)**, **external links with an open mode (new window / same window / iframe)**, icon names, i18n keys, ordering, `hidden` and permission codes. Dynamic pages must be registered locally (`src/app/remote-pages.tsx`) — the API can only reference them, never add new ones.
147
+ - **Two test accounts**: the sign-in page fills `admin` (`*` — everything) and `test` (restricted) so you can see menus, route guards and button permissions differ.
148
+ - **Frontend permissions in three places**: menus are filtered, routes fall back to 403 through `RequirePermission`, buttons hide or disable through `<Can>`; codes support `*` and `<namespace>.<resource>.*`.
149
+ - **Accessibility**: everything is keyboard reachable, dialogs manage focus, tables/trees/controls carry ARIA attributes, and semantic contrast is asserted at WCAG AA in Playwright.
150
+ - **Zero-dependency charts**: line/column/donut/mini/heatmap/radar/funnel/gantt are hand-drawn in `src/components/charts.tsx` and `column-chart.tsx`; when you need more, draw it or add a library on the business side.
151
+
152
+ ## Boundaries of the sample data
153
+
154
+ - Dashboard metrics, customers, orders, notifications and org units are **in-memory sample data** — a refresh resets them, including notification read state (only preferences persist).
155
+ - Sign-in / register / forgot-password demonstrate the form and validation only, with **no identity service**; sign-out just navigates.
156
+ - Upload, mention, shortcuts and table virtual scrolling already expose their seams (`uploader`, `onMove`, `loadChildren`, `virtual`), so wiring the real implementation means replacing a callback.
157
+
158
+ ## Not included
159
+
160
+ Authentication and sessions, an API client and error codes, the permission model, chart libraries, decorative
161
+ marketing motion, and heavy capabilities such as QR codes / syntax highlighting / Iconify icon packs.
162
+
163
+ Authentication and sessions, the API client and error codes, and the permission model are provided by
164
+ [Standard Admin Backend](https://github.com/runlume/admin-java).
165
+
166
+ ## License
167
+
168
+ [Apache-2.0](LICENSE), Copyright 2026 Runlume. Copy it into commercial products freely — just keep the copyright
169
+ and license notice and ship [LICENSE](LICENSE) plus [NOTICE](NOTICE) with any distribution. The license grants an
170
+ express patent license but no trademark rights. The marks under `public/brand/` are brand assets, so replace them
171
+ with your own. Details: [docs/guide/license.md](docs/guide/license.md).
package/README.md ADDED
@@ -0,0 +1,160 @@
1
+ <a href="https://runlume.app">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="public/brand/wordmark-dark.svg" />
4
+ <img src="public/brand/wordmark-light.svg" alt="Runlume" width="220" />
5
+ </picture>
6
+ </a>
7
+
8
+ # 标准后台前端
9
+
10
+ [![开源协议](https://img.shields.io/github/license/runlume/admin-design?style=flat-square&label=%E5%BC%80%E6%BA%90%E5%8D%8F%E8%AE%AE&color=blue)](LICENSE)
11
+ [![当前版本](https://img.shields.io/github/package-json/v/runlume/admin-design?style=flat-square&label=%E5%BD%93%E5%89%8D%E7%89%88%E6%9C%AC&color=007ec6)](https://github.com/runlume/admin-design/releases)
12
+ [![技术栈](https://img.shields.io/badge/React%2019%20%C2%B7%20TypeScript%20%C2%B7%20Vite%20%2B%20Tailwind-1f6feb?style=flat-square)](docs/guide/intro.md)
13
+ [![校验](https://img.shields.io/badge/pnpm%20check-%E5%85%A8%E7%BB%BF-2ea44f?style=flat-square)](#校验)
14
+
15
+ 站点:<https://adesign.runlume.app> · 文档:<https://adoc.runlume.app> · 在线演示:<https://ago.runlume.app> · [English](README.en.md)
16
+
17
+ 从 [Runlume](https://runlume.app) 平台前端提取出来的「标准后台」模板:主题与语义 Token、布局外壳、公共组件、标准页型和一整套组件总览。
18
+ 业务系统只需要接自己的菜单、文案、身份与接口,界面语言、交互细节和视觉规范直接用这里的一份。
19
+
20
+ 配套的后端标准起点是 [标准后台后端](https://github.com/runlume/admin-java):默认接入平台集成 SDK,
21
+ 自带本地用户管理与登录,接口契约、会话、权限、租户隔离与平台接入用那一份。
22
+
23
+ React 19 + TypeScript + Vite + Tailwind CSS + Radix UI,**不引入图表库、UI 框架或组件库依赖**(图表与动效均为自绘 SVG)。
24
+
25
+ ## 快速开始
26
+
27
+ 使用 Node.js 24 与 pnpm 11.21.0,只维护 `pnpm-lock.yaml`,不要混用 npm/yarn。
28
+
29
+ ```bash
30
+ pnpm install
31
+ pnpm dev # http://localhost:3200
32
+ pnpm build # 产物在 dist/
33
+ pnpm preview # http://localhost:3201 预览构建产物
34
+ ```
35
+
36
+ ## 作为 npm 组件库使用
37
+
38
+ 基础控件可独立构建为 `@runlume/admin-ui`,完整模板和演示应用仍保留在本仓库。发布后安装:
39
+
40
+ ```bash
41
+ pnpm add @runlume/admin-ui
42
+ ```
43
+
44
+ ```tsx
45
+ import { Button, Table } from '@runlume/admin-ui'
46
+ import '@runlume/admin-ui/styles.css'
47
+ ```
48
+
49
+ 组件库要求 React 19。仓库维护者发布前运行 `pnpm pack --dry-run`,该命令会自动重新构建
50
+ `dist-package/` 并检查最终包内容。品牌资源、示例页面、应用会话和通知状态不属于组件库出口。
51
+
52
+ 正式发布使用 `docs/scripts/publish-admin-ui-npm.sh`,通过 macOS 隐藏输入框读取具备
53
+ `Bypass 2FA` 权限的 npm Granular Access Token;凭据不会写入仓库或普通日志。
54
+
55
+ `pnpm dev` 启动时终端会打出品牌横幅(每个进程只打一次),并同时给出 Local 与 Network 两个地址
56
+ (`server.host: true`,手机或同网段设备可用 Network 地址访问)。品牌文案在 `src/lib/brand-info.ts`,
57
+ 终端横幅在 `scripts/banner.ts`,浏览器 F12 控制台的品牌输出在 `src/lib/brand-console.ts`。
58
+
59
+ ## 校验
60
+
61
+ ```bash
62
+ pnpm typecheck # tsc -b
63
+ pnpm lint # oxlint
64
+ pnpm test # Vitest(单元 / 组件)
65
+ pnpm test:e2e # Playwright(真实浏览器)
66
+ pnpm check # 以上四项 + 生产构建
67
+ ```
68
+
69
+ 截图评审(不是回归用例,默认跳过):
70
+
71
+ ```bash
72
+ SCREENSHOTS=1 pnpm test:e2e # 截图写入 /tmp/admin-design-shots
73
+ ```
74
+
75
+ 多人/多会话并行跑 Playwright 时,用 `pnpm test:e2e -- --output=/tmp/pw-admin-out` 隔离产物目录,
76
+ 避免共用 `test-results/` 造成假失败。
77
+
78
+ ## 文档站
79
+
80
+ `docs/` 是一个独立的 VitePress 站点(`vitepress` 只在 devDependencies,不进应用产物),
81
+ 结构为 `index.md` + `guide/`(指南)+ `components/`(组件):
82
+
83
+ ```bash
84
+ pnpm docs:dev # http://localhost:3210
85
+ pnpm docs:build # 产物在 docs/.vitepress/dist,构建时会检查死链
86
+ pnpm docs:preview # http://localhost:3211 预览文档产物
87
+ ```
88
+
89
+ 文档站品牌资源通过 `docs/public/brand` 软链接复用 `public/brand`,换品牌只改一处。
90
+
91
+ ## 目录结构
92
+
93
+ ```text
94
+ src/
95
+ ├── app/ # 外壳接线:路由、布局、Providers、示例菜单
96
+ ├── components/ # 公共组件(外壳、页型零件、图表、设置面板)
97
+ │ └── ui/ # 基础控件(button/input/table/tabs/dialog…)
98
+ ├── hooks/ # 通用 hooks
99
+ ├── lib/ # 纯逻辑:主题偏好、i18n、树、分页、指标、表格偏好…
100
+ ├── pages/ # 标准页型示例:工作台、列表、详情、设置、通知、登录注册
101
+ │ └── design-system/ # 组件总览(按类型拆分,见下)
102
+ └── test/ # 全部测试:unit / components / e2e
103
+ ```
104
+
105
+ ## 组件总览
106
+
107
+ 侧栏「设计系统」分组下按类型拆分,每个控件都能在页面上直接交互:
108
+
109
+ | 页面 | 路径 | 内容 |
110
+ | ---------- | --------------------------- | ----------------------------------------------------------------------------------------- |
111
+ | 组件总览 | `/design-system` | 品牌、语义色板、分类入口 |
112
+ | 基础控件 | `/design-system/basic` | 按钮、输入、选择、勾选、标签、进度、步进、滑块、滚动区、折叠 |
113
+ | 表单与选择 | `/design-system/form` | 表单、日期时间、验证码、密码强度、组合框、级联、多选、上传、提及 |
114
+ | 数据展示 | `/design-system/data` | 表格(排序/列管理/密度/固定列/行内展开/虚拟滚动)、树、表格树、描述列表、时间线、布局容器 |
115
+ | 反馈与浮层 | `/design-system/feedback` | 提示条、弹窗、抽屉、确认、菜单、提示、多步加载、右键菜单、悬停卡片、状态 |
116
+ | 导航与流程 | `/design-system/navigation` | 面包屑、页签、步骤条、快捷键、页型入口 |
117
+ | 指标与图表 | `/design-system/metrics` | 指标卡、折线、柱状、环形、迷你柱、条形、热力、雷达、漏斗、甘特、代码块 |
118
+ | 图标预览 | `/design-system/icons` | lucide 全量图标(按需加载),点击复制组件名 |
119
+ | 主题与设置 | `/design-system/theme` | 配色、通知偏好、无障碍、品牌 |
120
+
121
+ 组件的能力、props 与用法见文档站 [components/](docs/components/index.md)(或 `pnpm docs:dev` 后打开)。
122
+
123
+ ## 作为模板使用
124
+
125
+ 1. **复制整个目录**到业务仓库,改 `package.json` 的 `name`。
126
+ 2. **换菜单**:改 `src/app/navigation.ts`(`navigation` + `navigationGroups` 的 `paths` 决定分组与顺序)。
127
+ 3. **换身份**:`src/app/session.ts` 里的 `demoAccounts` 换成会话数据(含权限码);退出登录回调改成调用身份服务。
128
+ 4. **接接口**:页面里的示例数据(`src/pages/sample-data.ts`、`src/lib/notifications.ts`)换成真实查询;加载/空/错误态用 `LoadingState` / `EmptyState` / `ErrorState`。
129
+ 5. **换文案**:`src/lib/i18n.ts` 是唯一的语言包入口,中英文必须同步;菜单项可先写中文,未登记的 key 会原样显示。
130
+ 6. **换品牌**:`public/brand/` 下的 `mark.svg`、`mark-dark.svg`、`wordmark-light.svg`、`wordmark-dark.svg` 直接覆盖即可,组件不用改。
131
+ 7. **换环境变量**:`.env.development` / `.env.production` / `.env.test` 里的 `VITE_APP_TITLE`、`VITE_APP_STORAGE_PREFIX`(偏好存储前缀,业务系统务必改成自己的)、`VITE_APP_PLATFORM_WEB_BASEURL`(终端横幅 / 控制台品牌输出 / 侧栏外链)、`VITE_APP_DISABLE_DEVTOOL`(是否屏蔽开发者工具)、`VITE_BUILD_SOURCEMAP`(是否产出 sourcemap)、`VITE_BUILD_COMPRESS`(预压缩,默认关闭)。
132
+
133
+ ## 关键约定
134
+
135
+ - **颜色只用语义 Token**:`bg-card`、`text-muted-foreground`、`border-border`、`text-success` 等;业务组件不写死颜色。语义色(success / warning / info / danger)与品牌色(`brand-lime`)分开。
136
+ - **深浅模式与配色**:`palettes.css`(六套预设)+ `custom-palettes.css`(基础色 × 主题色自由组合)+ `accessibility.css`(高对比、灰色、色弱)。
137
+ - **偏好只存浏览器**:主题、配色、无障碍、通知偏好、顶栏操作顺序、侧栏宽度/圆角/动画/布局模式、表格列宽、筛选预设、快捷键都在 `localStorage`,键名统一带 `VITE_APP_STORAGE_PREFIX`。
138
+ - **菜单可以来自后台**:`src/app/remote-menu.ts` 的 `fetchRemoteMenu()` 换成真实接口即可;菜单项支持**多层级(`children`)**、**外链与打开方式(新窗口 / 当前窗口 / iframe 内嵌)**、图标名、i18n key、排序、隐藏与权限码。动态页面的组件由本地注册表(`src/app/remote-pages.tsx`)提供,接口只能引用不能新增。
139
+ - **两个测试账号**:登录页可一键填入 `admin`(`*` 全量权限)与 `test`(受限权限),用来看菜单、路由守卫与按钮鉴权的差异,见 `src/app/session.ts`。
140
+ - **前端权限三处生效**:菜单按权限过滤、路由用 `RequirePermission` 落 403、按钮用 `<Can>` 隐藏或置灰;权限码支持 `*` 与 `<命名空间>.<资源>.*`,示例会话见 `src/app/session.ts`。
141
+ - **无障碍**:所有交互可用键盘完成;对话框有焦点管理;表格、树、表单控件带 ARIA 属性;语义色对比度按 AA 校验(有 Playwright 断言)。
142
+ - **零依赖图表**:折线/柱状/环形/迷你图/热力/雷达/漏斗/甘特都在 `src/components/charts.tsx`、`column-chart.tsx` 里自绘,需要更多图表时先考虑自绘或业务侧引入。
143
+
144
+ ## 示例数据的边界
145
+
146
+ - 工作台指标、客户、订单、通知、组织单元等都是**内存示例数据**,刷新即恢复初始状态;通知的已读状态也不例外(偏好类设置才会持久化)。
147
+ - 登录/注册/找回密码只演示表单与校验,**不接身份服务**;退出登录只做跳转。
148
+ - 上传、提及、快捷键、表格虚拟滚动等能力的接口已留出(`uploader`、`onMove`、`loadChildren`、`virtual` 等 prop),接真实实现时替换回调即可。
149
+
150
+ ## 不在本模板内
151
+
152
+ 认证与会话、API 客户端与错误码、权限模型、图表库与装饰性营销动效、二维码/代码高亮/Iconify 图标库等重依赖能力。
153
+
154
+ 其中认证与会话、API 客户端与错误码、权限模型由 [标准后台后端](https://github.com/runlume/admin-java) 提供。
155
+
156
+ ## 开源协议
157
+
158
+ [Apache-2.0](LICENSE),Copyright 2026 Runlume。可以自由复制进商业产品,只需保留版权与许可声明,
159
+ 并随分发附上 [LICENSE](LICENSE) 与 [NOTICE](NOTICE);协议含显式专利授权,但不授予商标权。
160
+ `public/brand/` 下的品牌标识属于品牌资产,使用时替换成自己的。细节见 [docs/guide/license.md](docs/guide/license.md)。
@@ -0,0 +1,41 @@
1
+ import './index.css';
2
+ export * from './components/ui/alert-dialog';
3
+ export * from './components/ui/alert';
4
+ export * from './components/ui/avatar';
5
+ export * from './components/ui/badge';
6
+ export * from './components/ui/breadcrumb';
7
+ export * from './components/ui/button';
8
+ export * from './components/ui/card';
9
+ export * from './components/ui/checkbox';
10
+ export * from './components/ui/collapsible';
11
+ export * from './components/ui/context-menu';
12
+ export * from './components/ui/date-input';
13
+ export * from './components/ui/date-range-input';
14
+ export * from './components/ui/date-time-input';
15
+ export * from './components/ui/dialog';
16
+ export * from './components/ui/dropdown-menu';
17
+ export * from './components/ui/file-upload';
18
+ export * from './components/ui/hover-card';
19
+ export * from './components/ui/input-otp';
20
+ export * from './components/ui/input';
21
+ export * from './components/ui/kbd';
22
+ export * from './components/ui/label';
23
+ export * from './components/ui/native-select';
24
+ export * from './components/ui/number-field';
25
+ export * from './components/ui/progress';
26
+ export * from './components/ui/radio-group';
27
+ export * from './components/ui/scroll-area';
28
+ export * from './components/ui/select';
29
+ export * from './components/ui/separator';
30
+ export * from './components/ui/sheet';
31
+ export * from './components/ui/sidebar';
32
+ export * from './components/ui/skeleton';
33
+ export * from './components/ui/slider';
34
+ export * from './components/ui/switch';
35
+ export * from './components/ui/table';
36
+ export * from './components/ui/tabs';
37
+ export * from './components/ui/tag';
38
+ export * from './components/ui/textarea';
39
+ export * from './components/ui/time-input';
40
+ export * from './components/ui/tooltip';
41
+ //# sourceMappingURL=admin-ui.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin-ui.d.ts","sourceRoot":"","sources":["../src/admin-ui.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAEpB,cAAc,8BAA8B,CAAA;AAC5C,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,wBAAwB,CAAA;AACtC,cAAc,sBAAsB,CAAA;AACpC,cAAc,0BAA0B,CAAA;AACxC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,kCAAkC,CAAA;AAChD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,wBAAwB,CAAA;AACtC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,0BAA0B,CAAA;AACxC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,wBAAwB,CAAA;AACtC,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,yBAAyB,CAAA;AACvC,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,qBAAqB,CAAA;AACnC,cAAc,0BAA0B,CAAA;AACxC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yBAAyB,CAAA"}
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ import { AlertDialog as AlertDialogPrimitive } from 'radix-ui';
3
+ declare const AlertDialog: React.FC<AlertDialogPrimitive.AlertDialogProps>;
4
+ declare const AlertDialogTrigger: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare function AlertDialogContent({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content>): React.JSX.Element;
6
+ declare function AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
7
+ declare function AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
8
+ declare function AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>): React.JSX.Element;
9
+ declare function AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>): React.JSX.Element;
10
+ declare function AlertDialogAction({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action>): React.JSX.Element;
11
+ declare function AlertDialogCancel({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>): React.JSX.Element;
12
+ export { AlertDialog, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, };
13
+ //# sourceMappingURL=alert-dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert-dialog.d.ts","sourceRoot":"","sources":["../../../src/components/ui/alert-dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAI9D,QAAA,MAAM,WAAW,iDAA4B,CAAA;AAC7C,QAAA,MAAM,kBAAkB,wHAA+B,CAAA;AAiBvD,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,OAAO,CAAC,qBAa3D;AACD,iBAAS,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAI9E;AACD,iBAAS,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAO9E;AACD,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,KAAK,CAAC,qBAIzD;AACD,iBAAS,sBAAsB,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,WAAW,CAAC,qBAO/D;AACD,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,MAAM,CAAC,qBAO1D;AACD,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,MAAM,CAAC,qBAO1D;AACD,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,GAClB,CAAA"}
@@ -0,0 +1,14 @@
1
+ import type { ReactNode } from 'react';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ declare const alertVariants: (props?: ({
4
+ variant?: "warning" | "success" | "info" | "danger" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ /** 页内提示条:四态 + 可选操作。表单页说明与风险提示使用。 */
7
+ declare function Alert({ className, variant, title, description, action, onClose, children, ...props }: React.ComponentProps<'div'> & VariantProps<typeof alertVariants> & {
8
+ title?: ReactNode;
9
+ description?: ReactNode;
10
+ action?: ReactNode;
11
+ onClose?: () => void;
12
+ }): import("react").JSX.Element;
13
+ export { Alert, alertVariants };
14
+ //# sourceMappingURL=alert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/components/ui/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAKjE,QAAA,MAAM,aAAa;;8EAalB,CAAA;AAID,oCAAoC;AACpC,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,OAAgB,EAChB,KAAK,EACL,WAAW,EACX,MAAM,EACN,OAAO,EACP,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAC5B,YAAY,CAAC,OAAO,aAAa,CAAC,GAAG;IACnC,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB,+BAgCF;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA"}