@apexhub/apex-ui-react-source 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/README.md +18 -4
  2. package/bin/apex-ui-react-source.mjs +208 -24
  3. package/dist/files/AGENTS.md +2 -2
  4. package/dist/files/alert/llm.txt +1 -1
  5. package/dist/files/apex-provider/llm.txt +1 -1
  6. package/dist/files/auto-complete/llm.txt +1 -1
  7. package/dist/files/avatar/llm.txt +1 -1
  8. package/dist/files/breadcrumb/llm.txt +1 -1
  9. package/dist/files/button/llm.txt +1 -1
  10. package/dist/files/card/llm.txt +1 -1
  11. package/dist/files/cascader/llm.txt +1 -1
  12. package/dist/files/checkbox/llm.txt +1 -1
  13. package/dist/files/collapse/llm.txt +1 -1
  14. package/dist/files/date-picker/llm.txt +1 -1
  15. package/dist/files/divider/llm.txt +1 -1
  16. package/dist/files/drawer/llm.txt +1 -1
  17. package/dist/files/dropdown/llm.txt +1 -1
  18. package/dist/files/form/llm.txt +1 -1
  19. package/dist/files/grid/llm.txt +1 -1
  20. package/dist/files/image/llm.txt +1 -1
  21. package/dist/files/input/llm.txt +1 -1
  22. package/dist/files/input-number/llm.txt +1 -1
  23. package/dist/files/layout/llm.txt +1 -1
  24. package/dist/files/menu/llm.txt +1 -1
  25. package/dist/files/message/llm.txt +1 -1
  26. package/dist/files/modal/llm.txt +1 -1
  27. package/dist/files/notification/llm.txt +1 -1
  28. package/dist/files/pagination/llm.txt +1 -1
  29. package/dist/files/popover/llm.txt +1 -1
  30. package/dist/files/progress/llm.txt +1 -1
  31. package/dist/files/radio/llm.txt +1 -1
  32. package/dist/files/rate/llm.txt +1 -1
  33. package/dist/files/select/llm.txt +1 -1
  34. package/dist/files/skeleton/llm.txt +1 -1
  35. package/dist/files/spin/llm.txt +1 -1
  36. package/dist/files/steps/llm.txt +1 -1
  37. package/dist/files/switch/llm.txt +1 -1
  38. package/dist/files/table/llm.txt +1 -1
  39. package/dist/files/tabs/llm.txt +1 -1
  40. package/dist/files/tag/llm.txt +1 -1
  41. package/dist/files/tooltip/llm.txt +1 -1
  42. package/dist/files/tree/llm.txt +1 -1
  43. package/dist/files/tree-select/llm.txt +1 -1
  44. package/dist/files/typography/llm.txt +1 -1
  45. package/dist/files/upload/llm.txt +1 -1
  46. package/dist/manifest.json +44 -44
  47. package/package.json +11 -24
  48. package/template/_gitignore +5 -0
  49. package/template/index.html +12 -0
  50. package/template/src/App.tsx +25 -0
  51. package/template/src/main.tsx +14 -0
  52. package/template/tsconfig.app.json +22 -0
  53. package/template/tsconfig.json +4 -0
  54. package/template/tsconfig.node.json +16 -0
  55. package/template/vite.config.ts +8 -0
package/README.md CHANGED
@@ -12,14 +12,28 @@ change it directly.
12
12
 
13
13
  ## Requirements / 前提
14
14
 
15
- - React 19 and React DOM 19 already installed (Vite, Next.js App Router or similar).
15
+ - Existing projects: React 19 and React DOM 19 already installed. New folders: use `create` below.
16
16
  - Node.js 20.19+.
17
17
  - Commit your work first, so you can review what `init` adds. 先提交现有改动,方便查看 `init` 新增了什么。
18
18
 
