@yunlefun/ui 0.0.7 → 0.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yunlefun/ui",
3
- "version": "0.0.7",
3
+ "version": "0.1.0",
4
4
  "description": "Shared styles and design tokens for YunLeFun Design",
5
5
  "author": "YunLeFun",
6
6
  "license": "MIT",
@@ -22,22 +22,67 @@
22
22
  "types": "./styles/css.d.ts",
23
23
  "default": "./dist/index.css"
24
24
  },
25
- "./patterns.css": "./dist/patterns.css",
25
+ "./tokens.css": {
26
+ "types": "./styles/css.d.ts",
27
+ "default": "./dist/tokens.css"
28
+ },
29
+ "./compat.css": {
30
+ "types": "./styles/css.d.ts",
31
+ "default": "./dist/compat.css"
32
+ },
33
+ "./fonts.css": {
34
+ "types": "./styles/css.d.ts",
35
+ "default": "./dist/fonts.css"
36
+ },
37
+ "./patterns.css": {
38
+ "types": "./styles/css.d.ts",
39
+ "default": "./dist/patterns.css"
40
+ },
41
+ "./admin.css": {
42
+ "types": "./styles/css.d.ts",
43
+ "default": "./dist/admin.css"
44
+ },
45
+ "./editor.css": {
46
+ "types": "./styles/css.d.ts",
47
+ "default": "./dist/editor.css"
48
+ },
49
+ "./adapters/shadcn.css": {
50
+ "types": "./styles/css.d.ts",
51
+ "default": "./dist/adapters/shadcn.css"
52
+ },
53
+ "./adapters/nuxt-ui.css": {
54
+ "types": "./styles/css.d.ts",
55
+ "default": "./dist/adapters/nuxt-ui.css"
56
+ },
57
+ "./adapters/tdesign.css": {
58
+ "types": "./styles/css.d.ts",
59
+ "default": "./dist/adapters/tdesign.css"
60
+ },
61
+ "./tokens.json": "./dist/tokens.json",
62
+ "./tokens": {
63
+ "types": "./tokens/index.d.ts",
64
+ "default": "./tokens/index.mjs"
65
+ },
66
+ "./unocss": {
67
+ "types": "./unocss.d.ts",
68
+ "default": "./unocss.mjs"
69
+ },
26
70
  "./styles": "./styles/index.scss",
27
71
  "./styles/*": "./styles/*",
28
- "./*": "./*",
29
- "./admin.css": "./styles/admin.css",
30
- "./editor.css": "./styles/editor.css"
72
+ "./*": "./*"
31
73
  },
32
74
  "files": [
33
75
  "dist",
34
- "styles"
76
+ "styles",
77
+ "tokens",
78
+ "unocss.d.ts",
79
+ "unocss.mjs"
35
80
  ],
36
81
  "publishConfig": {
37
82
  "access": "public"
38
83
  },
39
84
  "scripts": {
40
- "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",
85
+ "build": "node scripts/build.mjs",
41
86
  "prepack": "npm run build",
42
87
  "release": "bumpp --no-commit --no-tag --no-push && npm publish"
43
88
  },
@@ -50,6 +95,6 @@
50
95
  }
51
96
  },
52
97
  "devDependencies": {
53
- "sass": "^1.105.1"
98
+ "sass": "^1.108.2"
54
99
  }
55
100
  }
