@yunlefun/vue 0.8.0 → 0.9.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.
Files changed (39) hide show
  1. package/components/YlfAccordion.vue +3 -3
  2. package/components/YlfAgentCard.vue +2 -2
  3. package/components/YlfAgentStatus.vue +4 -4
  4. package/components/YlfAiPromptLauncher.vue +1 -1
  5. package/components/YlfAvatar.vue +2 -2
  6. package/components/YlfBadge.vue +11 -11
  7. package/components/YlfBottomMenuItem.vue +1 -1
  8. package/components/YlfButton.vue +43 -38
  9. package/components/YlfCard.vue +3 -3
  10. package/components/YlfCheckbox.vue +6 -6
  11. package/components/YlfCuteCloud.vue +246 -0
  12. package/components/YlfDialog.vue +1 -1
  13. package/components/YlfDropdownMenu.vue +3 -3
  14. package/components/YlfInput.vue +5 -5
  15. package/components/YlfLogo.vue +1 -1
  16. package/components/YlfNavigation.vue +2 -2
  17. package/components/YlfNavigationLink.vue +3 -3
  18. package/components/YlfNavigationTrigger.vue +1 -1
  19. package/components/YlfProgress.vue +2 -2
  20. package/components/YlfRadioGroup.vue +6 -6
  21. package/components/YlfSegmentedControl.vue +2 -2
  22. package/components/YlfSelect.vue +11 -11
  23. package/components/YlfSeparator.vue +4 -4
  24. package/components/YlfSlider.vue +6 -6
  25. package/components/YlfSwitch.vue +7 -6
  26. package/components/YlfTabs.vue +6 -6
  27. package/components/badge/index.md +2 -2
  28. package/components/button/index.md +2 -2
  29. package/components/cute-cloud/demo.vue +73 -0
  30. package/components/cute-cloud/index.md +34 -0
  31. package/components/cute-cloud.ts +16 -0
  32. package/dist/components/YlfCuteCloud.vue.d.ts +25 -0
  33. package/dist/components/cute-cloud.d.ts +10 -0
  34. package/dist/index.cjs +7 -0
  35. package/dist/index.d.cts +13 -2
  36. package/dist/index.d.mts +13 -2
  37. package/dist/index.d.ts +13 -2
  38. package/dist/index.mjs +7 -1
  39. package/package.json +1 -1
@@ -97,8 +97,8 @@ const model = defineModel<string | string[]>()
97
97
  }
98
98
 