19
- ## Install / 安装
19
+ ## Create a project / 新建项目
20
+
21
+ 在只有 `AGENTS.md` 等 AI 配置、还没有 `package.json` 的文件夹里运行:
22
+
23
+ ```bash
24
+ npx @apexhub/apex-ui-react-source@latest create
25
+ npm run build
26
+ npm run dev
27
+ ```
28
+
29
+ `create` 会一次写好 Vite + React 项目、`@` 别名、组件源码、Provider 和中文亮色示例页,并安装依赖。
30
+ 已有文件发生冲突时会停止,不会覆盖。英文用 `--locale en_US`,暗色用 `--theme dark`。
31
+ 此命令需要发布包含 `create` 的新版源码包;旧版本没有 `create`,修改包名不会为旧版增加命令。
32
+
33
+ ## Install into an existing project / 接入已有项目
20
34
 
21
35
  ```bash
22
- npx @apexhub/apex-ui-react-source init
36
+ npx @apexhub/apex-ui-react-source@latest init
23
37
  ```
24
38
 
25
39
  This will:
@@ -69,7 +83,7 @@ of the folder tells AI assistants how to use and change the code.
69
83
 
70
84
  ```bash
71
85
  # Files this project modified, deleted or added since install (read-only)
72
- npx @apexhub/apex-ui-react-source status
86
+ npx @apexhub/apex-ui-react-source@latest status
73
87
 
74
88
  # Move to the latest version and keep the project's edits (--dry-run to preview)
75
89
  npx @apexhub/apex-ui-react-source@latest update
@@ -1,8 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * npx @apexhub/apex-ui-react-source init [options]
4
- * npx @apexhub/apex-ui-react-source status [--json]
5
- * npx @apexhub/apex-ui-react-source info [--cwd <path>] [--dir <path>] [--json]
3
+ * npx @apexhub/apex-ui-react-source@latest create [--theme light|dark] [--locale zh_CN|en_US]
4
+ * npx @apexhub/apex-ui-react-source@latest init [options]
5
+ * npx @apexhub/apex-ui-react-source@latest status [--json]
6
+ * npx @apexhub/apex-ui-react-source@latest info [--cwd <path>] [--dir <path>] [--json]
6
7
  * npx @apexhub/apex-ui-react-source@latest update [--dry-run] [--json]
7
8
  *
8
9
  * Copies the Apex UI React source into the project (default src/components/apex),
@@ -27,13 +28,17 @@ import { fileURLToPath } from 'node:url'
27
28
 
28
29
  const PKG_ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '..')
29
30
  const DIST = join(PKG_ROOT, 'dist')
31
+ const TEMPLATE = join(PKG_ROOT, 'template')
30
32
  const DEFAULT_DIR = 'src/components/apex'
31
33
  // Keep detecting earlier package names so a rename cannot mix source and compiled modes.
32
34
  const COMPILED_PACKAGES = ['@apexhub/apex-ui-react', '@apex-ui/react', '@frontend/apex-ui--react']
33
35
 
34
- const HELP = `Usage: npx @apexhub/apex-ui-react-source <command> [options]
36
+ const HELP = `Usage: npx @apexhub/apex-ui-react-source@latest <command> [options]
35
37
 
36
38
  Commands:
39
+ create Start a new Vite + React project with Apex UI in the current folder, in one
40
+ step: project files, the @ alias, ApexProvider, a sample page and a single
41
+ dependency install. For folders without a package.json.
37
42
  init Copy the Apex UI React components into your project as source code
38
43
  status List the component files this project modified, deleted or added
39
44
  since they were installed (read-only)
@@ -47,6 +52,8 @@ Options:
47
52
  --pm <name> Package manager: pnpm | npm | yarn | bun (default: detected from lockfile)
48
53
  --no-install Copy files and write apex.json, but only print the install command
49
54
  --dry-run Show what would happen; change nothing
55
+ --theme <name> create: light (default) or dark
56
+ --locale <name> create: zh_CN (default) or en_US
50
57
  --json status / update / info: print the result as JSON
51
58
  --base <path> update: folder with the files of the currently installed version, used to
52
59
  merge edited files (default: downloaded from the registry)
@@ -69,6 +76,8 @@ function parseArgs(argv) {
69
76
  pm: null,
70
77
  install: true,
71
78
  dryRun: false,
79
+ theme: 'light',
80
+ locale: 'zh_CN',
72
81
  }
73
82
  const rest = [...argv]
74
83
  while (rest.length) {
@@ -78,7 +87,7 @@ function parseArgs(argv) {
78
87
  else if (arg === '--no-install') args.install = false
79
88
  else if (arg === '--dry-run') args.dryRun = true
80
89
  else if (arg === '--json') args.json = true
81
- else if (arg === '--dir' || arg === '--cwd' || arg === '--pm' || arg === '--base') {
90
+ else if (['--dir', '--cwd', '--pm', '--base', '--theme', '--locale'].includes(arg)) {
82
91
  const value = rest.shift()
83
92
  if (!value || value.startsWith('-')) fail(`${arg} needs a value`)
84
93
  args[arg.slice(2)] = value
@@ -219,21 +228,7 @@ function init(args) {
219
228
  }
220
229
 
221
230
  // 4. Copy, record, install.
222
- for (const file of files) {
223
- const out = join(targetDir, relative(join(DIST, 'files'), file))
224
- mkdirSync(dirname(out), { recursive: true })
225
- writeFileSync(out, readFileSync(file))
226
- }
227
- const record = {
228
- name: manifest.name,
229
- version: manifest.version,
230
- framework: manifest.framework,
231
- dir: displayDir,
232
- installedAt: new Date().toISOString(),
233
- dependencies: manifest.dependencies,
234
- files: manifest.files,
235
- }
236
- writeFileSync(apexJson, `${JSON.stringify(record, null, 2)}\n`)
231
+ copyPayload({ manifest, files, targetDir, displayDir, apexJson })
237
232
  console.log(`\n✔ Copied ${files.length} files to ${displayDir}/ and wrote apex.json`)
238
233
 
239
234
  const printable = [cmd, ...cmdArgs].join(' ')
@@ -261,11 +256,198 @@ Next steps:
261
256
  Next.js App Router: do this in a 'use client' providers.tsx.
262
257
  3. Import components from their folder, e.g. ${displayDir}/button
263
258
  AI assistants: read ${displayDir}/AGENTS.md first. When you fix a component, add an entry to
264
- ${displayDir}/CHANGES.md; \`npx @apexhub/apex-ui-react-source status\` lists the files that were changed.
259
+ ${displayDir}/CHANGES.md; \`npx @apexhub/apex-ui-react-source@latest status\` lists the files that were changed.
265
260
  A newer version later: npx @apexhub/apex-ui-react-source@latest update (keeps the project's edits).
266
261
  `)
