@yunlefun/ui 0.0.2 → 0.0.3

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/index.css ADDED
@@ -0,0 +1 @@
1
+ :root,.ylf-theme-light{--ylf-c-brand: var(--ylf-palette-blue);--ylf-c-brand-hover: #1d4ed8;--ylf-c-brand-active: #1e40af;--ylf-c-brand-soft: #eff6ff;--ylf-accent-blue: var(--ylf-c-brand);--ylf-accent-blue-hover: var(--ylf-c-brand-hover);--ylf-accent-blue-soft: var(--ylf-c-brand-soft);--ylf-accent-blue-text: var(--ylf-c-brand);--ylf-accent-blue-on: var(--ylf-c-text-on-accent);--ylf-accent: var(--ylf-accent-blue);--ylf-accent-hover: var(--ylf-accent-blue-hover);--ylf-accent-soft: var(--ylf-accent-blue-soft);--ylf-accent-text: var(--ylf-accent-blue-text);--ylf-accent-on: var(--ylf-accent-blue-on);--ylf-palette-blue: #2563eb;--ylf-palette-sun: #facc15;--ylf-palette-cyan: #06b6d4;--ylf-palette-coral: #ff6b4a;--ylf-palette-pink: #ec4899;--ylf-palette-green: #22c55e;--ylf-spectrum-stops: var(--ylf-palette-blue) 0% 16.667%, var(--ylf-palette-cyan) 16.667% 33.333%, var(--ylf-palette-green) 33.333% 50%, var(--ylf-palette-sun) 50% 66.667%, var(--ylf-palette-coral) 66.667% 83.333%, var(--ylf-palette-pink) 83.333% 100%;--ylf-accent-sun: var(--ylf-palette-sun);--ylf-accent-sun-hover: #eab308;--ylf-accent-sun-soft: #fef9c3;--ylf-accent-sun-text: #854d0e;--ylf-accent-sun-on: #64380e;--ylf-accent-cyan: var(--ylf-palette-cyan);--ylf-accent-cyan-hover: #22d3ee;--ylf-accent-cyan-soft: #cffafe;--ylf-accent-cyan-text: #155e75;--ylf-accent-cyan-on: #083e4f;--ylf-accent-coral: var(--ylf-palette-coral);--ylf-accent-coral-hover: #ff856b;--ylf-accent-coral-soft: #ffede6;--ylf-accent-coral-text: #9a3412;--ylf-accent-coral-on: #551b0a;--ylf-accent-pink: var(--ylf-palette-pink);--ylf-accent-pink-hover: #f472b6;--ylf-accent-pink-soft: #fce7f3;--ylf-accent-pink-text: #9d174d;--ylf-accent-pink-on: #400a2b;--ylf-accent-green: var(--ylf-palette-green);--ylf-accent-green-hover: #4ade80;--ylf-accent-green-soft: #dcfce7;--ylf-accent-green-text: #166534;--ylf-accent-green-on: #124324;--ylf-c-feature: var(--ylf-accent-sun);--ylf-c-feature-bg: var(--ylf-accent-sun-soft);--ylf-c-feature-text: var(--ylf-c-text);--ylf-aurora-sky: var(--ylf-accent-cyan);--ylf-aurora-iris: var(--ylf-accent-coral);--ylf-aurora-pink: var(--ylf-accent-pink);--ylf-gradient-aurora: linear-gradient(var(--ylf-accent-sun), var(--ylf-accent-sun));--ylf-gradient-brand: linear-gradient(var(--ylf-c-brand), var(--ylf-c-brand));--ylf-status-success: var(--ylf-accent-green);--ylf-status-success-hover: var(--ylf-accent-green-hover);--ylf-status-success-on: var(--ylf-accent-green-on);--ylf-status-success-soft: var(--ylf-accent-green-soft);--ylf-status-success-text: var(--ylf-accent-green-text);--ylf-c-success: var(--ylf-status-success-text);--ylf-status-warning: var(--ylf-accent-sun);--ylf-status-warning-hover: var(--ylf-accent-sun-hover);--ylf-status-warning-on: var(--ylf-accent-sun-on);--ylf-status-warning-soft: var(--ylf-accent-sun-soft);--ylf-status-warning-text: var(--ylf-accent-sun-text);--ylf-c-warning: var(--ylf-status-warning-text);--ylf-status-danger: var(--ylf-accent-coral);--ylf-status-danger-hover: var(--ylf-accent-coral-hover);--ylf-status-danger-on: var(--ylf-accent-coral-on);--ylf-status-danger-soft: var(--ylf-accent-coral-soft);--ylf-status-danger-text: var(--ylf-accent-coral-text);--ylf-c-danger: var(--ylf-status-danger-text);--ylf-status-info: var(--ylf-accent-cyan);--ylf-status-info-hover: var(--ylf-accent-cyan-hover);--ylf-status-info-on: var(--ylf-accent-cyan-on);--ylf-status-info-soft: var(--ylf-accent-cyan-soft);--ylf-status-info-text: var(--ylf-accent-cyan-text);--ylf-c-info: var(--ylf-status-info-text);--ylf-c-bg: #f8fafc;--ylf-c-bg-soft: #f1f5f9;--ylf-c-bg-mute: #e2e8f0;--ylf-c-surface: #ffffff;--ylf-c-text: #0f172a;--ylf-c-text-2: #475569;--ylf-c-text-3: #64748b;--ylf-c-text-on-accent: #ffffff;--ylf-c-text-on-aurora: var(--ylf-accent-sun-on);--ylf-c-border: #e2e8f0;--ylf-c-border-strong: #cbd5e1;--ylf-c-overlay: rgba(13, 17, 32, 0.45);--ylf-glass-bg: rgba(255, 255, 255, 0.62);--ylf-glass-border: rgba(255, 255, 255, 0.7);--ylf-glass-blur: saturate(160%) blur(16px);--ylf-radius-sm: 10px;--ylf-radius: 14px;--ylf-radius-lg: 20px;--ylf-radius-xl: 28px;--ylf-radius-pill: 999px;--ylf-shadow-sm: 0 2px 8px -2px rgba(15, 23, 42, 0.12);--ylf-shadow: 0 10px 28px -8px rgba(15, 23, 42, 0.16);--ylf-shadow-lg: 0 22px 56px -14px rgba(15, 23, 42, 0.22);--ylf-glow-brand: 0 6px 18px -8px rgba(37, 99, 235, 0.35);--ylf-glow-brand-hover: 0 8px 22px -8px rgba(37, 99, 235, 0.4);--ylf-glow-aurora: var(--ylf-shadow-sm);--ylf-glow-aurora-hover: var(--ylf-shadow-sm);--ylf-font-display: 'Baloo 2', 'ZCOOL KuaiLe', ui-rounded, 'Hiragino Maru Gothic ProN', 'Hiragino Maru Gothic Pro', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', 'Source Han Sans SC', sans-serif;--ylf-font-wordmark: var(--ylf-font-display);--ylf-font-heading: ui-rounded, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', 'Source Han Sans SC', system-ui, sans-serif;--ylf-font-body: 'Inter', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;--ylf-font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;--ylf-text-xs: 0.75rem;--ylf-text-sm: 0.875rem;--ylf-text-base: 1rem;--ylf-text-lg: 1.25rem;--ylf-text-xl: 1.5rem;--ylf-text-2xl: 2rem;--ylf-text-display: clamp(2.25rem, 4.5vw, 4rem);--ylf-leading-heading: 1.25;--ylf-leading-body: 1.75;--ylf-space-1: 4px;--ylf-space-2: 8px;--ylf-space-3: 12px;--ylf-space-4: 16px;--ylf-space-6: 24px;--ylf-space-8: 32px;--ylf-space-12: 48px;--ylf-space-16: 64px;--ylf-layout-page: 1200px;--ylf-layout-reading: 720px;--ylf-grid-size: 32px;--ylf-c-grid: rgba(37, 99, 235, 0.06);--ylf-c-sky: #dbeafe;--ylf-c-cloud: #ffffff;--ylf-duration-fast: 160ms;--ylf-duration-normal: 240ms;--ylf-ease-standard: cubic-bezier(0.2, 0, 0, 1);--ylf-ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);--ylf-c-primary: var(--ylf-c-brand);--ylf-c-text-light: var(--ylf-c-text-2);--ylf-c-text-lighter: var(--ylf-c-text-3);--ylf-c-text-lightest: var(--ylf-c-border-strong);--ylf-c-bg-light: var(--ylf-c-bg-soft);--ylf-c-bg-lighter: var(--ylf-c-bg-mute)}.dark,.ylf-theme-dark{--ylf-c-brand: #60a5fa;--ylf-c-brand-hover: #93c5fd;--ylf-c-brand-active: #3b82f6;--ylf-c-brand-soft: #172554;--ylf-accent-blue: var(--ylf-c-brand);--ylf-accent-blue-hover: var(--ylf-c-brand-hover);--ylf-accent-blue-soft: var(--ylf-c-brand-soft);--ylf-accent-blue-text: var(--ylf-c-brand);--ylf-accent-blue-on: var(--ylf-c-text-on-accent);--ylf-accent: var(--ylf-accent-blue);--ylf-accent-hover: var(--ylf-accent-blue-hover);--ylf-accent-soft: var(--ylf-accent-blue-soft);--ylf-accent-text: var(--ylf-accent-blue-text);--ylf-accent-on: var(--ylf-accent-blue-on);--ylf-accent-sun-soft: #30290f;--ylf-accent-sun-text: #fde047;--ylf-accent-cyan-soft: #10313d;--ylf-accent-cyan-text: #67e8f9;--ylf-accent-coral-soft: #39231f;--ylf-accent-coral-text: #fda48c;--ylf-accent-pink-soft: #351e32;--ylf-accent-pink-text: #f9a8d4;--ylf-accent-green-soft: #142e26;--ylf-accent-green-text: #86efac;--ylf-status-success: var(--ylf-accent-green);--ylf-status-success-hover: var(--ylf-accent-green-hover);--ylf-status-success-on: var(--ylf-accent-green-on);--ylf-status-success-soft: var(--ylf-accent-green-soft);--ylf-status-success-text: var(--ylf-accent-green-text);--ylf-c-success: var(--ylf-status-success-text);--ylf-status-warning: var(--ylf-accent-sun);--ylf-status-warning-hover: var(--ylf-accent-sun-hover);--ylf-status-warning-on: var(--ylf-accent-sun-on);--ylf-status-warning-soft: var(--ylf-accent-sun-soft);--ylf-status-warning-text: var(--ylf-accent-sun-text);--ylf-c-warning: var(--ylf-status-warning-text);--ylf-status-danger: var(--ylf-accent-coral);--ylf-status-danger-hover: var(--ylf-accent-coral-hover);--ylf-status-danger-on: var(--ylf-accent-coral-on);--ylf-status-danger-soft: var(--ylf-accent-coral-soft);--ylf-status-danger-text: var(--ylf-accent-coral-text);--ylf-c-danger: var(--ylf-status-danger-text);--ylf-status-info: var(--ylf-accent-cyan);--ylf-status-info-hover: var(--ylf-accent-cyan-hover);--ylf-status-info-on: var(--ylf-accent-cyan-on);--ylf-status-info-soft: var(--ylf-accent-cyan-soft);--ylf-status-info-text: var(--ylf-accent-cyan-text);--ylf-c-info: var(--ylf-status-info-text);--ylf-c-feature-bg: var(--ylf-accent-sun-soft);--ylf-c-feature-text: var(--ylf-c-text);--ylf-gradient-brand: linear-gradient(var(--ylf-c-brand), var(--ylf-c-brand));--ylf-c-bg: #0b1022;--ylf-c-bg-soft: #0f1630;--ylf-c-bg-mute: #1f2a47;--ylf-c-surface: #121a30;--ylf-c-text: #e5e7eb;--ylf-c-text-2: #cbd5e1;--ylf-c-text-3: #94a3b8;--ylf-c-text-on-accent: #0f172a;--ylf-c-border: #2a3658;--ylf-c-border-strong: #3c4c74;--ylf-c-overlay: rgba(3, 6, 18, 0.7);--ylf-c-grid: rgba(96, 165, 250, 0.08);--ylf-c-sky: #172554;--ylf-c-cloud: #1f2a47;--ylf-glass-bg: rgba(18, 26, 48, 0.55);--ylf-glass-border: rgba(96, 165, 250, 0.18);--ylf-shadow-sm: 0 2px 10px -2px rgba(0, 0, 0, 0.5);--ylf-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.55);--ylf-shadow-lg: 0 24px 60px -14px rgba(0, 0, 0, 0.6);--ylf-glow-brand: 0 6px 18px -8px rgba(96, 165, 250, 0.3);--ylf-glow-brand-hover: 0 8px 22px -8px rgba(96, 165, 250, 0.4);--ylf-glow-aurora: var(--ylf-shadow-sm);--ylf-glow-aurora-hover: var(--ylf-shadow-sm)}@media(prefers-reduced-motion: reduce){:root,.ylf-theme-light,.ylf-theme-dark{--ylf-duration-fast: 0ms;--ylf-duration-normal: 0ms}}[data-ylf-tone=blue]{--ylf-accent-blue: var(--ylf-c-brand);--ylf-accent-blue-hover: var(--ylf-c-brand-hover);--ylf-accent-blue-soft: var(--ylf-c-brand-soft);--ylf-accent-blue-text: var(--ylf-c-brand);--ylf-accent-blue-on: var(--ylf-c-text-on-accent);--ylf-accent: var(--ylf-accent-blue);--ylf-accent-hover: var(--ylf-accent-blue-hover);--ylf-accent-soft: var(--ylf-accent-blue-soft);--ylf-accent-text: var(--ylf-accent-blue-text);--ylf-accent-on: var(--ylf-accent-blue-on)}[data-ylf-tone=sun]{--ylf-accent: var(--ylf-accent-sun);--ylf-accent-hover: var(--ylf-accent-sun-hover);--ylf-accent-soft: var(--ylf-accent-sun-soft);--ylf-accent-text: var(--ylf-accent-sun-text);--ylf-accent-on: var(--ylf-accent-sun-on)}[data-ylf-tone=cyan]{--ylf-accent: var(--ylf-accent-cyan);--ylf-accent-hover: var(--ylf-accent-cyan-hover);--ylf-accent-soft: var(--ylf-accent-cyan-soft);--ylf-accent-text: var(--ylf-accent-cyan-text);--ylf-accent-on: var(--ylf-accent-cyan-on)}[data-ylf-tone=coral]{--ylf-accent: var(--ylf-accent-coral);--ylf-accent-hover: var(--ylf-accent-coral-hover);--ylf-accent-soft: var(--ylf-accent-coral-soft);--ylf-accent-text: var(--ylf-accent-coral-text);--ylf-accent-on: var(--ylf-accent-coral-on)}[data-ylf-tone=pink]{--ylf-accent: var(--ylf-accent-pink);--ylf-accent-hover: var(--ylf-accent-pink-hover);--ylf-accent-soft: var(--ylf-accent-pink-soft);--ylf-accent-text: var(--ylf-accent-pink-text);--ylf-accent-on: var(--ylf-accent-pink-on)}[data-ylf-tone=green]{--ylf-accent: var(--ylf-accent-green);--ylf-accent-hover: var(--ylf-accent-green-hover);--ylf-accent-soft: var(--ylf-accent-green-soft);--ylf-accent-text: var(--ylf-accent-green-text);--ylf-accent-on: var(--ylf-accent-green-on)}
@@ -0,0 +1 @@
1
+ .ylf-pattern-grid{background-image:linear-gradient(var(--ylf-c-grid) 1px, transparent 1px),linear-gradient(90deg, var(--ylf-c-grid) 1px, transparent 1px);background-size:var(--ylf-grid-size) var(--ylf-grid-size)}.ylf-pattern-sky{background-color:var(--ylf-c-bg);background-image:linear-gradient(145deg, var(--ylf-c-sky), var(--ylf-c-bg) 70%)}
package/package.json CHANGED
@@ -1,30 +1,42 @@
1
1
  {
2
2
  "name": "@yunlefun/ui",
3
- "version": "0.0.2",
4
- "description": "UI for YunLeFun",
3
+ "version": "0.0.3",
4
+ "description": "Shared styles and design tokens for YunLeFun Design",
5
5
  "author": "YunLeFun",
6
6
  "homepage": "https://ui.yunle.fun",
7
7
  "repository": {
8
8
  "type": "git",
9
- "url": "https://github.com/YunLeFun/ui.git"
9
+ "url": "https://github.com/YunLeFun/design.git"
10
10
  },
11
11
  "keywords": [
12
12
  "ui",
13
13
  "css"
14
14
  ],
15
15
  "exports": {
16
+ "./css": "./dist/index.css",
17
+ "./patterns.css": "./dist/patterns.css",
16
18
  "./styles": "./styles/index.scss",
17
19
  "./styles/*": "./styles/*",
18
20
  "./*": "./*"
19
21
  },
20
22
  "files": [
23
+ "dist",
21
24
  "styles"
22
25
  ],
26
+ "scripts": {
27
+ "build": "sass styles/index.scss dist/index.css --no-source-map --style=compressed && sass styles/patterns.scss dist/patterns.css --no-source-map --style=compressed",
28
+ "prepack": "npm run build",
29
+ "release": "bumpp --no-commit --no-tag --no-push && npm publish"
30
+ },
23
31
  "peerDependencies": {
24
32
  "sass": "^1.101.0"
25
33
  },
26
- "scripts": {
27
- "build": "",
28
- "release": "bumpp --no-commit --no-tag --no-push && npm publish"
34
+ "peerDependenciesMeta": {
35
+ "sass": {
36
+ "optional": true
37
+ }
38
+ },
39
+ "devDependencies": {
40
+ "sass": "^1.101.0"
29
41
  }
30
- }
42
+ }
@@ -1,48 +1,118 @@
1
1
  // =============================================================================
2
- // 云乐坊 · 缤纷多彩 —— 「极光云 / Iridescent Cloud」 design tokens
2
+ // YunLeFun Design —— 晴空蓝为主,高饱和纯色点缀
3
3
  // -----------------------------------------------------------------------------
4
- // 品牌色不是单一色相,而是「光穿过云」的折射:
5
- // · 极光渐变 (--ylf-gradient-aurora) 是签名 —— 缤纷多彩
6
- // · 鸢尾紫 (--ylf-c-brand) 是日常锚点 —— 沉静
7
- // · 所有语义色都从这道光谱里取,于是再花哨也始终是一家人
4
+ // 晴空蓝负责主操作、链接和选中状态;明黄、青、橙、粉、绿用于有明确用途的局部强调。
5
+ // 语义色负责状态,前景与背景成组维护,明暗主题共享相同角色。
8
6
  // 组件以 var(--ylf-*) 引用这些 token(均带兜底值),加载本文件即生效。
9
7
  // =============================================================================
10
8
 
9
+ // 默认强调色跟随品牌主色,在每个明暗主题边界重新解析。
10
+ @mixin brand-accent {
11
+ --ylf-accent-blue: var(--ylf-c-brand);
12
+ --ylf-accent-blue-hover: var(--ylf-c-brand-hover);
13
+ --ylf-accent-blue-soft: var(--ylf-c-brand-soft);
14
+ --ylf-accent-blue-text: var(--ylf-c-brand);
15
+ --ylf-accent-blue-on: var(--ylf-c-text-on-accent);
16
+
17
+ --ylf-accent: var(--ylf-accent-blue);
18
+ --ylf-accent-hover: var(--ylf-accent-blue-hover);
19
+ --ylf-accent-soft: var(--ylf-accent-blue-soft);
20
+ --ylf-accent-text: var(--ylf-accent-blue-text);
21
+ --ylf-accent-on: var(--ylf-accent-blue-on);
22
+ }
23
+
24
+ // 状态与强调色共享同一色组,在每个主题范围内重新解析别名。
25
+ @mixin status-colors {
26
+ @each $status, $tone in (success: green, warning: sun, danger: coral, info: cyan) {
27
+ --ylf-status-#{$status}: var(--ylf-accent-#{$tone});
28
+ --ylf-status-#{$status}-hover: var(--ylf-accent-#{$tone}-hover);
29
+ --ylf-status-#{$status}-on: var(--ylf-accent-#{$tone}-on);
30
+ --ylf-status-#{$status}-soft: var(--ylf-accent-#{$tone}-soft);
31
+ --ylf-status-#{$status}-text: var(--ylf-accent-#{$tone}-text);
32
+ // 旧名称用于文字;实色组件使用 status / status-on 这一对。
33
+ --ylf-c-#{$status}: var(--ylf-status-#{$status}-text);
34
+ }
35
+ }
36
+
11
37
  :root,
12
38
  .ylf-theme-light {
13
- // --- brand 锚点:多巴胺鸢尾紫(高饱和、明快) --------------------------------
14
- --ylf-c-brand: #6d5cff;
15
- --ylf-c-brand-hover: #8979ff;
16
- --ylf-c-brand-active: #5a46f0;
17
- --ylf-c-brand-soft: #ece9ff;
18
-
19
- // --- aurora 极光:冷调 dreamy 渐变(蓝 → 鸢尾 → 兰紫,邻近色,不再彩虹) -----
20
- // 收敛到三色同族,去掉破坏协调的金/绿;签名一条连续的「夜空极光」丝带。
21
- --ylf-aurora-sky: #5ba3ff;
22
- --ylf-aurora-iris: #7b61ff;
23
- --ylf-aurora-pink: #e879c6;
24
- --ylf-gradient-aurora: linear-gradient(115deg, #5ba3ff 0%, #7b61ff 50%, #e879c6 100%);
25
- --ylf-gradient-brand: linear-gradient(120deg, #5ba3ff 0%, #6d5cff 55%, #8b6bff 100%);
26
-
27
- // --- semantic 多巴胺语义色(明快实色) --------------------------------------
28
- --ylf-c-success: #10c18c;
29
- --ylf-c-warning: #ffb02e;
30
- --ylf-c-danger: #ff4d6d;
31
- --ylf-c-info: #2c8cff;
39
+ // --- brand:晴空蓝 ---------------------------------------------------------
40
+ --ylf-c-brand: var(--ylf-palette-blue);
41
+ --ylf-c-brand-hover: #1d4ed8;
42
+ --ylf-c-brand-active: #1e40af;
43
+ --ylf-c-brand-soft: #eff6ff;
44
+
45
+ @include brand-accent;
46
+
47
+ // --- palette:原始色只表达色相,不直接承担状态文字 -------------------------
48
+ --ylf-palette-blue: #2563eb;
49
+ --ylf-palette-sun: #facc15;
50
+ --ylf-palette-cyan: #06b6d4;
51
+ --ylf-palette-coral: #ff6b4a;
52
+ --ylf-palette-pink: #ec4899;
53
+ --ylf-palette-green: #22c55e;
54
+
55
+ // 六段纯色拼接,用于品牌区分隔;不作为文字背景。
56
+ --ylf-spectrum-stops:
57
+ var(--ylf-palette-blue) 0% 16.667%, var(--ylf-palette-cyan) 16.667% 33.333%, var(--ylf-palette-green) 33.333% 50%,
58
+ var(--ylf-palette-sun) 50% 66.667%, var(--ylf-palette-coral) 66.667% 83.333%, var(--ylf-palette-pink) 83.333% 100%;
59
+
60
+ // --- accent:亮色、悬停、浅底与文字成组,明暗主题使用相同接口 ---------------
61
+ --ylf-accent-sun: var(--ylf-palette-sun);
62
+ --ylf-accent-sun-hover: #eab308;
63
+ --ylf-accent-sun-soft: #fef9c3;
64
+ --ylf-accent-sun-text: #854d0e;
65
+ --ylf-accent-sun-on: #64380e;
66
+ --ylf-accent-cyan: var(--ylf-palette-cyan);
67
+ --ylf-accent-cyan-hover: #22d3ee;
68
+ --ylf-accent-cyan-soft: #cffafe;
69
+ --ylf-accent-cyan-text: #155e75;
70
+ --ylf-accent-cyan-on: #083e4f;
71
+ --ylf-accent-coral: var(--ylf-palette-coral);
72
+ --ylf-accent-coral-hover: #ff856b;
73
+ --ylf-accent-coral-soft: #ffede6;
74
+ --ylf-accent-coral-text: #9a3412;
75
+ --ylf-accent-coral-on: #551b0a;
76
+ --ylf-accent-pink: var(--ylf-palette-pink);
77
+ --ylf-accent-pink-hover: #f472b6;
78
+ --ylf-accent-pink-soft: #fce7f3;
79
+ --ylf-accent-pink-text: #9d174d;
80
+ --ylf-accent-pink-on: #400a2b;
81
+ --ylf-accent-green: var(--ylf-palette-green);
82
+ --ylf-accent-green-hover: #4ade80;
83
+ --ylf-accent-green-soft: #dcfce7;
84
+ --ylf-accent-green-text: #166534;
85
+ --ylf-accent-green-on: #124324;
86
+
87
+ // 精选:明黄装饰 + 中性文字;不用于提醒或错误状态。
88
+ --ylf-c-feature: var(--ylf-accent-sun);
89
+ --ylf-c-feature-bg: var(--ylf-accent-sun-soft);
90
+ --ylf-c-feature-text: var(--ylf-c-text);
91
+
92
+ // 旧 token 仅供迁移:旧渐变已收敛为单一明黄色,不再维护紫粉极光。
93
+ --ylf-aurora-sky: var(--ylf-accent-cyan);
94
+ --ylf-aurora-iris: var(--ylf-accent-coral);
95
+ --ylf-aurora-pink: var(--ylf-accent-pink);
96
+ --ylf-gradient-aurora: linear-gradient(var(--ylf-accent-sun), var(--ylf-accent-sun));
97
+ --ylf-gradient-brand: linear-gradient(var(--ylf-c-brand), var(--ylf-c-brand));
98
+
99
+ // --- semantic:固定语义,复用多巴胺色板与对应前景 ---------------------------
100
+ @include status-colors;
32
101
 
33
102
  // --- neutrals 晴空中性色 ----------------------------------------------------
34
- --ylf-c-bg: #fbfcff;
35
- --ylf-c-bg-soft: #f2f5fc;
36
- --ylf-c-bg-mute: #e8ecf7;
103
+ --ylf-c-bg: #f8fafc;
104
+ --ylf-c-bg-soft: #f1f5f9;
105
+ --ylf-c-bg-mute: #e2e8f0;
37
106
  --ylf-c-surface: #ffffff;
38
107
 
39
- --ylf-c-text: #1b2238;
40
- --ylf-c-text-2: #5a6178;
41
- --ylf-c-text-3: #9098ad;
108
+ --ylf-c-text: #0f172a;
109
+ --ylf-c-text-2: #475569;
110
+ --ylf-c-text-3: #64748b;
42
111
  --ylf-c-text-on-accent: #ffffff;
112
+ --ylf-c-text-on-aurora: var(--ylf-accent-sun-on);
43
113
 
44
- --ylf-c-border: #e5e9f3;
45
- --ylf-c-border-strong: #d3d9ea;
114
+ --ylf-c-border: #e2e8f0;
115
+ --ylf-c-border-strong: #cbd5e1;
46
116
  --ylf-c-overlay: rgba(13, 17, 32, 0.45);
47
117
 
48
118
  // --- glass 云玻璃 -----------------------------------------------------------
@@ -58,12 +128,14 @@
58
128
  --ylf-radius-pill: 999px;
59
129
 
60
130
  // --- shadow 色染柔影(投影带品牌色而非灰) ----------------------------------
61
- --ylf-shadow-sm: 0 2px 8px -2px rgba(110, 123, 255, 0.16);
62
- --ylf-shadow: 0 10px 28px -8px rgba(110, 123, 255, 0.22);
63
- --ylf-shadow-lg: 0 22px 56px -14px rgba(109, 92, 255, 0.3);
64
- // 实色主按钮辉光(品牌色);极光辉光留给 aurora 变体
65
- --ylf-glow-brand: 0 10px 30px -6px rgba(109, 92, 255, 0.45);
66
- --ylf-glow-aurora: 0 10px 30px -6px rgba(124, 92, 255, 0.5);
131
+ --ylf-shadow-sm: 0 2px 8px -2px rgba(15, 23, 42, 0.12);
132
+ --ylf-shadow: 0 10px 28px -8px rgba(15, 23, 42, 0.16);
133
+ --ylf-shadow-lg: 0 22px 56px -14px rgba(15, 23, 42, 0.22);
134
+ // 旧阴影名保留别名,新组件使用表面阴影
135
+ --ylf-glow-brand: 0 6px 18px -8px rgba(37, 99, 235, 0.35);
136
+ --ylf-glow-brand-hover: 0 8px 22px -8px rgba(37, 99, 235, 0.4);
137
+ --ylf-glow-aurora: var(--ylf-shadow-sm);
138
+ --ylf-glow-aurora-hover: var(--ylf-shadow-sm);
67
139
 
68
140
  // --- typography -------------------------------------------------------------
69
141
  // 圆体做展示字,呼应「云是软的」:拉丁 Baloo 2 + 中文 ZCOOL KuaiLe 站酷快乐体
@@ -79,9 +151,45 @@
79
151
  'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', 'Source Han Sans SC', sans-serif;
80
152
  // 品牌字 wordmark(如「云乐坊」):目前等同 display,独立 token 便于单独调校字重/字距
81
153
  --ylf-font-wordmark: var(--ylf-font-display);
154
+ // 产品标题:页面、区块与卡片标题默认使用系统圆润无衬线,不触发 webfont 下载
155
+ // 与 display 分开,避免站酷快乐体、楷体等装饰字体进入密集产品界面。
156
+ --ylf-font-heading:
157
+ ui-rounded, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', 'Source Han Sans SC', system-ui,
158
+ sans-serif;
82
159
  --ylf-font-body: 'Inter', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
83
160
 
161
+ // --- scale:字号、间距与阅读宽度 --------------------------------------------
162
+ --ylf-font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
163
+ --ylf-text-xs: 0.75rem;
164
+ --ylf-text-sm: 0.875rem;
165
+ --ylf-text-base: 1rem;
166
+ --ylf-text-lg: 1.25rem;
167
+ --ylf-text-xl: 1.5rem;
168
+ --ylf-text-2xl: 2rem;
169
+ --ylf-text-display: clamp(2.25rem, 4.5vw, 4rem);
170
+ --ylf-leading-heading: 1.25;
171
+ --ylf-leading-body: 1.75;
172
+ --ylf-space-1: 4px;
173
+ --ylf-space-2: 8px;
174
+ --ylf-space-3: 12px;
175
+ --ylf-space-4: 16px;
176
+ --ylf-space-6: 24px;
177
+ --ylf-space-8: 32px;
178
+ --ylf-space-12: 48px;
179
+ --ylf-space-16: 64px;
180
+ --ylf-layout-page: 1200px;
181
+ --ylf-layout-reading: 720px;
182
+
183
+ // --- atmosphere:可选网格与晴空背景,不自动应用到业务页面 --------------------
184
+ --ylf-grid-size: 32px;
185
+ --ylf-c-grid: rgba(37, 99, 235, 0.06);
186
+ --ylf-c-sky: #dbeafe;
187
+ --ylf-c-cloud: #ffffff;
188
+
84
189
  // --- transition -------------------------------------------------------------
190
+ --ylf-duration-fast: 160ms;
191
+ --ylf-duration-normal: 240ms;
192
+ --ylf-ease-standard: cubic-bezier(0.2, 0, 0, 1);
85
193
  --ylf-ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
86
194
 
87
195
  // --- 向后兼容别名(旧组件仍在用) -------------------------------------------
@@ -95,36 +203,111 @@
95
203
 
96
204
  .dark,
97
205
  .ylf-theme-dark {
98
- --ylf-c-brand: #8e7cff;
99
- --ylf-c-brand-hover: #a99bff;
100
- --ylf-c-brand-active: #7565f5;
101
- --ylf-c-brand-soft: #231d52;
206
+ --ylf-c-brand: #60a5fa;
207
+ --ylf-c-brand-hover: #93c5fd;
208
+ --ylf-c-brand-active: #3b82f6;
209
+ --ylf-c-brand-soft: #172554;
210
+
211
+ @include brand-accent;
212
+
213
+ --ylf-accent-sun-soft: #30290f;
214
+ --ylf-accent-sun-text: #fde047;
215
+ --ylf-accent-cyan-soft: #10313d;
216
+ --ylf-accent-cyan-text: #67e8f9;
217
+ --ylf-accent-coral-soft: #39231f;
218
+ --ylf-accent-coral-text: #fda48c;
219
+ --ylf-accent-pink-soft: #351e32;
220
+ --ylf-accent-pink-text: #f9a8d4;
221
+ --ylf-accent-green-soft: #142e26;
222
+ --ylf-accent-green-text: #86efac;
102
223
 
103
- --ylf-c-success: #2ee0a6;
104
- --ylf-c-warning: #ffc04d;
105
- --ylf-c-danger: #ff6b85;
106
- --ylf-c-info: #59abff;
224
+ @include status-colors;
225
+
226
+ // 在局部夜空预览中也重新解析派生变量。
227
+ --ylf-c-feature-bg: var(--ylf-accent-sun-soft);
228
+ --ylf-c-feature-text: var(--ylf-c-text);
229
+ --ylf-gradient-brand: linear-gradient(var(--ylf-c-brand), var(--ylf-c-brand));
107
230
 
108
231
  // 深色 = 夜空(不是死黑,是深蓝夜空)
109
- --ylf-c-bg: #0d1120;
110
- --ylf-c-bg-soft: #141a2e;
111
- --ylf-c-bg-mute: #1e2541;
112
- --ylf-c-surface: #161c32;
232
+ --ylf-c-bg: #0b1022;
233
+ --ylf-c-bg-soft: #0f1630;
234
+ --ylf-c-bg-mute: #1f2a47;
235
+ --ylf-c-surface: #121a30;
113
236
 
114
- --ylf-c-text: #f1f3fb;
115
- --ylf-c-text-2: #aab2cc;
116
- --ylf-c-text-3: #6e7693;
237
+ --ylf-c-text: #e5e7eb;
238
+ --ylf-c-text-2: #cbd5e1;
239
+ --ylf-c-text-3: #94a3b8;
240
+ --ylf-c-text-on-accent: #0f172a;
117
241
 
118
- --ylf-c-border: #283054;
119
- --ylf-c-border-strong: #354068;
242
+ --ylf-c-border: #2a3658;
243
+ --ylf-c-border-strong: #3c4c74;
120
244
  --ylf-c-overlay: rgba(3, 6, 18, 0.7);
245
+ --ylf-c-grid: rgba(96, 165, 250, 0.08);
246
+ --ylf-c-sky: #172554;
247
+ --ylf-c-cloud: #1f2a47;
121
248
 
122
- --ylf-glass-bg: rgba(22, 28, 50, 0.55);
123
- --ylf-glass-border: rgba(139, 150, 255, 0.18);
249
+ --ylf-glass-bg: rgba(18, 26, 48, 0.55);
250
+ --ylf-glass-border: rgba(96, 165, 250, 0.18);
124
251
 
125
252
  --ylf-shadow-sm: 0 2px 10px -2px rgba(0, 0, 0, 0.5);
126
253
  --ylf-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.55);
127
254
  --ylf-shadow-lg: 0 24px 60px -14px rgba(0, 0, 0, 0.6);
128
- --ylf-glow-brand: 0 12px 34px -6px rgba(142, 124, 255, 0.5);
129
- --ylf-glow-aurora: 0 12px 34px -6px rgba(142, 124, 255, 0.55);
255
+ --ylf-glow-brand: 0 6px 18px -8px rgba(96, 165, 250, 0.3);
256
+ --ylf-glow-brand-hover: 0 8px 22px -8px rgba(96, 165, 250, 0.4);
257
+ --ylf-glow-aurora: var(--ylf-shadow-sm);
258
+ --ylf-glow-aurora-hover: var(--ylf-shadow-sm);
259
+ }
260
+
261
+ @media (prefers-reduced-motion: reduce) {
262
+ :root,
263
+ .ylf-theme-light,
264
+ .ylf-theme-dark {
265
+ --ylf-duration-fast: 0ms;
266
+ --ylf-duration-normal: 0ms;
267
+ }
268
+ }
269
+
270
+ // 所有强调组件共用的色彩上下文,也可供原生 HTML 使用。
271
+ [data-ylf-tone='blue'] {
272
+ @include brand-accent;
273
+ }
274
+
275
+ [data-ylf-tone='sun'] {
276
+ --ylf-accent: var(--ylf-accent-sun);
277
+ --ylf-accent-hover: var(--ylf-accent-sun-hover);
278
+ --ylf-accent-soft: var(--ylf-accent-sun-soft);
279
+ --ylf-accent-text: var(--ylf-accent-sun-text);
280
+ --ylf-accent-on: var(--ylf-accent-sun-on);
281
+ }
282
+
283
+ [data-ylf-tone='cyan'] {
284
+ --ylf-accent: var(--ylf-accent-cyan);
285
+ --ylf-accent-hover: var(--ylf-accent-cyan-hover);
286
+ --ylf-accent-soft: var(--ylf-accent-cyan-soft);
287
+ --ylf-accent-text: var(--ylf-accent-cyan-text);
288
+ --ylf-accent-on: var(--ylf-accent-cyan-on);
289
+ }
290
+
291
+ [data-ylf-tone='coral'] {
292
+ --ylf-accent: var(--ylf-accent-coral);
293
+ --ylf-accent-hover: var(--ylf-accent-coral-hover);
294
+ --ylf-accent-soft: var(--ylf-accent-coral-soft);
295
+ --ylf-accent-text: var(--ylf-accent-coral-text);
296
+ --ylf-accent-on: var(--ylf-accent-coral-on);
297
+ }
298
+
299
+ [data-ylf-tone='pink'] {
300
+ --ylf-accent: var(--ylf-accent-pink);
301
+ --ylf-accent-hover: var(--ylf-accent-pink-hover);
302
+ --ylf-accent-soft: var(--ylf-accent-pink-soft);
303
+ --ylf-accent-text: var(--ylf-accent-pink-text);
304
+ --ylf-accent-on: var(--ylf-accent-pink-on);
305
+ }
306
+
307
+ [data-ylf-tone='green'] {
308
+ --ylf-accent: var(--ylf-accent-green);
309
+ --ylf-accent-hover: var(--ylf-accent-green-hover);
310
+ --ylf-accent-soft: var(--ylf-accent-green-soft);
311
+ --ylf-accent-text: var(--ylf-accent-green-text);
312
+ --ylf-accent-on: var(--ylf-accent-green-on);
130
313
  }
package/styles/fonts.scss CHANGED
@@ -1,7 +1,7 @@
1
1
  // =============================================================================
2
2
  // 云乐坊 · 圆体字体加载(CDN)/ Rounded display webfonts via CDN
3
3
  // -----------------------------------------------------------------------------
4
- // 只为「展示 / 标题」角色加载圆体;正文走 --ylf-font-body(纯系统字体,零下载)。
4
+ // 只为「品牌展示」角色加载圆体;产品标题与正文均走系统字体,零下载。
5
5
  // 字族 token 与完整回退链见 ./css-vars.scss,说明见文档 /guide/typography。
6
6
  //
7
7
  // ⚠️ 性能 / Perf:CSS `@import` 是串行阻塞加载。若你能控制页面 <head>,更推荐改用
@@ -29,6 +29,10 @@
29
29
  font-family: var(--ylf-font-wordmark);
30
30
  }
31
31
 
32
+ .ylf-font-heading {
33
+ font-family: var(--ylf-font-heading);
34
+ }
35
+
32
36
  .ylf-font-body {
33
37
  font-family: var(--ylf-font-body);
34
38
  }
package/styles/index.scss CHANGED
@@ -1,4 +1,4 @@
1
- // 云乐坊 · 缤纷多彩 —— 样式入口
2
- // 仅含「极光云」设计 token(含日夜间),保持零 webfont、零网络请求。
1
+ // 云乐坊 · 晴空与纯色 —— 样式入口
2
+ // 仅含「晴空蓝为主、高饱和纯色点缀」设计 token(含日夜间),保持零 webfont、零网络请求。
3
3
  // 圆体展示字体按需 opt-in:`@use '@yunlefun/ui/styles/fonts'`(见 /guide/typography)。
4
4
  @use './css-vars.scss';
@@ -0,0 +1,13 @@
1
+ // 可选的品牌背景;先加载 @yunlefun/ui/styles,再按需加载本文件。
2
+ // 装饰不使用定位伪元素,不影响宿主布局或遮挡内容。
3
+ .ylf-pattern-grid {
4
+ background-image:
5
+ linear-gradient(var(--ylf-c-grid) 1px, transparent 1px),
6
+ linear-gradient(90deg, var(--ylf-c-grid) 1px, transparent 1px);
7
+ background-size: var(--ylf-grid-size) var(--ylf-grid-size);
8
+ }
9
+
10
+ .ylf-pattern-sky {
11
+ background-color: var(--ylf-c-bg);
12
+ background-image: linear-gradient(145deg, var(--ylf-c-sky), var(--ylf-c-bg) 70%);
13
+ }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2023 YunLeFun Studio | 云乐坊工作室
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.