@yunlefun/ui 0.0.7 → 0.2.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/styles/editor.css CHANGED
@@ -1,55 +1,258 @@
1
- /* YunLeFun Design · Editor. Opt-in tokens, independent of consumer UI density.
2
- * Source: YunLeFun/design packages/ui/styles/editor.css (MIT).
3
- * Saier vendors this file until the Editor entry is published; keep copies identical.
4
- */
5
- :root {
6
- --ylf-editor-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
7
- --ylf-editor-text: 12px;
8
- --ylf-editor-caption: 11px;
9
- --ylf-editor-control-sm: 24px;
10
- --ylf-editor-control: 28px;
11
- --ylf-editor-row: 32px;
12
- --ylf-editor-header: 32px;
13
- --ylf-editor-radius: 5px;
14
- --ylf-editor-panel-radius: 10px;
15
- --ylf-editor-panel-width: 272px;
16
- }
17
- :root,
18
- .light,
19
- .ylf-theme-light,
20
- [data-ylf-editor-theme='light'] {
21
- --ylf-editor-bg: #f6f6f7;
22
- --ylf-editor-chrome: #ebebed;
23
- --ylf-editor-panel: #f6f6f7;
24
- --ylf-editor-field: #ffffff;
25
- --ylf-editor-workspace: #d7d7da;
26
- --ylf-editor-fg: #292a2e;
27
- --ylf-editor-muted: #62636b;
28
- --ylf-editor-border: rgb(25 25 30 / 13%);
29
- --ylf-editor-accent: var(--ylf-palette-blue, #2563eb);
30
- --ylf-editor-selection: rgb(37 99 235 / 10%);
31
- --ylf-editor-shadow: 0 1px 3px rgb(0 0 0 / 8%), 0 10px 28px -8px rgb(0 0 0 / 18%);
32
- }
33
- .dark,
34
- .ylf-theme-dark,
35
- [data-ylf-editor-theme='dark'] {
36
- --ylf-editor-bg: #242426;
37
- --ylf-editor-chrome: #303033;
38
- --ylf-editor-panel: #292a2d;
39
- --ylf-editor-field: #353639;
40
- --ylf-editor-workspace: #202123;
41
- --ylf-editor-fg: #eeeef0;
42
- --ylf-editor-muted: #b1b1b8;
43
- --ylf-editor-border: rgb(255 255 255 / 11%);
44
- --ylf-editor-accent: #60a5fa;
45
- --ylf-editor-selection: rgb(96 165 250 / 16%);
46
- --ylf-editor-shadow: 0 1px 3px rgb(0 0 0 / 20%), 0 10px 28px -8px rgb(0 0 0 / 40%);
47
- }
48
- @media (pointer: coarse) {
1
+ /* YunLeFun Design · Editor profile. Generated from packages/ui/tokens/source.mjs. */
2
+
3
+ @layer ylf.tokens, ylf.compat, ylf.profile, ylf.adapters;
4
+
5
+ @layer ylf.profile {
49
6
  :root {
50
- --ylf-editor-control-sm: 40px;
51
- --ylf-editor-control: 40px;
52
- --ylf-editor-row: 44px;
53
- --ylf-editor-header: 44px;
7
+ --ylf-editor-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-editor-text: 12px;
19
+ --ylf-editor-caption: 11px;
20
+ --ylf-editor-control-sm: 24px;
21
+ --ylf-editor-control: 28px;
22
+ --ylf-editor-row: 32px;
23
+ --ylf-editor-header: 32px;
24
+ --ylf-editor-radius: 5px;
25
+ --ylf-editor-panel-radius: 10px;
26
+ --ylf-editor-panel-width: 272px;
27
+ }
28
+
29
+ :root,
30
+ .light,
31
+ .ylf-theme-light {
32
+ --ylf-editor-bg: #f6f6f7;
33
+ --ylf-editor-chrome: #ebebed;
34
+ --ylf-editor-panel: #f6f6f7;
35
+ --ylf-editor-field: #ffffff;
36
+ --ylf-editor-workspace: #d7d7da;
37
+ --ylf-editor-fg: #292a2e;
38
+ --ylf-editor-muted: #5c5d65;
39
+ --ylf-editor-border: rgb(25 25 30 / 13%);
40
+ --ylf-editor-border-control: #82848d;
41
+ --ylf-editor-accent: var(--ylf-c-brand, #006aeb);
42
+ --ylf-editor-selection: color-mix(in srgb, var(--ylf-editor-accent) 10%, transparent);
43
+ --ylf-editor-shadow: 0 1px 3px rgb(0 0 0 / 8%), 0 10px 28px -8px rgb(0 0 0 / 18%);
44
+ }
45
+
46
+ .dark,
47
+ .ylf-theme-dark {
48
+ --ylf-editor-bg: #242426;
49
+ --ylf-editor-chrome: #303033;
50
+ --ylf-editor-panel: #292a2d;
51
+ --ylf-editor-field: #353639;
52
+ --ylf-editor-workspace: #202123;
53
+ --ylf-editor-fg: #eeeef0;
54
+ --ylf-editor-muted: #b1b1b8;
55
+ --ylf-editor-border: rgb(255 255 255 / 11%);
56
+ --ylf-editor-border-control: #82848d;
57
+ --ylf-editor-accent: var(--ylf-c-brand, #38acff);
58
+ --ylf-editor-selection: color-mix(in srgb, var(--ylf-editor-accent) 16%, transparent);
59
+ --ylf-editor-shadow: 0 1px 3px rgb(0 0 0 / 20%), 0 10px 28px -8px rgb(0 0 0 / 40%);
60
+ }
61
+
62
+ [data-ylf-editor-theme='light'] {
63
+ --ylf-editor-bg: #f6f6f7;
64
+ --ylf-editor-chrome: #ebebed;
65
+ --ylf-editor-panel: #f6f6f7;
66
+ --ylf-editor-field: #ffffff;
67
+ --ylf-editor-workspace: #d7d7da;
68
+ --ylf-editor-fg: #292a2e;
69
+ --ylf-editor-muted: #5c5d65;
70
+ --ylf-editor-border: rgb(25 25 30 / 13%);
71
+ --ylf-editor-border-control: #82848d;
72
+ --ylf-editor-accent: var(--ylf-c-brand, #006aeb);
73
+ --ylf-editor-selection: color-mix(in srgb, var(--ylf-editor-accent) 10%, transparent);
74
+ --ylf-editor-shadow: 0 1px 3px rgb(0 0 0 / 8%), 0 10px 28px -8px rgb(0 0 0 / 18%);
75
+ --ylf-c-brand: var(--ylf-palette-blue);
76
+ --ylf-c-brand-hover: #0057c7;
77
+ --ylf-c-brand-active: #0047a6;
78
+ --ylf-c-brand-soft: #f0f7ff;
79
+ --ylf-accent-blue: var(--ylf-c-brand);
80
+ --ylf-accent-blue-hover: var(--ylf-c-brand-hover);
81
+ --ylf-accent-blue-soft: var(--ylf-c-brand-soft);
82
+ --ylf-accent-blue-text: var(--ylf-c-brand);
83
+ --ylf-accent-blue-on: var(--ylf-c-text-on-accent);
84
+ --ylf-accent: var(--ylf-accent-blue);
85
+ --ylf-accent-hover: var(--ylf-accent-blue-hover);
86
+ --ylf-accent-soft: var(--ylf-accent-blue-soft);
87
+ --ylf-accent-text: var(--ylf-accent-blue-text);
88
+ --ylf-accent-on: var(--ylf-accent-blue-on);
89
+ --ylf-accent-sun-soft: #fef9c3;
90
+ --ylf-accent-sun-text: #854d0e;
91
+ --ylf-accent-cyan-soft: #cffafe;
92
+ --ylf-accent-cyan-text: #155e75;
93
+ --ylf-accent-coral-soft: #ffede6;
94
+ --ylf-accent-coral-text: #9a3412;
95
+ --ylf-accent-pink-soft: #fce7f3;
96
+ --ylf-accent-pink-text: #9d174d;
97
+ --ylf-accent-green-soft: #dcfce7;
98
+ --ylf-accent-green-text: #166534;
99
+ --ylf-status-success: var(--ylf-accent-green);
100
+ --ylf-status-success-hover: var(--ylf-accent-green-hover);
101
+ --ylf-status-success-on: var(--ylf-accent-green-on);
102
+ --ylf-status-success-soft: var(--ylf-accent-green-soft);
103
+ --ylf-status-success-text: var(--ylf-accent-green-text);
104
+ --ylf-status-warning: var(--ylf-accent-sun);
105
+ --ylf-status-warning-hover: var(--ylf-accent-sun-hover);
106
+ --ylf-status-warning-on: var(--ylf-accent-sun-on);
107
+ --ylf-status-warning-soft: var(--ylf-accent-sun-soft);
108
+ --ylf-status-warning-text: var(--ylf-accent-sun-text);
109
+ --ylf-status-info: var(--ylf-accent-cyan);
110
+ --ylf-status-info-hover: var(--ylf-accent-cyan-hover);
111
+ --ylf-status-info-on: var(--ylf-accent-cyan-on);
112
+ --ylf-status-info-soft: var(--ylf-accent-cyan-soft);
113
+ --ylf-status-info-text: var(--ylf-accent-cyan-text);
114
+ --ylf-status-danger-soft: #fef2f2;
115
+ --ylf-status-danger-text: #b91c1c;
116
+ --ylf-c-feature-bg: var(--ylf-accent-sun-soft);
117
+ --ylf-c-feature-text: var(--ylf-c-text);
118
+ --ylf-c-text-on-accent: #ffffff;
119
+ --ylf-c-bg-mute: #e2e8f0;
120
+ --ylf-c-panel: rgba(255, 255, 255, 0.96);
121
+ --ylf-c-highlight: rgba(255, 255, 255, 0.9);
122
+ --ylf-c-edge: rgba(30, 64, 115, 0.12);
123
+ --ylf-c-overlay: rgba(13, 17, 32, 0.45);
124
+ --ylf-ring-color: var(--ylf-c-brand);
125
+ --ylf-glass-bg: rgba(255, 255, 255, 0.82);
126
+ --ylf-glass-border: rgba(255, 255, 255, 0.7);
127
+ --ylf-shadow-sm: 0 2px 8px -2px rgba(15, 23, 42, 0.12);
128
+ --ylf-shadow: 0 10px 28px -8px rgba(15, 23, 42, 0.16);
129
+ --ylf-shadow-lg: 0 22px 56px -14px rgba(15, 23, 42, 0.22);
130
+ --ylf-shadow-control:
131
+ 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);
132
+ --ylf-shadow-inset: inset 0 1px 3px rgba(15, 23, 42, 0.08);
133
+ --ylf-shadow-panel:
134
+ 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),
135
+ 0 28px 64px -20px rgba(24, 52, 102, 0.24);
136
+ --ylf-glow-brand: 0 6px 18px -8px rgba(0, 106, 235, 0.35);
137
+ --ylf-glow-brand-hover: 0 8px 22px -8px rgba(0, 106, 235, 0.4);
138
+ }
139
+
140
+ [data-ylf-editor-theme='dark'] {
141
+ --ylf-editor-bg: #242426;
142
+ --ylf-editor-chrome: #303033;
143
+ --ylf-editor-panel: #292a2d;
144
+ --ylf-editor-field: #353639;
145
+ --ylf-editor-workspace: #202123;
146
+ --ylf-editor-fg: #eeeef0;
147
+ --ylf-editor-muted: #b1b1b8;
148
+ --ylf-editor-border: rgb(255 255 255 / 11%);
149
+ --ylf-editor-border-control: #82848d;
150
+ --ylf-editor-accent: var(--ylf-c-brand, #38acff);
151
+ --ylf-editor-selection: color-mix(in srgb, var(--ylf-editor-accent) 16%, transparent);
152
+ --ylf-editor-shadow: 0 1px 3px rgb(0 0 0 / 20%), 0 10px 28px -8px rgb(0 0 0 / 40%);
153
+ --ylf-c-brand: #38acff;
154
+ --ylf-c-brand-hover: #73c5ff;
155
+ --ylf-c-brand-active: #1a95f0;
156
+ --ylf-c-brand-soft: #102845;
157
+ --ylf-accent-blue: var(--ylf-c-brand);
158
+ --ylf-accent-blue-hover: var(--ylf-c-brand-hover);
159
+ --ylf-accent-blue-soft: var(--ylf-c-brand-soft);
160
+ --ylf-accent-blue-text: var(--ylf-c-brand);
161
+ --ylf-accent-blue-on: var(--ylf-c-text-on-accent);
162
+ --ylf-accent: var(--ylf-accent-blue);
163
+ --ylf-accent-hover: var(--ylf-accent-blue-hover);
164
+ --ylf-accent-soft: var(--ylf-accent-blue-soft);
165
+ --ylf-accent-text: var(--ylf-accent-blue-text);
166
+ --ylf-accent-on: var(--ylf-accent-blue-on);
167
+ --ylf-accent-sun-soft: #30290f;
168
+ --ylf-accent-sun-text: #fde047;
169
+ --ylf-accent-cyan-soft: #10313d;
170
+ --ylf-accent-cyan-text: #67e8f9;
171
+ --ylf-accent-coral-soft: #39231f;
172
+ --ylf-accent-coral-text: #fda48c;
173
+ --ylf-accent-pink-soft: #351e32;
174
+ --ylf-accent-pink-text: #f9a8d4;
175
+ --ylf-accent-green-soft: #142e26;
176
+ --ylf-accent-green-text: #86efac;
177
+ --ylf-status-success: var(--ylf-accent-green);
178
+ --ylf-status-success-hover: var(--ylf-accent-green-hover);
179
+ --ylf-status-success-on: var(--ylf-accent-green-on);
180
+ --ylf-status-success-soft: var(--ylf-accent-green-soft);
181
+ --ylf-status-success-text: var(--ylf-accent-green-text);
182
+ --ylf-status-warning: var(--ylf-accent-sun);
183
+ --ylf-status-warning-hover: var(--ylf-accent-sun-hover);
184
+ --ylf-status-warning-on: var(--ylf-accent-sun-on);
185
+ --ylf-status-warning-soft: var(--ylf-accent-sun-soft);
186
+ --ylf-status-warning-text: var(--ylf-accent-sun-text);
187
+ --ylf-status-info: var(--ylf-accent-cyan);
188
+ --ylf-status-info-hover: var(--ylf-accent-cyan-hover);
189
+ --ylf-status-info-on: var(--ylf-accent-cyan-on);
190
+ --ylf-status-info-soft: var(--ylf-accent-cyan-soft);
191
+ --ylf-status-info-text: var(--ylf-accent-cyan-text);
192
+ --ylf-status-danger-soft: #3b151a;
193
+ --ylf-status-danger-text: #fca5a5;
194
+ --ylf-c-feature-bg: var(--ylf-accent-sun-soft);
195
+ --ylf-c-feature-text: var(--ylf-c-text);
196
+ --ylf-c-text-on-accent: #0f172a;
197
+ --ylf-c-bg-mute: #22304a;
198
+ --ylf-c-panel: rgba(20, 29, 43, 0.96);
199
+ --ylf-c-highlight: rgba(186, 214, 255, 0.1);
200
+ --ylf-c-edge: rgba(2, 6, 15, 0.55);
201
+ --ylf-c-overlay: rgba(2, 6, 15, 0.72);
202
+ --ylf-ring-color: var(--ylf-c-brand);
203
+ --ylf-glass-bg: rgba(20, 29, 43, 0.9);
204
+ --ylf-glass-border: rgba(56, 172, 255, 0.18);
205
+ --ylf-shadow-sm: 0 2px 10px -2px rgba(2, 6, 15, 0.55);
206
+ --ylf-shadow: 0 12px 30px -8px rgba(2, 6, 15, 0.6);
207
+ --ylf-shadow-lg: 0 24px 60px -14px rgba(2, 6, 15, 0.65);
208
+ --ylf-shadow-control:
209
+ 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);
210
+ --ylf-shadow-inset: inset 0 1px 4px rgba(2, 6, 15, 0.4);
211
+ --ylf-shadow-panel:
212
+ 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),
213
+ 0 32px 72px -18px rgba(2, 6, 15, 0.6);
214
+ --ylf-glow-brand: 0 6px 18px -8px rgba(56, 172, 255, 0.3);
215
+ --ylf-glow-brand-hover: 0 8px 22px -8px rgba(56, 172, 255, 0.4);
216
+ }
217
+
218
+ @media (pointer: coarse) {
219
+ :root {
220
+ --ylf-editor-control-sm: 40px;
221
+ --ylf-editor-control: 40px;
222
+ --ylf-editor-row: 44px;
223
+ --ylf-editor-header: 44px;
224
+ }
225
+ }
226
+
227
+ [data-ylf-profile='editor'],
228
+ [data-ylf-profile='editor'] :is(.light, .dark, .ylf-theme-light, .ylf-theme-dark, [data-ylf-editor-theme]) {
229
+ --ylf-c-bg: var(--ylf-editor-bg);
230
+ --ylf-c-bg-soft: var(--ylf-editor-chrome);
231
+ --ylf-c-bg-mute: var(--ylf-editor-chrome);
232
+ --ylf-c-surface: var(--ylf-editor-field);
233
+ --ylf-c-surface-raised: var(--ylf-editor-panel);
234
+ --ylf-c-surface-inset: var(--ylf-editor-chrome);
235
+ --ylf-c-panel: var(--ylf-editor-panel);
236
+ --ylf-c-text: var(--ylf-editor-fg);
237
+ --ylf-c-text-2: var(--ylf-editor-muted);
238
+ --ylf-c-text-3: var(--ylf-editor-muted);
239
+ --ylf-c-placeholder: var(--ylf-editor-muted);
240
+ --ylf-c-border: var(--ylf-editor-border);
241
+ --ylf-c-border-strong: var(--ylf-editor-border);
242
+ --ylf-c-border-control: var(--ylf-editor-border-control);
243
+ --ylf-c-brand-soft: var(--ylf-editor-selection);
244
+ --ylf-shadow-panel: var(--ylf-editor-shadow);
245
+ --ylf-font-body: var(--ylf-editor-font);
246
+ --ylf-radius: var(--ylf-editor-radius);
247
+ --ylf-radius-sm: var(--ylf-editor-radius);
248
+ --ylf-radius-lg: var(--ylf-editor-panel-radius);
249
+ --ylf-control-h-sm: var(--ylf-editor-control-sm);
250
+ --ylf-control-h: var(--ylf-editor-control);
251
+ --ylf-control-h-lg: var(--ylf-editor-row);
252
+ --ylf-control-radius: var(--ylf-editor-radius);
253
+ --ylf-control-radius-sm: var(--ylf-editor-radius);
254
+ --ylf-panel-radius: var(--ylf-editor-panel-radius);
255
+ --ylf-control-font-size: var(--ylf-editor-text);
256
+ --ylf-control-font-size-sm: var(--ylf-editor-caption);
54
257
  }
55
258
  }