@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.
- package/components/YlfAccordion.vue +3 -3
- package/components/YlfAgentCard.vue +2 -2
- package/components/YlfAgentStatus.vue +4 -4
- package/components/YlfAiPromptLauncher.vue +1 -1
- package/components/YlfAvatar.vue +2 -2
- package/components/YlfBadge.vue +11 -11
- package/components/YlfBottomMenuItem.vue +1 -1
- package/components/YlfButton.vue +43 -38
- package/components/YlfCard.vue +3 -3
- package/components/YlfCheckbox.vue +6 -6
- package/components/YlfCuteCloud.vue +246 -0
- package/components/YlfDialog.vue +1 -1
- package/components/YlfDropdownMenu.vue +3 -3
- package/components/YlfInput.vue +5 -5
- package/components/YlfLogo.vue +1 -1
- package/components/YlfNavigation.vue +2 -2
- package/components/YlfNavigationLink.vue +3 -3
- package/components/YlfNavigationTrigger.vue +1 -1
- package/components/YlfProgress.vue +2 -2
- package/components/YlfRadioGroup.vue +6 -6
- package/components/YlfSegmentedControl.vue +2 -2
- package/components/YlfSelect.vue +11 -11
- package/components/YlfSeparator.vue +4 -4
- package/components/YlfSlider.vue +6 -6
- package/components/YlfSwitch.vue +7 -6
- package/components/YlfTabs.vue +6 -6
- package/components/badge/index.md +2 -2
- package/components/button/index.md +2 -2
- package/components/cute-cloud/demo.vue +73 -0
- package/components/cute-cloud/index.md +34 -0
- package/components/cute-cloud.ts +16 -0
- package/dist/components/YlfCuteCloud.vue.d.ts +25 -0
- package/dist/components/cute-cloud.d.ts +10 -0
- package/dist/index.cjs +7 -0
- package/dist/index.d.cts +13 -2
- package/dist/index.d.mts +13 -2
- package/dist/index.d.ts +13 -2
- package/dist/index.mjs +7 -1
- package/package.json +1 -1
package/components/YlfInput.vue
CHANGED
|
@@ -18,7 +18,7 @@ const model = defineModel<string>({ default: '' })
|
|
|
18
18
|
min-width: 0;
|
|
19
19
|
height: var(--ylf-control-h, 44px);
|
|
20
20
|
padding: 0 14px;
|
|
21
|
-
border: 1px solid var(--ylf-c-border-
|
|
21
|
+
border: 1px solid var(--ylf-c-border-control, #7d8ca0);
|
|
22
22
|
border-radius: var(--ylf-control-radius, var(--ylf-radius, 14px));
|
|
23
23
|
background: var(--ylf-c-surface, #fff);
|
|
24
24
|
color: var(--ylf-c-text, #0f172a);
|
|
@@ -32,17 +32,17 @@ const model = defineModel<string>({ default: '' })
|
|
|
32
32
|
color: var(--ylf-c-placeholder, var(--ylf-c-text-3, #5a697e));
|
|
33
33
|
}
|
|
34
34
|
.ylf-input:hover:not(:disabled, :read-only) {
|
|
35
|
-
border-color: var(--ylf-c-brand, #
|
|
35
|
+
border-color: var(--ylf-c-brand, #006aeb);
|
|
36
36
|
}
|
|
37
37
|
.ylf-input:focus-visible {
|
|
38
|
-
outline: var(--ylf-ring-width, 2px) solid var(--ylf-ring-color, var(--ylf-c-brand, #
|
|
38
|
+
outline: var(--ylf-ring-width, 2px) solid var(--ylf-ring-color, var(--ylf-c-brand, #006aeb));
|
|
39
39
|
outline-offset: 2px;
|
|
40
40
|
}
|
|
41
41
|
.ylf-input[aria-invalid='true'] {
|
|
42
|
-
border-color: var(--ylf-status-danger-text, #
|
|
42
|
+
border-color: var(--ylf-status-danger-text, #b91c1c);
|
|
43
43
|
}
|
|
44
44
|
.ylf-input[aria-invalid='true']:focus-visible {
|
|
45
|
-
outline-color: var(--ylf-status-danger-text, #
|
|
45
|
+
outline-color: var(--ylf-status-danger-text, #b91c1c);
|
|
46
46
|
}
|
|
47
47
|
.ylf-input:disabled {
|
|
48
48
|
opacity: var(--ylf-disabled-opacity, 0.48);
|
package/components/YlfLogo.vue
CHANGED
|
@@ -60,14 +60,14 @@ const indicator = useNavigationIndicator(root, {
|
|
|
60
60
|
width: 16px;
|
|
61
61
|
height: 2px;
|
|
62
62
|
border-radius: var(--ylf-radius-pill, 999px);
|
|
63
|
-
background: var(--ylf-c-brand, #
|
|
63
|
+
background: var(--ylf-c-brand, #006aeb);
|
|
64
64
|
pointer-events: none;
|
|
65
65
|
transition: transform var(--ylf-duration-normal, 240ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
.ylf-navigation[data-orientation='vertical'] {
|
|
69
69
|
--_ylf-nav-justify: flex-start;
|
|
70
|
-
--_ylf-nav-active-bg: var(--ylf-c-brand-soft, #
|
|
70
|
+
--_ylf-nav-active-bg: var(--ylf-c-brand-soft, #f0f7ff);
|
|
71
71
|
--_ylf-nav-indicator: none;
|
|
72
72
|
|
|
73
73
|
flex-direction: column;
|
|
@@ -57,14 +57,14 @@ withDefaults(defineProps<{
|
|
|
57
57
|
|
|
58
58
|
/* Focus stays inside the target so it cannot overlap a neighboring state. */
|
|
59
59
|
.ylf-navigation-link:focus-visible {
|
|
60
|
-
outline: var(--ylf-ring-width, 2px) solid var(--ylf-ring-color, var(--ylf-c-brand, #
|
|
60
|
+
outline: var(--ylf-ring-width, 2px) solid var(--ylf-ring-color, var(--ylf-c-brand, #006aeb));
|
|
61
61
|
outline-offset: -2px;
|
|
62
62
|
box-shadow: none;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
.ylf-navigation-link[data-active] {
|
|
66
66
|
background: var(--_ylf-nav-active-bg, transparent);
|
|
67
|
-
color: var(--ylf-c-brand, #
|
|
67
|
+
color: var(--ylf-c-brand, #006aeb);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
.ylf-navigation-link[data-active]::after {
|
|
@@ -81,7 +81,7 @@ withDefaults(defineProps<{
|
|
|
81
81
|
|
|
82
82
|
.ylf-navigation-link[data-active]:hover {
|
|
83
83
|
background: var(--ylf-c-bg-soft, #f1f5f9);
|
|
84
|
-
color: var(--ylf-c-brand, #
|
|
84
|
+
color: var(--ylf-c-brand, #006aeb);
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -47,7 +47,7 @@ withDefaults(defineProps<{
|
|
|
47
47
|
|
|
48
48
|
/* Focus stays inside the target so it cannot overlap a neighboring state. */
|
|
49
49
|
.ylf-navigation-trigger:focus-visible {
|
|
50
|
-
outline: var(--ylf-ring-width, 2px) solid var(--ylf-ring-color, var(--ylf-c-brand, #
|
|
50
|
+
outline: var(--ylf-ring-width, 2px) solid var(--ylf-ring-color, var(--ylf-c-brand, #006aeb));
|
|
51
51
|
outline-offset: -2px;
|
|
52
52
|
box-shadow: none;
|
|
53
53
|
}
|
|
@@ -56,7 +56,7 @@ const percent = computed(() => safeValue.value === null
|
|
|
56
56
|
width: 100%;
|
|
57
57
|
height: 100%;
|
|
58
58
|
border-radius: var(--ylf-radius-pill, 999px);
|
|
59
|
-
background: var(--ylf-c-brand, #
|
|
59
|
+
background: var(--ylf-c-brand, #006aeb);
|
|
60
60
|
transition: transform 0.4s var(--ylf-ease-bounce, cubic-bezier(0.34, 1.56, 0.64, 1));
|
|
61
61
|
}
|
|
62
62
|
|
|
@@ -77,7 +77,7 @@ const percent = computed(() => safeValue.value === null
|
|
|
77
77
|
|
|
78
78
|
.ylf-progress--accent .ylf-progress__indicator,
|
|
79
79
|
.ylf-progress--aurora .ylf-progress__indicator {
|
|
80
|
-
background: var(--ylf-accent, var(--ylf-c-brand, #
|
|
80
|
+
background: var(--ylf-accent, var(--ylf-c-brand, #006aeb));
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -108,7 +108,7 @@ function selectFocusedRadio(event: KeyboardEvent) {
|
|
|
108
108
|
height: 20px;
|
|
109
109
|
display: inline-grid;
|
|
110
110
|
place-items: center;
|
|
111
|
-
border: 2px solid var(--ylf-c-border-
|
|
111
|
+
border: 2px solid var(--ylf-c-border-control, #7d8ca0);
|
|
112
112
|
border-radius: 50%;
|
|
113
113
|
background: var(--ylf-c-surface, #fff);
|
|
114
114
|
box-shadow: var(--ylf-shadow-control);
|
|
@@ -121,7 +121,7 @@ function selectFocusedRadio(event: KeyboardEvent) {
|
|
|
121
121
|
|
|
122
122
|
@media (hover: hover) and (pointer: fine) {
|
|
123
123
|
.ylf-radio:hover:not([data-disabled]) .ylf-radio__control {
|
|
124
|
-
border-color: var(--ylf-c-brand, #
|
|
124
|
+
border-color: var(--ylf-c-brand, #006aeb);
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
|
|
@@ -130,13 +130,13 @@ function selectFocusedRadio(event: KeyboardEvent) {
|
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
.ylf-radio:focus-visible .ylf-radio__control {
|
|
133
|
-
box-shadow: 0 0 0 3px var(--ylf-c-brand-soft, #
|
|
134
|
-
outline: var(--ylf-ring-width, 2px) solid var(--ylf-ring-color, var(--ylf-c-brand, #
|
|
133
|
+
box-shadow: 0 0 0 3px var(--ylf-c-brand-soft, #f0f7ff);
|
|
134
|
+
outline: var(--ylf-ring-width, 2px) solid var(--ylf-ring-color, var(--ylf-c-brand, #006aeb));
|
|
135
135
|
outline-offset: 3px;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
.ylf-radio[data-state='checked'] .ylf-radio__control {
|
|
139
|
-
border-color: var(--ylf-c-brand, #
|
|
139
|
+
border-color: var(--ylf-c-brand, #006aeb);
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
.ylf-radio[data-disabled] {
|
|
@@ -149,7 +149,7 @@ function selectFocusedRadio(event: KeyboardEvent) {
|
|
|
149
149
|
width: 10px;
|
|
150
150
|
height: 10px;
|
|
151
151
|
border-radius: 50%;
|
|
152
|
-
background: var(--ylf-c-brand, #
|
|
152
|
+
background: var(--ylf-c-brand, #006aeb);
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
.ylf-radio:active:not([data-disabled]) .ylf-radio__control {
|
|
@@ -168,7 +168,7 @@ onBeforeUnmount(() => resizeObserver?.disconnect())
|
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
.ylf-segmented__item[aria-pressed='true'] {
|
|
171
|
-
color: var(--ylf-c-brand, #
|
|
171
|
+
color: var(--ylf-c-brand, #006aeb);
|
|
172
172
|
background: var(--ylf-c-surface, #fff);
|
|
173
173
|
border-color: var(--ylf-c-border, #e2e8f0);
|
|
174
174
|
box-shadow: var(--ylf-shadow-control);
|
|
@@ -204,7 +204,7 @@ onBeforeUnmount(() => resizeObserver?.disconnect())
|
|
|
204
204
|
.ylf-segmented__item:focus-visible {
|
|
205
205
|
position: relative;
|
|
206
206
|
z-index: var(--ylf-z-base, 1);
|
|
207
|
-
outline: var(--ylf-ring-width, 2px) solid var(--ylf-ring-color, var(--ylf-c-brand, #
|
|
207
|
+
outline: var(--ylf-ring-width, 2px) solid var(--ylf-ring-color, var(--ylf-c-brand, #006aeb));
|
|
208
208
|
outline-offset: 2px;
|
|
209
209
|
}
|
|
210
210
|
|
package/components/YlfSelect.vue
CHANGED
|
@@ -92,7 +92,7 @@ const viewport = useTemplateRef<HTMLElement>('viewport')
|
|
|
92
92
|
line-height: 1.5;
|
|
93
93
|
color: var(--ylf-c-text, #0f172a);
|
|
94
94
|
background: var(--ylf-c-surface, #fff);
|
|
95
|
-
border: 1px solid var(--ylf-c-border-
|
|
95
|
+
border: 1px solid var(--ylf-c-border-control, #7d8ca0);
|
|
96
96
|
border-radius: var(--ylf-control-radius, var(--ylf-radius, 14px));
|
|
97
97
|
box-shadow: var(--ylf-shadow-control);
|
|
98
98
|
cursor: pointer;
|
|
@@ -107,22 +107,22 @@ const viewport = useTemplateRef<HTMLElement>('viewport')
|
|
|
107
107
|
|
|
108
108
|
@media (hover: hover) and (pointer: fine) {
|
|
109
109
|
.ylf-select__trigger:hover:not([data-disabled]) {
|
|
110
|
-
border-color: var(--ylf-c-brand, #
|
|
110
|
+
border-color: var(--ylf-c-brand, #006aeb);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
.ylf-select__trigger[data-state='open'] {
|
|
115
|
-
border-color: var(--ylf-c-brand, #
|
|
115
|
+
border-color: var(--ylf-c-brand, #006aeb);
|
|
116
116
|
box-shadow:
|
|
117
117
|
var(--ylf-shadow-control),
|
|
118
|
-
0 0 0 3px var(--ylf-c-brand-soft, #
|
|
118
|
+
0 0 0 3px var(--ylf-c-brand-soft, #f0f7ff);
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
.ylf-select__trigger:focus-visible {
|
|
122
|
-
outline: var(--ylf-ring-width, 2px) solid var(--ylf-ring-color, var(--ylf-c-brand, #
|
|
122
|
+
outline: var(--ylf-ring-width, 2px) solid var(--ylf-ring-color, var(--ylf-c-brand, #006aeb));
|
|
123
123
|
outline-offset: 2px;
|
|
124
|
-
border-color: var(--ylf-c-brand, #
|
|
125
|
-
box-shadow: 0 0 0 3px var(--ylf-c-brand-soft, #
|
|
124
|
+
border-color: var(--ylf-c-brand, #006aeb);
|
|
125
|
+
box-shadow: 0 0 0 3px var(--ylf-c-brand-soft, #f0f7ff);
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
.ylf-select__trigger[data-disabled] {
|
|
@@ -223,9 +223,9 @@ const viewport = useTemplateRef<HTMLElement>('viewport')
|
|
|
223
223
|
}
|
|
224
224
|
|
|
225
225
|
.ylf-select__item[data-highlighted] {
|
|
226
|
-
background: var(--ylf-c-brand-soft, #
|
|
227
|
-
color: var(--ylf-c-brand, #
|
|
228
|
-
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ylf-c-brand, #
|
|
226
|
+
background: var(--ylf-c-brand-soft, #f0f7ff);
|
|
227
|
+
color: var(--ylf-c-brand, #006aeb);
|
|
228
|
+
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ylf-c-brand, #006aeb) 12%, transparent);
|
|
229
229
|
}
|
|
230
230
|
|
|
231
231
|
.ylf-select__item[data-disabled] {
|
|
@@ -235,7 +235,7 @@ const viewport = useTemplateRef<HTMLElement>('viewport')
|
|
|
235
235
|
|
|
236
236
|
.ylf-select__check {
|
|
237
237
|
display: inline-flex;
|
|
238
|
-
color: var(--ylf-c-brand, #
|
|
238
|
+
color: var(--ylf-c-brand, #006aeb);
|
|
239
239
|
}
|
|
240
240
|
|
|
241
241
|
.ylf-select__check :where(svg, i, span) {
|
|
@@ -45,13 +45,13 @@ withDefaults(defineProps<{
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
.ylf-separator--brand {
|
|
48
|
-
background: var(--ylf-c-brand, #
|
|
48
|
+
background: var(--ylf-c-brand, #006aeb);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
.ylf-separator--accent {
|
|
52
52
|
--_separator-size: 2px;
|
|
53
53
|
|
|
54
|
-
background: var(--ylf-accent, var(--ylf-c-brand, #
|
|
54
|
+
background: var(--ylf-accent, var(--ylf-c-brand, #006aeb));
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
.ylf-separator--spectrum {
|
|
@@ -60,14 +60,14 @@ withDefaults(defineProps<{
|
|
|
60
60
|
border-radius: var(--ylf-radius-pill, 999px);
|
|
61
61
|
background: linear-gradient(
|
|
62
62
|
90deg,
|
|
63
|
-
var(--ylf-spectrum-stops, var(--ylf-palette-blue, #
|
|
63
|
+
var(--ylf-spectrum-stops, var(--ylf-palette-blue, #006aeb), var(--ylf-palette-sun, #facc15))
|
|
64
64
|
);
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
.ylf-separator--spectrum.ylf-separator--vertical {
|
|
68
68
|
background: linear-gradient(
|
|
69
69
|
180deg,
|
|
70
|
-
var(--ylf-spectrum-stops, var(--ylf-palette-blue, #
|
|
70
|
+
var(--ylf-spectrum-stops, var(--ylf-palette-blue, #006aeb), var(--ylf-palette-sun, #facc15))
|
|
71
71
|
);
|
|
72
72
|
}
|
|
73
73
|
</style>
|
package/components/YlfSlider.vue
CHANGED
|
@@ -73,7 +73,7 @@ const model = defineModel<number[]>({
|
|
|
73
73
|
position: absolute;
|
|
74
74
|
height: 100%;
|
|
75
75
|
border-radius: var(--ylf-radius-pill, 999px);
|
|
76
|
-
background: var(--ylf-c-brand, #
|
|
76
|
+
background: var(--ylf-c-brand, #006aeb);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
.ylf-slider__thumb {
|
|
@@ -83,7 +83,7 @@ const model = defineModel<number[]>({
|
|
|
83
83
|
height: 18px;
|
|
84
84
|
border-radius: 50%;
|
|
85
85
|
background: var(--ylf-c-surface, #fff);
|
|
86
|
-
border: 2px solid var(--ylf-c-brand, #
|
|
86
|
+
border: 2px solid var(--ylf-c-brand, #006aeb);
|
|
87
87
|
box-shadow: var(--ylf-shadow-sm, 0 2px 8px -2px rgba(15, 23, 42, 0.12));
|
|
88
88
|
cursor: grab;
|
|
89
89
|
transition:
|
|
@@ -93,20 +93,20 @@ const model = defineModel<number[]>({
|
|
|
93
93
|
|
|
94
94
|
@media (hover: hover) and (pointer: fine) {
|
|
95
95
|
.ylf-slider__thumb:hover {
|
|
96
|
-
box-shadow: 0 0 0 6px var(--ylf-c-brand-soft, #
|
|
96
|
+
box-shadow: 0 0 0 6px var(--ylf-c-brand-soft, #f0f7ff);
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
.ylf-slider__thumb:focus-visible {
|
|
101
|
-
outline: var(--ylf-ring-width, 2px) solid var(--ylf-ring-color, var(--ylf-c-brand, #
|
|
101
|
+
outline: var(--ylf-ring-width, 2px) solid var(--ylf-ring-color, var(--ylf-c-brand, #006aeb));
|
|
102
102
|
outline-offset: 2px;
|
|
103
|
-
box-shadow: 0 0 0 4px var(--ylf-c-brand-soft, #
|
|
103
|
+
box-shadow: 0 0 0 4px var(--ylf-c-brand-soft, #f0f7ff);
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
.ylf-slider__thumb:active {
|
|
107
107
|
cursor: grabbing;
|
|
108
108
|
scale: 1.2;
|
|
109
|
-
box-shadow: 0 0 0 6px var(--ylf-c-brand-soft, #
|
|
109
|
+
box-shadow: 0 0 0 6px var(--ylf-c-brand-soft, #f0f7ff);
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
@media (pointer: coarse) {
|
package/components/YlfSwitch.vue
CHANGED
|
@@ -49,7 +49,7 @@ const checked = defineModel<boolean>({ default: false })
|
|
|
49
49
|
background: var(--ylf-c-bg-mute, #e2e8f0);
|
|
50
50
|
box-shadow:
|
|
51
51
|
var(--ylf-shadow-inset),
|
|
52
|
-
inset 0 0 0 1px var(--ylf-c-
|
|
52
|
+
inset 0 0 0 1px var(--ylf-c-border-control, #7d8ca0);
|
|
53
53
|
cursor: pointer;
|
|
54
54
|
-webkit-tap-highlight-color: transparent;
|
|
55
55
|
transition:
|
|
@@ -63,11 +63,11 @@ const checked = defineModel<boolean>({ default: false })
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
.ylf-switch:focus-visible {
|
|
66
|
-
outline: var(--ylf-ring-width, 2px) solid var(--ylf-ring-color, var(--ylf-c-brand, #
|
|
66
|
+
outline: var(--ylf-ring-width, 2px) solid var(--ylf-ring-color, var(--ylf-c-brand, #006aeb));
|
|
67
67
|
outline-offset: 2px;
|
|
68
68
|
box-shadow:
|
|
69
|
-
0 0 0 3px var(--ylf-c-brand-soft, #
|
|
70
|
-
0 0 0 5px var(--ylf-ring-color, var(--ylf-c-brand, #
|
|
69
|
+
0 0 0 3px var(--ylf-c-brand-soft, #f0f7ff),
|
|
70
|
+
0 0 0 5px var(--ylf-ring-color, var(--ylf-c-brand, #006aeb));
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
.ylf-switch[data-disabled] {
|
|
@@ -77,13 +77,14 @@ const checked = defineModel<boolean>({ default: false })
|
|
|
77
77
|
|
|
78
78
|
/* on 态:晴空蓝主色 */
|
|
79
79
|
.ylf-switch[data-state='checked'] {
|
|
80
|
-
background: var(--ylf-c-brand, #
|
|
80
|
+
background: var(--ylf-c-brand, #006aeb);
|
|
81
|
+
box-shadow: var(--ylf-shadow-inset);
|
|
81
82
|
}
|
|
82
83
|
|
|
83
84
|
/* 选中的强调轨道,前景与填充色成组。 */
|
|
84
85
|
.ylf-switch--accent[data-state='checked'],
|
|
85
86
|
.ylf-switch--aurora[data-state='checked'] {
|
|
86
|
-
background: var(--ylf-accent, var(--ylf-c-brand, #
|
|
87
|
+
background: var(--ylf-accent, var(--ylf-c-brand, #006aeb));
|
|
87
88
|
}
|
|
88
89
|
|
|
89
90
|
.ylf-switch:active:not([data-disabled]) {
|
package/components/YlfTabs.vue
CHANGED
|
@@ -78,8 +78,8 @@ const model = defineModel<string>()
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
.ylf-tabs__trigger[data-state='active'] {
|
|
81
|
-
color: var(--ylf-c-brand, #
|
|
82
|
-
background: color-mix(in srgb, var(--ylf-c-brand-soft, #
|
|
81
|
+
color: var(--ylf-c-brand, #006aeb);
|
|
82
|
+
background: color-mix(in srgb, var(--ylf-c-brand-soft, #f0f7ff) 65%, transparent);
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
.ylf-tabs__trigger[data-disabled] {
|
|
@@ -88,10 +88,10 @@ const model = defineModel<string>()
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
.ylf-tabs__trigger:focus-visible {
|
|
91
|
-
outline: var(--ylf-ring-width, 2px) solid var(--ylf-ring-color, var(--ylf-c-brand, #
|
|
91
|
+
outline: var(--ylf-ring-width, 2px) solid var(--ylf-ring-color, var(--ylf-c-brand, #006aeb));
|
|
92
92
|
outline-offset: -3px;
|
|
93
93
|
border-radius: var(--ylf-radius-sm, 10px);
|
|
94
|
-
box-shadow: 0 0 0 3px var(--ylf-c-brand-soft, #
|
|
94
|
+
box-shadow: 0 0 0 3px var(--ylf-c-brand-soft, #f0f7ff);
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
.ylf-tabs__indicator {
|
|
@@ -101,8 +101,8 @@ const model = defineModel<string>()
|
|
|
101
101
|
width: var(--reka-tabs-indicator-size);
|
|
102
102
|
height: 2.5px;
|
|
103
103
|
border-radius: var(--ylf-radius-pill, 999px);
|
|
104
|
-
background: var(--ylf-c-brand, #
|
|
105
|
-
box-shadow: 0 1px 4px color-mix(in srgb, var(--ylf-c-brand, #
|
|
104
|
+
background: var(--ylf-c-brand, #006aeb);
|
|
105
|
+
box-shadow: 0 1px 4px color-mix(in srgb, var(--ylf-c-brand, #006aeb) 25%, transparent);
|
|
106
106
|
transform: translateX(var(--reka-tabs-indicator-position));
|
|
107
107
|
transition:
|
|
108
108
|
transform var(--ylf-duration-slow, 480ms)
|
|
@@ -11,11 +11,11 @@ title_zh: 徽标
|
|
|
11
11
|
- `featured`:精选、推荐等品牌标记,明黄星芒、浅黄底和中性文字。
|
|
12
12
|
- `accent`:高饱和实色,默认晴空蓝,使用 `tone` 选择明黄、青、珊瑚橙、桃粉或鲜绿。
|
|
13
13
|
- `neutral`:已归档、草稿等普通信息,无需暗示成功或错误。
|
|
14
|
-
- `success` / `warning` / `danger` / `info
|
|
14
|
+
- `success` / `warning` / `danger` / `info`:分别使用鲜绿、明黄、警戒红与青色实底,配套状态图形和文字。
|
|
15
15
|
|
|
16
16
|
徽标使用系统正文字体,默认 12px、500 字重,无阴影、发光或持续动画。前景、底色和描边使用配套 token,随明暗主题调整。使用简短明确的文字描述状态,颜色辅助识别。
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
晴空蓝实底在浅色主题使用白字、深色主题使用深蓝字;错误警戒红在明暗主题下均使用白字;其余纯色标签使用同色相深色文字,保证各组填充与前景的对比度。详见[色彩与组件](/guide/colors#状态也来自同一套色板)。
|
|
19
19
|
|
|
20
20
|
徽标用于展示信息;需要点击筛选或执行操作时,使用按钮等交互组件。
|
|
21
21
|
|
|
@@ -5,11 +5,11 @@ title_zh: 按钮
|
|
|
5
5
|
|
|
6
6
|
主操作默认使用晴空蓝实色;品牌展示可选择 `accent` 纯色变体,配合 `tone` 指定强调色。描边、柔色和透明按钮用于次级操作,成功、提醒与危险变体表达对应的状态语义。
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
状态按钮与徽标共享语义色:成功为鲜绿、提醒为明黄、危险为独立警戒红(白字),避免与珊瑚橙的活动入口混淆。
|
|
9
9
|
|
|
10
10
|
## 品牌入口
|
|
11
11
|
|
|
12
|
-
首页或活动区的主入口使用 `variant="hero" size="xl"
|
|
12
|
+
首页或活动区的主入口使用 `variant="hero" size="xl"`:由晴空蓝延展至深海蓝的同色系渐变、白色文案、柔光投影,以及 56px 点击高度。明暗主题均保留深色渐变和白字,不使用偏亮的天空装饰渐变作为按钮底色。悬停时加深颜色,键盘聚焦使用双色外圈,减少动态效果时关闭位移。
|
|
13
13
|
|
|
14
14
|
每个区块保留一个 hero 主入口。日常保存、确认和导航使用 `primary` 或次级变体。`tone` 和 `appearance` 不改变 hero 的专用配色;颜色与阴影统一由 `--ylf-hero-*` 提供,业务可保留自己的路由行为封装。
|
|
15
15
|
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { YlfCuteCloudMood, YlfCuteCloudShape } from '../cute-cloud'
|
|
3
|
+
import { computed, ref, useId } from 'vue'
|
|
4
|
+
|
|
5
|
+
const shape = ref<YlfCuteCloudShape>('round')
|
|
6
|
+
const face = ref(true)
|
|
7
|
+
const happy = ref(false)
|
|
8
|
+
const animated = ref(true)
|
|
9
|
+
const lookRight = ref(false)
|
|
10
|
+
const faceId = useId()
|
|
11
|
+
const happyId = useId()
|
|
12
|
+
const animatedId = useId()
|
|
13
|
+
const lookId = useId()
|
|
14
|
+
|
|
15
|
+
const shapes: { value: YlfCuteCloudShape, label: string }[] = [
|
|
16
|
+
{ value: 'round', label: '圆云' },
|
|
17
|
+
{ value: 'long', label: '长云' },
|
|
18
|
+
{ value: 'small', label: '小云' },
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
const mood = computed<YlfCuteCloudMood>(() => happy.value ? 'happy' : 'calm')
|
|
22
|
+
const look = computed(() => lookRight.value
|
|
23
|
+
? { x: 0.8, y: 0.4 }
|
|
24
|
+
: { x: -0.6, y: 0.4 })
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<template>
|
|
28
|
+
<div class="flex flex-col gap-5">
|
|
29
|
+
<div class="cute-cloud-demo__stage">
|
|
30
|
+
<YlfCuteCloud
|
|
31
|
+
:shape="shape"
|
|
32
|
+
:face="face"
|
|
33
|
+
:mood="mood"
|
|
34
|
+
:animated="animated"
|
|
35
|
+
:look="look"
|
|
36
|
+
class="cute-cloud-demo__cloud"
|
|
37
|
+
/>
|
|
38
|
+
</div>
|
|
39
|
+
<YlfSegmentedControl v-model="shape" :options="shapes" label="小云形状" />
|
|
40
|
+
<div class="flex flex-wrap items-center gap-6">
|
|
41
|
+
<label class="flex items-center gap-2 text-sm" :for="faceId">
|
|
42
|
+
<YlfSwitch :id="faceId" v-model="face" size="sm" />
|
|
43
|
+
小脸
|
|
44
|
+
</label>
|
|
45
|
+
<label class="flex items-center gap-2 text-sm" :for="happyId">
|
|
46
|
+
<YlfSwitch :id="happyId" v-model="happy" size="sm" :disabled="!face" />
|
|
47
|
+
开心
|
|
48
|
+
</label>
|
|
49
|
+
<label class="flex items-center gap-2 text-sm" :for="animatedId">
|
|
50
|
+
<YlfSwitch :id="animatedId" v-model="animated" size="sm" :disabled="!face" />
|
|
51
|
+
眨眼
|
|
52
|
+
</label>
|
|
53
|
+
<label class="flex items-center gap-2 text-sm" :for="lookId">
|
|
54
|
+
<YlfSwitch :id="lookId" v-model="lookRight" size="sm" :disabled="!face || happy" />
|
|
55
|
+
向右看
|
|
56
|
+
</label>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</template>
|
|
60
|
+
|
|
61
|
+
<style scoped>
|
|
62
|
+
.cute-cloud-demo__stage {
|
|
63
|
+
display: grid;
|
|
64
|
+
place-items: center;
|
|
65
|
+
height: 180px;
|
|
66
|
+
border-radius: var(--ylf-radius-lg);
|
|
67
|
+
background: linear-gradient(180deg, var(--ylf-c-sky), var(--ylf-cloud-haze-color));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.cute-cloud-demo__cloud {
|
|
71
|
+
width: 140px;
|
|
72
|
+
}
|
|
73
|
+
</style>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: CuteCloud
|
|
3
|
+
title_zh: 卡通小云
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
圆润简洁的卡通云朵插画,用于认证卡片、空状态和个人中心等轻松场景:支持三种轮廓、可选小脸表情、`mood` 切换以及视线跟随。配色同样来自 `@yunlefun/ui` 的 `--ylf-cloud-*` token,随明暗主题自动切换。纯装饰,`aria-hidden="true"`,不接收指针事件。
|
|
7
|
+
|
|
8
|
+
## 轮廓与表情
|
|
9
|
+
|
|
10
|
+
- `shape` 支持三种固定比例的轮廓:`round`(`120 × 72`)、`long`(`170 × 64`)、`small`(`100 × 46`)。
|
|
11
|
+
- 开启 `face` 后会渲染一张默认就会偶尔眨眼的小脸;表单输入密码或需要静态装饰时可传入 `:animated="false"` 暂停眨眼。
|
|
12
|
+
- `mood="happy"` 时眼睛眯成 `^ ^` 微笑弧线并加深腮红。
|
|
13
|
+
- `look` 传入 `{ x, y }`(均限制在 `-1..1`)可让眼睛看向指定方向,并使用 SVG `transform` 属性驱动,兼容严格的 `style-src 'self'` CSP。
|
|
14
|
+
|
|
15
|
+
## Props
|
|
16
|
+
|
|
17
|
+
| 属性 | 说明 | 类型 | 默认值 |
|
|
18
|
+
| ---------- | -------------------------- | -------------------------- | ------- |
|
|
19
|
+
| `shape` | 云朵轮廓 | `round \| long \| small` | `round` |
|
|
20
|
+
| `face` | 是否显示小脸表情 | `boolean` | `false` |
|
|
21
|
+
| `mood` | 小脸心情 | `calm \| happy` | `calm` |
|
|
22
|
+
| `animated` | 是否启用眨眼动画 | `boolean` | `true` |
|
|
23
|
+
| `look` | 视线方向(自动钳制 -1..1) | `{ x: number, y: number }` | `—` |
|
|
24
|
+
|
|
25
|
+
## CSS 变量
|
|
26
|
+
|
|
27
|
+
| 变量 | 说明 | 默认值 |
|
|
28
|
+
| ----------------------- | ------------ | ------------------------ |
|
|
29
|
+
| `--ylf-cloud-highlight` | 云朵亮面底色 | `#fffefa` |
|
|
30
|
+
| `--ylf-cloud-shade` | 底部阴影色调 | `#c6dff5`(按 70% 混入) |
|
|
31
|
+
| `--ylf-cloud-rim` | 左上角高光 | `#ffffff` |
|
|
32
|
+
| `--ylf-cloud-face` | 五官线条颜色 | `#5a7fae` |
|
|
33
|
+
|
|
34
|
+
轮廓列表与类型也可从包根入口导出:`import { ylfCuteCloudShapes, type YlfCuteCloudShape } from '@yunlefun/vue'`。
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Silhouettes supported by `YlfCuteCloud`. */
|
|
2
|
+
export const ylfCuteCloudShapes = [
|
|
3
|
+
'round',
|
|
4
|
+
'long',
|
|
5
|
+
'small',
|
|
6
|
+
] as const
|
|
7
|
+
|
|
8
|
+
export type YlfCuteCloudShape = typeof ylfCuteCloudShapes[number]
|
|
9
|
+
export type YlfCuteCloudMood = 'calm' | 'happy'
|
|
10
|
+
|
|
11
|
+
export interface YlfCuteCloudLook {
|
|
12
|
+
/** Horizontal gaze direction, clamped to `-1..1`. */
|
|
13
|
+
x: number
|
|
14
|
+
/** Vertical gaze direction, clamped to `-1..1`. */
|
|
15
|
+
y: number
|
|
16
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { YlfCuteCloudLook, YlfCuteCloudMood, YlfCuteCloudShape } from './cute-cloud';
|
|
2
|
+
/**
|
|
3
|
+
* 卡通小云:几团圆鼓鼓的扁平色块拼成,底部一道柔和阴影,可选一张会眨眼的小脸。
|
|
4
|
+
*
|
|
5
|
+
* 比写实的 YlfCloud 更简单、更可爱,用于个人中心、认证卡片等轻松场景。
|
|
6
|
+
* 配色读取 `--ylf-cloud-*` 主题 token,浅色是白日白云,深色是夜空或黄昏云。
|
|
7
|
+
* `mood="happy"` 时眯成 ^ ^ 眼、腮红变深;`look` 传入 -1..1 方向时眼睛朝对应方向看。
|
|
8
|
+
*/
|
|
9
|
+
type __VLS_Props = {
|
|
10
|
+
shape?: YlfCuteCloudShape;
|
|
11
|
+
face?: boolean;
|
|
12
|
+
mood?: YlfCuteCloudMood;
|
|
13
|
+
/** 装饰性眨眼;表单等专注操作的场景可关闭。 */
|
|
14
|
+
animated?: boolean;
|
|
15
|
+
/** 视线方向,x / y 取 -1..1。 */
|
|
16
|
+
look?: YlfCuteCloudLook;
|
|
17
|
+
};
|
|
18
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
19
|
+
shape: "small" | "round" | "long";
|
|
20
|
+
face: boolean;
|
|
21
|
+
mood: YlfCuteCloudMood;
|
|
22
|
+
animated: boolean;
|
|
23
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Silhouettes supported by `YlfCuteCloud`. */
|
|
2
|
+
export declare const ylfCuteCloudShapes: readonly ["round", "long", "small"];
|
|
3
|
+
export type YlfCuteCloudShape = typeof ylfCuteCloudShapes[number];
|
|
4
|
+
export type YlfCuteCloudMood = 'calm' | 'happy';
|
|
5
|
+
export interface YlfCuteCloudLook {
|
|
6
|
+
/** Horizontal gaze direction, clamped to `-1..1`. */
|
|
7
|
+
x: number;
|
|
8
|
+
/** Vertical gaze direction, clamped to `-1..1`. */
|
|
9
|
+
y: number;
|
|
10
|
+
}
|
package/dist/index.cjs
CHANGED
|
@@ -20,5 +20,12 @@ const ylfCloudSilhouettes = {
|
|
|
20
20
|
wisp: "M 20 200 C 6 200 2 190 10 184 C 18 178 30 178 40 180 C 52 166 80 162 98 170 C 120 156 160 154 182 166 C 206 152 248 150 270 164 C 296 152 336 154 352 168 C 376 160 410 162 426 174 C 452 170 482 178 484 190 C 486 202 470 206 446 206 C 380 208 300 206 230 208 C 160 210 80 206 20 200 Z"
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
+
const ylfCuteCloudShapes = [
|
|
24
|
+
"round",
|
|
25
|
+
"long",
|
|
26
|
+
"small"
|
|
27
|
+
];
|
|
28
|
+
|
|
23
29
|
exports.ylfCloudShapes = ylfCloudShapes;
|
|
24
30
|
exports.ylfCloudSilhouettes = ylfCloudSilhouettes;
|
|
31
|
+
exports.ylfCuteCloudShapes = ylfCuteCloudShapes;
|
package/dist/index.d.cts
CHANGED
|
@@ -28,6 +28,17 @@ type YlfCloudShape = typeof ylfCloudShapes[number];
|
|
|
28
28
|
/** Shared SVG paths for cloud silhouettes (`viewBox="0 0 490 250"`). */
|
|
29
29
|
declare const ylfCloudSilhouettes: Record<YlfCloudShape, string>;
|
|
30
30
|
|
|
31
|
+
/** Silhouettes supported by `YlfCuteCloud`. */
|
|
32
|
+
declare const ylfCuteCloudShapes: readonly ["round", "long", "small"];
|
|
33
|
+
type YlfCuteCloudShape = typeof ylfCuteCloudShapes[number];
|
|
34
|
+
type YlfCuteCloudMood = 'calm' | 'happy';
|
|
35
|
+
interface YlfCuteCloudLook {
|
|
36
|
+
/** Horizontal gaze direction, clamped to `-1..1`. */
|
|
37
|
+
x: number;
|
|
38
|
+
/** Vertical gaze direction, clamped to `-1..1`. */
|
|
39
|
+
y: number;
|
|
40
|
+
}
|
|
41
|
+
|
|
31
42
|
/** One choice in a single-selection segmented control. */
|
|
32
43
|
interface YlfSegmentedOption<T extends string = string> {
|
|
33
44
|
value: T;
|
|
@@ -42,5 +53,5 @@ type YlfAccentTone = 'blue' | 'sun' | 'cyan' | 'coral' | 'pink' | 'green';
|
|
|
42
53
|
/** Visual emphasis for accent and status buttons/badges. */
|
|
43
54
|
type YlfColorAppearance = 'solid' | 'soft' | 'outline';
|
|
44
55
|
|
|
45
|
-
export { ylfCloudShapes, ylfCloudSilhouettes };
|
|
46
|
-
export type { BottomMenuItem, YlfAccentTone, YlfAgentState, YlfCloudShape, YlfColorAppearance, YlfSegmentedOption };
|
|
56
|
+
export { ylfCloudShapes, ylfCloudSilhouettes, ylfCuteCloudShapes };
|
|
57
|
+
export type { BottomMenuItem, YlfAccentTone, YlfAgentState, YlfCloudShape, YlfColorAppearance, YlfCuteCloudLook, YlfCuteCloudMood, YlfCuteCloudShape, YlfSegmentedOption };
|
package/dist/index.d.mts
CHANGED
|
@@ -28,6 +28,17 @@ type YlfCloudShape = typeof ylfCloudShapes[number];
|
|
|
28
28
|
/** Shared SVG paths for cloud silhouettes (`viewBox="0 0 490 250"`). */
|
|
29
29
|
declare const ylfCloudSilhouettes: Record<YlfCloudShape, string>;
|
|
30
30
|
|
|
31
|
+
/** Silhouettes supported by `YlfCuteCloud`. */
|
|
32
|
+
declare const ylfCuteCloudShapes: readonly ["round", "long", "small"];
|
|
33
|
+
type YlfCuteCloudShape = typeof ylfCuteCloudShapes[number];
|
|
34
|
+
type YlfCuteCloudMood = 'calm' | 'happy';
|
|
35
|
+
interface YlfCuteCloudLook {
|
|
36
|
+
/** Horizontal gaze direction, clamped to `-1..1`. */
|
|
37
|
+
x: number;
|
|
38
|
+
/** Vertical gaze direction, clamped to `-1..1`. */
|
|
39
|
+
y: number;
|
|
40
|
+
}
|
|
41
|
+
|
|
31
42
|
/** One choice in a single-selection segmented control. */
|
|
32
43
|
interface YlfSegmentedOption<T extends string = string> {
|
|
33
44
|
value: T;
|
|
@@ -42,5 +53,5 @@ type YlfAccentTone = 'blue' | 'sun' | 'cyan' | 'coral' | 'pink' | 'green';
|
|
|
42
53
|
/** Visual emphasis for accent and status buttons/badges. */
|
|
43
54
|
type YlfColorAppearance = 'solid' | 'soft' | 'outline';
|
|
44
55
|
|
|
45
|
-
export { ylfCloudShapes, ylfCloudSilhouettes };
|
|
46
|
-
export type { BottomMenuItem, YlfAccentTone, YlfAgentState, YlfCloudShape, YlfColorAppearance, YlfSegmentedOption };
|
|
56
|
+
export { ylfCloudShapes, ylfCloudSilhouettes, ylfCuteCloudShapes };
|
|
57
|
+
export type { BottomMenuItem, YlfAccentTone, YlfAgentState, YlfCloudShape, YlfColorAppearance, YlfCuteCloudLook, YlfCuteCloudMood, YlfCuteCloudShape, YlfSegmentedOption };
|