@hsu-react/ui 2.2.15 → 2.3.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.
@@ -41,7 +41,7 @@
41
41
  text-overflow: ellipsis;
42
42
  }
43
43
 
44
- // 明暗两套文字色由 --cf-text 一并承担,不再各写一份字面量
44
+ // 明暗两套文字色由 --vita-foreground 一并承担,不再各写一份字面量
45
45
  .back,
46
46
  .title {
47
47
  color: var(--vita-foreground);
@@ -24,7 +24,7 @@ export interface ThemeProps {
24
24
  * - 自存一份主题色(原来固定是青色) -> antd useToken 里当前生效的 colorPrimary
25
25
  * - matchMedia 监听系统深色 -> useIsDark
26
26
  * - borderRadius / colorBorder / Table / Card / Button / Input 等成套 token 覆盖 -> toAntdTheme
27
- * - 在包裹元素上内联重定义 --cf-*:那会盖掉 tokens.scss 生成的值,属于主动帮倒忙
27
+ * - 在包裹元素上内联重定义 --vita-*:那会盖掉 tokens.scss 生成的值,属于主动帮倒忙
28
28
  */
29
29
  declare const Theme: React.FC<ThemeProps>;
30
30
  export default Theme;
@@ -23,7 +23,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
23
23
  * - 自存一份主题色(原来固定是青色) -> antd useToken 里当前生效的 colorPrimary
24
24
  * - matchMedia 监听系统深色 -> useIsDark
25
25
  * - borderRadius / colorBorder / Table / Card / Button / Input 等成套 token 覆盖 -> toAntdTheme
26
- * - 在包裹元素上内联重定义 --cf-*:那会盖掉 tokens.scss 生成的值,属于主动帮倒忙
26
+ * - 在包裹元素上内联重定义 --vita-*:那会盖掉 tokens.scss 生成的值,属于主动帮倒忙
27
27
  */
28
28
  var Theme = observer(function (props) {
29
29
  var _navDarkColors$top, _navDarkColors$bottom;
@@ -38,8 +38,10 @@ export interface HsuThemeTokens {
38
38
  shadow3: string;
39
39
  }
40
40
  /**
41
- * 2.0 之前的字段名。CSS 变量那侧留了 `--cf-*` 别名,但这里的 TS 字段是直接改名的 ——
42
- * 消费方写 `lightTokens.canvas` 会直接拿到 undefined,且没有任何提示。补上映射。
41
+ * 2.0 之前的字段名。TS 字段是直接改名的,消费方写 `lightTokens.canvas` 会拿到
42
+ * undefined 且没有任何提示,所以这里补上映射。
43
+ *
44
+ * (CSS 变量那侧原本也有一层 `--cf-*` 别名,2.3.0 起已移除,见 docs/guide.md。)
43
45
  *
44
46
  * `headerBg` 在重命名时被整个删掉了(没有对应的新名),这里指回 `surface`:2.0 之前
45
47
  * 两者在浅色下同为 #ffffff、暗色下同为卡片底色,语义上就是「顶栏用的面」。
@@ -98,7 +100,7 @@ export declare const breakpoints: {
98
100
  sm: number;
99
101
  md: number;
100
102
  lg: number;
101
- xl: number; /** Default brand colour; consuming projects override it via `ConfigProvider.primaryColor` */
103
+ xl: number;
102
104
  xxl: number;
103
105
  };
104
106
  /**
@@ -28,8 +28,10 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
28
28
  import raw from "./tokens.json";
29
29
 
30
30
  /**
31
- * 2.0 之前的字段名。CSS 变量那侧留了 `--cf-*` 别名,但这里的 TS 字段是直接改名的 ——
32
- * 消费方写 `lightTokens.canvas` 会直接拿到 undefined,且没有任何提示。补上映射。
31
+ * 2.0 之前的字段名。TS 字段是直接改名的,消费方写 `lightTokens.canvas` 会拿到
32
+ * undefined 且没有任何提示,所以这里补上映射。
33
+ *
34
+ * (CSS 变量那侧原本也有一层 `--cf-*` 别名,2.3.0 起已移除,见 docs/guide.md。)
33
35
  *
34
36
  * `headerBg` 在重命名时被整个删掉了(没有对应的新名),这里指回 `surface`:2.0 之前
35
37
  * 两者在浅色下同为 #ffffff、暗色下同为卡片底色,语义上就是「顶栏用的面」。
@@ -62,30 +62,6 @@
62
62
  --vita-screen-lg: 1024px;
63
63
  --vita-screen-xl: 1280px;
64
64
  --vita-screen-xxl: 1536px;
65
-
66
- // ---- 兼容别名(2.0 前的 --cf-*,单向指向新名)----
67
- --cf-canvas: var(--vita-background);
68
- --cf-surface: var(--vita-surface);
69
- --cf-subtle: var(--vita-muted);
70
- --cf-border: var(--vita-border);
71
- --cf-border-weak: var(--vita-border-weak);
72
- --cf-text: var(--vita-foreground);
73
- --cf-text-2: var(--vita-muted-foreground);
74
- --cf-text-3: var(--vita-subtle-foreground);
75
- --cf-row-hover: var(--vita-hover);
76
- --cf-success: var(--vita-success);
77
- --cf-warning: var(--vita-warning);
78
- --cf-error: var(--vita-error);
79
- --cf-font-family: var(--vita-font-family);
80
- --cf-font-size-sm: var(--vita-font-size-sm);
81
- --cf-font-size: var(--vita-font-size);
82
- --cf-font-size-lg: var(--vita-font-size-lg);
83
- --cf-radius-sm: var(--vita-radius-sm);
84
- --cf-radius: var(--vita-radius);
85
- --cf-radius-lg: var(--vita-radius-lg);
86
- --cf-shadow-1: var(--vita-shadow-1);
87
- --cf-shadow-2: var(--vita-shadow-2);
88
- --cf-shadow-3: var(--vita-shadow-3);
89
65
  }
90
66
 
91
67
  html[data-theme="dark"],
@@ -41,7 +41,7 @@
41
41
  text-overflow: ellipsis;
42
42
  }
43
43
 
44
- // 明暗两套文字色由 --cf-text 一并承担,不再各写一份字面量
44
+ // 明暗两套文字色由 --vita-foreground 一并承担,不再各写一份字面量
45
45
  .back,
46
46
  .title {
47
47
  color: var(--vita-foreground);
@@ -24,7 +24,7 @@ export interface ThemeProps {
24
24
  * - 自存一份主题色(原来固定是青色) -> antd useToken 里当前生效的 colorPrimary
25
25
  * - matchMedia 监听系统深色 -> useIsDark
26
26
  * - borderRadius / colorBorder / Table / Card / Button / Input 等成套 token 覆盖 -> toAntdTheme
27
- * - 在包裹元素上内联重定义 --cf-*:那会盖掉 tokens.scss 生成的值,属于主动帮倒忙
27
+ * - 在包裹元素上内联重定义 --vita-*:那会盖掉 tokens.scss 生成的值,属于主动帮倒忙
28
28
  */
29
29
  declare const Theme: React.FC<ThemeProps>;
30
30
  export default Theme;
@@ -32,7 +32,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
32
32
  * - 自存一份主题色(原来固定是青色) -> antd useToken 里当前生效的 colorPrimary
33
33
  * - matchMedia 监听系统深色 -> useIsDark
34
34
  * - borderRadius / colorBorder / Table / Card / Button / Input 等成套 token 覆盖 -> toAntdTheme
35
- * - 在包裹元素上内联重定义 --cf-*:那会盖掉 tokens.scss 生成的值,属于主动帮倒忙
35
+ * - 在包裹元素上内联重定义 --vita-*:那会盖掉 tokens.scss 生成的值,属于主动帮倒忙
36
36
  */
37
37
  const Theme = (0, _mobxReactLite.observer)(props => {
38
38
  const {
@@ -38,8 +38,10 @@ export interface HsuThemeTokens {
38
38
  shadow3: string;
39
39
  }
40
40
  /**
41
- * 2.0 之前的字段名。CSS 变量那侧留了 `--cf-*` 别名,但这里的 TS 字段是直接改名的 ——
42
- * 消费方写 `lightTokens.canvas` 会直接拿到 undefined,且没有任何提示。补上映射。
41
+ * 2.0 之前的字段名。TS 字段是直接改名的,消费方写 `lightTokens.canvas` 会拿到
42
+ * undefined 且没有任何提示,所以这里补上映射。
43
+ *
44
+ * (CSS 变量那侧原本也有一层 `--cf-*` 别名,2.3.0 起已移除,见 docs/guide.md。)
43
45
  *
44
46
  * `headerBg` 在重命名时被整个删掉了(没有对应的新名),这里指回 `surface`:2.0 之前
45
47
  * 两者在浅色下同为 #ffffff、暗色下同为卡片底色,语义上就是「顶栏用的面」。
@@ -98,7 +100,7 @@ export declare const breakpoints: {
98
100
  sm: number;
99
101
  md: number;
100
102
  lg: number;
101
- xl: number; /** Default brand colour; consuming projects override it via `ConfigProvider.primaryColor` */
103
+ xl: number;
102
104
  xxl: number;
103
105
  };
104
106
  /**
@@ -22,8 +22,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
22
22
  */
23
23
 
24
24
  /**
25
- * 2.0 之前的字段名。CSS 变量那侧留了 `--cf-*` 别名,但这里的 TS 字段是直接改名的 ——
26
- * 消费方写 `lightTokens.canvas` 会直接拿到 undefined,且没有任何提示。补上映射。
25
+ * 2.0 之前的字段名。TS 字段是直接改名的,消费方写 `lightTokens.canvas` 会拿到
26
+ * undefined 且没有任何提示,所以这里补上映射。
27
+ *
28
+ * (CSS 变量那侧原本也有一层 `--cf-*` 别名,2.3.0 起已移除,见 docs/guide.md。)
27
29
  *
28
30
  * `headerBg` 在重命名时被整个删掉了(没有对应的新名),这里指回 `surface`:2.0 之前
29
31
  * 两者在浅色下同为 #ffffff、暗色下同为卡片底色,语义上就是「顶栏用的面」。
@@ -62,30 +62,6 @@
62
62
  --vita-screen-lg: 1024px;
63
63
  --vita-screen-xl: 1280px;
64
64
  --vita-screen-xxl: 1536px;
65
-
66
- // ---- 兼容别名(2.0 前的 --cf-*,单向指向新名)----
67
- --cf-canvas: var(--vita-background);
68
- --cf-surface: var(--vita-surface);
69
- --cf-subtle: var(--vita-muted);
70
- --cf-border: var(--vita-border);
71
- --cf-border-weak: var(--vita-border-weak);
72
- --cf-text: var(--vita-foreground);
73
- --cf-text-2: var(--vita-muted-foreground);
74
- --cf-text-3: var(--vita-subtle-foreground);
75
- --cf-row-hover: var(--vita-hover);
76
- --cf-success: var(--vita-success);
77
- --cf-warning: var(--vita-warning);
78
- --cf-error: var(--vita-error);
79
- --cf-font-family: var(--vita-font-family);
80
- --cf-font-size-sm: var(--vita-font-size-sm);
81
- --cf-font-size: var(--vita-font-size);
82
- --cf-font-size-lg: var(--vita-font-size-lg);
83
- --cf-radius-sm: var(--vita-radius-sm);
84
- --cf-radius: var(--vita-radius);
85
- --cf-radius-lg: var(--vita-radius-lg);
86
- --cf-shadow-1: var(--vita-shadow-1);
87
- --cf-shadow-2: var(--vita-shadow-2);
88
- --cf-shadow-3: var(--vita-shadow-3);
89
65
  }
90
66
 
91
67
  html[data-theme="dark"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hsu-react/ui",
3
- "version": "2.2.15",
3
+ "version": "2.3.0",
4
4
  "description": "一套基于 React + Ant Design 的中后台业务组件库",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -41,7 +41,7 @@
41
41
  text-overflow: ellipsis;
42
42
  }
43
43
 
44
- // 明暗两套文字色由 --cf-text 一并承担,不再各写一份字面量
44
+ // 明暗两套文字色由 --vita-foreground 一并承担,不再各写一份字面量
45
45
  .back,
46
46
  .title {
47
47
  color: var(--vita-foreground);
@@ -30,7 +30,7 @@ export interface ThemeProps {
30
30
  * - 自存一份主题色(原来固定是青色) -> antd useToken 里当前生效的 colorPrimary
31
31
  * - matchMedia 监听系统深色 -> useIsDark
32
32
  * - borderRadius / colorBorder / Table / Card / Button / Input 等成套 token 覆盖 -> toAntdTheme
33
- * - 在包裹元素上内联重定义 --cf-*:那会盖掉 tokens.scss 生成的值,属于主动帮倒忙
33
+ * - 在包裹元素上内联重定义 --vita-*:那会盖掉 tokens.scss 生成的值,属于主动帮倒忙
34
34
  */
35
35
  const Theme: React.FC<ThemeProps> = observer((props) => {
36
36
  const { children, navDarkColors } = props;
@@ -62,30 +62,6 @@
62
62
  --vita-screen-lg: 1024px;
63
63
  --vita-screen-xl: 1280px;
64
64
  --vita-screen-xxl: 1536px;
65
-
66
- // ---- 兼容别名(2.0 前的 --cf-*,单向指向新名)----
67
- --cf-canvas: var(--vita-background);
68
- --cf-surface: var(--vita-surface);
69
- --cf-subtle: var(--vita-muted);
70
- --cf-border: var(--vita-border);
71
- --cf-border-weak: var(--vita-border-weak);
72
- --cf-text: var(--vita-foreground);
73
- --cf-text-2: var(--vita-muted-foreground);
74
- --cf-text-3: var(--vita-subtle-foreground);
75
- --cf-row-hover: var(--vita-hover);
76
- --cf-success: var(--vita-success);
77
- --cf-warning: var(--vita-warning);
78
- --cf-error: var(--vita-error);
79
- --cf-font-family: var(--vita-font-family);
80
- --cf-font-size-sm: var(--vita-font-size-sm);
81
- --cf-font-size: var(--vita-font-size);
82
- --cf-font-size-lg: var(--vita-font-size-lg);
83
- --cf-radius-sm: var(--vita-radius-sm);
84
- --cf-radius: var(--vita-radius);
85
- --cf-radius-lg: var(--vita-radius-lg);
86
- --cf-shadow-1: var(--vita-shadow-1);
87
- --cf-shadow-2: var(--vita-shadow-2);
88
- --cf-shadow-3: var(--vita-shadow-3);
89
65
  }
90
66
 
91
67
  html[data-theme="dark"],
@@ -42,8 +42,10 @@ export interface HsuThemeTokens {
42
42
  }
43
43
 
44
44
  /**
45
- * 2.0 之前的字段名。CSS 变量那侧留了 `--cf-*` 别名,但这里的 TS 字段是直接改名的 ——
46
- * 消费方写 `lightTokens.canvas` 会直接拿到 undefined,且没有任何提示。补上映射。
45
+ * 2.0 之前的字段名。TS 字段是直接改名的,消费方写 `lightTokens.canvas` 会拿到
46
+ * undefined 且没有任何提示,所以这里补上映射。
47
+ *
48
+ * (CSS 变量那侧原本也有一层 `--cf-*` 别名,2.3.0 起已移除,见 docs/guide.md。)
47
49
  *
48
50
  * `headerBg` 在重命名时被整个删掉了(没有对应的新名),这里指回 `surface`:2.0 之前
49
51
  * 两者在浅色下同为 #ffffff、暗色下同为卡片底色,语义上就是「顶栏用的面」。