@autional/ui 0.1.0-rc.45 → 0.1.0-rc.47

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@autional/ui",
3
- "version": "0.1.0-rc.45",
4
- "description": "Autional shared React component library (atoms + molecules) — the canonical home of the component layer",
3
+ "version": "0.1.0-rc.47",
4
+ "description": "Autional shared React component library (atoms + molecules) �?the canonical home of the component layer",
5
5
  "license": "AGPL-3.0",
6
6
  "main": "./src/index.ts",
7
7
  "module": "./src/index.ts",
@@ -82,7 +82,7 @@
82
82
  "react-i18next": "17.0.7",
83
83
  "typescript": "5.8.3",
84
84
  "vitest": "3.2.0",
85
- "@autional/tokens": "0.1.0-rc.13"
85
+ "@autional/tokens": "0.1.0-rc.15"
86
86
  },
87
87
  "scripts": {
88
88
  "typecheck": "tsc --noEmit",
@@ -2,17 +2,23 @@
2
2
 
3
3
  import React from 'react';
4
4
 
5
- // ConsolePageHeader —— 控制台页面的页头:左对齐标题 + 右侧操作槽 + 可选副标题。
5
+ // AppPageHeader —— **应用外壳里的页面页头**:左对齐标题 + 右侧操作槽 + 可选副标题。
6
6
  //
7
7
  // 为什么不是 DS 里已有的 PageHeader:那是**营销 hero**(text-center + text-3xl/sm:text-4xl),
8
- // 落地页在用;控制台页头是另一种东西(左对齐 + text-xl/font-semibold + 右侧操作槽)。
8
+ // 落地页在用;应用页头是另一种东西(左对齐 + text-xl/font-semibold + 右侧操作槽)。
9
9
  // 两者**同名不同物**,互相替换会把控制台的密度打散 —— 所以这里另立一件,PageHeader 保持原样(D5)。
10
10
  //
11
+ // 第 63 轮改名(L17):原名 ConsolePageHeader 把契约说小了 —— user 门户(面向终端用户,
12
+ // 不是「控制台」)早就是它的大用户。实测改名当时 **393 处**调用(站点 359 + 设计系统 34),
13
+ // 而 L17 登记的是 174 处:**台账里的数字也会腐**,动手前必须重数。
14
+ // 新名字跟着 AppShell 走:外壳叫什么,外壳里的页头就叫什么,与页面是不是「控制台」无关。
15
+ // 不保留旧名别名 —— 全舰队同一批迁完,留一个只被我们自己引用的旧名字只会变成死代码。
16
+ //
11
17
  // 收敛前实测(2026-10):三个控制台在 **106 个页面**里把这段页头内联写了 106 遍,
12
18
  // 包裹容器的 className 有 **11 种**(mb-4 / mb-6、有没有 justify-between、有没有响应式断点各不相同)。
13
19
  // 这里固定成一种:窄屏纵向堆叠、sm 起横向两端对齐、gap-3、下边距 mb-6 —— 与其中 55 处的多数派一致。
14
20
 
15
- export interface ConsolePageHeaderProps {
21
+ export interface AppPageHeaderProps {
16
22
  /** 页面标题。 */
17
23
  title: React.ReactNode;
18
24
  /** 标题下方的说明文字(可选)。 */
@@ -23,12 +29,12 @@ export interface ConsolePageHeaderProps {
23
29
  className?: string;
24
30
  }
25
31
 
26
- export const ConsolePageHeader = React.memo(function ConsolePageHeader({
32
+ export const AppPageHeader = React.memo(function AppPageHeader({
27
33
  title,
28
34
  description,
29
35
  actions,
30
36
  className = '',
31
- }: ConsolePageHeaderProps) {
37
+ }: AppPageHeaderProps) {
32
38
  return (
33
39
  <div
34
40
  className={`mb-6 flex flex-col items-start gap-3 sm:flex-row sm:items-center sm:justify-between ${className}`}
@@ -45,7 +45,7 @@ const ICONS: Record<ToastType, typeof CheckCircle> = {
45
45
  const STYLES: Record<ToastType, string> = {
46
46
  success: 'bg-success text-white',
47
47
  error: 'bg-danger text-white',
48
- warning: 'bg-amber-500 text-white',
48
+ warning: 'bg-warning text-white',
49
49
  info: 'bg-[var(--color-brand)] text-white',
50
50
  };
51
51
 
@@ -23,8 +23,8 @@ export { PageContainer } from './PageContainer';
23
23
  export type { PageContainerProps } from './PageContainer';
24
24
  export { AppShell } from './AppShell';
25
25
  export type { AppShellProps } from './AppShell';
26
- export { ConsolePageHeader } from './ConsolePageHeader';
27
- export type { ConsolePageHeaderProps } from './ConsolePageHeader';
26
+ export { AppPageHeader } from './AppPageHeader';
27
+ export type { AppPageHeaderProps } from './AppPageHeader';
28
28
  export { Alert } from './Alert';
29
29
  export type { AlertProps, AlertVariant } from './Alert';
30
30
  export { Result } from './Result';