267
262
  }
268
263
 
264
+ /** Copies the component source into targetDir and writes apex.json next to it. */
265
+ function copyPayload({ manifest, files, targetDir, displayDir, apexJson }) {
266
+ for (const file of files) {
267
+ const out = join(targetDir, relative(join(DIST, 'files'), file))
268
+ mkdirSync(dirname(out), { recursive: true })
269
+ writeFileSync(out, readFileSync(file))
270
+ }
271
+ const record = {
272
+ name: manifest.name,
273
+ version: manifest.version,
274
+ framework: manifest.framework,
275
+ dir: displayDir,
276
+ installedAt: new Date().toISOString(),
277
+ dependencies: manifest.dependencies,
278
+ files: manifest.files,
279
+ }
280
+ writeFileSync(apexJson, `${JSON.stringify(record, null, 2)}\n`)
281
+ }
282
+
283
+ /** Versions the new-project template was built and checked with. */
284
+ const TEMPLATE_DEPENDENCIES = { react: '^19.3.1', 'react-dom': '^19.3.1' }
285
+ const TEMPLATE_DEV_DEPENDENCIES = {
286
+ '@types/node': '^24.19.2',
287
+ '@types/react': '^19.3.0',
288
+ '@types/react-dom': '^19.3.0',
289
+ '@vitejs/plugin-react': '^6.3.0',
290
+ typescript: '~7.0.2',
291
+ vite: '^8.3.8',
292
+ }
293
+
294
+ /** Text of the sample page and the entry, per locale. */
295
+ const TEMPLATE_TEXT = {
296
+ zh_CN: {
297
+ htmlLang: 'zh-CN',
298
+ title: 'Apex UI 已经装好',
299
+ intro: '这是示例首页。直接用一句话告诉 AI 想要什么页面,它会替换这里的内容。',
300
+ button: '点我试试',
301
+ toast: '按钮可以正常使用',
302
+ },
303
+ en_US: {
304
+ htmlLang: 'en',
305
+ title: 'Apex UI is ready',
306
+ intro: 'This is a sample home page. Tell the AI what page you want and it will replace this.',
307
+ button: 'Try me',
308
+ toast: 'The button works',
309
+ },
310
+ }
311
+
312
+ /** Template file -> path in the new project. npm drops .gitignore from packages, hence _gitignore. */
313
+ const TEMPLATE_FILES = {
314
+ 'index.html': 'index.html',
315
+ 'vite.config.ts': 'vite.config.ts',
316
+ 'tsconfig.json': 'tsconfig.json',
317
+ 'tsconfig.app.json': 'tsconfig.app.json',
318
+ 'tsconfig.node.json': 'tsconfig.node.json',
319
+ _gitignore: '.gitignore',
320
+ 'src/main.tsx': 'src/main.tsx',
321
+ 'src/App.tsx': 'src/App.tsx',
322
+ }
323
+
324
+ function packageName(cwd) {
325
+ const name = cwd
326
+ .split(sep)
327
+ .pop()
328
+ .toLowerCase()
329
+ .replace(/[^a-z0-9._-]+/g, '-')
330
+ .replace(/^[-._]+|[-._]+$/g, '')
331
+ return name || 'apex-app'
332
+ }
333
+
334
+ function renderTemplate(file, values) {
335
+ let text = readFileSync(join(TEMPLATE, file), 'utf8').replace(
336
+ /\{\{(\w+)\}\}/g,
337
+ (_, key) => values[key],
338
+ )
339
+ if (file === 'src/main.tsx') {
340
+ text = text.replace('theme="light"', `theme="${values.theme}"`)
341
+ if (values.locale === 'en_US') {
342
+ text = text
343
+ .replace(
344
+ "import zhCN from '@/components/apex/locale/zh_CN'",
345
+ "import enUS from '@/components/apex/locale/en_US'",
346
+ )
347
+ .replace('locale={zhCN}', 'locale={enUS}')
348
+ }
349
+ }
350
+ return text
351
+ }
352
+
353
+ /**
354
+ * New project in the current folder in one step. Files that are already there (AGENTS.md,
355
+ * .agents/ from the skill installer, a README) are left alone; only a file the template
356
+ * would replace stops it.
357
+ */
358
+ function create(args) {
359
+ if (!existsSync(join(DIST, 'manifest.json'))) {
360
+ fail(
361
+ 'This package has no payload (dist/manifest.json is missing). Reinstall @apexhub/apex-ui-react-source.',
362
+ )
363
+ }
364
+ if (!['light', 'dark'].includes(args.theme))
365
+ fail(`--theme must be light or dark (got ${args.theme})`)
366
+ if (!TEMPLATE_TEXT[args.locale]) fail(`--locale must be zh_CN or en_US (got ${args.locale})`)
367
+ const manifest = readJson(join(DIST, 'manifest.json'))
368
+ const cwd = resolve(args.cwd)
369
+ mkdirSync(cwd, { recursive: true })
370
+ if (existsSync(join(cwd, 'package.json'))) {
371
+ fail('This folder already has a project (package.json).', [
372
+ 'To add Apex UI to it, run: npx @apexhub/apex-ui-react-source@latest init',
373
+ ])
374
+ }
375
+ const targetDir = resolve(cwd, args.dir)
376
+ const rel = relative(cwd, targetDir)
377
+ if (!rel || rel.startsWith('..') || rel.includes(`..${sep}`)) {
378
+ fail(`--dir must be a folder inside the project (got ${args.dir}).`)
379
+ }
380
+ const displayDir = rel.split(sep).join('/')
381
+ const apexJson = join(dirname(targetDir), 'apex.json')
382
+ const conflicts = Object.entries(TEMPLATE_FILES)
383
+ .filter(([, out]) => out !== '.gitignore' && existsSync(join(cwd, out)))
384
+ .map(([, out]) => out)
385
+ if (existsSync(targetDir) && readdirSync(targetDir).length > 0) conflicts.push(`${displayDir}/`)
386
+ if (existsSync(apexJson)) conflicts.push(relative(cwd, apexJson).split(sep).join('/'))
387
+ if (conflicts.length) {
388
+ fail('Nothing was changed: these files already exist and would be replaced.', [
389
+ ...conflicts.map((file) => `- ${file}`),
390
+ 'Move them away, or start in an empty folder.',
391
+ ])
392
+ }
393
+
394
+ const name = packageName(cwd)
395
+ const values = { ...TEMPLATE_TEXT[args.locale], name, theme: args.theme, locale: args.locale }
396
+ const pm = args.pm ?? detectPackageManager(cwd)
397
+ if (!['pnpm', 'npm', 'yarn', 'bun'].includes(pm)) fail(`Unsupported package manager: ${pm}`)
398
+ console.log(`\nNew project "${name}" with Apex UI ${manifest.version} (source mode)`)
399
+ console.log(` theme: ${args.theme}, locale: ${args.locale}, components: ${displayDir}/`)
400
+ if (args.dryRun) {
401
+ console.log('\nDry run: nothing was changed.\n')
402
+ return
403
+ }
404
+
405
+ const pkg = {
406
+ name,
407
+ private: true,
408
+ version: '0.0.0',
409
+ type: 'module',
410
+ scripts: { dev: 'vite', build: 'tsc -b && vite build', preview: 'vite preview' },
411
+ dependencies: Object.fromEntries(
412
+ Object.entries({ ...TEMPLATE_DEPENDENCIES, ...manifest.dependencies }).sort(([a], [b]) =>
413
+ a.localeCompare(b),
414
+ ),
415
+ ),
416
+ devDependencies: TEMPLATE_DEV_DEPENDENCIES,
417
+ }
418
+ writeFileSync(join(cwd, 'package.json'), `${JSON.stringify(pkg, null, 2)}\n`)
419
+ for (const [file, out] of Object.entries(TEMPLATE_FILES)) {
420
+ if (out === '.gitignore' && existsSync(join(cwd, out))) continue
421
+ mkdirSync(dirname(join(cwd, out)), { recursive: true })
422
+ writeFileSync(join(cwd, out), renderTemplate(file, values))
423
+ }
424
+ const files = walk(join(DIST, 'files'))
425
+ copyPayload({ manifest, files, targetDir, displayDir, apexJson })
426
+ console.log(`\n✔ Wrote the project files and copied ${files.length} files to ${displayDir}/`)
427
+
428
+ const printable = pm === 'yarn' ? 'yarn' : `${pm} install`
429
+ if (args.install) {
430
+ console.log(`\n$ ${printable}`)
431
+ const result = spawnSync(pm, pm === 'yarn' ? [] : ['install'], {
432
+ cwd,
433
+ stdio: 'inherit',
434
+ shell: process.platform === 'win32',
435
+ })
436
+ if (result.status !== 0) {
437
+ fail('Dependency installation failed. The project files are in place; run this yourself:', [
438
+ printable,
439
+ ])
440
+ }
441
+ } else {
442
+ console.log(`\nInstall the dependencies:\n ${printable}`)
443
+ }
444
+ console.log(`
445
+ Done. Start it with: ${pm === 'npm' ? 'npm run dev' : `${pm} dev`}
446
+ Open the "Local:" address it prints (Vite picks another port when 5173 is taken).
447
+ AI assistants: the sample page is src/App.tsx; read ${displayDir}/AGENTS.md before building pages.
448
+ `)
449
+ }
450
+
269
451
  /** Files the project keeps inside the component folder that are not part of Apex UI itself. */