@@ -0,0 +1,36 @@
1
+ /* YunLeFun Design · Nuxt UI variable adapter. Generated from packages/ui/tokens/source.mjs. */
2
+
3
+ @layer ylf.tokens, ylf.compat, ylf.profile, ylf.adapters;
4
+
5
+ @layer ylf.adapters {
6
+ :root,
7
+ .light,
8
+ .dark,
9
+ .ylf-theme-light,
10
+ .ylf-theme-dark,
11
+ [data-ylf-profile='admin'],
12
+ [data-ylf-profile='editor'],
13
+ [data-ylf-admin-theme='light'],
14
+ [data-ylf-admin-theme='dark'],
15
+ [data-ylf-editor-theme='light'],
16
+ [data-ylf-editor-theme='dark'] {
17
+ --ui-primary: var(--ylf-c-brand);
18
+ --ui-success: var(--ylf-status-success-text);
19
+ --ui-warning: var(--ylf-status-warning-text);
20
+ --ui-error: var(--ylf-status-danger-text);
21
+ --ui-info: var(--ylf-status-info-text);
22
+ --ui-bg: var(--ylf-c-bg);
23
+ --ui-bg-muted: var(--ylf-c-bg-soft);
24
+ --ui-bg-elevated: var(--ylf-c-surface);
25
+ --ui-bg-accented: var(--ylf-c-bg-mute);
26
+ --ui-text: var(--ylf-c-text);
27
+ --ui-text-muted: var(--ylf-c-text-2);
28
+ --ui-text-dimmed: var(--ylf-c-text-3);
29
+ --ui-text-toned: var(--ylf-c-text-2);
30
+ --ui-text-highlighted: var(--ylf-c-text);
31
+ --ui-border: var(--ylf-c-border-strong);
32
+ --ui-border-muted: var(--ylf-c-border);
33
+ --ui-border-accented: var(--ylf-c-border-strong);
34
+ --ui-radius: var(--ylf-radius);
35
+ }
36
+ }
@@ -0,0 +1,38 @@
1
+ /* YunLeFun Design · shadcn / shadcn-vue variable adapter. Generated from packages/ui/tokens/source.mjs. */
2
+
3
+ @layer ylf.tokens, ylf.compat, ylf.profile, ylf.adapters;
4
+
5
+ @layer ylf.adapters {
6
+ :root,
7
+ .light,
8
+ .dark,
9
+ .ylf-theme-light,
10
+ .ylf-theme-dark,
11
+ [data-ylf-profile='admin'],
12
+ [data-ylf-profile='editor'],
13
+ [data-ylf-admin-theme='light'],
14
+ [data-ylf-admin-theme='dark'],
15
+ [data-ylf-editor-theme='light'],
16
+ [data-ylf-editor-theme='dark'] {
17
+ --background: var(--ylf-c-bg);
18
+ --foreground: var(--ylf-c-text);
19
+ --card: var(--ylf-c-surface);
20
+ --card-foreground: var(--ylf-c-text);
21
+ --popover: var(--ylf-c-panel);
22
+ --popover-foreground: var(--ylf-c-text);
23
+ --primary: var(--ylf-c-brand);
24
+ --primary-foreground: var(--ylf-c-text-on-accent);
25
+ --secondary: var(--ylf-c-bg-soft);
26
+ --secondary-foreground: var(--ylf-c-text);
27
+ --muted: var(--ylf-c-bg-soft);
28
+ --muted-foreground: var(--ylf-c-text-2);
29
+ --accent: var(--ylf-c-bg-mute);
30
+ --accent-foreground: var(--ylf-c-text);
31
+ --destructive: var(--ylf-status-danger-text);
32
+ --destructive-foreground: var(--ylf-c-bg);
33
+ --border: var(--ylf-c-border);
34
+ --input: var(--ylf-c-border-strong);
35
+ --ring: var(--ylf-c-brand);
36
+ --radius: var(--ylf-radius);
37
+ }
38
+ }
@@ -0,0 +1,160 @@
1
+ /* YunLeFun Design · TDesign variable adapter. Generated from packages/ui/tokens/source.mjs. */
2
+
3
+ @layer ylf.tokens, ylf.compat, ylf.profile, ylf.adapters;
4
+
5
+ @layer ylf.adapters {
6
+ :root,
7
+ .light,
8
+ .dark,
9
+ .ylf-theme-light,
10
+ .ylf-theme-dark,
11
+ [data-ylf-profile='admin'],
12
+ [data-ylf-profile='editor'],
13
+ [data-ylf-admin-theme='light'],
14
+ [data-ylf-admin-theme='dark'],
15
+ [data-ylf-editor-theme='light'],
16
+ [data-ylf-editor-theme='dark'],
17
+ [theme-mode='light'],
18
+ [theme-mode='dark'] {
19
+ --td-brand-color: var(--ylf-c-brand);
20
+ --td-brand-color-hover: var(--ylf-c-brand-hover);
21
+ --td-brand-color-active: var(--ylf-c-brand-active);
22
+ --td-brand-color-focus: color-mix(in srgb, var(--ylf-c-brand) 20%, var(--ylf-c-surface));
23
+ --td-brand-color-disabled: color-mix(in srgb, var(--ylf-c-brand) 35%, var(--ylf-c-surface));
24
+ --td-brand-color-light: color-mix(in srgb, var(--ylf-c-brand) 9%, var(--ylf-admin-surface, var(--ylf-c-surface)));
25
+ --td-brand-color-light-hover: color-mix(
26
+ in srgb,
27
+ var(--ylf-c-brand) 15%,
28
+ var(--ylf-admin-surface, var(--ylf-c-surface))
29
+ );
30
+ --td-text-color-brand: var(--ylf-c-brand);
31
+ --td-text-color-link: var(--ylf-c-brand);
32
+ --td-success-color: var(--ylf-status-success-text);
33
+ --td-success-color-hover: color-mix(in srgb, var(--ylf-status-success-text) 88%, var(--ylf-c-text));
34
+ --td-success-color-active: color-mix(in srgb, var(--ylf-status-success-text) 76%, var(--ylf-c-text));
35
+ --td-success-color-focus: color-mix(in srgb, var(--ylf-status-success-text) 20%, var(--ylf-c-surface));
36
+ --td-success-color-disabled: color-mix(in srgb, var(--ylf-status-success-text) 35%, var(--ylf-c-surface));
37
+ --td-success-color-light: color-mix(
38
+ in srgb,
39
+ var(--ylf-status-success-text) 9%,
40
+ var(--ylf-admin-surface, var(--ylf-c-surface))
41
+ );
42
+ --td-success-color-light-hover: color-mix(
43
+ in srgb,
44
+ var(--ylf-status-success-text) 12%,
45
+ var(--ylf-status-success-soft)
46
+ );
47
+ --td-success-color-1: var(--ylf-status-success-soft);
48
+ --td-success-color-3: color-mix(in srgb, var(--ylf-status-success-text) 30%, var(--ylf-c-surface));
49
+ --td-success-color-4: color-mix(in srgb, var(--ylf-status-success-text) 45%, var(--ylf-c-surface));
50
+ --td-warning-color: var(--ylf-status-warning-text);
51
+ --td-warning-color-hover: color-mix(in srgb, var(--ylf-status-warning-text) 88%, var(--ylf-c-text));
52
+ --td-warning-color-active: color-mix(in srgb, var(--ylf-status-warning-text) 76%, var(--ylf-c-text));
53
+ --td-warning-color-focus: color-mix(in srgb, var(--ylf-status-warning-text) 20%, var(--ylf-c-surface));
54
+ --td-warning-color-disabled: color-mix(in srgb, var(--ylf-status-warning-text) 35%, var(--ylf-c-surface));
55
+ --td-warning-color-light: color-mix(
56
+ in srgb,
57
+ var(--ylf-status-warning-text) 9%,
58
+ var(--ylf-admin-surface, var(--ylf-c-surface))
59
+ );
60
+ --td-warning-color-light-hover: color-mix(
61
+ in srgb,
62
+ var(--ylf-status-warning-text) 12%,
63
+ var(--ylf-status-warning-soft)
64
+ );
65
+ --td-warning-color-1: var(--ylf-status-warning-soft);
66
+ --td-warning-color-3: color-mix(in srgb, var(--ylf-status-warning-text) 30%, var(--ylf-c-surface));
67
+ --td-warning-color-4: color-mix(in srgb, var(--ylf-status-warning-text) 45%, var(--ylf-c-surface));
68
+ --td-error-color: var(--ylf-status-danger-text);
69
+ --td-error-color-hover: color-mix(in srgb, var(--ylf-status-danger-text) 88%, var(--ylf-c-text));
70
+ --td-error-color-active: color-mix(in srgb, var(--ylf-status-danger-text) 76%, var(--ylf-c-text));
71
+ --td-error-color-focus: color-mix(in srgb, var(--ylf-status-danger-text) 20%, var(--ylf-c-surface));
72
+ --td-error-color-disabled: color-mix(in srgb, var(--ylf-status-danger-text) 35%, var(--ylf-c-surface));
73
+ --td-error-color-light: color-mix(
74
+ in srgb,
75
+ var(--ylf-status-danger-text) 9%,
76
+ var(--ylf-admin-surface, var(--ylf-c-surface))
77
+ );
78
+ --td-error-color-light-hover: color-mix(in srgb, var(--ylf-status-danger-text) 12%, var(--ylf-status-danger-soft));
79
+ --td-error-color-1: var(--ylf-status-danger-soft);
80
+ --td-error-color-3: color-mix(in srgb, var(--ylf-status-danger-text) 30%, var(--ylf-c-surface));
81
+ --td-error-color-4: color-mix(in srgb, var(--ylf-status-danger-text) 45%, var(--ylf-c-surface));
82
+ --td-bg-color-page: var(--ylf-admin-bg, var(--ylf-c-bg));
83
+ --td-bg-color-container: var(--ylf-admin-surface, var(--ylf-c-surface));
84
+ --td-bg-color-container-hover: var(--ylf-admin-raised, var(--ylf-c-surface-raised));
85
+ --td-bg-color-container-active: var(--ylf-admin-border, var(--ylf-c-border));
86
+ --td-bg-color-container-select: var(--ylf-admin-surface, var(--ylf-c-surface));
87
+ --td-bg-color-secondarycontainer: var(--ylf-admin-inset, var(--ylf-c-surface-inset));
88
+ --td-bg-color-secondarycontainer-hover: var(--ylf-admin-raised, var(--ylf-c-surface-raised));
89
+ --td-bg-color-secondarycontainer-active: var(--ylf-admin-border-strong, var(--ylf-c-border-strong));
90
+ --td-bg-color-component: var(--ylf-admin-raised, var(--ylf-c-bg-soft));
91
+ --td-bg-color-component-hover: var(--ylf-admin-border-strong, var(--ylf-c-border-strong));
92
+ --td-bg-color-component-active: var(--ylf-c-text-3);
93
+ --td-bg-color-secondarycomponent: var(--ylf-admin-border, var(--ylf-c-border));
94
+ --td-bg-color-secondarycomponent-hover: var(--ylf-admin-border-strong, var(--ylf-c-border-strong));
95
+ --td-bg-color-secondarycomponent-active: var(--ylf-c-text-3);
96
+ --td-bg-color-component-disabled: var(--ylf-admin-inset, var(--ylf-c-surface-inset));
97
+ --td-bg-color-specialcomponent: var(--ylf-admin-surface, var(--ylf-c-surface));
98
+ --td-text-color-primary: var(--ylf-admin-fg, var(--ylf-c-text));
99
+ --td-text-color-secondary: var(--ylf-admin-muted, var(--ylf-c-text-2));
100
+ --td-text-color-placeholder: var(--ylf-admin-placeholder, var(--ylf-c-placeholder));
101
+ --td-text-color-disabled: color-mix(in srgb, var(--ylf-c-text-3) 55%, var(--ylf-c-surface));
102
+ --td-text-color-anti: var(--ylf-c-text-on-accent);
103
+ --td-text-color-watermark: color-mix(in srgb, var(--ylf-c-text) 10%, transparent);
104
+ --td-border-level-1-color: var(--ylf-admin-border, var(--ylf-c-border));
105
+ --td-component-stroke: var(--ylf-admin-border, var(--ylf-c-border));
106
+ --td-border-level-2-color: var(--ylf-admin-border-strong, var(--ylf-c-border-strong));
107
+ --td-component-border: var(--ylf-admin-border-strong, var(--ylf-c-border-strong));
108
+ --td-mask-active: var(--ylf-c-overlay);
109
+ --td-mask-disabled: color-mix(in srgb, var(--ylf-c-surface) 60%, transparent);
110
+ --td-mask-background: var(--ylf-c-panel);
111
+ --td-mask-gradient: transparent;
112
+ --td-shadow-1: var(--ylf-shadow-sm);
113
+ --td-shadow-2: var(--ylf-shadow);
114
+ --td-shadow-3: var(--ylf-shadow-lg);
115
+ --td-shadow-inset-top: inset 0 0.5px 0 var(--ylf-c-border);
116
+ --td-shadow-inset-right: inset 0.5px 0 0 var(--ylf-c-border);
117
+ --td-shadow-inset-bottom: inset 0 -0.5px 0 var(--ylf-c-border);
118
+ --td-shadow-inset-left: inset -0.5px 0 0 var(--ylf-c-border);
119
+ --td-table-shadow-color: var(--ylf-c-edge);
120
+ --td-scrollbar-color: color-mix(in srgb, var(--ylf-c-text-3) 25%, transparent);
121
+ --td-scrollbar-hover-color: color-mix(in srgb, var(--ylf-c-text-3) 45%, transparent);
122
+ --td-scroll-track-color: var(--ylf-c-surface);
123
+ --td-comp-size-xs: var(--ylf-admin-control-sm, var(--ylf-control-h-sm));
124
+ --td-comp-size-s: var(--ylf-admin-control-sm, var(--ylf-control-h-sm));
125
+ --td-comp-size-m: var(--ylf-admin-control, var(--ylf-control-h));
126
+ --td-comp-size-l: var(--ylf-admin-control-lg, var(--ylf-control-h-lg));
127
+ --td-radius-small: var(--ylf-radius-2xs, 4px);
128
+ --td-radius-default: var(--ylf-admin-radius, var(--ylf-radius-xs));
129
+ --td-radius-medium: var(--ylf-radius-xs, 6px);
130
+ --td-radius-large: var(--ylf-radius-sm);
131
+ --td-radius-extraLarge: var(--ylf-radius);
132
+ --td-radius-round: var(--ylf-radius-pill);
133
+ --td-font-family: var(--ylf-admin-font, var(--ylf-font-ui));
134
+ --td-font-family-medium: var(--ylf-admin-font, var(--ylf-font-ui));
135
+ --td-font-family-code: var(--ylf-font-mono);
136
+ }
137
+
138
+ :root,
139
+ .light,
140
+ .ylf-theme-light,
141
+ [data-ylf-admin-theme='light'],
142
+ [data-ylf-editor-theme='light'],
143
+ [theme-mode='light'] {
144
+ color-scheme: light;
145
+ }
146
+
147
+ .dark,
148
+ .ylf-theme-dark,
149
+ [data-ylf-admin-theme='dark'],
150
+ [data-ylf-editor-theme='dark'],
151
+ [theme-mode='dark'] {
152
+ color-scheme: dark;
153
+ }
154
+
155
+ .t-tooltip--default {
156
+ --td-gray-color-13: var(--ylf-c-text);
157
+ --td-gray-color-9: var(--ylf-c-text-2);
158
+ --td-text-color-anti: var(--ylf-c-surface);
159
+ }
160
+ }
package/styles/admin.css CHANGED
@@ -1,48 +1,245 @@
1
- /* YunLeFun Design · Admin profile. Tokens only; import after the base theme.
2
- * Keep the vendored copy in YunLeFun/admin identical until this entry is published. */
3
- :root {
4
- --ylf-admin-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
5
- --ylf-admin-control-sm: 28px;
6
- --ylf-admin-control: 32px;
7
- --ylf-admin-control-lg: 40px;
8
- --ylf-admin-radius: 6px;
9
- --ylf-admin-panel-radius: 10px;
10
- --ylf-admin-icon-gap: 8px;
11
- }
12
-
13
- :root,
14
- .light,
15
- .ylf-theme-light,
16
- [data-ylf-admin-theme='light'] {
17
- --ylf-admin-bg: #f6f7f9;
18
- --ylf-admin-surface: #ffffff;
19
- --ylf-admin-raised: #f0f2f5;
20
- --ylf-admin-inset: #f8f9fb;
21
- --ylf-admin-fg: #20242c;
22
- --ylf-admin-muted: #626b78;
23
- --ylf-admin-placeholder: #757e8b;
24
- --ylf-admin-border: #e1e5eb;
25
- --ylf-admin-border-strong: #c7cdd6;
26
- }
1
+ /* YunLeFun Design · Admin profile. Generated from packages/ui/tokens/source.mjs. */
27
2
 
