@autional-cn/tokens 0.1.0-rc
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/dist/antd-theme.d.mts +8 -0
- package/dist/antd-theme.d.ts +6 -0
- package/dist/antd-theme.js +34 -0
- package/dist/antd-theme.mjs +39 -0
- package/dist/chart.d.ts +7 -0
- package/dist/chart.js +32 -0
- package/dist/index.d.ts +508 -0
- package/dist/index.js +3 -0
- package/dist/tokens.json +527 -0
- package/fonts/LICENSE-Inter-OFL.txt +93 -0
- package/fonts/inter-latin-wght-normal.woff2 +0 -0
- package/package.json +37 -0
- package/primitives.css +525 -0
- package/profiles/developer.css +48 -0
- package/profiles/docs.css +48 -0
- package/tokens.css +384 -0
package/dist/tokens.json
ADDED
|
@@ -0,0 +1,527 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$meta": {
|
|
3
|
+
"name": "Autional Design Tokens",
|
|
4
|
+
"package": "@autional-cn/tokens",
|
|
5
|
+
"version": "0.1.0-rc",
|
|
6
|
+
"spec": 1,
|
|
7
|
+
"description": "Single source of truth for the Autional design system (canonical repo: autional-cn/ui). Edit this file, then run `pnpm gen`. Generated artifacts are committed.",
|
|
8
|
+
"conventions": {
|
|
9
|
+
"reference": "A value of the exact form {a.b.c} references another token. CSS artifacts emit var(--a-b-c); JS artifacts resolve it to the literal value (profile/mode aware).",
|
|
10
|
+
"literal": "Any other string is emitted verbatim (raw CSS syntax such as var(...) with fallbacks is allowed).",
|
|
11
|
+
"metadata": "Keys starting with $ carry notes or emission hints and are never emitted.",
|
|
12
|
+
"naming": "CSS variable name = --{namespace}-{key path joined with '-'}; e.g. core.color.primary.500 -> --color-primary-500, core['font-size'].base -> --font-size-base, core.motion['ease-out'] -> --motion-ease-out."
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"core": {
|
|
16
|
+
"color": {
|
|
17
|
+
"primary": {
|
|
18
|
+
"50": "#e8f1f8",
|
|
19
|
+
"100": "#d1e3f1",
|
|
20
|
+
"200": "#a3c7e3",
|
|
21
|
+
"300": "#75abd5",
|
|
22
|
+
"400": "#478fc7",
|
|
23
|
+
"500": "#235f84",
|
|
24
|
+
"600": "#004565",
|
|
25
|
+
"700": "#003153",
|
|
26
|
+
"800": "#002540",
|
|
27
|
+
"900": "#041d31"
|
|
28
|
+
},
|
|
29
|
+
"sky": {
|
|
30
|
+
"50": "#f2fafd",
|
|
31
|
+
"100": "#eef9fd",
|
|
32
|
+
"200": "#d5f0f9",
|
|
33
|
+
"300": "#bde6f5",
|
|
34
|
+
"400": "#a2dcf0",
|
|
35
|
+
"500": "#87ceeb",
|
|
36
|
+
"600": "#64b4d8",
|
|
37
|
+
"700": "#429bc5",
|
|
38
|
+
"800": "#2d7ca3",
|
|
39
|
+
"900": "#1c5d7e"
|
|
40
|
+
},
|
|
41
|
+
"amber": {
|
|
42
|
+
"50": "#fffcf0",
|
|
43
|
+
"100": "#fff8e6",
|
|
44
|
+
"200": "#ffefb3",
|
|
45
|
+
"300": "#ffe480",
|
|
46
|
+
"400": "#ffd94d",
|
|
47
|
+
"500": "#ffbf00",
|
|
48
|
+
"600": "#d9a300",
|
|
49
|
+
"700": "#b38700",
|
|
50
|
+
"800": "#8c6b00",
|
|
51
|
+
"900": "#664f00"
|
|
52
|
+
},
|
|
53
|
+
"neutral": {
|
|
54
|
+
"0": "#ffffff",
|
|
55
|
+
"50": "#fafbfc",
|
|
56
|
+
"100": "#f7fafd",
|
|
57
|
+
"200": "#eef2f6",
|
|
58
|
+
"300": "#dce3ea",
|
|
59
|
+
"400": "#b0bcc8",
|
|
60
|
+
"500": "#8896a6",
|
|
61
|
+
"600": "#64748b",
|
|
62
|
+
"700": "#475569",
|
|
63
|
+
"800": "#334155",
|
|
64
|
+
"900": "#1e293b"
|
|
65
|
+
},
|
|
66
|
+
"success": "#52c41a",
|
|
67
|
+
"warning": "#faad14",
|
|
68
|
+
"danger": "#ff4d4f",
|
|
69
|
+
"danger-text": "#c62828",
|
|
70
|
+
"success-text": "#2e7213",
|
|
71
|
+
"success-soft": "#ebfbe5",
|
|
72
|
+
"warning-soft": "#fef4e1",
|
|
73
|
+
"danger-soft": "#fce4e4",
|
|
74
|
+
"$soft-note": "语义色的**柔和容器档**(浅底色)。U66 第⑤项:原来只有实心值,于是各站被迫写 bg-emerald-50 text-emerald-600 这类非设计系统色的组合。取值不是随手调的淡色——每一档都与对应的 -text 令牌配对,保证其上正文达到 4.5:1:success 5.51 / warning 4.85 / danger 4.65。暗色下换成深色调(见 modes.dark),在深色下 -text 解析为实心色,配深色调同样 ≥4.5。info 暂不提供柔和档:设计系统没有 info-text 令牌,补齐它属于另一个决定,不在这批里顺手加。",
|
|
75
|
+
"warning-text": "#966003",
|
|
76
|
+
"text-disabled": "{color.neutral.400}",
|
|
77
|
+
"$semantic-text-note": "语义色分「填充」与「文本」两档,因为同一个色不可能既是好填充又是好文本。success #52c41a 对白底只有 2.27:1、warning #faad14 只有 1.90:1 —— 当填充没问题,当文字不可读。原设计只有 danger-text,缺 success/warning 的文本档,结果舰队各自发明:#3f8600(antd green-7,对页底 4.39,仍不达 AA)、#d97706(3.07)。现在补齐,且新值不是外来色:success-text 是 DS success 同色相(hsl 103)压暗到 26% 明度(5.94:1),warning-text 是 DS warning 同色相(hsl 38)压暗到 30%(5.29:1)。暗色下规则更简单——直接复用填充色:success-text = success、warning-text = warning(对深底 7.57 / 9.02)。text-disabled 是禁用态,WCAG 对禁用控件豁免对比度要求,但仍登记为令牌,免得每个站点自己发明一个灰。",
|
|
78
|
+
"info": "#1890ff",
|
|
79
|
+
"chart": {
|
|
80
|
+
"1": "#003153",
|
|
81
|
+
"2": "#235f84",
|
|
82
|
+
"3": "#429bc5",
|
|
83
|
+
"4": "#b38700",
|
|
84
|
+
"5": "#664f00",
|
|
85
|
+
"6": "#059669",
|
|
86
|
+
"7": "#8b5cf6",
|
|
87
|
+
"8": "#ef4444"
|
|
88
|
+
},
|
|
89
|
+
"$chart-note": "Categorical series colors. chart-1 = primary-700 (#003153) keeps single-series charts on the brand anchor; 2..8 alternate hue family so adjacent series differ in both hue and lightness. Six hue families (navy x2, sky, amber x2, emerald, violet, red). All eight are pinned literals rather than {color.*} references, deliberately: the docs and developer profiles redefine the primary/sky/amber scales as their own tint, so while chart-3/4/5 still referenced sky-700/amber-700/amber-900 they silently followed that tint, and the docs-dark context fell to a worst pair of dE 10.7 normal / 8.4 deuteranopia -- worse than the palette this change fixes. Categorical series colors are a system-level property, not a per-portal branding property: two portals drawing the same chart must draw it in the same colors, or they stop looking like one product. Pinning also forces any future palette change through the token lock instead of letting it ride along with an unrelated palette edit. chart-6/7/8 are the hues the fleet (admin/platform/security consoles) had already converged on, adopted into the design system instead of forcing a 3-hue primary/sky/amber palette on 8 series. Measured with CIE76 dE and a Vienot-1999 deuteranopia simulation: previous palette (primary/sky/amber only) had a worst pair of dE 6.9 normal / 7.2 deuteranopia -- chart-1 primary-700 vs chart-8 primary-800 are both near-black navy and effectively indistinguishable -- and three of its eight colors failed WCAG 1.4.11 non-text contrast on white (amber-500 1.65:1, sky-500 1.74:1, primary-300 2.46:1). This palette has a worst pair of dE 19.8 normal / 17.0 deuteranopia and all eight clear 3:1 on white. Values are locked by verification/contrast-pairs.json and the palette is asserted by scripts/check-chart-palette.mjs. Status-like series (healthy/unhealthy, delivered/failed) use semantic colors (success/warning/danger), never chart-N.",
|
|
90
|
+
"method": {
|
|
91
|
+
"get": "{color.primary.600}",
|
|
92
|
+
"post": "{color.success}",
|
|
93
|
+
"put": "{color.amber.600}",
|
|
94
|
+
"patch": "{color.sky.600}",
|
|
95
|
+
"delete": "{color.danger}",
|
|
96
|
+
"head": "{color.neutral.500}"
|
|
97
|
+
},
|
|
98
|
+
"bg-primary": "{color.neutral.50}",
|
|
99
|
+
"bg-surface": "{color.neutral.0}",
|
|
100
|
+
"bg-elevated": "{color.neutral.0}",
|
|
101
|
+
"bg-muted": "#f8fbfe",
|
|
102
|
+
"bg-developer": "#031425",
|
|
103
|
+
"text-primary": "{color.primary.900}",
|
|
104
|
+
"text-secondary": "{color.primary.600}",
|
|
105
|
+
"text-muted": "#64748d",
|
|
106
|
+
"text-inverse": "#f8fbfe",
|
|
107
|
+
"border": "{color.border-subtle}",
|
|
108
|
+
"border-subtle": "{color.primary.200}",
|
|
109
|
+
"border-strong": "#2d7ca3",
|
|
110
|
+
"brand-base": "{color.primary.700}",
|
|
111
|
+
"brand-hover-base": "{color.primary.600}",
|
|
112
|
+
"brand-dark": "{color.sky.500}",
|
|
113
|
+
"brand-dark-hover": "{color.sky.400}",
|
|
114
|
+
"on-brand-base": "#ffffff",
|
|
115
|
+
"on-brand": "{color.on-brand-base}",
|
|
116
|
+
"on-brand-dark": "#0a0f1a",
|
|
117
|
+
"brand": "{color.brand-base}",
|
|
118
|
+
"brand-hover": "{color.brand-hover-base}",
|
|
119
|
+
"brand-soft": "{color.sky.300}",
|
|
120
|
+
"brand-active": "{color.primary.800}",
|
|
121
|
+
"accent": "{color.amber.500}"
|
|
122
|
+
},
|
|
123
|
+
"font": {
|
|
124
|
+
"sans": [
|
|
125
|
+
"Inter",
|
|
126
|
+
"-apple-system",
|
|
127
|
+
"Segoe UI",
|
|
128
|
+
"PingFang SC",
|
|
129
|
+
"Microsoft YaHei",
|
|
130
|
+
"Noto Sans CJK SC",
|
|
131
|
+
"sans-serif"
|
|
132
|
+
],
|
|
133
|
+
"serif": [
|
|
134
|
+
"Source Han Serif SC",
|
|
135
|
+
"Noto Serif SC",
|
|
136
|
+
"serif"
|
|
137
|
+
],
|
|
138
|
+
"mono": [
|
|
139
|
+
"JetBrains Mono",
|
|
140
|
+
"Fira Code",
|
|
141
|
+
"Consolas",
|
|
142
|
+
"monospace"
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
"$font-note": "Latin: self-hosted Inter (@fontsource). CJK: system stack only (PingFang SC / Microsoft YaHei / Noto Sans CJK SC) — CJK webfonts exceed 2MB and are not acceptable for LCP on Vercel + mainland China.",
|
|
146
|
+
"$font-size-note": "4xl(36px) 补的是阶梯自身的洞:3xl(30) → display-lg(40) 原本是 ×1.333,是全阶梯最大跳跃(其余相邻比均 ≤ ×1.25)。插入 36 后拆成 30→36 的 ×1.2 与 36→40 的 ×1.111,两个都回到家族内。选 36 不是迁就消费方,而是 ×1.2 作用于 30 的结果,恰好与站群事实上的页面标题档一致(text-4xl 68 处 / 覆盖全部 14 个站点),因此这一档也是站群迁到品牌阶梯的前置条件——舰队同时使用 30(text-3xl 63 处) / 36(text-4xl 68 处) / 48(text-5xl 40 处) 三档,而阶梯原本只有 30 和 48。lineHeight 取 40px(= Tailwind 默认的 2.5rem 而不是重算)是为了让已有的 text-4xl 用法切到本令牌时零渲染变化;同理不设 fontWeight/letterSpacing。",
|
|
147
|
+
"font-size": {
|
|
148
|
+
"xs": {
|
|
149
|
+
"size": "12px",
|
|
150
|
+
"lineHeight": "16px"
|
|
151
|
+
},
|
|
152
|
+
"sm": {
|
|
153
|
+
"size": "14px",
|
|
154
|
+
"lineHeight": "20px"
|
|
155
|
+
},
|
|
156
|
+
"base": {
|
|
157
|
+
"size": "16px",
|
|
158
|
+
"lineHeight": "24px"
|
|
159
|
+
},
|
|
160
|
+
"lg": {
|
|
161
|
+
"size": "18px",
|
|
162
|
+
"lineHeight": "28px",
|
|
163
|
+
"fontWeight": "500"
|
|
164
|
+
},
|
|
165
|
+
"xl": {
|
|
166
|
+
"size": "20px",
|
|
167
|
+
"lineHeight": "28px",
|
|
168
|
+
"fontWeight": "600"
|
|
169
|
+
},
|
|
170
|
+
"2xl": {
|
|
171
|
+
"size": "24px",
|
|
172
|
+
"lineHeight": "32px",
|
|
173
|
+
"fontWeight": "700"
|
|
174
|
+
},
|
|
175
|
+
"3xl": {
|
|
176
|
+
"size": "30px",
|
|
177
|
+
"lineHeight": "36px",
|
|
178
|
+
"fontWeight": "700"
|
|
179
|
+
},
|
|
180
|
+
"4xl": {
|
|
181
|
+
"size": "36px",
|
|
182
|
+
"lineHeight": "40px"
|
|
183
|
+
},
|
|
184
|
+
"display-2xl": {
|
|
185
|
+
"size": "72px",
|
|
186
|
+
"lineHeight": "1.16",
|
|
187
|
+
"fontWeight": "800",
|
|
188
|
+
"letterSpacing": "-0.02em"
|
|
189
|
+
},
|
|
190
|
+
"display-xl": {
|
|
191
|
+
"size": "48px",
|
|
192
|
+
"lineHeight": "1.16",
|
|
193
|
+
"fontWeight": "800",
|
|
194
|
+
"letterSpacing": "-0.02em"
|
|
195
|
+
},
|
|
196
|
+
"display-lg": {
|
|
197
|
+
"size": "40px",
|
|
198
|
+
"lineHeight": "1.2",
|
|
199
|
+
"fontWeight": "800",
|
|
200
|
+
"letterSpacing": "-0.015em"
|
|
201
|
+
},
|
|
202
|
+
"heading-lg": {
|
|
203
|
+
"size": "30px",
|
|
204
|
+
"lineHeight": "1.35",
|
|
205
|
+
"fontWeight": "700",
|
|
206
|
+
"letterSpacing": "-0.01em"
|
|
207
|
+
},
|
|
208
|
+
"heading-md": {
|
|
209
|
+
"size": "22px",
|
|
210
|
+
"lineHeight": "1.45",
|
|
211
|
+
"fontWeight": "700",
|
|
212
|
+
"letterSpacing": "0"
|
|
213
|
+
},
|
|
214
|
+
"body-lg": {
|
|
215
|
+
"size": "18px",
|
|
216
|
+
"lineHeight": "1.75"
|
|
217
|
+
},
|
|
218
|
+
"body-md": {
|
|
219
|
+
"size": "16px",
|
|
220
|
+
"lineHeight": "1.75"
|
|
221
|
+
},
|
|
222
|
+
"body-sm": {
|
|
223
|
+
"size": "14px",
|
|
224
|
+
"lineHeight": "1.6"
|
|
225
|
+
},
|
|
226
|
+
"label-md": {
|
|
227
|
+
"size": "14px",
|
|
228
|
+
"lineHeight": "1.43",
|
|
229
|
+
"fontWeight": "600"
|
|
230
|
+
},
|
|
231
|
+
"label-caps": {
|
|
232
|
+
"size": "12px",
|
|
233
|
+
"lineHeight": "1.35",
|
|
234
|
+
"fontWeight": "600",
|
|
235
|
+
"letterSpacing": "0.12em"
|
|
236
|
+
},
|
|
237
|
+
"code-md": {
|
|
238
|
+
"size": "14px",
|
|
239
|
+
"lineHeight": "1.75"
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
"space": {
|
|
243
|
+
"1": "4px",
|
|
244
|
+
"2": "8px",
|
|
245
|
+
"3": "12px",
|
|
246
|
+
"4": "16px",
|
|
247
|
+
"5": "20px",
|
|
248
|
+
"6": "24px",
|
|
249
|
+
"8": "32px",
|
|
250
|
+
"10": "40px",
|
|
251
|
+
"12": "48px",
|
|
252
|
+
"hero-gap": "40px",
|
|
253
|
+
"section-gap": "48px",
|
|
254
|
+
"$rhythm-note": "命名节奏档。U66 第⑫项:「hero-gap / section-gap 命名令牌迁移丢失(值仍在 space-10/12)」。这是「页面模式层」缺失的一个症状——数值还在,但**语义名字没了**,于是每个内容站只能自己决定「一节之间留多少」,各留各的。值与原 space-10 / space-12 完全相同,所以是零视觉变化;意义在于节奏从此有名字、可被集中调。"
|
|
255
|
+
},
|
|
256
|
+
"radius": {
|
|
257
|
+
"sm": "8px",
|
|
258
|
+
"md": "16px",
|
|
259
|
+
"lg": "24px",
|
|
260
|
+
"xl": "28px",
|
|
261
|
+
"xxl": "32px",
|
|
262
|
+
"full": "9999px"
|
|
263
|
+
},
|
|
264
|
+
"shadow": {
|
|
265
|
+
"soft": "0 8px 20px rgba(0, 49, 83, 0.08)",
|
|
266
|
+
"card": "0 12px 36px rgba(0, 49, 83, 0.10)",
|
|
267
|
+
"brand": "0 24px 80px rgba(0, 49, 83, 0.14)",
|
|
268
|
+
"code": "0 24px 60px rgba(3, 20, 37, 0.18)",
|
|
269
|
+
"deep": "0 32px 120px rgba(3, 20, 37, 0.38)",
|
|
270
|
+
"$note": "code / deep 是从 primitives.css 里**收进来**的,不是新设计。primitives.css 声称「只消费 var()」,但代码块与开发者面板两处直接写死了 box-shadow(U66 第⑦项)。收进令牌后取值与原来**逐字相同**,所以是零视觉变化;意义在于这两处阴影从此可被集中调整,而不是散在组件的样式里。另外注意它们的色相与前三个不同:前三个用 primary-700 的 rgb(0,49,83),这两个用 bg-developer 的 rgb(3,20,37)——深色面板上的阴影本就该更深。"
|
|
271
|
+
},
|
|
272
|
+
"motion": {
|
|
273
|
+
"duration-instant": "100ms",
|
|
274
|
+
"duration-fast": "150ms",
|
|
275
|
+
"duration-base": "200ms",
|
|
276
|
+
"duration-slow": "300ms",
|
|
277
|
+
"duration-slower": "500ms",
|
|
278
|
+
"ease-standard": "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
279
|
+
"ease-out": "cubic-bezier(0.16, 1, 0.3, 1)",
|
|
280
|
+
"ease-in": "cubic-bezier(0.4, 0, 1, 1)",
|
|
281
|
+
"ease-in-out": "cubic-bezier(0.65, 0, 0.35, 1)"
|
|
282
|
+
},
|
|
283
|
+
"focus": {
|
|
284
|
+
"ring-width": "2px",
|
|
285
|
+
"ring-offset": "2px",
|
|
286
|
+
"ring-color": "{color.primary.500}"
|
|
287
|
+
},
|
|
288
|
+
"z": {
|
|
289
|
+
"base": "0",
|
|
290
|
+
"dropdown": "1000",
|
|
291
|
+
"sticky": "1020",
|
|
292
|
+
"fixed": "1030",
|
|
293
|
+
"modal-backdrop": "1040",
|
|
294
|
+
"modal": "1050",
|
|
295
|
+
"popover": "1060",
|
|
296
|
+
"toast": "1070",
|
|
297
|
+
"tooltip": "1080"
|
|
298
|
+
},
|
|
299
|
+
"layout": {
|
|
300
|
+
"header-height": "64px",
|
|
301
|
+
"header-height-compact": "56px",
|
|
302
|
+
"$header-note": "站点顶栏高度。此前 14 个门户各写各的,实测跨度为 48–117px(auth h-12=48、platform h-16=64、developer 约 72、admin 用 antd Header 再加内边距)。顶栏是每个页面都出现的第一条水平线,高度不一致是最容易被一眼看穿的「不是同一个产品」。取 64px:控制台的主流值,够放 logo 与导航,也留得住内边距。compact 是移动端值,56px 仍高于 a11y.touch-target 的 44px。注意这里定的是**高度与位置**,不是内容——控制台的租户切换器与文档站的导航链接本就该不同。",
|
|
303
|
+
"max-width": "1280px",
|
|
304
|
+
"prose-width": "768px",
|
|
305
|
+
"breakpoint-sm": "640px",
|
|
306
|
+
"breakpoint-md": "768px",
|
|
307
|
+
"breakpoint-lg": "1024px",
|
|
308
|
+
"breakpoint-xl": "1280px",
|
|
309
|
+
"breakpoint-2xl": "1536px"
|
|
310
|
+
},
|
|
311
|
+
"a11y": {
|
|
312
|
+
"touch-target": "44px"
|
|
313
|
+
},
|
|
314
|
+
"image": {
|
|
315
|
+
"brand-radial": "radial-gradient(circle at top, rgba(135, 206, 235, 0.22), transparent 44%)",
|
|
316
|
+
"brand-grid": "linear-gradient(rgba(0, 49, 83, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 49, 83, 0.08) 1px, transparent 1px)",
|
|
317
|
+
"page-light": "radial-gradient(circle at top left, rgba(135, 206, 235, 0.18), transparent 28%), radial-gradient(circle at top right, rgba(255, 191, 0, 0.10), transparent 22%), linear-gradient(180deg, #f8fbfe 0%, #ffffff 26%, #f7fafd 100%)",
|
|
318
|
+
"page-dark": "radial-gradient(circle at top left, rgba(135, 206, 235, 0.12), transparent 28%), radial-gradient(circle at top right, rgba(255, 191, 0, 0.08), transparent 20%), linear-gradient(180deg, #041d31 0%, #031425 45%, #020b14 100%)"
|
|
319
|
+
},
|
|
320
|
+
"$image-note": "brand-radial/brand-grid are decorative section backdrops. page-light/page-dark are the full-page body wash applied by @autional-cn/tokens/primitives.css on content sites; the alpha values converge the former website (0.16) and docs/developer (0.18) variants onto one canonical stop."
|
|
321
|
+
},
|
|
322
|
+
"modes": {
|
|
323
|
+
"dark": {
|
|
324
|
+
"$note": "Emitted as `.dark, [data-theme=\"dark\"]`. Applies on top of any profile.",
|
|
325
|
+
"$colorScheme": "dark",
|
|
326
|
+
"color": {
|
|
327
|
+
"neutral": {
|
|
328
|
+
"0": "#0a0f1a",
|
|
329
|
+
"50": "#0f1a2e",
|
|
330
|
+
"100": "#142238",
|
|
331
|
+
"200": "#1a2a42",
|
|
332
|
+
"300": "#1f3350",
|
|
333
|
+
"400": "#2a4060",
|
|
334
|
+
"500": "#4a6585",
|
|
335
|
+
"600": "#6b8caa",
|
|
336
|
+
"700": "#8fb0cc",
|
|
337
|
+
"800": "#b5d0e6",
|
|
338
|
+
"900": "#e2edf5"
|
|
339
|
+
},
|
|
340
|
+
"bg-primary": "{color.primary.900}",
|
|
341
|
+
"bg-surface": "#0a2940",
|
|
342
|
+
"bg-elevated": "#0f3348",
|
|
343
|
+
"bg-muted": "#0a1f30",
|
|
344
|
+
"text-primary": "#f8fbfe",
|
|
345
|
+
"text-secondary": "#87ceeb",
|
|
346
|
+
"text-muted": "#8896a6",
|
|
347
|
+
"border-subtle": "#1a4a65",
|
|
348
|
+
"border-strong": "#429bc5",
|
|
349
|
+
"border": "{color.border-strong}",
|
|
350
|
+
"danger-text": "#ff4d4f",
|
|
351
|
+
"success-text": "{color.success}",
|
|
352
|
+
"success-soft": "#1c460b",
|
|
353
|
+
"warning-soft": "#503302",
|
|
354
|
+
"danger-soft": "#490909",
|
|
355
|
+
"warning-text": "{color.warning}",
|
|
356
|
+
"text-disabled": "{color.neutral.500}",
|
|
357
|
+
"brand": "{color.brand-dark}",
|
|
358
|
+
"brand-hover": "{color.brand-dark-hover}",
|
|
359
|
+
"on-brand": "{color.on-brand-dark}",
|
|
360
|
+
"brand-soft": "{color.sky.700}",
|
|
361
|
+
"chart": {
|
|
362
|
+
"1": "#75abd5",
|
|
363
|
+
"2": "#bde6f5",
|
|
364
|
+
"3": "#87ceeb",
|
|
365
|
+
"4": "#ffe480",
|
|
366
|
+
"5": "#ffbf00",
|
|
367
|
+
"6": "#6ee7b7",
|
|
368
|
+
"7": "#a78bfa",
|
|
369
|
+
"8": "#f87171"
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
"$chart-note": "Dark-mode chart series. Before this existed, core.color.chart-1..8 had no dark override at all, so any consumer that switched to the canonical chart tokens would have rendered chart-1 (primary-700 #003153) on bg-primary (neutral-900 #1e293b) at 1.07:1 -- invisible. The dark set is the same six hue families shifted to their 300/400/500 steps so it reads on a dark surface; all eight clear 3:1 against bg-primary and against bg-surface (#0a2940). Like the light set, these are pinned literals rather than references, for the same reason: a profile palette must not be able to shift categorical series colors. Worst pair dE 14.5 normal / 12.5 deuteranopia. Distinguishability is intrinsically lower in dark mode than light (only light colors are available, so the gamut compresses); that is expected, not a defect.",
|
|
373
|
+
"focus": {
|
|
374
|
+
"ring-color": "{color.sky.500}"
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
"variants": {
|
|
379
|
+
"portal": {
|
|
380
|
+
"$note": "Shared light surface for the end-user portal family (e.g. trust portal).",
|
|
381
|
+
"color": {
|
|
382
|
+
"bg-primary": "{color.neutral.0}",
|
|
383
|
+
"brand": "var(--color-brand-base, var(--color-primary-600))",
|
|
384
|
+
"brand-hover": "var(--color-brand-hover-base, var(--color-primary-500))",
|
|
385
|
+
"brand-soft": "{color.sky.400}"
|
|
386
|
+
}
|
|
387
|
+
},
|
|
388
|
+
"auth": {
|
|
389
|
+
"$note": "Auth pages family.",
|
|
390
|
+
"color": {
|
|
391
|
+
"bg-primary": "{color.neutral.0}",
|
|
392
|
+
"brand": "var(--color-brand-base, var(--color-primary-600))",
|
|
393
|
+
"brand-hover": "var(--color-brand-hover-base, var(--color-primary-500))"
|
|
394
|
+
}
|
|
395
|
+
},
|
|
396
|
+
"authenticator": {
|
|
397
|
+
"$note": "Authenticator app — deliberately dark-first, pure black. Wins over `.dark` when both apply. 它只写自己改写的那几条,其余从 dark 继承:$extends 在生成期展开,因此单独应用 [data-theme=authenticator](不带 .dark)也是一个完整的深色主题,不会回落到 core 的浅色值。",
|
|
398
|
+
"$colorScheme": "dark",
|
|
399
|
+
"$extends": "dark",
|
|
400
|
+
"color": {
|
|
401
|
+
"bg-primary": "#0a0a0a",
|
|
402
|
+
"bg-surface": "#141414",
|
|
403
|
+
"bg-elevated": "#1f1f1f",
|
|
404
|
+
"text-primary": "#f5f5f5",
|
|
405
|
+
"text-secondary": "#a3a3a3",
|
|
406
|
+
"border-subtle": "#2a2a2a",
|
|
407
|
+
"border-strong": "#666666",
|
|
408
|
+
"brand": "{color.primary.500}",
|
|
409
|
+
"brand-hover": "{color.primary.400}"
|
|
410
|
+
},
|
|
411
|
+
"focus": {
|
|
412
|
+
"ring-color": "{color.sky.500}"
|
|
413
|
+
}
|
|
414
|
+
},
|
|
415
|
+
"auth-tenant": {
|
|
416
|
+
"$kind": "runtime",
|
|
417
|
+
"$note": "Runtime variant, no stylesheet emitted. Auth pages inject a tenant brand color (derived with OKLab + WCAG contrast, see auth-pages src/lib/brand-color.ts) into these variables at page load; all brand aliases above follow automatically.",
|
|
418
|
+
"inject": [
|
|
419
|
+
"--color-brand-base",
|
|
420
|
+
"--color-brand-hover-base",
|
|
421
|
+
"--color-on-brand-base"
|
|
422
|
+
]
|
|
423
|
+
}
|
|
424
|
+
},
|
|
425
|
+
"profiles": {
|
|
426
|
+
"console": {
|
|
427
|
+
"$note": "The 8 SPA portals (admin/auth/user/security/status/trust/platform/authenticator) and the shared react UI package. Extends core without overrides — this IS the canonical baseline."
|
|
428
|
+
},
|
|
429
|
+
"marketing": {
|
|
430
|
+
"$note": "www (marketing site). Extends core without token overrides (primary/amber re-converge to core; the legacy website scale is deprecated). Distinctive: full dark-mode support via darkMode: 'class', brand-radial / brand-grid imagery (core.image). 注意:本站额外装了 @tailwindcss/typography,但那是**站点自己的 tailwind.config.cjs** 里的 plugins,不是这个 profile 或共享 preset 提供的——preset 的 plugins 是空的(typography 属于「谁要用谁装」,不该由共享 preset 强加给 14 个站)。原文写「typography plugin」容易被读成 profile 自带该能力;实测 user 站就据此以为 prose 可用,而它的构建产物里 .prose 一条规则都没有。该条已由第 14 道闸门守住。"
|
|
431
|
+
},
|
|
432
|
+
"docs": {
|
|
433
|
+
"$note": "docs.autional.cn, reference.autional.cn, wiki.autional.cn. Slightly cooler, deeper primary/sky scales and larger soft shadows.",
|
|
434
|
+
"color": {
|
|
435
|
+
"primary": {
|
|
436
|
+
"50": "#e9f3f9",
|
|
437
|
+
"100": "#d1e5f2",
|
|
438
|
+
"200": "#9ec2db",
|
|
439
|
+
"300": "#6a9fbe",
|
|
440
|
+
"400": "#3c779a",
|
|
441
|
+
"500": "#235f84",
|
|
442
|
+
"600": "#124b70",
|
|
443
|
+
"700": "#003153",
|
|
444
|
+
"800": "#032845",
|
|
445
|
+
"900": "#021c31"
|
|
446
|
+
},
|
|
447
|
+
"sky": {
|
|
448
|
+
"50": "#eef9fd",
|
|
449
|
+
"100": "#d6f0fa",
|
|
450
|
+
"200": "#b4e3f6",
|
|
451
|
+
"300": "#87ceeb",
|
|
452
|
+
"400": "#59bcde",
|
|
453
|
+
"500": "#3094b8",
|
|
454
|
+
"600": "#24778f",
|
|
455
|
+
"700": "#1f6173",
|
|
456
|
+
"800": "#1d505f",
|
|
457
|
+
"900": "#1d434f"
|
|
458
|
+
},
|
|
459
|
+
"amber": {
|
|
460
|
+
"50": "#fff8e6",
|
|
461
|
+
"100": "#ffefbf",
|
|
462
|
+
"200": "#ffdf80",
|
|
463
|
+
"300": "#ffcf40",
|
|
464
|
+
"400": "#ffc71a",
|
|
465
|
+
"500": "#ffbf00",
|
|
466
|
+
"600": "#d69f00",
|
|
467
|
+
"700": "#a67800",
|
|
468
|
+
"800": "#755400",
|
|
469
|
+
"900": "#4a3500"
|
|
470
|
+
},
|
|
471
|
+
"border-subtle": "{color.primary.100}"
|
|
472
|
+
},
|
|
473
|
+
"shadow": {
|
|
474
|
+
"soft": "0 16px 40px rgba(0, 49, 83, 0.10)",
|
|
475
|
+
"card": "0 20px 60px rgba(3, 20, 37, 0.08)",
|
|
476
|
+
"brand": "0 32px 100px rgba(3, 20, 37, 0.12)"
|
|
477
|
+
}
|
|
478
|
+
},
|
|
479
|
+
"developer": {
|
|
480
|
+
"$note": "developer.autional.cn. Same scale family as docs (the developer site historically mirrors docs).",
|
|
481
|
+
"color": {
|
|
482
|
+
"primary": {
|
|
483
|
+
"50": "#e9f3f9",
|
|
484
|
+
"100": "#d1e5f2",
|
|
485
|
+
"200": "#9ec2db",
|
|
486
|
+
"300": "#6a9fbe",
|
|
487
|
+
"400": "#3c779a",
|
|
488
|
+
"500": "#235f84",
|
|
489
|
+
"600": "#124b70",
|
|
490
|
+
"700": "#003153",
|
|
491
|
+
"800": "#032845",
|
|
492
|
+
"900": "#021c31"
|
|
493
|
+
},
|
|
494
|
+
"sky": {
|
|
495
|
+
"50": "#eef9fd",
|
|
496
|
+
"100": "#d6f0fa",
|
|
497
|
+
"200": "#b4e3f6",
|
|
498
|
+
"300": "#87ceeb",
|
|
499
|
+
"400": "#59bcde",
|
|
500
|
+
"500": "#3094b8",
|
|
501
|
+
"600": "#24778f",
|
|
502
|
+
"700": "#1f6173",
|
|
503
|
+
"800": "#1d505f",
|
|
504
|
+
"900": "#1d434f"
|
|
505
|
+
},
|
|
506
|
+
"amber": {
|
|
507
|
+
"50": "#fff8e6",
|
|
508
|
+
"100": "#ffefbf",
|
|
509
|
+
"200": "#ffdf80",
|
|
510
|
+
"300": "#ffcf40",
|
|
511
|
+
"400": "#ffc71a",
|
|
512
|
+
"500": "#ffbf00",
|
|
513
|
+
"600": "#d69f00",
|
|
514
|
+
"700": "#a67800",
|
|
515
|
+
"800": "#755400",
|
|
516
|
+
"900": "#4a3500"
|
|
517
|
+
},
|
|
518
|
+
"border-subtle": "{color.primary.100}"
|
|
519
|
+
},
|
|
520
|
+
"shadow": {
|
|
521
|
+
"soft": "0 16px 40px rgba(0, 49, 83, 0.10)",
|
|
522
|
+
"card": "0 20px 60px rgba(3, 20, 37, 0.08)",
|
|
523
|
+
"brand": "0 32px 100px rgba(3, 20, 37, 0.12)"
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter) Inter-Italic[opsz,wght].ttf: Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
http://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@autional-cn/tokens",
|
|
3
|
+
"version": "0.1.0-rc",
|
|
4
|
+
"description": "Autional canonical design tokens — CSS variables, Tailwind values, antd theme bridge, chart colors",
|
|
5
|
+
"license": "AGPL-3.0",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"tokens.css",
|
|
11
|
+
"primitives.css",
|
|
12
|
+
"profiles",
|
|
13
|
+
"fonts"
|
|
14
|
+
],
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"default": "./dist/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./tokens.css": "./tokens.css",
|
|
21
|
+
"./primitives.css": "./primitives.css",
|
|
22
|
+
"./profiles/*.css": "./profiles/*.css",
|
|
23
|
+
"./antd-theme": {
|
|
24
|
+
"types": "./dist/antd-theme.d.ts",
|
|
25
|
+
"default": "./dist/antd-theme.js"
|
|
26
|
+
},
|
|
27
|
+
"./chart": {
|
|
28
|
+
"types": "./dist/chart.d.ts",
|
|
29
|
+
"default": "./dist/chart.js"
|
|
30
|
+
},
|
|
31
|
+
"./tokens.json": "./dist/tokens.json",
|
|
32
|
+
"./package.json": "./package.json"
|
|
33
|
+
},
|
|
34
|
+
"sideEffects": [
|
|
35
|
+
"**/*.css"
|
|
36
|
+
]
|
|
37
|
+
}
|