270
452
  const PROJECT_NOTES = new Set(['CHANGES.md'])
271
453
 
@@ -369,7 +551,7 @@ function status(args) {
369
551
  const apexJson = join(dirname(resolve(cwd, args.dir)), 'apex.json')
370
552
  if (!existsSync(apexJson)) {
371
553
  fail(`No ${relative(cwd, apexJson).split(sep).join('/')} found.`, [
372
- 'Apex UI is not installed in source mode here. Run: npx @apexhub/apex-ui-react-source init',
554
+ 'Apex UI is not installed in source mode here. Run: npx @apexhub/apex-ui-react-source@latest init',
373
555
  'If the components are in another folder, pass --dir <that folder>.',
374
556
  ])
375
557
  }
@@ -463,7 +645,7 @@ function update(args) {
463
645
  const apexJson = join(dirname(resolve(cwd, args.dir)), 'apex.json')
464
646
  if (!existsSync(apexJson)) {
465
647
  fail(`No ${relative(cwd, apexJson).split(sep).join('/')} found.`, [
466
- 'Apex UI is not installed in source mode here. Run: npx @apexhub/apex-ui-react-source init',
648
+ 'Apex UI is not installed in source mode here. Run: npx @apexhub/apex-ui-react-source@latest init',
467
649
  'If the components are in another folder, pass --dir <that folder>.',
468
650
  ])
469
651
  }
@@ -702,6 +884,8 @@ if (args.version) {
702
884
  console.log(readJson(join(PKG_ROOT, 'package.json')).version)
703
885
  } else if (args.help || !args.command) {
704
886
  console.log(HELP)
887
+ } else if (args.command === 'create') {
888
+ create(args)
705
889
  } else if (args.command === 'init') {
706
890
  init(args)
707
891
  } else if (args.command === 'status') {
@@ -712,6 +896,6 @@ if (args.version) {
712
896
  update(args)
713
897
  } else {
714
898
  fail(`Unknown command: ${args.command}`, [
715
- 'Available: init, status, update, info. Run with --help to see the options.',
899
+ 'Available: create, init, status, update, info. Run with --help to see the options.',
716
900
  ])
717
901
  }
@@ -1,6 +1,6 @@
1
1
  # Apex UI source (React) — rules for AI assistants
2
2
 
3
- This folder is Apex UI 1.2.0, installed as source code by `@apexhub/apex-ui-react-source`.
3
+ This folder is Apex UI 1.2.1, installed as source code by `@apexhub/apex-ui-react-source`.
4
4
  The code now belongs to this project: you may edit it.
5
5
 
6
6
  ## Using components
@@ -28,7 +28,7 @@ The code now belongs to this project: you may edit it.
28
28
  - `data-slot` attributes are a public contract; avoid renaming or removing them.
29
29
  - After fixing a component, append an entry to `CHANGES.md` in this folder (create it if
30
30
  missing): date, component, files, why, what changed. Future updates and feedback to Apex UI
31
- rely on it. `npx @apexhub/apex-ui-react-source status` lists the files that differ from the
31
+ rely on it. `npx @apexhub/apex-ui-react-source@latest status` lists the files that differ from the
32
32
  installed version.
33
33
  - To move to a newer Apex UI version run `npx @apexhub/apex-ui-react-source@latest update`: it keeps
34
34
  the project's edits and lists the files that need a manual merge. Do not re-run `init` or
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Alert:需要在当前页面内展示操作结果、风险提示或补充说明,且信息应持续可见时。
4
4
 
5
- 版本:`1.2.0`。组件源码在本目录,属于当前项目。
5
+ 版本:`1.2.1`。组件源码在本目录,属于当前项目。
6
6
 
7
7
  公开导出:`Alert`。
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > ApexProvider:在应用或微前端子应用最外层包裹,确保组件库 Token、主题、滚动条样式在整个组件树生效。
4
4
 
5
- 版本:`1.2.0`。组件源码在本目录,属于当前项目。
5
+ 版本:`1.2.1`。组件源码在本目录,属于当前项目。
6
6
 
7
7
  公开导出:`ApexProvider`、`useConfig`。
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > AutoComplete:为自由文本输入提供历史记录、关键词或搜索建议。没有匹配建议时,输入内容仍会保留。
4
4
 
5
- 版本:`1.2.0`。组件源码在本目录,属于当前项目。
5
+ 版本:`1.2.1`。组件源码在本目录,属于当前项目。
6
6
 
7
7
  公开导出:`AutoComplete`。
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Avatar:需要展示用户、团队或业务实体的缩略标识,且空间有限时。
4
4
 
5
- 版本:`1.2.0`。组件源码在本目录,属于当前项目。
5
+ 版本:`1.2.1`。组件源码在本目录,属于当前项目。
6
6
 
7
7
  公开导出:`Avatar`、`AvatarGroup`。
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Breadcrumb:页面层级较深,用户需要知道「当前在哪」并快速返回上级时。
4
4
 
5
- 版本:`1.2.0`。组件源码在本目录,属于当前项目。
5
+ 版本:`1.2.1`。组件源码在本目录,属于当前项目。
6
6
 
7
7
  公开导出:`Breadcrumb`、`BreadcrumbLink`、`BreadcrumbSeparatorIcon`、`isBreadcrumbSeparatorItem`。
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Button:标记一个或多个操作(提交、确认、跳转等)时。
4
4
 
5
- 版本:`1.2.0`。组件源码在本目录,属于当前项目。
5
+ 版本:`1.2.1`。组件源码在本目录,属于当前项目。
6
6
 
7
7
  公开导出:`Button`。
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Card:需要将一组相关信息收纳在带边框的容器内,与页面背景区分时。
4
4
 
5
- 版本:`1.2.0`。组件源码在本目录,属于当前项目。
5
+ 版本:`1.2.1`。组件源码在本目录,属于当前项目。
6
6
 
7
7
  公开导出:`Card`。
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Cascader:选项具有清晰的层级关系(省市区、分类目录等),需要从根到叶逐级选择时。
4
4
 
5
- 版本:`1.2.0`。组件源码在本目录,属于当前项目。
5
+ 版本:`1.2.1`。组件源码在本目录,属于当前项目。
6
6
 
7
7
  公开导出:`Cascader`。
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Checkbox:用户可从多个选项中任选零个、一个或多个时(与 Radio 互斥单选相对)。
4
4
 
5
- 版本:`1.2.0`。组件源码在本目录,属于当前项目。
5
+ 版本:`1.2.1`。组件源码在本目录,属于当前项目。
6
6
 
7
7
  公开导出:`Checkbox`、`CheckboxGroup`。
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Collapse:页面信息量大,需要将次要内容默认折叠、按需展开时。
4
4
 
5
- 版本:`1.2.0`。组件源码在本目录,属于当前项目。
5
+ 版本:`1.2.1`。组件源码在本目录,属于当前项目。
6
6
 
7
7
  公开导出:`Collapse`。
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > DatePicker:用户需要选择单个日期或日期范围,且精确到日、周、月、季、年等不同粒度时。
4
4
 
5
- 版本:`1.2.0`。组件源码在本目录,属于当前项目。
5
+ 版本:`1.2.1`。组件源码在本目录,属于当前项目。
6
6
 
7
7
  公开导出:`DatePicker`、`RangePicker`。
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Divider:需要在区块之间做视觉分隔、区分内容层次时。
4
4
 
5
- 版本:`1.2.0`。组件源码在本目录,属于当前项目。
5
+ 版本:`1.2.1`。组件源码在本目录,属于当前项目。
6
6
 
7
7
  公开导出:`Divider`。
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Drawer:需要从屏幕边缘滑出面板展示详情、表单或临时任务,且保留原页面上下文时。
4
4
 
5
- 版本:`1.2.0`。组件源码在本目录,属于当前项目。
5
+ 版本:`1.2.1`。组件源码在本目录,属于当前项目。
6
6
 
7
7
  公开导出:`Drawer`。
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Dropdown:在触发器附近展示一组快捷操作或菜单项时。
4
4
 
5
- 版本:`1.2.0`。组件源码在本目录,属于当前项目。
5
+ 版本:`1.2.1`。组件源码在本目录,属于当前项目。
6
6
 
7
7
  公开导出:`Dropdown`。
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Form:需要收集、校验并提交一组结构化字段数据时。
4
4
 
5
- 版本:`1.2.0`。组件源码在本目录,属于当前项目。
5
+ 版本:`1.2.1`。组件源码在本目录,属于当前项目。
6
6
 
7
7
  公开导出:`Form`、`FormItem`、`useForm`。
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Grid:页面区块需要按 24 栅格划分宽度与响应式列数时。
4
4
 
5
- 版本:`1.2.0`。组件源码在本目录,属于当前项目。
5
+ 版本:`1.2.1`。组件源码在本目录,属于当前项目。
6
6
 
7
7
  公开导出:`Col`、`Row`、`useBreakpoint`。
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Image:需要以缩略图形式展示图片,并支持点击放大预览时。
4
4
 
5
- 版本:`1.2.0`。组件源码在本目录,属于当前项目。
5
+ 版本:`1.2.1`。组件源码在本目录,属于当前项目。
6
6
 
7
7
  公开导出:`Image`。
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Input:需要通过键盘录入单行或多行文本内容时。
4
4
 
5
- 版本:`1.2.0`。组件源码在本目录,属于当前项目。
5
+ 版本:`1.2.1`。组件源码在本目录,属于当前项目。
6
6
 
7
7
  公开导出:`Input`。
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > InputNumber:需要录入有上下界的数值,并支持步进增减时。
4
4
 
5
- 版本:`1.2.0`。组件源码在本目录,属于当前项目。
5
+ 版本:`1.2.1`。组件源码在本目录,属于当前项目。
6
6
 
7
7
  公开导出:`InputNumber`。
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Layout:搭建后台页面的 Header、侧栏、内容区与 Footer 等整体结构时。
4
4
 
5
- 版本:`1.2.0`。组件源码在本目录,属于当前项目。
5
+ 版本:`1.2.1`。组件源码在本目录,属于当前项目。
6
6
 
7
7
  公开导出:`Layout`、`LayoutSiderDrawerBody`、`LayoutSiderDrawerHeader`、`LayoutSiderMenuCollapsed`、`LayoutSiderMenuMaximized`。
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Menu:侧栏持久导航,需要在图标 rail 与展开列表之间切换时。
4
4
 
5
- 版本:`1.2.0`。组件源码在本目录,属于当前项目。
5
+ 版本:`1.2.1`。组件源码在本目录,属于当前项目。
6
6
 
7
7
  公开导出:`isKeySelected`、`Menu`。
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Message:操作结果的轻量全局反馈(成功、失败、警告、进行中等)时。
4
4
 
5
- 版本:`1.2.0`。组件源码在本目录,属于当前项目。
5
+ 版本:`1.2.1`。组件源码在本目录,属于当前项目。
6
6
 
7
7
  公开导出:`message`。
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Modal:需要用户阅读并确认、取消或提交,且应暂时阻断当前页面操作时。
4
4
 
5
- 版本:`1.2.0`。组件源码在本目录,属于当前项目。
5
+ 版本:`1.2.1`。组件源码在本目录,属于当前项目。
6
6
 
7
7
  公开导出:`Modal`。
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Notification:操作完成后的全局反馈,需要用户注意到但不必立即处理时。
4
4
 
5
- 版本:`1.2.0`。组件源码在本目录,属于当前项目。
5
+ 版本:`1.2.1`。组件源码在本目录,属于当前项目。
6
6
 
7
7
  公开导出:`notification`。
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Pagination:数据量较大、需要分批次浏览列表或表格时。
4
4
 
5
- 版本:`1.2.0`。组件源码在本目录,属于当前项目。
5
+ 版本:`1.2.1`。组件源码在本目录,属于当前项目。
6
6
 
7
7
  公开导出:`Pagination`。
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Popover:需要在触发元素旁展示标题 + 正文,且正文内可包含链接、按钮等可交互元素时。
4
4
 
5
- 版本:`1.2.0`。组件源码在本目录,属于当前项目。
5
+ 版本:`1.2.1`。组件源码在本目录,属于当前项目。
6
6
 
7
7
  公开导出:`Popover`。
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Progress:需要向用户展示任务、上传、加载等操作的完成百分比时。
4
4
 
5
- 版本:`1.2.0`。组件源码在本目录,属于当前项目。
5
+ 版本:`1.2.1`。组件源码在本目录,属于当前项目。
6
6
 
7
7
  公开导出:`Progress`。
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Radio:用户必须从多个互斥选项中选择一个时(如性别、配送方式)。
4
4
 
5
- 版本:`1.2.0`。组件源码在本目录,属于当前项目。
5
+ 版本:`1.2.1`。组件源码在本目录,属于当前项目。
6
6
 
7
7
  公开导出:`Radio`、`RadioGroup`、`RadioIndicator`。
8
8