28
- .dark,
29
- .ylf-theme-dark,
30
- [data-ylf-admin-theme='dark'] {
31
- --ylf-admin-bg: #111318;
32
- --ylf-admin-surface: #191c22;
33
- --ylf-admin-raised: #252a33;
34
- --ylf-admin-inset: #15181e;
35
- --ylf-admin-fg: #eef1f6;
36
- --ylf-admin-muted: #aab2c0;
37
- --ylf-admin-placeholder: #929cac;
38
- --ylf-admin-border: #303641;
39
- --ylf-admin-border-strong: #4d5869;
40
- }
3
+ @layer ylf.tokens, ylf.compat, ylf.profile, ylf.adapters;
41
4
 
42
- @media (max-width: 767.9px), (pointer: coarse) {
5
+ @layer ylf.profile {
43
6
  :root {
44
- --ylf-admin-control-sm: 40px;
45
- --ylf-admin-control: 44px;
46
- --ylf-admin-control-lg: 48px;
7
+ --ylf-admin-font: var(
8
+ --ylf-font-ui,
9
+ -apple-system,
10
+ BlinkMacSystemFont,
11
+ 'Segoe UI',
12
+ 'PingFang SC',
13
+ 'Hiragino Sans GB',
14
+ 'Microsoft YaHei',
15
+ system-ui,
16
+ sans-serif
17
+ );
18
+ --ylf-admin-control-sm: 28px;
19
+ --ylf-admin-control: 32px;
20
+ --ylf-admin-control-lg: 40px;
21
+ --ylf-admin-radius: 6px;
22
+ --ylf-admin-panel-radius: 10px;
23
+ --ylf-admin-icon-gap: 8px;
24
+ }
25
+
26
+ :root,
27
+ .light,
28
+ .ylf-theme-light {
29
+ --ylf-admin-bg: #f6f7f9;
30
+ --ylf-admin-surface: #ffffff;
31
+ --ylf-admin-raised: #f0f2f5;
32
+ --ylf-admin-inset: #f8f9fb;
33
+ --ylf-admin-fg: #20242c;
34
+ --ylf-admin-muted: #626b78;
35
+ --ylf-admin-placeholder: #656e7b;
36
+ --ylf-admin-border: #e1e5eb;
37
+ --ylf-admin-border-strong: #c7cdd6;
38
+ }
39
+
40
+ .dark,
41
+ .ylf-theme-dark {
42
+ --ylf-admin-bg: #111318;
43
+ --ylf-admin-surface: #191c22;
44
+ --ylf-admin-raised: #252a33;
45
+ --ylf-admin-inset: #15181e;
46
+ --ylf-admin-fg: #eef1f6;
47
+ --ylf-admin-muted: #aab2c0;
48
+ --ylf-admin-placeholder: #929cac;
49
+ --ylf-admin-border: #303641;
50
+ --ylf-admin-border-strong: #4d5869;
51
+ }
52
+
53
+ [data-ylf-admin-theme='light'] {
54
+ --ylf-admin-bg: #f6f7f9;
55
+ --ylf-admin-surface: #ffffff;
56
+ --ylf-admin-raised: #f0f2f5;
57
+ --ylf-admin-inset: #f8f9fb;
58
+ --ylf-admin-fg: #20242c;
59
+ --ylf-admin-muted: #626b78;
60
+ --ylf-admin-placeholder: #656e7b;
61
+ --ylf-admin-border: #e1e5eb;
62
+ --ylf-admin-border-strong: #c7cdd6;
63
+ --ylf-c-brand: var(--ylf-palette-blue);
64
+ --ylf-c-brand-hover: #1d4ed8;
65
+ --ylf-c-brand-active: #1e40af;
66
+ --ylf-c-brand-soft: #eff6ff;
67
+ --ylf-accent-blue: var(--ylf-c-brand);
68
+ --ylf-accent-blue-hover: var(--ylf-c-brand-hover);
69
+ --ylf-accent-blue-soft: var(--ylf-c-brand-soft);
70
+ --ylf-accent-blue-text: var(--ylf-c-brand);
71
+ --ylf-accent-blue-on: var(--ylf-c-text-on-accent);
72
+ --ylf-accent: var(--ylf-accent-blue);
73
+ --ylf-accent-hover: var(--ylf-accent-blue-hover);
74
+ --ylf-accent-soft: var(--ylf-accent-blue-soft);
75
+ --ylf-accent-text: var(--ylf-accent-blue-text);
76
+ --ylf-accent-on: var(--ylf-accent-blue-on);
77
+ --ylf-accent-sun-soft: #fef9c3;
78
+ --ylf-accent-sun-text: #854d0e;
79
+ --ylf-accent-cyan-soft: #cffafe;
80
+ --ylf-accent-cyan-text: #155e75;
81
+ --ylf-accent-coral-soft: #ffede6;
82
+ --ylf-accent-coral-text: #9a3412;
83
+ --ylf-accent-pink-soft: #fce7f3;
84
+ --ylf-accent-pink-text: #9d174d;
85
+ --ylf-accent-green-soft: #dcfce7;
86
+ --ylf-accent-green-text: #166534;
87
+ --ylf-status-success: var(--ylf-accent-green);
88
+ --ylf-status-success-hover: var(--ylf-accent-green-hover);
89
+ --ylf-status-success-on: var(--ylf-accent-green-on);
90
+ --ylf-status-success-soft: var(--ylf-accent-green-soft);
91
+ --ylf-status-success-text: var(--ylf-accent-green-text);
92
+ --ylf-status-warning: var(--ylf-accent-sun);
93
+ --ylf-status-warning-hover: var(--ylf-accent-sun-hover);
94
+ --ylf-status-warning-on: var(--ylf-accent-sun-on);
95
+ --ylf-status-warning-soft: var(--ylf-accent-sun-soft);
96
+ --ylf-status-warning-text: var(--ylf-accent-sun-text);
97
+ --ylf-status-danger: var(--ylf-accent-coral);
98
+ --ylf-status-danger-hover: var(--ylf-accent-coral-hover);
99
+ --ylf-status-danger-on: var(--ylf-accent-coral-on);
100
+ --ylf-status-danger-soft: var(--ylf-accent-coral-soft);
101
+ --ylf-status-danger-text: var(--ylf-accent-coral-text);
102
+ --ylf-status-info: var(--ylf-accent-cyan);
103
+ --ylf-status-info-hover: var(--ylf-accent-cyan-hover);
104
+ --ylf-status-info-on: var(--ylf-accent-cyan-on);
105
+ --ylf-status-info-soft: var(--ylf-accent-cyan-soft);
106
+ --ylf-status-info-text: var(--ylf-accent-cyan-text);
107
+ --ylf-c-feature-bg: var(--ylf-accent-sun-soft);
108
+ --ylf-c-feature-text: var(--ylf-c-text);
109
+ --ylf-c-text-on-accent: #ffffff;
110
+ --ylf-c-bg-mute: #e2e8f0;
111
+ --ylf-c-panel: rgba(255, 255, 255, 0.96);
112
+ --ylf-c-highlight: rgba(255, 255, 255, 0.9);
113
+ --ylf-c-edge: rgba(30, 64, 115, 0.12);
114
+ --ylf-c-overlay: rgba(13, 17, 32, 0.45);
115
+ --ylf-ring-color: var(--ylf-c-brand);
116
+ --ylf-glass-bg: rgba(255, 255, 255, 0.82);
117
+ --ylf-glass-border: rgba(255, 255, 255, 0.7);
118
+ --ylf-shadow-sm: 0 2px 8px -2px rgba(15, 23, 42, 0.12);
119
+ --ylf-shadow: 0 10px 28px -8px rgba(15, 23, 42, 0.16);
120
+ --ylf-shadow-lg: 0 22px 56px -14px rgba(15, 23, 42, 0.22);
121
+ --ylf-shadow-control:
122
+ inset 0 1px 0 var(--ylf-c-highlight), 0 1px 2px rgba(15, 23, 42, 0.06), 0 3px 6px -4px rgba(15, 23, 42, 0.16);
123
+ --ylf-shadow-inset: inset 0 1px 3px rgba(15, 23, 42, 0.08);
124
+ --ylf-shadow-panel:
125
+ inset 0 1px 0 var(--ylf-c-highlight), 0 0 0 1px var(--ylf-c-edge), 0 8px 16px -8px rgba(15, 23, 42, 0.14),
126
+ 0 28px 64px -20px rgba(24, 52, 102, 0.24);
127
+ --ylf-glow-brand: 0 6px 18px -8px rgba(37, 99, 235, 0.35);
128
+ --ylf-glow-brand-hover: 0 8px 22px -8px rgba(37, 99, 235, 0.4);
129
+ }
130
+
131
+ [data-ylf-admin-theme='dark'] {
132
+ --ylf-admin-bg: #111318;
133
+ --ylf-admin-surface: #191c22;
134
+ --ylf-admin-raised: #252a33;
135
+ --ylf-admin-inset: #15181e;
136
+ --ylf-admin-fg: #eef1f6;
137
+ --ylf-admin-muted: #aab2c0;
138
+ --ylf-admin-placeholder: #929cac;
139
+ --ylf-admin-border: #303641;
140
+ --ylf-admin-border-strong: #4d5869;
141
+ --ylf-c-brand: #60a5fa;
142
+ --ylf-c-brand-hover: #93c5fd;
143
+ --ylf-c-brand-active: #3b82f6;
144
+ --ylf-c-brand-soft: #15264a;
145
+ --ylf-accent-blue: var(--ylf-c-brand);
146
+ --ylf-accent-blue-hover: var(--ylf-c-brand-hover);
147
+ --ylf-accent-blue-soft: var(--ylf-c-brand-soft);
148
+ --ylf-accent-blue-text: var(--ylf-c-brand);
149
+ --ylf-accent-blue-on: var(--ylf-c-text-on-accent);
150
+ --ylf-accent: var(--ylf-accent-blue);
151
+ --ylf-accent-hover: var(--ylf-accent-blue-hover);
152
+ --ylf-accent-soft: var(--ylf-accent-blue-soft);
153
+ --ylf-accent-text: var(--ylf-accent-blue-text);
154
+ --ylf-accent-on: var(--ylf-accent-blue-on);
155
+ --ylf-accent-sun-soft: #30290f;
156
+ --ylf-accent-sun-text: #fde047;
157
+ --ylf-accent-cyan-soft: #10313d;
158
+ --ylf-accent-cyan-text: #67e8f9;
159
+ --ylf-accent-coral-soft: #39231f;
160
+ --ylf-accent-coral-text: #fda48c;
161
+ --ylf-accent-pink-soft: #351e32;
162
+ --ylf-accent-pink-text: #f9a8d4;
163
+ --ylf-accent-green-soft: #142e26;
164
+ --ylf-accent-green-text: #86efac;
165
+ --ylf-status-success: var(--ylf-accent-green);
166
+ --ylf-status-success-hover: var(--ylf-accent-green-hover);
167
+ --ylf-status-success-on: var(--ylf-accent-green-on);
168
+ --ylf-status-success-soft: var(--ylf-accent-green-soft);
169
+ --ylf-status-success-text: var(--ylf-accent-green-text);
170
+ --ylf-status-warning: var(--ylf-accent-sun);
171
+ --ylf-status-warning-hover: var(--ylf-accent-sun-hover);
172
+ --ylf-status-warning-on: var(--ylf-accent-sun-on);
173
+ --ylf-status-warning-soft: var(--ylf-accent-sun-soft);
174
+ --ylf-status-warning-text: var(--ylf-accent-sun-text);
175
+ --ylf-status-danger: var(--ylf-accent-coral);
176
+ --ylf-status-danger-hover: var(--ylf-accent-coral-hover);
177
+ --ylf-status-danger-on: var(--ylf-accent-coral-on);
178
+ --ylf-status-danger-soft: var(--ylf-accent-coral-soft);
179
+ --ylf-status-danger-text: var(--ylf-accent-coral-text);
180
+ --ylf-status-info: var(--ylf-accent-cyan);
181
+ --ylf-status-info-hover: var(--ylf-accent-cyan-hover);
182
+ --ylf-status-info-on: var(--ylf-accent-cyan-on);
183
+ --ylf-status-info-soft: var(--ylf-accent-cyan-soft);
184
+ --ylf-status-info-text: var(--ylf-accent-cyan-text);
185
+ --ylf-c-feature-bg: var(--ylf-accent-sun-soft);
186
+ --ylf-c-feature-text: var(--ylf-c-text);
187
+ --ylf-c-text-on-accent: #0f172a;
188
+ --ylf-c-bg-mute: #22304a;
189
+ --ylf-c-panel: rgba(20, 29, 43, 0.96);
190
+ --ylf-c-highlight: rgba(186, 214, 255, 0.1);
191
+ --ylf-c-edge: rgba(2, 6, 15, 0.55);
192
+ --ylf-c-overlay: rgba(2, 6, 15, 0.72);
193
+ --ylf-ring-color: var(--ylf-c-brand);
194
+ --ylf-glass-bg: rgba(20, 29, 43, 0.9);
195
+ --ylf-glass-border: rgba(96, 165, 250, 0.18);
196
+ --ylf-shadow-sm: 0 2px 10px -2px rgba(2, 6, 15, 0.55);
197
+ --ylf-shadow: 0 12px 30px -8px rgba(2, 6, 15, 0.6);
198
+ --ylf-shadow-lg: 0 24px 60px -14px rgba(2, 6, 15, 0.65);
199
+ --ylf-shadow-control:
200
+ inset 0 1px 0 var(--ylf-c-highlight), 0 1px 2px rgba(2, 6, 15, 0.3), 0 4px 8px -4px rgba(2, 6, 15, 0.35);
201
+ --ylf-shadow-inset: inset 0 1px 4px rgba(2, 6, 15, 0.4);
202
+ --ylf-shadow-panel:
203
+ inset 0 1px 0 var(--ylf-c-highlight), 0 0 0 1px var(--ylf-c-edge), 0 10px 20px -8px rgba(2, 6, 15, 0.4),
204
+ 0 32px 72px -18px rgba(2, 6, 15, 0.6);
205
+ --ylf-glow-brand: 0 6px 18px -8px rgba(96, 165, 250, 0.3);
206
+ --ylf-glow-brand-hover: 0 8px 22px -8px rgba(96, 165, 250, 0.4);
207
+ }
208
+
209
+ @media (max-width: 767.9px), (pointer: coarse) {
210
+ :root {
211
+ --ylf-admin-control-sm: 40px;
212
+ --ylf-admin-control: 44px;
213
+ --ylf-admin-control-lg: 48px;
214
+ }
215
+ }
216
+
217
+ [data-ylf-profile='admin'],
218
+ [data-ylf-profile='admin'] :is(.light, .dark, .ylf-theme-light, .ylf-theme-dark, [data-ylf-admin-theme]) {
219
+ --ylf-c-bg: var(--ylf-admin-bg);
220
+ --ylf-c-bg-soft: var(--ylf-admin-raised);
221
+ --ylf-c-bg-mute: var(--ylf-admin-raised);
222
+ --ylf-c-surface: var(--ylf-admin-surface);
223
+ --ylf-c-surface-raised: var(--ylf-admin-raised);
224
+ --ylf-c-surface-inset: var(--ylf-admin-inset);
225
+ --ylf-c-panel: var(--ylf-admin-surface);
226
+ --ylf-c-text: var(--ylf-admin-fg);
227
+ --ylf-c-text-2: var(--ylf-admin-muted);
228
+ --ylf-c-text-3: var(--ylf-admin-placeholder);
229
+ --ylf-c-placeholder: var(--ylf-admin-placeholder);
230
+ --ylf-c-border: var(--ylf-admin-border);
231
+ --ylf-c-border-strong: var(--ylf-admin-border-strong);
232
+ --ylf-font-body: var(--ylf-admin-font);
233
+ --ylf-radius: var(--ylf-admin-radius);
234
+ --ylf-radius-sm: var(--ylf-radius-xs, 6px);
235
+ --ylf-radius-lg: var(--ylf-admin-panel-radius);
236
+ --ylf-control-h-sm: var(--ylf-admin-control-sm);
237
+ --ylf-control-h: var(--ylf-admin-control);
238
+ --ylf-control-h-lg: var(--ylf-admin-control-lg);
239
+ --ylf-control-radius: var(--ylf-admin-radius);
240
+ --ylf-control-radius-sm: var(--ylf-admin-radius);
241
+ --ylf-panel-radius: var(--ylf-admin-panel-radius);
242
+ --ylf-control-font-size: var(--ylf-text-sm, 0.875rem);
243
+ --ylf-control-font-size-sm: var(--ylf-text-xs, 0.75rem);
47
244
  }
48
245
  }
@@ -0,0 +1,48 @@
1
+ /* =============================================================================
2
+ * YunLeFun Design · Deprecated Compatibility Aliases(自动生成,请勿手改)
3
+ * 源文件:packages/ui/tokens/source.mjs
4
+ * ============================================================================= */
5
+
6
+ @layer ylf.tokens, ylf.compat, ylf.profile, ylf.adapters;
7
+
8
+ @layer ylf.compat {
9
+ :root,
10
+ .light,
11
+ .ylf-theme-light {
12
+ --ylf-c-success: var(--ylf-status-success-text);
13
+ --ylf-c-warning: var(--ylf-status-warning-text);
14
+ --ylf-c-danger: var(--ylf-status-danger-text);
15
+ --ylf-c-info: var(--ylf-status-info-text);
16
+ --ylf-aurora-sky: var(--ylf-accent-cyan);
17
+ --ylf-aurora-iris: var(--ylf-accent-coral);
18
+ --ylf-aurora-pink: var(--ylf-accent-pink);
19
+ --ylf-gradient-aurora: linear-gradient(var(--ylf-accent-sun), var(--ylf-accent-sun));
20
+ --ylf-gradient-brand: linear-gradient(var(--ylf-c-brand), var(--ylf-c-brand));
21
+ --ylf-c-text-on-aurora: var(--ylf-accent-sun-on);
22
+ --ylf-glow-aurora: var(--ylf-shadow-sm);
23
+ --ylf-glow-aurora-hover: var(--ylf-shadow-sm);
24
+ --ylf-c-primary: var(--ylf-c-brand);
25
+ --ylf-c-text-light: var(--ylf-c-text-2);
26
+ --ylf-c-text-lighter: var(--ylf-c-text-3);
27
+ --ylf-c-text-lightest: var(--ylf-c-border-strong);
28
+ --ylf-c-bg-light: var(--ylf-c-bg-soft);
29
+ --ylf-c-bg-lighter: var(--ylf-c-bg-mute);
30
+ }
31
+
32
+ .dark,
33
+ .ylf-theme-dark {
34
+ --ylf-c-success: var(--ylf-status-success-text);
35
+ --ylf-c-warning: var(--ylf-status-warning-text);
36
+ --ylf-c-danger: var(--ylf-status-danger-text);
37
+ --ylf-c-info: var(--ylf-status-info-text);
38
+ --ylf-gradient-brand: linear-gradient(var(--ylf-c-brand), var(--ylf-c-brand));
39
+ --ylf-glow-aurora: var(--ylf-shadow-sm);
40
+ --ylf-glow-aurora-hover: var(--ylf-shadow-sm);
41
+ --ylf-c-primary: var(--ylf-c-brand);
42
+ --ylf-c-text-light: var(--ylf-c-text-2);
43
+ --ylf-c-text-lighter: var(--ylf-c-text-3);
44
+ --ylf-c-text-lightest: var(--ylf-c-border-strong);
45
+ --ylf-c-bg-light: var(--ylf-c-bg-soft);
46
+ --ylf-c-bg-lighter: var(--ylf-c-bg-mute);
47
+ }
48
+ }