99
99
  .ylf-accordion__trigger[data-state='open'] {
100
- color: var(--ylf-c-brand, #2563eb);
101
- background: color-mix(in srgb, var(--ylf-c-brand-soft, #eff6ff) 60%, transparent);
100
+ color: var(--ylf-c-brand, #006aeb);
101
+ background: color-mix(in srgb, var(--ylf-c-brand-soft, #f0f7ff) 60%, transparent);
102
102
  }
103
103
 
104
104
  .ylf-accordion__trigger[data-disabled] {
@@ -109,7 +109,7 @@ const model = defineModel<string | string[]>()
109
109
  .ylf-accordion__trigger:focus-visible {
110
110
  outline: var(--ylf-ring-width, 2px) solid transparent;
111
111
  outline-offset: -2px;
112
- box-shadow: inset 0 0 0 var(--ylf-ring-width, 2px) var(--ylf-ring-color, var(--ylf-c-brand, #2563eb));
112
+ box-shadow: inset 0 0 0 var(--ylf-ring-width, 2px) var(--ylf-ring-color, var(--ylf-c-brand, #006aeb));
113
113
  }
114
114
 
115
115
  .ylf-accordion__chevron {
@@ -67,8 +67,8 @@ const titleId = useId()
67
67
  width: 52px;
68
68
  height: 52px;
69
69
  border-radius: var(--ylf-radius, 14px);
70
- background: var(--ylf-c-brand-soft, #eff6ff);
71
- color: var(--ylf-c-brand, #2563eb);
70
+ background: var(--ylf-c-brand-soft, #f0f7ff);
71
+ color: var(--ylf-c-brand, #006aeb);
72
72
  }
73
73
  .ylf-agent-card__avatar svg {
74
74
  width: 32px;
@@ -41,16 +41,16 @@ withDefaults(defineProps<{
41
41
  }
42
42
  .ylf-agent-status[data-state='connecting'],
43
43
  .ylf-agent-status[data-state='working'] {
44
- --agent-color: var(--ylf-c-brand, #2563eb);
45
- --agent-surface: var(--ylf-c-brand-soft, #eff6ff);
44
+ --agent-color: var(--ylf-c-brand, #006aeb);
45
+ --agent-surface: var(--ylf-c-brand-soft, #f0f7ff);
46
46
  }
47
47
  .ylf-agent-status[data-state='waiting'] {
48
48
  --agent-color: var(--ylf-status-warning-text, #854d0e);
49
49
  --agent-surface: var(--ylf-status-warning-soft, #fef9c3);
50
50
  }
51
51
  .ylf-agent-status[data-state='error'] {
52
- --agent-color: var(--ylf-status-danger-text, #9a3412);
53
- --agent-surface: var(--ylf-status-danger-soft, #ffede6);
52
+ --agent-color: var(--ylf-status-danger-text, #b91c1c);
53
+ --agent-surface: var(--ylf-status-danger-soft, #fef2f2);
54
54
  }
55
55
  .ylf-agent-status__mark {
56
56
  flex: none;
@@ -186,7 +186,7 @@ async function open(event: MouseEvent, target: AiPromptTarget) {
186
186
  --_border: var(--ylf-ai-border, var(--ylf-c-border, #e2e8f0));
187
187
  --_surface: var(--ylf-ai-surface, var(--ylf-c-surface, #fff));
188
188
  --_soft: var(--ylf-ai-background, var(--ylf-c-bg-soft, #f1f5f9));
189
- --_brand: var(--ylf-ai-accent, var(--ylf-c-brand, #2563eb));
189
+ --_brand: var(--ylf-ai-accent, var(--ylf-c-brand, #006aeb));
190
190
  color: var(--_ink);
191
191
  container: ylf-ai / inline-size;
192
192
  }
@@ -32,7 +32,7 @@ withDefaults(defineProps<{
32
32
  overflow: hidden;
33
33
  border-radius: 50%;
34
34
  user-select: none;
35
- background: var(--ylf-c-brand-soft, #eff6ff);
35
+ background: var(--ylf-c-brand-soft, #f0f7ff);
36
36
  }
37
37
 
38
38
  .ylf-avatar--sm {
@@ -66,6 +66,6 @@ withDefaults(defineProps<{
66
66
  width: 100%;
67
67
  height: 100%;
68
68
  font-weight: 600;
69
- color: var(--ylf-c-brand, #2563eb);
69
+ color: var(--ylf-c-brand, #006aeb);
70
70
  }
71
71
  </style>
@@ -48,7 +48,7 @@ const statusPath = computed(() => statusPaths[props.variant])
48
48
 
49
49
  <style>
50
50
  .ylf-badge {
51
- --_badge-tone: var(--ylf-c-brand, #2563eb);
51
+ --_badge-tone: var(--ylf-c-brand, #006aeb);
52
52
 
53
53
  display: inline-flex;
54
54
  align-items: center;
@@ -73,12 +73,12 @@ const statusPath = computed(() => statusPaths[props.variant])
73
73
  }
74
74
 
75
75
  .ylf-badge--accent {
76
- --_color: var(--ylf-accent, var(--ylf-c-brand, #2563eb));
77
- --_soft: var(--ylf-accent-soft, var(--ylf-c-brand-soft, #eff6ff));
78
- --_text: var(--ylf-accent-text, var(--ylf-c-brand, #2563eb));
76
+ --_color: var(--ylf-accent, var(--ylf-c-brand, #006aeb));
77
+ --_soft: var(--ylf-accent-soft, var(--ylf-c-brand-soft, #f0f7ff));
78
+ --_text: var(--ylf-accent-text, var(--ylf-c-brand, #006aeb));
79
79
 
80
80
  color: var(--ylf-accent-on, var(--ylf-c-text-on-accent, #fff));
81
- background: var(--ylf-accent, var(--ylf-c-brand, #2563eb));
81
+ background: var(--ylf-accent, var(--ylf-c-brand, #006aeb));
82
82
  border-color: transparent;
83
83
  }
84
84
 
@@ -113,7 +113,7 @@ const statusPath = computed(() => statusPaths[props.variant])
113
113
  --_soft: var(--ylf-status-success-soft, var(--ylf-c-bg-soft, #f1f5f9));
114
114
  --_text: var(--ylf-status-success-text, #166534);
115
115
 
116
- color: var(--ylf-status-success-on, #124324);
116
+ color: var(--ylf-status-success-on, #052e16);
117
117
  background: var(--ylf-status-success, #22c55e);
118
118
  border-color: transparent;
119
119
  }
@@ -129,12 +129,12 @@ const statusPath = computed(() => statusPaths[props.variant])
129
129
  }
130
130
 
131
131
  .ylf-badge--danger {
132
- --_color: var(--ylf-status-danger, #ff6b4a);
132
+ --_color: var(--ylf-status-danger, #dc2626);
133
133
  --_soft: var(--ylf-status-danger-soft, var(--ylf-c-bg-soft, #f1f5f9));
134
- --_text: var(--ylf-status-danger-text, #9a3412);
134
+ --_text: var(--ylf-status-danger-text, #b91c1c);
135
135
 
136
- color: var(--ylf-status-danger-on, #551b0a);
137
- background: var(--ylf-status-danger, #ff6b4a);
136
+ color: var(--ylf-status-danger-on, #fff);
137
+ background: var(--ylf-status-danger, #dc2626);
138
138
  border-color: transparent;
139
139
  }
140
140
 
@@ -143,7 +143,7 @@ const statusPath = computed(() => statusPaths[props.variant])
143
143
  --_soft: var(--ylf-status-info-soft, var(--ylf-c-bg-soft, #f1f5f9));
144
144
  --_text: var(--ylf-status-info-text, #155e75);
145
145
 
146
- color: var(--ylf-status-info-on, #083e4f);
146
+ color: var(--ylf-status-info-on, #032530);
147
147
  background: var(--ylf-status-info, #06b6d4);
148
148
  border-color: transparent;
149
149
  }
@@ -54,7 +54,7 @@ const emit = defineEmits(['click'])
54
54
  }
55
55
 
56
56
  .ylf-bottom-menu-item.active {
57
- color: var(--ylf-c-brand, #2563eb);
57
+ color: var(--ylf-c-brand, #006aeb);
58
58
  }
59
59
 
60
60
  @media (prefers-reduced-motion: reduce) {
@@ -92,7 +92,7 @@ function onClick(e: MouseEvent) {
92
92
  <style>
93
93
  .ylf-button {
94
94
  --_radius: var(--ylf-control-radius, var(--ylf-radius, 14px));
95
- --_fill: var(--ylf-c-brand, #2563eb);
95
+ --_fill: var(--ylf-c-brand, #006aeb);
96
96
 
97
97
  box-sizing: border-box;
98
98
  max-width: 100%;
@@ -131,11 +131,11 @@ function onClick(e: MouseEvent) {
131
131
  }
132
132
 
133
133
  .ylf-button:focus-visible {
134
- outline: var(--ylf-ring-width, 2px) solid var(--ylf-ring-color, var(--ylf-c-brand, #2563eb));
134
+ outline: var(--ylf-ring-width, 2px) solid var(--ylf-ring-color, var(--ylf-c-brand, #006aeb));
135
135
  outline-offset: 4px;
136
136
  box-shadow:
137
- 0 0 0 3px var(--ylf-c-brand-soft, #eff6ff),
138
- 0 0 0 5px var(--ylf-ring-color, var(--ylf-c-brand, #2563eb));
137
+ 0 0 0 3px var(--ylf-c-brand-soft, #f0f7ff),
138
+ 0 0 0 5px var(--ylf-ring-color, var(--ylf-c-brand, #006aeb));
139
139
  }
140
140
 
141
141
  /* --- sizes --- */
@@ -194,18 +194,18 @@ function onClick(e: MouseEvent) {
194
194
  /* Opt-in brand entrance; everyday primary actions keep their solid appearance. */
195
195
  .ylf-button--hero {
196
196
  color: var(--ylf-hero-foreground, #fff);
197
- background: var(--ylf-hero-background, linear-gradient(115deg, #2563eb, #0f74b8 58%, #0369a1));
197
+ background: var(--ylf-hero-background, linear-gradient(115deg, #006aeb, #005ed6 58%, #0051bd));
198
198
  border-color: var(--ylf-hero-border, rgb(255 255 255 / 0.16));
199
- box-shadow: var(--ylf-hero-shadow, inset 0 1px 0 rgb(255 255 255 / 0.24), 0 12px 26px -14px rgb(3 105 161 / 0.58));
199
+ box-shadow: var(--ylf-hero-shadow, inset 0 1px 0 rgb(255 255 255 / 0.24), 0 12px 26px -14px rgb(0 81 189 / 0.58));
200
200
  }
201
201
 
202
202
  @media (hover: hover) and (pointer: fine) {
203
203
  .ylf-button--hero:hover:not(.is-disabled, .is-loading, :disabled) {
204
- background: var(--ylf-hero-background-hover, linear-gradient(115deg, #1d4ed8, #096ba9 58%, #075985));
204
+ background: var(--ylf-hero-background-hover, linear-gradient(115deg, #0057c7, #004db3 58%, #004199));
205
205
  box-shadow: var(
206
206
  --ylf-hero-shadow-hover,
207
207
  inset 0 1px 0 rgb(255 255 255 / 0.3),
208
- 0 14px 30px -14px rgb(3 105 161 / 0.58)
208
+ 0 14px 30px -14px rgb(0 81 189 / 0.58)
209
209
  );
210
210
  transform: translateY(var(--ylf-hover-lift, -1px));
211
211
  }
@@ -214,13 +214,13 @@ function onClick(e: MouseEvent) {
214
214
  .ylf-button--hero:focus-visible {
215
215
  outline: var(--ylf-ring-width, 2px) solid var(--ylf-hero-foreground, #fff);
216
216
  outline-offset: 3px;
217
- box-shadow: 0 0 0 5px var(--ylf-hero-end, #0369a1);
217
+ box-shadow: 0 0 0 5px var(--ylf-hero-end, #0051bd);
218
218
  }
219
219
 
220
220
  /* --- primary:晴空蓝实色(主操作,单色不花) --- */
221
221
  .ylf-button--primary {
222
222
  color: var(--ylf-c-text-on-accent, #fff);
223
- background: var(--ylf-c-brand, #2563eb);
223
+ background: var(--ylf-c-brand, #006aeb);
224
224
  border-color: color-mix(in srgb, var(--_fill) 85%, #000);
225
225
  box-shadow:
226
226
  inset 0 1px 0 rgba(255, 255, 255, 0.22),
@@ -230,7 +230,7 @@ function onClick(e: MouseEvent) {
230
230
 
231
231
  @media (hover: hover) and (pointer: fine) {
232
232
  .ylf-button--primary:hover:not(.is-disabled, .is-loading, :disabled) {
233
- background: var(--ylf-c-brand-hover, #1d4ed8);
233
+ background: var(--ylf-c-brand-hover, #0057c7);
234
234
  transform: translateY(var(--ylf-hover-lift, -1px));
235
235
  box-shadow:
236
236
  inset 0 1px 0 rgba(255, 255, 255, 0.22),
@@ -242,23 +242,25 @@ function onClick(e: MouseEvent) {
242
242
  /* 强调色来自共享上下文;实色上的文字与填充色成组维护。 */
243
243
  .ylf-button--accent,
244
244
  .ylf-button--aurora {
245
- --_fill: var(--ylf-accent, var(--ylf-c-brand, #2563eb));
246
- --_color: var(--ylf-accent, var(--ylf-c-brand, #2563eb));
247
- --_soft: var(--ylf-accent-soft, var(--ylf-c-brand-soft, #eff6ff));
248
- --_text: var(--ylf-accent-text, var(--ylf-c-brand, #2563eb));
245
+ --_fill: var(--ylf-accent, var(--ylf-c-brand, #006aeb));
246
+ --_color: var(--ylf-accent, var(--ylf-c-brand, #006aeb));
247
+ --_soft: var(--ylf-accent-soft, var(--ylf-c-brand-soft, #f0f7ff));
248
+ --_text: var(--ylf-accent-text, var(--ylf-c-brand, #006aeb));
249
249
 
250
250
  color: var(--ylf-accent-on, var(--ylf-c-text-on-accent, #fff));
251
- background: var(--ylf-accent, var(--ylf-c-brand, #2563eb));
252
- border-color: color-mix(in srgb, var(--_fill) 82%, #000);
251
+ background: var(--ylf-accent, var(--ylf-c-brand, #006aeb));
252
+ border-color: color-mix(in srgb, var(--_fill) 85%, #000);
253
253
  box-shadow:
254
- inset 0 1px 0 rgba(255, 255, 255, 0.2),
255
- 0 2px 0 color-mix(in srgb, var(--_fill) 78%, #000);
254
+ inset 0 1px 0 rgba(255, 255, 255, 0.22),
255
+ 0 2px 0 color-mix(in srgb, var(--_fill) 80%, #000),
256
+ 0 6px 14px -6px color-mix(in srgb, var(--_fill) 32%, transparent);
256
257
  }
257
258
 
258
259
  @media (hover: hover) and (pointer: fine) {
259
260
  .ylf-button--accent:hover:not(.is-disabled, .is-loading, :disabled),
260
261
  .ylf-button--aurora:hover:not(.is-disabled, .is-loading, :disabled) {
261
- background: var(--ylf-accent-hover, var(--ylf-c-brand-hover, #1d4ed8));
262
+ background: var(--ylf-accent-hover, var(--ylf-c-brand-hover, #0057c7));
263
+ transform: translateY(var(--ylf-hover-lift, -1px));
262
264
  }
263
265
  }
264
266
 
@@ -266,23 +268,23 @@ function onClick(e: MouseEvent) {
266
268
  .ylf-button--secondary {
267
269
  color: var(--ylf-c-text, #0f172a);
268
270
  background: var(--ylf-c-surface, #fff);
269
- border-color: var(--ylf-c-border-strong, #cbd5e1);
271
+ border-color: var(--ylf-c-border-control, #7d8ca0);
270
272
  box-shadow: var(--ylf-shadow-control);
271
273
  }
272
274
 
273
275
  @media (hover: hover) and (pointer: fine) {
274
276
  .ylf-button--secondary:hover:not(.is-disabled, .is-loading, :disabled) {
275
- color: var(--ylf-c-brand, #2563eb);
276
- border-color: var(--ylf-c-brand, #2563eb);
277
+ color: var(--ylf-c-brand, #006aeb);
278
+ border-color: var(--ylf-c-brand, #006aeb);
277
279
  transform: translateY(var(--ylf-hover-lift, -1px));
278
280
  }
279
281
  }
280
282
 
281
283
  /* --- soft:柔色填充 --- */
282
284
  .ylf-button--soft {
283
- color: var(--ylf-c-brand, #2563eb);
284
- background: var(--ylf-c-brand-soft, #eff6ff);
285
- border-color: color-mix(in srgb, var(--ylf-c-brand, #2563eb) 12%, transparent);
285
+ color: var(--ylf-c-brand, #006aeb);
286
+ background: var(--ylf-c-brand-soft, #f0f7ff);
287
+ border-color: color-mix(in srgb, var(--ylf-c-brand, #006aeb) 12%, transparent);
286
288
  }
287
289
 
288
290
  @media (hover: hover) and (pointer: fine) {
@@ -300,14 +302,14 @@ function onClick(e: MouseEvent) {
300
302
 
301
303
  @media (hover: hover) and (pointer: fine) {
302
304
  .ylf-button--ghost:hover:not(.is-disabled, .is-loading, :disabled) {
303
- color: var(--ylf-c-brand, #2563eb);
304
- background: var(--ylf-c-brand-soft, #eff6ff);
305
+ color: var(--ylf-c-brand, #006aeb);
306
+ background: var(--ylf-c-brand-soft, #f0f7ff);
305
307
  }
306
308
  }
307
309
 
308
310
  .ylf-button--ghost[aria-pressed='true'] {
309
- color: var(--ylf-c-brand, #2563eb);
310
- background: var(--ylf-c-brand-soft, #eff6ff);
311
+ color: var(--ylf-c-brand, #006aeb);
312
+ background: var(--ylf-c-brand-soft, #f0f7ff);
311
313
  }
312
314
 
313
315
  /* --- 语义色 --- */
@@ -316,7 +318,7 @@ function onClick(e: MouseEvent) {
316
318
  --_soft: var(--ylf-status-success-soft, var(--ylf-c-bg-soft, #f1f5f9));
317
319
  --_text: var(--ylf-status-success-text, #166534);
318
320
 
319
- color: var(--ylf-status-success-on, #124324);
321
+ color: var(--ylf-status-success-on, #052e16);
320
322
  background: var(--ylf-status-success, #22c55e);
321
323
  }
322
324
 
@@ -330,25 +332,28 @@ function onClick(e: MouseEvent) {
330
332
  }
331
333
 
332
334
  .ylf-button--danger {
333
- --_color: var(--ylf-status-danger, #ff6b4a);
335
+ --_color: var(--ylf-status-danger, #dc2626);
334
336
  --_soft: var(--ylf-status-danger-soft, var(--ylf-c-bg-soft, #f1f5f9));
335
- --_text: var(--ylf-status-danger-text, #9a3412);
337
+ --_text: var(--ylf-status-danger-text, #b91c1c);
336
338
 
337
- color: var(--ylf-status-danger-on, #551b0a);
338
- background: var(--ylf-status-danger, #ff6b4a);
339
+ color: var(--ylf-status-danger-on, #fff);
340
+ background: var(--ylf-status-danger, #dc2626);
339
341
  }
340
342
 
341
343
  @media (hover: hover) and (pointer: fine) {
342
344
  .ylf-button--success:hover:not(.is-disabled, .is-loading, :disabled) {
343
- background: var(--ylf-status-success-hover, #4ade80);
345
+ background: var(--ylf-status-success-hover, #18a84e);
346
+ transform: translateY(var(--ylf-hover-lift, -1px));
344
347
  }
345
348
 
346
349
  .ylf-button--warning:hover:not(.is-disabled, .is-loading, :disabled) {
347
350
  background: var(--ylf-status-warning-hover, #eab308);
351
+ transform: translateY(var(--ylf-hover-lift, -1px));
348
352
  }
349
353
 
350
354
  .ylf-button--danger:hover:not(.is-disabled, .is-loading, :disabled) {
351
- background: var(--ylf-status-danger-hover, #ff856b);
355
+ background: var(--ylf-status-danger-hover, #b91c1c);
356
+ transform: translateY(var(--ylf-hover-lift, -1px));
352
357
  }
353
358
  }
354
359
 
@@ -374,7 +379,7 @@ function onClick(e: MouseEvent) {
374
379
  .is-soft,
375
380
  .is-outline
376
381
  ):focus-visible {
377
- outline: var(--ylf-ring-width, 2px) solid var(--ylf-ring-color, var(--ylf-c-brand, #2563eb));
382
+ outline: var(--ylf-ring-width, 2px) solid var(--ylf-ring-color, var(--ylf-c-brand, #006aeb));
378
383
  outline-offset: 3px;
379
384
  }
380
385
 
@@ -66,12 +66,12 @@ withDefaults(defineProps<{
66
66
 
67
67
  .ylf-card--accent,
68
68
  .ylf-card--gradient {
69
- border-top: 3px solid var(--ylf-accent, var(--ylf-c-brand, #2563eb));
69
+ border-top: 3px solid var(--ylf-accent, var(--ylf-c-brand, #006aeb));
70
70
  }
71
71
 
72
72
  .ylf-card--tinted {
73
- background: var(--ylf-accent-soft, var(--ylf-c-brand-soft, #eff6ff));
74
- border-color: color-mix(in srgb, var(--ylf-accent, var(--ylf-c-brand, #2563eb)) 35%, var(--ylf-c-surface, #fff));
73
+ background: var(--ylf-accent-soft, var(--ylf-c-brand-soft, #f0f7ff));
74
+ border-color: color-mix(in srgb, var(--ylf-accent, var(--ylf-c-brand, #006aeb)) 35%, var(--ylf-c-surface, #fff));
75
75
  box-shadow: none;
76
76
  }
77
77
 
@@ -48,7 +48,7 @@ watch(checked, () => {
48
48
  display: inline-grid;
49
49
  place-items: center;
50
50
  padding: 0;
51
- border: 2px solid var(--ylf-c-border-strong, #cbd5e1);
51
+ border: 2px solid var(--ylf-c-border-control, #7d8ca0);
52
52
  border-radius: 7px;
53
53
  background: var(--ylf-c-surface, #fff);
54
54
  box-shadow: var(--ylf-shadow-control);
@@ -65,14 +65,14 @@ watch(checked, () => {
65
65
 
66
66
  @media (hover: hover) and (pointer: fine) {
67
67
  .ylf-checkbox:hover:not([data-disabled]) {
68
- border-color: var(--ylf-c-brand, #2563eb);
68
+ border-color: var(--ylf-c-brand, #006aeb);
69
69
  }
70
70
  }
71
71
 
72
72
  .ylf-checkbox:focus-visible {
73
- outline: var(--ylf-ring-width, 2px) solid var(--ylf-ring-color, var(--ylf-c-brand, #2563eb));
73
+ outline: var(--ylf-ring-width, 2px) solid var(--ylf-ring-color, var(--ylf-c-brand, #006aeb));
74
74
  outline-offset: 3px;
75
- box-shadow: 0 0 0 3px var(--ylf-c-brand-soft, #eff6ff);
75
+ box-shadow: 0 0 0 3px var(--ylf-c-brand-soft, #f0f7ff);
76
76
  }
77
77
 
78
78
  .ylf-checkbox:active:not([data-disabled]) {
@@ -88,8 +88,8 @@ watch(checked, () => {
88
88
 
89
89
  .ylf-checkbox[data-state='checked'],
90
90
  .ylf-checkbox[data-state='indeterminate'] {
91
- background: var(--ylf-c-brand, #2563eb);
92
- border-color: var(--ylf-c-brand, #2563eb);
91
+ background: var(--ylf-c-brand, #006aeb);
92
+ border-color: var(--ylf-c-brand, #006aeb);
93
93
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
94
94
  }
95
95
 
@@ -0,0 +1,246 @@
1
+ <script lang="ts" setup>
2
+ import type { YlfCuteCloudLook, YlfCuteCloudMood, YlfCuteCloudShape } from './cute-cloud'
3
+ import { computed, useId } from 'vue'
4
+
5
+ /**
6
+ * 卡通小云:几团圆鼓鼓的扁平色块拼成,底部一道柔和阴影,可选一张会眨眼的小脸。
7
+ *
8
+ * 比写实的 YlfCloud 更简单、更可爱,用于个人中心、认证卡片等轻松场景。
9
+ * 配色读取 `--ylf-cloud-*` 主题 token,浅色是白日白云,深色是夜空或黄昏云。
10
+ * `mood="happy"` 时眯成 ^ ^ 眼、腮红变深;`look` 传入 -1..1 方向时眼睛朝对应方向看。
11
+ */
12
+ const props = withDefaults(defineProps<{
13
+ shape?: YlfCuteCloudShape
14
+ face?: boolean
15
+ mood?: YlfCuteCloudMood
16
+ /** 装饰性眨眼;表单等专注操作的场景可关闭。 */
17
+ animated?: boolean
18
+ /** 视线方向,x / y 取 -1..1。 */
19
+ look?: YlfCuteCloudLook
20
+ }>(), {
21
+ shape: 'round',
22
+ face: false,
23
+ mood: 'calm',
24
+ animated: true,
25
+ })
26
+
27
+ interface Bump {
28
+ cx: number
29
+ cy: number
30
+ r: number
31
+ }
32
+
33
+ interface Silhouette {
34
+ width: number
35
+ height: number
36
+ base: { x: number, y: number, w: number, h: number }
37
+ bumps: readonly Bump[]
38
+ face: { x: number, y: number }
39
+ }
40
+
41
+ const SHAPES: Record<YlfCuteCloudShape, Silhouette> = {
42
+ round: {
43
+ width: 120,
44
+ height: 72,
45
+ base: { x: 12, y: 40, w: 96, h: 28 },
46
+ bumps: [
47
+ { cx: 36, cy: 44, r: 18 },
48
+ { cx: 62, cy: 32, r: 24 },
49
+ { cx: 88, cy: 44, r: 17 },
50
+ ],
51
+ face: { x: 62, y: 50 },
52
+ },
53
+ long: {
54
+ width: 170,
55
+ height: 64,
56
+ base: { x: 8, y: 36, w: 154, h: 24 },
57
+ bumps: [
58
+ { cx: 32, cy: 38, r: 16 },
59
+ { cx: 60, cy: 28, r: 21 },
60
+ { cx: 94, cy: 24, r: 22 },
61
+ { cx: 126, cy: 34, r: 17 },
62
+ ],
63
+ face: { x: 94, y: 44 },
64
+ },
65
+ small: {
66
+ width: 100,
67
+ height: 46,
68
+ base: { x: 6, y: 24, w: 88, h: 18 },
69
+ bumps: [
70
+ { cx: 34, cy: 24, r: 13 },
71
+ { cx: 60, cy: 20, r: 15 },
72
+ ],
73
+ face: { x: 50, y: 32 },
74
+ },
75
+ }
76
+
77
+ const shapeDef = computed(() => SHAPES[props.shape] ?? SHAPES.round)
78
+ const shinePath = computed(() => {
79
+ const first = shapeDef.value.bumps[0]!
80
+ return `M ${first.cx - first.r * 0.55} ${first.cy - first.r * 0.15} q ${first.r * 0.15} ${-first.r * 0.5} ${first.r * 0.6} ${-first.r * 0.55}`
81
+ })
82
+ const gazeTransform = computed(() => {
83
+ if (!props.look)
84
+ return undefined
85
+ const x = (Math.max(-1, Math.min(1, props.look.x)) * 2.2).toFixed(2)
86
+ const y = (Math.max(-1, Math.min(1, props.look.y)) * 1.4).toFixed(2)
87
+ return `translate(${x} ${y})`
88
+ })
89
+ const id = `ylf-cute-cloud-${useId()}`
90
+ </script>
91
+
92
+ <template>
93
+ <svg
94
+ class="ylf-cute-cloud"
95
+ :class="{
96
+ 'ylf-cute-cloud--happy': mood === 'happy',
97
+ 'ylf-cute-cloud--still': !animated,
98
+ }"
99
+ :data-shape="shape"
100
+ :viewBox="`0 0 ${shapeDef.width} ${shapeDef.height}`"
101
+ fill="none"
102
+ focusable="false"
103
+ aria-hidden="true"
104
+ >
105
+ <defs>
106
+ <clipPath :id="`${id}-clip`">
107
+ <rect
108
+ :x="shapeDef.base.x"
109
+ :y="shapeDef.base.y"
110
+ :width="shapeDef.base.w"
111
+ :height="shapeDef.base.h"
112
+ :rx="shapeDef.base.h / 2"
113
+ />
114
+ <circle v-for="(bump, index) in shapeDef.bumps" :key="index" :cx="bump.cx" :cy="bump.cy" :r="bump.r" />
115
+ </clipPath>
116
+ </defs>
117
+
118
+ <g :clip-path="`url(#${id}-clip)`">
119
+ <rect class="ylf-cute-cloud__body" width="100%" height="100%" />
120
+ <ellipse
121
+ class="ylf-cute-cloud__shade"
122
+ :cx="shapeDef.width / 2"
123
+ :cy="shapeDef.base.y + shapeDef.base.h + 2"
124
+ :rx="shapeDef.width * 0.56"
125
+ :ry="shapeDef.base.h * 0.5"
126
+ />
127
+ </g>
128
+ <path class="ylf-cute-cloud__shine" :d="shinePath" />
129
+
130
+ <g v-if="face" class="ylf-cute-cloud__face" :transform="`translate(${shapeDef.face.x} ${shapeDef.face.y})`">
131
+ <ellipse class="ylf-cute-cloud__blush" cx="-14" cy="4" rx="4.5" ry="2.6" />
132
+ <ellipse class="ylf-cute-cloud__blush" cx="14" cy="4" rx="4.5" ry="2.6" />
133
+ <g class="ylf-cute-cloud__eyes" :transform="gazeTransform">
134
+ <ellipse class="ylf-cute-cloud__eye" cx="-7" cy="-1" rx="2.2" ry="2.8" />
135
+ <ellipse class="ylf-cute-cloud__eye" cx="7" cy="-1" rx="2.2" ry="2.8" />
136
+ </g>
137
+ <g class="ylf-cute-cloud__happy-eyes">
138
+ <path d="M -9.5 0 q 2.5 -4 5 0" />
139
+ <path d="M 4.5 0 q 2.5 -4 5 0" />
140
+ </g>
141
+ <path class="ylf-cute-cloud__mouth" d="M -3 3.5 q 3 3 6 0" />
142
+ </g>
143
+ </svg>
144
+ </template>
145
+
146
+ <style>
147
+ .ylf-cute-cloud {
148
+ --_body: var(--ylf-cloud-highlight, #fffefa);
149
+ --_shade: color-mix(in srgb, var(--ylf-cloud-shade, #c6dff5) 70%, var(--_body));
150
+ --_face: var(--ylf-cloud-face, #5a7fae);
151
+
152
+ overflow: visible;
153
+ pointer-events: none;
154
+ }
155
+
156
+ /* 尺寸默认铺满容器;用 :where 降到零优先级,使用处的宽度、定位可以直接覆盖。 */
157
+ :where(.ylf-cute-cloud) {
158
+ display: block;
159
+ width: 100%;
160
+ height: auto;
161
+ }
162
+
163
+ .ylf-cute-cloud__body {
164
+ fill: var(--_body);
165
+ }
166
+
167
+ .ylf-cute-cloud__shade {
168
+ fill: var(--_shade);
169
+ }
170
+
171
+ .ylf-cute-cloud__shine {
172
+ fill: none;
173
+ stroke: var(--ylf-cloud-rim, #ffffff);
174
+ stroke-linecap: round;
175
+ stroke-width: 2.5;
176
+ opacity: 0.9;
177
+ }
178
+
179
+ .ylf-cute-cloud__eye {
180
+ fill: var(--_face);
181
+ transform-box: fill-box;
182
+ transform-origin: center;
183
+ animation: ylf-cute-cloud-blink 5.2s ease-in-out infinite;
184
+ }
185
+
186
+ .ylf-cute-cloud--still .ylf-cute-cloud__eye {
187
+ animation: none;
188
+ }
189
+
190
+ .ylf-cute-cloud__happy-eyes path,
191
+ .ylf-cute-cloud__mouth {
192
+ fill: none;
193
+ stroke: var(--_face);
194
+ stroke-linecap: round;
195
+ stroke-width: 1.6;
196
+ }
197
+
198
+ .ylf-cute-cloud__blush {
199
+ fill: var(--ylf-palette-pink, #ec4899);
200
+ opacity: 0.28;
201
+ transition: opacity var(--ylf-duration-normal, 240ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1));
202
+ }
203
+
204
+ .ylf-cute-cloud__happy-eyes {
205
+ opacity: 0;
206
+ }
207
+
208
+ .ylf-cute-cloud__eyes {
209
+ transition: transform 180ms var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1));
210
+ }
211
+
212
+ .ylf-cute-cloud--happy .ylf-cute-cloud__eyes {
213
+ opacity: 0;
214
+ }
215
+
216
+ .ylf-cute-cloud--happy .ylf-cute-cloud__happy-eyes {
217
+ opacity: 1;
218
+ }
219
+
220
+ .ylf-cute-cloud--happy .ylf-cute-cloud__blush {
221
+ opacity: 0.56;
222
+ }
223
+
224
+ @keyframes ylf-cute-cloud-blink {
225
+ 0%,
226
+ 92%,
227
+ 100% {
228
+ transform: scaleY(1);
229
+ }
230
+
231
+ 95% {
232
+ transform: scaleY(0.1);
233
+ }
234
+ }
235
+
236
+ @media (prefers-reduced-motion: reduce) {
237
+ .ylf-cute-cloud__blush,
238
+ .ylf-cute-cloud__eyes {
239
+ transition: none;
240
+ }
241
+
242
+ .ylf-cute-cloud__eye {
243
+ animation: none;
244
+ }
245
+ }
246
+ </style>
@@ -182,7 +182,7 @@ const descriptionProps = computed(() => hasDescription.value
182
182
  }
183
183
 
184
184
  .ylf-dialog__close:focus-visible {
185
- outline: var(--ylf-ring-width, 2px) solid var(--ylf-ring-color, var(--ylf-c-brand, #2563eb));
185
+ outline: var(--ylf-ring-width, 2px) solid var(--ylf-ring-color, var(--ylf-c-brand, #006aeb));
186
186
  outline-offset: 2px;
187
187
  }
188
188
 
@@ -101,9 +101,9 @@ const open = defineModel<boolean>('open', { default: false })
101
101
  }
102
102
 
103
103
  .ylf-menu__item[data-highlighted] {
104
- background: var(--ylf-c-brand-soft, #eff6ff);
105
- color: var(--ylf-c-brand, #2563eb);
106
- box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ylf-c-brand, #2563eb) 12%, transparent);
104
+ background: var(--ylf-c-brand-soft, #f0f7ff);
105
+ color: var(--ylf-c-brand, #006aeb);
106
+ box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ylf-c-brand, #006aeb) 12%, transparent);
107
107
  }
108
108
 
109
109
  .ylf-menu__item[data-disabled] {