@omnific/atelier 0.2.0 → 0.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.
- package/README.md +4 -4
- package/dist/box/Box.d.ts +1 -1
- package/dist/box/Box.js +8 -13
- package/dist/box/types.d.ts +6 -30
- package/dist/props/display.props.d.ts +10 -0
- package/dist/props/display.props.js +15 -0
- package/dist/props/flex.props.d.ts +58 -0
- package/dist/props/flex.props.js +72 -0
- package/dist/props/gap.props.d.ts +10 -0
- package/dist/props/gap.props.js +18 -0
- package/dist/props/height.props.d.ts +10 -0
- package/dist/props/height.props.js +27 -0
- package/dist/props/index.d.ts +95 -0
- package/dist/props/index.js +158 -0
- package/dist/props/justify.props.d.ts +34 -0
- package/dist/props/justify.props.js +43 -0
- package/dist/props/margin.props.d.ts +10 -0
- package/dist/props/margin.props.js +27 -0
- package/dist/props/overflow.props.d.ts +10 -0
- package/dist/props/overflow.props.js +13 -0
- package/dist/props/padding.props.d.ts +10 -0
- package/dist/props/padding.props.js +18 -0
- package/dist/props/position.props.d.ts +18 -0
- package/dist/props/position.props.js +38 -0
- package/dist/props/radius.props.d.ts +10 -0
- package/dist/props/radius.props.js +19 -0
- package/dist/props/scaling.props.d.ts +10 -0
- package/dist/props/shadow.props.d.ts +10 -0
- package/dist/props/shadow.props.js +16 -0
- package/dist/props/width.props.d.ts +10 -0
- package/dist/props/width.props.js +26 -0
- package/dist/styles.css +2387 -27
- package/dist/system/create-system.d.ts +9 -4
- package/dist/system/create-system.js +9 -8
- package/dist/system/css-vars.d.ts +5 -40
- package/dist/system/css-vars.js +5 -61
- package/dist/system/default-system.d.ts +7 -3
- package/dist/system/default-system.js +3 -3
- package/dist/system/defaults/colors.d.ts +147 -74
- package/dist/system/defaults/colors.js +86 -60
- package/dist/system/define-colors.d.ts +7 -0
- package/dist/system/define-colors.js +7 -0
- package/dist/system/index.d.ts +6 -14
- package/dist/system/index.js +5 -13
- package/dist/system/merge-colors.d.ts +10 -0
- package/dist/system/merge-colors.js +21 -0
- package/dist/system/types.d.ts +14 -50
- package/dist/system/use-theme.d.ts +3 -23
- package/dist/system/use-theme.js +2 -21
- package/dist/utils/extractProps.js +34 -0
- package/package.json +6 -7
- package/dist/system/defaults/control-heights.d.ts +0 -16
- package/dist/system/defaults/control-heights.js +0 -11
- package/dist/system/defaults/focus-rings.d.ts +0 -10
- package/dist/system/defaults/focus-rings.js +0 -7
- package/dist/system/defaults/font-sizes.d.ts +0 -13
- package/dist/system/defaults/font-sizes.js +0 -10
- package/dist/system/defaults/fonts.d.ts +0 -10
- package/dist/system/defaults/fonts.js +0 -7
- package/dist/system/defaults/index.d.ts +0 -422
- package/dist/system/defaults/index.js +0 -28
- package/dist/system/defaults/radii.d.ts +0 -40
- package/dist/system/defaults/radii.js +0 -19
- package/dist/system/defaults/shadows.d.ts +0 -31
- package/dist/system/defaults/shadows.js +0 -16
- package/dist/system/defaults/spacing.d.ts +0 -112
- package/dist/system/defaults/spacing.js +0 -43
- package/dist/system/define-tokens.d.ts +0 -7
- package/dist/system/define-tokens.js +0 -7
- package/dist/system/merge-tokens.d.ts +0 -20
- package/dist/system/merge-tokens.js +0 -27
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ColorSet } from "./types.js";
|
|
2
2
|
//#region system/create-system.d.ts
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* 合并扁平颜色表并返回 system 实例。
|
|
5
5
|
*
|
|
6
|
-
*
|
|
6
|
+
* 第一个参数可以是主题名称,也可以直接传入扁平颜色表;
|
|
7
|
+
* 省略主题名称时使用 `default`。
|
|
7
8
|
*/
|
|
8
|
-
export declare function createSystem(
|
|
9
|
+
export declare function createSystem(nameOrColors: string | ColorSet, ...colorSets: ColorSet[]): {
|
|
10
|
+
name: string;
|
|
11
|
+
colors: ColorSet;
|
|
12
|
+
cssVars: Readonly<Record<string, string>>;
|
|
13
|
+
};
|
|
9
14
|
//#endregion
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { mergeColors } from "./merge-colors.js";
|
|
2
2
|
import { isString } from "@omnific/utils";
|
|
3
3
|
//#region system/create-system.ts
|
|
4
4
|
const DEFAULT_SYSTEM_NAME = "default";
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* 合并扁平颜色表并返回 system 实例。
|
|
7
7
|
*
|
|
8
|
-
*
|
|
8
|
+
* 第一个参数可以是主题名称,也可以直接传入扁平颜色表;
|
|
9
|
+
* 省略主题名称时使用 `default`。
|
|
9
10
|
*/
|
|
10
|
-
function createSystem(
|
|
11
|
-
const name = isString(
|
|
12
|
-
const
|
|
13
|
-
const {
|
|
11
|
+
function createSystem(nameOrColors, ...colorSets) {
|
|
12
|
+
const name = isString(nameOrColors) ? nameOrColors : DEFAULT_SYSTEM_NAME;
|
|
13
|
+
const mergedColorSets = isString(nameOrColors) ? colorSets : [nameOrColors, ...colorSets];
|
|
14
|
+
const { colors, cssVars } = mergeColors(...mergedColorSets);
|
|
14
15
|
return {
|
|
15
16
|
name,
|
|
16
|
-
|
|
17
|
+
colors,
|
|
17
18
|
cssVars
|
|
18
19
|
};
|
|
19
20
|
}
|
|
@@ -1,52 +1,17 @@
|
|
|
1
|
-
import { SystemContext
|
|
2
|
-
import { CSSProperties } from "react";
|
|
1
|
+
import { SystemContext } from "./types.js";
|
|
3
2
|
//#region system/css-vars.d.ts
|
|
4
3
|
/**
|
|
5
|
-
* CSS
|
|
6
|
-
*/
|
|
7
|
-
declare const STYLE_TOKEN: {
|
|
8
|
-
readonly padding: "spacing";
|
|
9
|
-
readonly paddingInline: "spacing";
|
|
10
|
-
readonly paddingBlock: "spacing";
|
|
11
|
-
readonly background: "colors";
|
|
12
|
-
readonly borderColor: "colors";
|
|
13
|
-
readonly borderRadius: "radii";
|
|
14
|
-
readonly boxShadow: "shadows";
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* 将 token 分类与键转为扁平 CSS 变量名。
|
|
18
|
-
*
|
|
19
|
-
* @example
|
|
20
|
-
* toCssVarName('colors', 'bg.muted') // '--color-bg-muted'
|
|
21
|
-
* toCssVarName('focusRings', 'default') // '--focus-ring-default'
|
|
22
|
-
*/
|
|
23
|
-
export declare const toCssVarName: (category: keyof ThemeTokens, key: string) => string;
|
|
24
|
-
type StyleProperty = keyof typeof STYLE_TOKEN;
|
|
25
|
-
/**
|
|
26
|
-
* `styleFromTokens` 单条:`[CSS 属性, token 键]`。
|
|
27
|
-
*/
|
|
28
|
-
export type TokenStyleEntry = readonly [StyleProperty, string | number | null | undefined];
|
|
29
|
-
/**
|
|
30
|
-
* 将 token 取值写成可合并进 React `style` 的 CSS 属性对象;空值跳过。
|
|
31
|
-
* ThemeTokens 分类由 `STYLE_TOKEN` 按 CSS 属性映射。
|
|
32
|
-
* 传入的 `style` 后合并,可覆盖同名属性。
|
|
4
|
+
* 将扁平语义颜色键转为 CSS 变量名。
|
|
33
5
|
*
|
|
34
6
|
* @example
|
|
35
|
-
*
|
|
36
|
-
* [
|
|
37
|
-
* ['padding', 4],
|
|
38
|
-
* ['background', 'bg.muted'],
|
|
39
|
-
* ],
|
|
40
|
-
* { color: 'red' },
|
|
41
|
-
* )
|
|
42
|
-
* // { padding: 'var(--space-4)', background: 'var(--color-bg-muted)', color: 'red' }
|
|
7
|
+
* toColorVarName('accent-solid') // '--color-accent-solid'
|
|
43
8
|
*/
|
|
44
|
-
export declare const
|
|
9
|
+
export declare const toColorVarName: (key: string) => string;
|
|
45
10
|
/**
|
|
46
11
|
* 将 `system.cssVars` 写入文档级 `<style>`(挂在 `document.head` 下)。
|
|
47
12
|
*
|
|
48
13
|
* 以 `system.name` 为 key 复用节点。返回卸载函数。
|
|
49
14
|
* 目标节点设置 `data-atelier-theme={system.name}`。
|
|
50
15
|
*/
|
|
51
|
-
export declare const applyCssVars: (system: SystemContext, target: HTMLElement) => (
|
|
16
|
+
export declare const applyCssVars: (system: SystemContext, target: HTMLElement) => () => void;
|
|
52
17
|
//#endregion
|
package/dist/system/css-vars.js
CHANGED
|
@@ -1,74 +1,18 @@
|
|
|
1
1
|
import { hasValue, isNil } from "@omnific/utils";
|
|
2
2
|
//#region system/css-vars.ts
|
|
3
3
|
/**
|
|
4
|
-
* Token 分类 → CSS 变量名前缀。
|
|
5
|
-
*/
|
|
6
|
-
const CATEGORY_PREFIX = {
|
|
7
|
-
colors: "color",
|
|
8
|
-
spacing: "space",
|
|
9
|
-
radii: "radius",
|
|
10
|
-
shadows: "shadow",
|
|
11
|
-
fonts: "font",
|
|
12
|
-
fontSizes: "font-size",
|
|
13
|
-
controlHeights: "control-height",
|
|
14
|
-
focusRings: "focus-ring"
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* CSS 属性 → ThemeTokens 分类。
|
|
18
|
-
*/
|
|
19
|
-
const STYLE_TOKEN = {
|
|
20
|
-
padding: "spacing",
|
|
21
|
-
paddingInline: "spacing",
|
|
22
|
-
paddingBlock: "spacing",
|
|
23
|
-
background: "colors",
|
|
24
|
-
borderColor: "colors",
|
|
25
|
-
borderRadius: "radii",
|
|
26
|
-
boxShadow: "shadows"
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
4
|
* 主题作用域属性;值为 `system.name`(含挂在 `documentElement` 上时)。
|
|
30
5
|
*/
|
|
31
6
|
const THEME_ATTR = "data-atelier-theme";
|
|
32
|
-
/**
|
|
33
|
-
* `system.name` → 样式节点与引用次数。
|
|
34
|
-
*/
|
|
35
7
|
const stylesByName = /* @__PURE__ */ new Map();
|
|
36
8
|
/**
|
|
37
|
-
*
|
|
9
|
+
* 将扁平语义颜色键转为 CSS 变量名。
|
|
38
10
|
*
|
|
39
11
|
* @example
|
|
40
|
-
*
|
|
41
|
-
* toCssVarName('focusRings', 'default') // '--focus-ring-default'
|
|
12
|
+
* toColorVarName('accent-solid') // '--color-accent-solid'
|
|
42
13
|
*/
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
return `--${CATEGORY_PREFIX[category]}-${suffix}`;
|
|
46
|
-
};
|
|
47
|
-
/**
|
|
48
|
-
* 将 token 取值写成可合并进 React `style` 的 CSS 属性对象;空值跳过。
|
|
49
|
-
* ThemeTokens 分类由 `STYLE_TOKEN` 按 CSS 属性映射。
|
|
50
|
-
* 传入的 `style` 后合并,可覆盖同名属性。
|
|
51
|
-
*
|
|
52
|
-
* @example
|
|
53
|
-
* styleFromTokens(
|
|
54
|
-
* [
|
|
55
|
-
* ['padding', 4],
|
|
56
|
-
* ['background', 'bg.muted'],
|
|
57
|
-
* ],
|
|
58
|
-
* { color: 'red' },
|
|
59
|
-
* )
|
|
60
|
-
* // { padding: 'var(--space-4)', background: 'var(--color-bg-muted)', color: 'red' }
|
|
61
|
-
*/
|
|
62
|
-
const styleFromTokens = (entries, style) => {
|
|
63
|
-
const tokenStyle = {};
|
|
64
|
-
for (const [property, token] of entries) {
|
|
65
|
-
if (isNil(token)) continue;
|
|
66
|
-
tokenStyle[property] = `var(${toCssVarName(STYLE_TOKEN[property], String(token))})`;
|
|
67
|
-
}
|
|
68
|
-
return isNil(style) ? tokenStyle : {
|
|
69
|
-
...tokenStyle,
|
|
70
|
-
...style
|
|
71
|
-
};
|
|
14
|
+
const toColorVarName = (key) => {
|
|
15
|
+
return `--color-${key.replaceAll(".", "-")}`;
|
|
72
16
|
};
|
|
73
17
|
const toCssText = (system) => {
|
|
74
18
|
const lines = [];
|
|
@@ -109,4 +53,4 @@ const applyCssVars = (system, target) => {
|
|
|
109
53
|
};
|
|
110
54
|
};
|
|
111
55
|
//#endregion
|
|
112
|
-
export { applyCssVars,
|
|
56
|
+
export { applyCssVars, toColorVarName };
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ColorSet } from "./types.js";
|
|
2
2
|
//#region system/default-system.d.ts
|
|
3
3
|
/**
|
|
4
|
-
* 基于 `
|
|
4
|
+
* 基于 `defaultColors` 的共享默认 system(单例,可直接 `useTheme` / `applyCssVars`)。
|
|
5
5
|
*/
|
|
6
|
-
export declare const defaultSystem:
|
|
6
|
+
export declare const defaultSystem: {
|
|
7
|
+
name: string;
|
|
8
|
+
colors: ColorSet;
|
|
9
|
+
cssVars: Readonly<Record<string, string>>;
|
|
10
|
+
};
|
|
7
11
|
//#endregion
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createSystem } from "./create-system.js";
|
|
2
|
-
import {
|
|
2
|
+
import { defaultColors } from "./defaults/colors.js";
|
|
3
3
|
//#region system/default-system.ts
|
|
4
4
|
/**
|
|
5
|
-
* 基于 `
|
|
5
|
+
* 基于 `defaultColors` 的共享默认 system(单例,可直接 `useTheme` / `applyCssVars`)。
|
|
6
6
|
*/
|
|
7
|
-
const defaultSystem = createSystem(
|
|
7
|
+
const defaultSystem = createSystem(defaultColors);
|
|
8
8
|
//#endregion
|
|
9
9
|
export { defaultSystem };
|
|
@@ -1,181 +1,254 @@
|
|
|
1
1
|
//#region system/defaults/colors.d.ts
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* 默认语义颜色。
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
* `bg` / `fg` / `border` 角色名保留,便于组件与业务扩展。
|
|
5
|
+
* 颜色键使用扁平 kebab-case 语义名,运行时统一映射为 `--color-*`。
|
|
7
6
|
*/
|
|
8
|
-
export declare const
|
|
7
|
+
export declare const defaultColors: {
|
|
9
8
|
readonly bg: {
|
|
10
9
|
readonly value: "#ffffff";
|
|
11
10
|
};
|
|
12
|
-
readonly 'bg
|
|
11
|
+
readonly 'bg-subtle': {
|
|
13
12
|
readonly value: "#fafafa";
|
|
14
13
|
};
|
|
15
|
-
readonly 'bg
|
|
14
|
+
readonly 'bg-muted': {
|
|
16
15
|
readonly value: "#f4f4f5";
|
|
17
16
|
};
|
|
18
|
-
readonly 'bg
|
|
17
|
+
readonly 'bg-emphasized': {
|
|
19
18
|
readonly value: "#e4e4e7";
|
|
20
19
|
};
|
|
21
|
-
readonly 'bg
|
|
20
|
+
readonly 'bg-inverted': {
|
|
22
21
|
readonly value: "#09090b";
|
|
23
22
|
};
|
|
24
|
-
readonly 'bg
|
|
23
|
+
readonly 'bg-panel': {
|
|
25
24
|
readonly value: "#ffffff";
|
|
26
25
|
};
|
|
27
|
-
readonly 'bg
|
|
26
|
+
readonly 'bg-disabled': {
|
|
28
27
|
readonly value: "rgb(239 239 239)";
|
|
29
28
|
};
|
|
30
|
-
readonly 'bg
|
|
29
|
+
readonly 'bg-danger': {
|
|
31
30
|
readonly value: "#fef2f2";
|
|
32
31
|
};
|
|
33
|
-
readonly 'bg
|
|
32
|
+
readonly 'bg-warning': {
|
|
34
33
|
readonly value: "#fff7ed";
|
|
35
34
|
};
|
|
36
|
-
readonly 'bg
|
|
35
|
+
readonly 'bg-success': {
|
|
37
36
|
readonly value: "#f0fdf4";
|
|
38
37
|
};
|
|
39
|
-
readonly 'bg
|
|
38
|
+
readonly 'bg-info': {
|
|
40
39
|
readonly value: "#e6f4ff";
|
|
41
40
|
};
|
|
42
41
|
readonly fg: {
|
|
43
42
|
readonly value: "rgb(0 0 0 / 88%)";
|
|
44
43
|
};
|
|
45
|
-
readonly 'fg
|
|
44
|
+
readonly 'fg-muted': {
|
|
46
45
|
readonly value: "rgb(0 0 0 / 45%)";
|
|
47
46
|
};
|
|
48
|
-
readonly 'fg
|
|
47
|
+
readonly 'fg-subtle': {
|
|
49
48
|
readonly value: "rgb(0 0 0 / 25%)";
|
|
50
49
|
};
|
|
51
|
-
readonly 'fg
|
|
50
|
+
readonly 'fg-inverted': {
|
|
52
51
|
readonly value: "#ffffff";
|
|
53
52
|
};
|
|
54
|
-
readonly 'fg
|
|
53
|
+
readonly 'fg-disabled': {
|
|
55
54
|
readonly value: "rgb(0 0 0 / 25%)";
|
|
56
55
|
};
|
|
57
|
-
readonly 'fg
|
|
56
|
+
readonly 'fg-danger': {
|
|
58
57
|
readonly value: "#ff4d4f";
|
|
59
58
|
};
|
|
60
|
-
readonly 'fg
|
|
59
|
+
readonly 'fg-warning': {
|
|
61
60
|
readonly value: "#faad14";
|
|
62
61
|
};
|
|
63
|
-
readonly 'fg
|
|
62
|
+
readonly 'fg-success': {
|
|
64
63
|
readonly value: "#52c41a";
|
|
65
64
|
};
|
|
66
|
-
readonly 'fg
|
|
65
|
+
readonly 'fg-info': {
|
|
67
66
|
readonly value: "#1677ff";
|
|
68
67
|
};
|
|
69
68
|
readonly border: {
|
|
70
69
|
readonly value: "#d9d9d9";
|
|
71
70
|
};
|
|
72
|
-
readonly 'border
|
|
71
|
+
readonly 'border-muted': {
|
|
73
72
|
readonly value: "#f0f0f0";
|
|
74
73
|
};
|
|
75
|
-
readonly 'border
|
|
74
|
+
readonly 'border-subtle': {
|
|
76
75
|
readonly value: "#fafafa";
|
|
77
76
|
};
|
|
78
|
-
readonly 'border
|
|
77
|
+
readonly 'border-emphasized': {
|
|
79
78
|
readonly value: "#d9d9d9";
|
|
80
79
|
};
|
|
81
|
-
readonly 'border
|
|
80
|
+
readonly 'border-inverted': {
|
|
82
81
|
readonly value: "#434343";
|
|
83
82
|
};
|
|
84
|
-
readonly 'border
|
|
83
|
+
readonly 'border-danger': {
|
|
85
84
|
readonly value: "#ff4d4f";
|
|
86
85
|
};
|
|
87
|
-
readonly 'border
|
|
86
|
+
readonly 'border-warning': {
|
|
88
87
|
readonly value: "#faad14";
|
|
89
88
|
};
|
|
90
|
-
readonly 'border
|
|
89
|
+
readonly 'border-success': {
|
|
91
90
|
readonly value: "#52c41a";
|
|
92
91
|
};
|
|
93
|
-
readonly 'border
|
|
92
|
+
readonly 'border-info': {
|
|
94
93
|
readonly value: "#1677ff";
|
|
95
94
|
};
|
|
96
|
-
readonly '
|
|
95
|
+
readonly 'accent-contrast': {
|
|
97
96
|
readonly value: "#ffffff";
|
|
98
97
|
};
|
|
99
|
-
readonly '
|
|
100
|
-
readonly value: "rgb(0 0 0 / 88%)";
|
|
101
|
-
};
|
|
102
|
-
readonly 'gray.subtle': {
|
|
103
|
-
readonly value: "#fafafa";
|
|
104
|
-
};
|
|
105
|
-
readonly 'gray.muted': {
|
|
106
|
-
readonly value: "#f5f5f5";
|
|
107
|
-
};
|
|
108
|
-
readonly 'gray.emphasized': {
|
|
109
|
-
readonly value: "#d9d9d9";
|
|
110
|
-
};
|
|
111
|
-
readonly 'gray.solid': {
|
|
112
|
-
readonly value: "#1f1f1f";
|
|
113
|
-
};
|
|
114
|
-
readonly 'gray.focus-ring': {
|
|
115
|
-
readonly value: "rgb(0 0 0 / 15%)";
|
|
116
|
-
};
|
|
117
|
-
readonly 'gray.border': {
|
|
118
|
-
readonly value: "#d9d9d9";
|
|
119
|
-
};
|
|
120
|
-
readonly 'blue.contrast': {
|
|
121
|
-
readonly value: "#ffffff";
|
|
122
|
-
};
|
|
123
|
-
readonly 'blue.fg': {
|
|
98
|
+
readonly 'accent-fg': {
|
|
124
99
|
readonly value: "#1677ff";
|
|
125
100
|
};
|
|
126
|
-
readonly '
|
|
101
|
+
readonly 'accent-subtle': {
|
|
127
102
|
readonly value: "#e6f4ff";
|
|
128
103
|
};
|
|
129
|
-
readonly '
|
|
104
|
+
readonly 'accent-muted': {
|
|
130
105
|
readonly value: "#bae0ff";
|
|
131
106
|
};
|
|
132
|
-
readonly '
|
|
107
|
+
readonly 'accent-emphasized': {
|
|
133
108
|
readonly value: "#69b1ff";
|
|
134
109
|
};
|
|
135
|
-
readonly '
|
|
110
|
+
readonly 'accent-solid': {
|
|
136
111
|
readonly value: "#1677ff";
|
|
137
112
|
};
|
|
138
|
-
readonly '
|
|
113
|
+
readonly 'accent-hover': {
|
|
139
114
|
readonly value: "#4096ff";
|
|
140
115
|
};
|
|
141
|
-
readonly '
|
|
116
|
+
readonly 'accent-active': {
|
|
142
117
|
readonly value: "#0958d9";
|
|
143
118
|
};
|
|
144
|
-
readonly '
|
|
119
|
+
readonly 'accent-focus-ring': {
|
|
145
120
|
readonly value: "rgb(21 112 239 / 25%)";
|
|
146
121
|
};
|
|
147
|
-
readonly '
|
|
122
|
+
readonly 'accent-border': {
|
|
148
123
|
readonly value: "#1677ff";
|
|
149
124
|
};
|
|
150
|
-
readonly '
|
|
125
|
+
readonly 'danger-contrast': {
|
|
151
126
|
readonly value: "#ffffff";
|
|
152
127
|
};
|
|
153
|
-
readonly '
|
|
128
|
+
readonly 'danger-fg': {
|
|
154
129
|
readonly value: "#ff4d4f";
|
|
155
130
|
};
|
|
156
|
-
readonly '
|
|
131
|
+
readonly 'danger-subtle': {
|
|
157
132
|
readonly value: "#fff1f0";
|
|
158
133
|
};
|
|
159
|
-
readonly '
|
|
134
|
+
readonly 'danger-muted': {
|
|
160
135
|
readonly value: "#ffccc7";
|
|
161
136
|
};
|
|
162
|
-
readonly '
|
|
137
|
+
readonly 'danger-emphasized': {
|
|
163
138
|
readonly value: "#ffa39e";
|
|
164
139
|
};
|
|
165
|
-
readonly '
|
|
140
|
+
readonly 'danger-solid': {
|
|
166
141
|
readonly value: "#ff4d4f";
|
|
167
142
|
};
|
|
168
|
-
readonly '
|
|
143
|
+
readonly 'danger-hover': {
|
|
169
144
|
readonly value: "#ff7875";
|
|
170
145
|
};
|
|
171
|
-
readonly '
|
|
146
|
+
readonly 'danger-active': {
|
|
172
147
|
readonly value: "#d9363e";
|
|
173
148
|
};
|
|
174
|
-
readonly '
|
|
149
|
+
readonly 'danger-focus-ring': {
|
|
175
150
|
readonly value: "rgb(255 77 79 / 25%)";
|
|
176
151
|
};
|
|
177
|
-
readonly '
|
|
152
|
+
readonly 'danger-border': {
|
|
178
153
|
readonly value: "#ff4d4f";
|
|
179
154
|
};
|
|
155
|
+
readonly 'warning-contrast': {
|
|
156
|
+
readonly value: "#ffffff";
|
|
157
|
+
};
|
|
158
|
+
readonly 'warning-fg': {
|
|
159
|
+
readonly value: "#faad14";
|
|
160
|
+
};
|
|
161
|
+
readonly 'warning-subtle': {
|
|
162
|
+
readonly value: "#fff7ed";
|
|
163
|
+
};
|
|
164
|
+
readonly 'warning-muted': {
|
|
165
|
+
readonly value: "#ffe7ba";
|
|
166
|
+
};
|
|
167
|
+
readonly 'warning-emphasized': {
|
|
168
|
+
readonly value: "#ffd666";
|
|
169
|
+
};
|
|
170
|
+
readonly 'warning-solid': {
|
|
171
|
+
readonly value: "#faad14";
|
|
172
|
+
};
|
|
173
|
+
readonly 'warning-hover': {
|
|
174
|
+
readonly value: "#ffc53d";
|
|
175
|
+
};
|
|
176
|
+
readonly 'warning-active': {
|
|
177
|
+
readonly value: "#d48806";
|
|
178
|
+
};
|
|
179
|
+
readonly 'warning-focus-ring': {
|
|
180
|
+
readonly value: "rgb(250 173 20 / 25%)";
|
|
181
|
+
};
|
|
182
|
+
readonly 'warning-border': {
|
|
183
|
+
readonly value: "#faad14";
|
|
184
|
+
};
|
|
185
|
+
readonly 'success-contrast': {
|
|
186
|
+
readonly value: "#ffffff";
|
|
187
|
+
};
|
|
188
|
+
readonly 'success-fg': {
|
|
189
|
+
readonly value: "#52c41a";
|
|
190
|
+
};
|
|
191
|
+
readonly 'success-subtle': {
|
|
192
|
+
readonly value: "#f0fdf4";
|
|
193
|
+
};
|
|
194
|
+
readonly 'success-muted': {
|
|
195
|
+
readonly value: "#b7eb8f";
|
|
196
|
+
};
|
|
197
|
+
readonly 'success-emphasized': {
|
|
198
|
+
readonly value: "#95de64";
|
|
199
|
+
};
|
|
200
|
+
readonly 'success-solid': {
|
|
201
|
+
readonly value: "#52c41a";
|
|
202
|
+
};
|
|
203
|
+
readonly 'success-hover': {
|
|
204
|
+
readonly value: "#73d13d";
|
|
205
|
+
};
|
|
206
|
+
readonly 'success-active': {
|
|
207
|
+
readonly value: "#389e0d";
|
|
208
|
+
};
|
|
209
|
+
readonly 'success-focus-ring': {
|
|
210
|
+
readonly value: "rgb(82 196 26 / 25%)";
|
|
211
|
+
};
|
|
212
|
+
readonly 'success-border': {
|
|
213
|
+
readonly value: "#52c41a";
|
|
214
|
+
};
|
|
215
|
+
readonly 'info-contrast': {
|
|
216
|
+
readonly value: "#ffffff";
|
|
217
|
+
};
|
|
218
|
+
readonly 'info-fg': {
|
|
219
|
+
readonly value: "#1677ff";
|
|
220
|
+
};
|
|
221
|
+
readonly 'info-subtle': {
|
|
222
|
+
readonly value: "#e6f4ff";
|
|
223
|
+
};
|
|
224
|
+
readonly 'info-muted': {
|
|
225
|
+
readonly value: "#bae0ff";
|
|
226
|
+
};
|
|
227
|
+
readonly 'info-emphasized': {
|
|
228
|
+
readonly value: "#69b1ff";
|
|
229
|
+
};
|
|
230
|
+
readonly 'info-solid': {
|
|
231
|
+
readonly value: "#1677ff";
|
|
232
|
+
};
|
|
233
|
+
readonly 'info-hover': {
|
|
234
|
+
readonly value: "#4096ff";
|
|
235
|
+
};
|
|
236
|
+
readonly 'info-active': {
|
|
237
|
+
readonly value: "#0958d9";
|
|
238
|
+
};
|
|
239
|
+
readonly 'info-focus-ring': {
|
|
240
|
+
readonly value: "rgb(21 112 239 / 25%)";
|
|
241
|
+
};
|
|
242
|
+
readonly 'info-border': {
|
|
243
|
+
readonly value: "#1677ff";
|
|
244
|
+
};
|
|
180
245
|
};
|
|
246
|
+
/**
|
|
247
|
+
* 默认颜色键列表。
|
|
248
|
+
*/
|
|
249
|
+
export declare const defaultColorKeys: Array<keyof typeof defaultColors>;
|
|
250
|
+
/**
|
|
251
|
+
* 默认颜色键类型。
|
|
252
|
+
*/
|
|
253
|
+
export type DefaultColorKey = (typeof defaultColorKeys)[number];
|
|
181
254
|
//#endregion
|