@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/styles/editor.css CHANGED
@@ -1,55 +1,259 @@
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-accent: var(--ylf-c-brand, #2563eb);
41
+ --ylf-editor-selection: color-mix(in srgb, var(--ylf-editor-accent) 10%, transparent);
42
+ --ylf-editor-shadow: 0 1px 3px rgb(0 0 0 / 8%), 0 10px 28px -8px rgb(0 0 0 / 18%);
43
+ }
44
+
45
+ .dark,
46
+ .ylf-theme-dark {
47
+ --ylf-editor-bg: #242426;
48
+ --ylf-editor-chrome: #303033;
49
+ --ylf-editor-panel: #292a2d;
50
+ --ylf-editor-field: #353639;
51
+ --ylf-editor-workspace: #202123;
52
+ --ylf-editor-fg: #eeeef0;
53
+ --ylf-editor-muted: #b1b1b8;
54
+ --ylf-editor-border: rgb(255 255 255 / 11%);
55
+ --ylf-editor-accent: var(--ylf-c-brand, #60a5fa);
56
+ --ylf-editor-selection: color-mix(in srgb, var(--ylf-editor-accent) 16%, transparent);
57
+ --ylf-editor-shadow: 0 1px 3px rgb(0 0 0 / 20%), 0 10px 28px -8px rgb(0 0 0 / 40%);
58
+ }
59
+
60
+ [data-ylf-editor-theme='light'] {
61
+ --ylf-editor-bg: #f6f6f7;
62
+ --ylf-editor-chrome: #ebebed;
63
+ --ylf-editor-panel: #f6f6f7;
64
+ --ylf-editor-field: #ffffff;
65
+ --ylf-editor-workspace: #d7d7da;
66
+ --ylf-editor-fg: #292a2e;
67
+ --ylf-editor-muted: #5c5d65;
68
+ --ylf-editor-border: rgb(25 25 30 / 13%);
69
+ --ylf-editor-accent: var(--ylf-c-brand, #2563eb);
70
+ --ylf-editor-selection: color-mix(in srgb, var(--ylf-editor-accent) 10%, transparent);
71
+ --ylf-editor-shadow: 0 1px 3px rgb(0 0 0 / 8%), 0 10px 28px -8px rgb(0 0 0 / 18%);
72
+ --ylf-c-brand: var(--ylf-palette-blue);
73
+ --ylf-c-brand-hover: #1d4ed8;
74
+ --ylf-c-brand-active: #1e40af;
75
+ --ylf-c-brand-soft: #eff6ff;
76
+ --ylf-accent-blue: var(--ylf-c-brand);
77
+ --ylf-accent-blue-hover: var(--ylf-c-brand-hover);
78
+ --ylf-accent-blue-soft: var(--ylf-c-brand-soft);
79
+ --ylf-accent-blue-text: var(--ylf-c-brand);
80
+ --ylf-accent-blue-on: var(--ylf-c-text-on-accent);
81
+ --ylf-accent: var(--ylf-accent-blue);
82
+ --ylf-accent-hover: var(--ylf-accent-blue-hover);
83
+ --ylf-accent-soft: var(--ylf-accent-blue-soft);
84
+ --ylf-accent-text: var(--ylf-accent-blue-text);
85
+ --ylf-accent-on: var(--ylf-accent-blue-on);
86
+ --ylf-accent-sun-soft: #fef9c3;
87
+ --ylf-accent-sun-text: #854d0e;
88
+ --ylf-accent-cyan-soft: #cffafe;
89
+ --ylf-accent-cyan-text: #155e75;
90
+ --ylf-accent-coral-soft: #ffede6;
91
+ --ylf-accent-coral-text: #9a3412;
92
+ --ylf-accent-pink-soft: #fce7f3;
93
+ --ylf-accent-pink-text: #9d174d;
94
+ --ylf-accent-green-soft: #dcfce7;
95
+ --ylf-accent-green-text: #166534;
96
+ --ylf-status-success: var(--ylf-accent-green);
97
+ --ylf-status-success-hover: var(--ylf-accent-green-hover);
98
+ --ylf-status-success-on: var(--ylf-accent-green-on);
99
+ --ylf-status-success-soft: var(--ylf-accent-green-soft);
100
+ --ylf-status-success-text: var(--ylf-accent-green-text);
101
+ --ylf-status-warning: var(--ylf-accent-sun);
102
+ --ylf-status-warning-hover: var(--ylf-accent-sun-hover);
103
+ --ylf-status-warning-on: var(--ylf-accent-sun-on);
104
+ --ylf-status-warning-soft: var(--ylf-accent-sun-soft);
105
+ --ylf-status-warning-text: var(--ylf-accent-sun-text);
106
+ --ylf-status-danger: var(--ylf-accent-coral);
107
+ --ylf-status-danger-hover: var(--ylf-accent-coral-hover);
108
+ --ylf-status-danger-on: var(--ylf-accent-coral-on);
109
+ --ylf-status-danger-soft: var(--ylf-accent-coral-soft);
110
+ --ylf-status-danger-text: var(--ylf-accent-coral-text);
111
+ --ylf-status-info: var(--ylf-accent-cyan);
112
+ --ylf-status-info-hover: var(--ylf-accent-cyan-hover);
113
+ --ylf-status-info-on: var(--ylf-accent-cyan-on);
114
+ --ylf-status-info-soft: var(--ylf-accent-cyan-soft);
115
+ --ylf-status-info-text: var(--ylf-accent-cyan-text);
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(37, 99, 235, 0.35);
137
+ --ylf-glow-brand-hover: 0 8px 22px -8px rgba(37, 99, 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-accent: var(--ylf-c-brand, #60a5fa);
150
+ --ylf-editor-selection: color-mix(in srgb, var(--ylf-editor-accent) 16%, transparent);
151
+ --ylf-editor-shadow: 0 1px 3px rgb(0 0 0 / 20%), 0 10px 28px -8px rgb(0 0 0 / 40%);
152
+ --ylf-c-brand: #60a5fa;
153
+ --ylf-c-brand-hover: #93c5fd;
154
+ --ylf-c-brand-active: #3b82f6;
155
+ --ylf-c-brand-soft: #15264a;
156
+ --ylf-accent-blue: var(--ylf-c-brand);
157
+ --ylf-accent-blue-hover: var(--ylf-c-brand-hover);
158
+ --ylf-accent-blue-soft: var(--ylf-c-brand-soft);
159
+ --ylf-accent-blue-text: var(--ylf-c-brand);
160
+ --ylf-accent-blue-on: var(--ylf-c-text-on-accent);
161
+ --ylf-accent: var(--ylf-accent-blue);
162
+ --ylf-accent-hover: var(--ylf-accent-blue-hover);
163
+ --ylf-accent-soft: var(--ylf-accent-blue-soft);
164
+ --ylf-accent-text: var(--ylf-accent-blue-text);
165
+ --ylf-accent-on: var(--ylf-accent-blue-on);
166
+ --ylf-accent-sun-soft: #30290f;
167
+ --ylf-accent-sun-text: #fde047;
168
+ --ylf-accent-cyan-soft: #10313d;
169
+ --ylf-accent-cyan-text: #67e8f9;
170
+ --ylf-accent-coral-soft: #39231f;
171
+ --ylf-accent-coral-text: #fda48c;
172
+ --ylf-accent-pink-soft: #351e32;
173
+ --ylf-accent-pink-text: #f9a8d4;
174
+ --ylf-accent-green-soft: #142e26;
175
+ --ylf-accent-green-text: #86efac;
176
+ --ylf-status-success: var(--ylf-accent-green);
177
+ --ylf-status-success-hover: var(--ylf-accent-green-hover);
178
+ --ylf-status-success-on: var(--ylf-accent-green-on);
179
+ --ylf-status-success-soft: var(--ylf-accent-green-soft);
180
+ --ylf-status-success-text: var(--ylf-accent-green-text);
181
+ --ylf-status-warning: var(--ylf-accent-sun);
182
+ --ylf-status-warning-hover: var(--ylf-accent-sun-hover);
183
+ --ylf-status-warning-on: var(--ylf-accent-sun-on);
184
+ --ylf-status-warning-soft: var(--ylf-accent-sun-soft);
185
+ --ylf-status-warning-text: var(--ylf-accent-sun-text);
186
+ --ylf-status-danger: var(--ylf-accent-coral);
187
+ --ylf-status-danger-hover: var(--ylf-accent-coral-hover);
188
+ --ylf-status-danger-on: var(--ylf-accent-coral-on);
189
+ --ylf-status-danger-soft: var(--ylf-accent-coral-soft);
190
+ --ylf-status-danger-text: var(--ylf-accent-coral-text);
191
+ --ylf-status-info: var(--ylf-accent-cyan);
192
+ --ylf-status-info-hover: var(--ylf-accent-cyan-hover);
193
+ --ylf-status-info-on: var(--ylf-accent-cyan-on);
194
+ --ylf-status-info-soft: var(--ylf-accent-cyan-soft);
195
+ --ylf-status-info-text: var(--ylf-accent-cyan-text);
196
+ --ylf-c-feature-bg: var(--ylf-accent-sun-soft);
197
+ --ylf-c-feature-text: var(--ylf-c-text);
198
+ --ylf-c-text-on-accent: #0f172a;
199
+ --ylf-c-bg-mute: #22304a;
200
+ --ylf-c-panel: rgba(20, 29, 43, 0.96);
201
+ --ylf-c-highlight: rgba(186, 214, 255, 0.1);
202
+ --ylf-c-edge: rgba(2, 6, 15, 0.55);
203
+ --ylf-c-overlay: rgba(2, 6, 15, 0.72);
204
+ --ylf-ring-color: var(--ylf-c-brand);
205
+ --ylf-glass-bg: rgba(20, 29, 43, 0.9);
206
+ --ylf-glass-border: rgba(96, 165, 250, 0.18);
207
+ --ylf-shadow-sm: 0 2px 10px -2px rgba(2, 6, 15, 0.55);
208
+ --ylf-shadow: 0 12px 30px -8px rgba(2, 6, 15, 0.6);
209
+ --ylf-shadow-lg: 0 24px 60px -14px rgba(2, 6, 15, 0.65);
210
+ --ylf-shadow-control:
211
+ 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);
212
+ --ylf-shadow-inset: inset 0 1px 4px rgba(2, 6, 15, 0.4);
213
+ --ylf-shadow-panel:
214
+ 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),
215
+ 0 32px 72px -18px rgba(2, 6, 15, 0.6);
216
+ --ylf-glow-brand: 0 6px 18px -8px rgba(96, 165, 250, 0.3);
217
+ --ylf-glow-brand-hover: 0 8px 22px -8px rgba(96, 165, 250, 0.4);
218
+ }
219
+
220
+ @media (pointer: coarse) {
221
+ :root {
222
+ --ylf-editor-control-sm: 40px;
223
+ --ylf-editor-control: 40px;
224
+ --ylf-editor-row: 44px;
225
+ --ylf-editor-header: 44px;
226
+ }
227
+ }
228
+
229
+ [data-ylf-profile='editor'],
230
+ [data-ylf-profile='editor'] :is(.light, .dark, .ylf-theme-light, .ylf-theme-dark, [data-ylf-editor-theme]) {
231
+ --ylf-c-bg: var(--ylf-editor-bg);
232
+ --ylf-c-bg-soft: var(--ylf-editor-chrome);
233
+ --ylf-c-bg-mute: var(--ylf-editor-chrome);
234
+ --ylf-c-surface: var(--ylf-editor-field);
235
+ --ylf-c-surface-raised: var(--ylf-editor-panel);
236
+ --ylf-c-surface-inset: var(--ylf-editor-chrome);
237
+ --ylf-c-panel: var(--ylf-editor-panel);
238
+ --ylf-c-text: var(--ylf-editor-fg);
239
+ --ylf-c-text-2: var(--ylf-editor-muted);
240
+ --ylf-c-text-3: var(--ylf-editor-muted);
241
+ --ylf-c-placeholder: var(--ylf-editor-muted);
242
+ --ylf-c-border: var(--ylf-editor-border);
243
+ --ylf-c-border-strong: var(--ylf-editor-border);
244
+ --ylf-c-brand-soft: var(--ylf-editor-selection);
245
+ --ylf-shadow-panel: var(--ylf-editor-shadow);
246
+ --ylf-font-body: var(--ylf-editor-font);
247
+ --ylf-radius: var(--ylf-editor-radius);
248
+ --ylf-radius-sm: var(--ylf-editor-radius);
249
+ --ylf-radius-lg: var(--ylf-editor-panel-radius);
250
+ --ylf-control-h-sm: var(--ylf-editor-control-sm);
251
+ --ylf-control-h: var(--ylf-editor-control);
252
+ --ylf-control-h-lg: var(--ylf-editor-row);
253
+ --ylf-control-radius: var(--ylf-editor-radius);
254
+ --ylf-control-radius-sm: var(--ylf-editor-radius);
255
+ --ylf-panel-radius: var(--ylf-editor-panel-radius);
256
+ --ylf-control-font-size: var(--ylf-editor-text);
257
+ --ylf-control-font-size-sm: var(--ylf-editor-caption);
54
258
  }
55
259
  }