@yunlefun/vue 0.7.0 → 0.8.1
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/README.md +5 -6
- package/components/YlfAccordion.vue +30 -29
- package/components/YlfAgentCard.vue +6 -6
- package/components/YlfAgentStatus.vue +5 -5
- package/components/YlfAgentTask.vue +4 -4
- package/components/YlfAiPromptLauncher.vue +19 -9
- package/components/YlfAvatar.vue +31 -31
- package/components/YlfBadge.vue +93 -74
- package/components/YlfBottomMenu.vue +5 -5
- package/components/YlfBottomMenuItem.vue +15 -15
- package/components/YlfButton.vue +307 -267
- package/components/YlfCard.vue +32 -32
- package/components/YlfCheckbox.vue +62 -55
- package/components/YlfCloud.vue +5 -18
- package/components/YlfDialog.vue +47 -46
- package/components/YlfDropdownMenu.vue +55 -57
- package/components/YlfInput.vue +24 -17
- package/components/YlfLogo.vue +58 -42
- package/components/YlfNavigation.vue +24 -24
- package/components/YlfNavigationLink.vue +58 -25
- package/components/YlfNavigationTrigger.vue +49 -21
- package/components/YlfPopover.vue +34 -31
- package/components/YlfProgress.vue +12 -8
- package/components/YlfRadioGroup.vue +73 -58
- package/components/YlfScrollFade.vue +1 -1
- package/components/YlfSegmentedControl.vue +22 -16
- package/components/YlfSelect.vue +83 -79
- package/components/YlfSeparator.vue +31 -26
- package/components/YlfSlider.vue +49 -46
- package/components/YlfSwitch.vue +68 -64
- package/components/YlfTabs.vue +32 -30
- package/components/YlfTooltip.vue +30 -27
- package/components/ai-prompt.ts +33 -6
- package/components/badge/index.md +2 -2
- package/components/button/index.md +2 -2
- package/components/cloud.ts +21 -1
- package/components/navigation-indicator.ts +9 -3
- package/components/scroll-fade.ts +3 -1
- package/components/segmented-control/demo.vue +9 -2
- package/dist/ag-ui.cjs +11 -2
- package/dist/ag-ui.mjs +11 -2
- package/dist/ai-prompt.cjs +30 -5
- package/dist/ai-prompt.mjs +30 -5
- package/dist/components/YlfAccordion.vue.d.ts +5 -3
- package/dist/components/YlfAgentCard.vue.d.ts +9 -7
- package/dist/components/YlfAgentTask.vue.d.ts +7 -5
- package/dist/components/YlfBadge.vue.d.ts +5 -4
- package/dist/components/YlfBottomMenu.vue.d.ts +5 -3
- package/dist/components/YlfBottomMenuItem.vue.d.ts +5 -3
- package/dist/components/YlfButton.vue.d.ts +7 -6
- package/dist/components/YlfCard.vue.d.ts +5 -4
- package/dist/components/YlfDialog.vue.d.ts +11 -9
- package/dist/components/YlfDropdownMenu.vue.d.ts +5 -3
- package/dist/components/YlfNavigation.vue.d.ts +5 -3
- package/dist/components/YlfNavigationLink.vue.d.ts +5 -3
- package/dist/components/YlfNavigationTrigger.vue.d.ts +5 -3
- package/dist/components/YlfPopover.vue.d.ts +7 -5
- package/dist/components/YlfProgress.vue.d.ts +0 -1
- package/dist/components/YlfScrollFade.vue.d.ts +5 -3
- package/dist/components/YlfSeparator.vue.d.ts +0 -1
- package/dist/components/YlfSwitch.vue.d.ts +0 -1
- package/dist/components/YlfTabs.vue.d.ts +5 -3
- package/dist/components/YlfTooltip.vue.d.ts +7 -5
- package/dist/components/cloud.d.ts +2 -0
- package/dist/index.cjs +20 -10
- package/dist/index.d.cts +3 -4
- package/dist/index.d.mts +3 -4
- package/dist/index.d.ts +3 -4
- package/dist/index.mjs +20 -8
- package/dist/node.cjs +11 -0
- package/dist/node.d.cts +4 -0
- package/dist/node.d.mts +4 -0
- package/dist/node.d.ts +4 -0
- package/dist/node.mjs +7 -0
- package/package.json +6 -3
- package/components/_navigation.scss +0 -38
package/components/YlfCard.vue
CHANGED
|
@@ -17,7 +17,6 @@ withDefaults(defineProps<{
|
|
|
17
17
|
padding?: string
|
|
18
18
|
}>(), {
|
|
19
19
|
variant: 'soft',
|
|
20
|
-
tone: 'blue',
|
|
21
20
|
hoverable: true,
|
|
22
21
|
padding: '22px',
|
|
23
22
|
})
|
|
@@ -34,54 +33,55 @@ withDefaults(defineProps<{
|
|
|
34
33
|
</div>
|
|
35
34
|
</template>
|
|
36
35
|
|
|
37
|
-
<style
|
|
36
|
+
<style>
|
|
38
37
|
.ylf-card {
|
|
39
38
|
position: relative;
|
|
40
|
-
border-radius: var(--ylf-radius-lg, 20px);
|
|
39
|
+
border-radius: var(--ylf-panel-radius, var(--ylf-radius-lg, 20px));
|
|
41
40
|
color: var(--ylf-c-text, #0f172a);
|
|
42
41
|
background: var(--ylf-c-surface, #fff);
|
|
43
42
|
border: 1px solid var(--ylf-c-border, #e2e8f0);
|
|
44
|
-
box-shadow: var(--ylf-shadow-control
|
|
43
|
+
box-shadow: var(--ylf-shadow-control);
|
|
45
44
|
transition:
|
|
46
|
-
transform var(--ylf-duration-slow, 480ms)
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
transform var(--ylf-duration-slow, 480ms)
|
|
46
|
+
var(--ylf-ease-spring, var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1))),
|
|
47
|
+
box-shadow var(--ylf-duration-normal, 240ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1)),
|
|
48
|
+
background var(--ylf-duration-normal, 240ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
49
|
+
}
|
|
49
50
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
51
|
+
@media (hover: hover) and (pointer: fine) {
|
|
52
|
+
.ylf-card.is-hoverable:hover {
|
|
53
|
+
transform: translateY(-4px);
|
|
54
|
+
box-shadow: var(--ylf-shadow, 0 10px 28px -8px rgba(15, 23, 42, 0.16));
|
|
55
55
|
}
|
|
56
|
+
}
|
|
56
57
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
58
|
+
/* 云玻璃 */
|
|
59
|
+
.ylf-card--glass {
|
|
60
|
+
background: var(--ylf-glass-bg, rgba(255, 255, 255, 0.82));
|
|
61
|
+
border-color: var(--ylf-glass-border, rgba(255, 255, 255, 0.7));
|
|
62
|
+
-webkit-backdrop-filter: var(--ylf-glass-blur, saturate(160%) blur(16px));
|
|
63
|
+
backdrop-filter: var(--ylf-glass-blur, saturate(160%) blur(16px));
|
|
64
|
+
box-shadow: var(--ylf-shadow-panel, var(--ylf-shadow-lg, 0 22px 56px -14px rgba(15, 23, 42, 0.22)));
|
|
65
|
+
}
|
|
65
66
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
.ylf-card--accent,
|
|
68
|
+
.ylf-card--gradient {
|
|
69
|
+
border-top: 3px solid var(--ylf-accent, var(--ylf-c-brand, #006aeb));
|
|
70
|
+
}
|
|
70
71
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
72
|
+
.ylf-card--tinted {
|
|
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
|
+
box-shadow: none;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
@media (prefers-reduced-motion: reduce) {
|
|
79
79
|
.ylf-card {
|
|
80
80
|
transition: none;
|
|
81
|
+
}
|
|
81
82
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
83
|
+
.ylf-card.is-hoverable:hover {
|
|
84
|
+
transform: none;
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
</style>
|
|
@@ -38,7 +38,7 @@ watch(checked, () => {
|
|
|
38
38
|
</CheckboxRoot>
|
|
39
39
|
</template>
|
|
40
40
|
|
|
41
|
-
<style
|
|
41
|
+
<style>
|
|
42
42
|
.ylf-checkbox {
|
|
43
43
|
--_size: 20px;
|
|
44
44
|
|
|
@@ -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-
|
|
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);
|
|
@@ -56,60 +56,64 @@ watch(checked, () => {
|
|
|
56
56
|
cursor: pointer;
|
|
57
57
|
-webkit-tap-highlight-color: transparent;
|
|
58
58
|
transition:
|
|
59
|
-
background var(--ylf-duration-fast, 160ms) var(--ylf-ease-standard,
|
|
60
|
-
border-color var(--ylf-duration-fast, 160ms) var(--ylf-ease-standard,
|
|
61
|
-
box-shadow var(--ylf-duration-fast, 160ms) var(--ylf-ease-standard,
|
|
62
|
-
transform var(--ylf-duration-slow, 480ms)
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
&:hover:not([data-disabled]) {
|
|
66
|
-
border-color: var(--ylf-c-brand, #2563eb);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
59
|
+
background var(--ylf-duration-fast, 160ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1)),
|
|
60
|
+
border-color var(--ylf-duration-fast, 160ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1)),
|
|
61
|
+
box-shadow var(--ylf-duration-fast, 160ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1)),
|
|
62
|
+
transform var(--ylf-duration-slow, 480ms)
|
|
63
|
+
var(--ylf-ease-spring, var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1)));
|
|
64
|
+
}
|
|
69
65
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
box-shadow: 0 0 0 3px var(--ylf-c-brand-soft, #eff6ff);
|
|
66
|
+
@media (hover: hover) and (pointer: fine) {
|
|
67
|
+
.ylf-checkbox:hover:not([data-disabled]) {
|
|
68
|
+
border-color: var(--ylf-c-brand, #006aeb);
|
|
74
69
|
}
|
|
70
|
+
}
|
|
75
71
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
72
|
+
.ylf-checkbox:focus-visible {
|
|
73
|
+
outline: var(--ylf-ring-width, 2px) solid var(--ylf-ring-color, var(--ylf-c-brand, #006aeb));
|
|
74
|
+
outline-offset: 3px;
|
|
75
|
+
box-shadow: 0 0 0 3px var(--ylf-c-brand-soft, #f0f7ff);
|
|
76
|
+
}
|
|
80
77
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
78
|
+
.ylf-checkbox:active:not([data-disabled]) {
|
|
79
|
+
transform: scale(0.9);
|
|
80
|
+
transition-duration: var(--ylf-duration-press, 100ms);
|
|
81
|
+
}
|
|
85
82
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
83
|
+
.ylf-checkbox.is-animated[data-state='checked'],
|
|
84
|
+
.ylf-checkbox.is-animated[data-state='indeterminate'] {
|
|
85
|
+
animation: ylf-checkbox-pop var(--ylf-duration-slow, 480ms)
|
|
86
|
+
var(--ylf-ease-spring, var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1)));
|
|
87
|
+
}
|
|
92
88
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
89
|
+
.ylf-checkbox[data-state='checked'],
|
|
90
|
+
.ylf-checkbox[data-state='indeterminate'] {
|
|
91
|
+
background: var(--ylf-c-brand, #006aeb);
|
|
92
|
+
border-color: var(--ylf-c-brand, #006aeb);
|
|
93
|
+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
|
|
94
|
+
}
|
|
97
95
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
96
|
+
.ylf-checkbox[data-disabled] {
|
|
97
|
+
opacity: var(--ylf-disabled-opacity, 0.48);
|
|
98
|
+
cursor: not-allowed;
|
|
99
|
+
}
|
|
101
100
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
101
|
+
.ylf-checkbox__indicator {
|
|
102
|
+
display: inline-flex;
|
|
103
|
+
}
|
|
106
104
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
105
|
+
.ylf-checkbox__indicator svg {
|
|
106
|
+
width: 14px;
|
|
107
|
+
height: 14px;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/* 对勾按笔画顺序画出。 */
|
|
111
|
+
.ylf-checkbox.is-animated .ylf-checkbox__indicator path {
|
|
112
|
+
stroke-dasharray: 1;
|
|
113
|
+
animation: ylf-checkbox-draw var(--ylf-duration-normal, 240ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1))
|
|
114
|
+
60ms backwards;
|
|
112
115
|
}
|
|
116
|
+
|
|
113
117
|
@media (pointer: coarse) {
|
|
114
118
|
.ylf-checkbox {
|
|
115
119
|
position: relative;
|
|
@@ -117,28 +121,31 @@ watch(checked, () => {
|
|
|
117
121
|
margin-block: max(0px, calc((var(--ylf-touch-target, 44px) - var(--_size)) / 2));
|
|
118
122
|
margin-inline: max(0px, calc((var(--ylf-touch-target, 44px) - var(--_size)) / 2));
|
|
119
123
|
touch-action: manipulation;
|
|
124
|
+
}
|
|
120
125
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
126
|
+
.ylf-checkbox::before {
|
|
127
|
+
position: absolute;
|
|
128
|
+
top: 50%;
|
|
129
|
+
left: 50%;
|
|
130
|
+
width: max(100%, var(--ylf-touch-target, 44px));
|
|
131
|
+
height: max(100%, var(--ylf-touch-target, 44px));
|
|
132
|
+
transform: translate(-50%, -50%);
|
|
133
|
+
content: '';
|
|
130
134
|
}
|
|
131
135
|
}
|
|
136
|
+
|
|
132
137
|
@keyframes ylf-checkbox-pop {
|
|
133
138
|
from {
|
|
134
139
|
transform: scale(0.82);
|
|
135
140
|
}
|
|
136
141
|
}
|
|
142
|
+
|
|
137
143
|
@keyframes ylf-checkbox-draw {
|
|
138
144
|
from {
|
|
139
145
|
stroke-dashoffset: 1;
|
|
140
146
|
}
|
|
141
147
|
}
|
|
148
|
+
|
|
142
149
|
@media (prefers-reduced-motion: reduce) {
|
|
143
150
|
.ylf-checkbox,
|
|
144
151
|
.ylf-checkbox.is-animated[data-state],
|
package/components/YlfCloud.vue
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import type { YlfCloudShape } from './cloud'
|
|
3
3
|
import { computed, useId } from 'vue'
|
|
4
|
+
import { ylfCloudSilhouettes } from './cloud'
|
|
4
5
|
|
|
5
6
|
const props = withDefaults(defineProps<{
|
|
6
7
|
shape?: YlfCloudShape
|
|
@@ -16,21 +17,7 @@ const props = withDefaults(defineProps<{
|
|
|
16
17
|
|
|
17
18
|
const id = `ylf-cloud-${useId()}`
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
const silhouettes: Record<YlfCloudShape, string> = {
|
|
21
|
-
// 层层鼓起的主云。
|
|
22
|
-
billow: 'M 58 199 C 26 199 8 185 8 164 C 8 144 22 130 43 128 C 39 102 55 81 79 80 C 94 79 106 85 115 94 C 106 57 129 24 164 23 C 191 22 211 38 220 61 C 232 43 251 36 269 40 C 295 45 310 66 309 90 C 325 80 345 83 357 95 C 367 104 371 117 369 129 C 392 119 417 130 424 151 C 449 147 477 163 477 183 C 477 207 453 218 422 218 C 391 218 367 213 341 216 C 303 222 272 218 246 215 C 211 222 176 217 151 212 C 118 218 84 214 58 199 Z',
|
|
23
|
-
// 宽厚的近景积云,右侧堆得更高。
|
|
24
|
-
heap: 'M 40 205 C 14 205 4 190 10 174 C 16 158 34 152 52 156 C 50 126 74 106 102 112 C 112 78 150 62 182 76 C 198 44 240 30 274 46 C 302 30 344 38 360 66 C 392 58 424 78 426 108 C 456 110 482 132 480 162 C 486 190 466 208 436 210 C 380 214 330 212 280 214 C 220 216 160 214 110 212 C 84 212 60 208 40 205 Z',
|
|
25
|
-
// 贴着地平线的扁长云堤。
|
|
26
|
-
bank: 'M 30 212 C 10 212 2 200 8 188 C 14 176 30 172 46 176 C 52 156 74 148 94 156 C 108 136 138 132 156 146 C 172 124 208 120 228 138 C 246 118 284 118 300 140 C 318 126 352 128 362 150 C 380 140 410 144 418 162 C 444 158 470 172 474 190 C 478 206 462 214 440 214 C 380 216 300 214 230 216 C 160 218 90 214 30 212 Z',
|
|
27
|
-
// 圆鼓鼓的小团云。
|
|
28
|
-
puff: 'M 120 210 C 88 210 70 192 76 170 C 82 150 102 142 122 148 C 120 112 150 86 186 90 C 204 60 250 52 278 76 C 300 64 336 74 344 104 C 376 102 404 126 400 156 C 412 182 396 210 366 212 C 300 214 220 214 120 210 Z',
|
|
29
|
-
// 远处拉长的薄云。
|
|
30
|
-
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',
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const d = computed(() => silhouettes[props.shape] ?? silhouettes.billow)
|
|
20
|
+
const d = computed(() => ylfCloudSilhouettes[props.shape] ?? ylfCloudSilhouettes.billow)
|
|
34
21
|
</script>
|
|
35
22
|
|
|
36
23
|
<template>
|
|
@@ -104,9 +91,9 @@ const d = computed(() => silhouettes[props.shape] ?? silhouettes.billow)
|
|
|
104
91
|
</svg>
|
|
105
92
|
</template>
|
|
106
93
|
|
|
107
|
-
<style
|
|
108
|
-
|
|
109
|
-
|
|
94
|
+
<style>
|
|
95
|
+
/* 配色来自 @yunlefun/ui 的 --ylf-cloud-* token,随主题切换;
|
|
96
|
+
* --ylf-cloud-haze(0–1)把远处的云混向天空色,形成空气透视。 */
|
|
110
97
|
.ylf-cloud {
|
|
111
98
|
--_ylf-cloud-haze-color: var(--ylf-cloud-haze-color, #9cc6ef);
|
|
112
99
|
--_ylf-cloud-highlight: color-mix(
|
package/components/YlfDialog.vue
CHANGED
|
@@ -76,22 +76,22 @@ const descriptionProps = computed(() => hasDescription.value
|
|
|
76
76
|
</DialogRoot>
|
|
77
77
|
</template>
|
|
78
78
|
|
|
79
|
-
<style
|
|
79
|
+
<style>
|
|
80
80
|
.ylf-dialog__overlay {
|
|
81
81
|
position: fixed;
|
|
82
82
|
inset: 0;
|
|
83
|
-
z-index: 100;
|
|
83
|
+
z-index: var(--ylf-z-overlay, 100);
|
|
84
84
|
background: var(--ylf-c-overlay, rgba(13, 17, 32, 0.45));
|
|
85
|
-
-webkit-backdrop-filter: var(--ylf-overlay-blur, blur(10px));
|
|
86
|
-
backdrop-filter: var(--ylf-overlay-blur, blur(10px));
|
|
85
|
+
-webkit-backdrop-filter: var(--ylf-overlay-blur, saturate(85%) blur(10px));
|
|
86
|
+
backdrop-filter: var(--ylf-overlay-blur, saturate(85%) blur(10px));
|
|
87
|
+
}
|
|
87
88
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
.ylf-dialog__overlay[data-state='closed'] {
|
|
90
|
+
animation: ylf-dialog-overlay-out var(--ylf-duration-exit, 160ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
91
|
+
}
|
|
91
92
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
93
|
+
.ylf-dialog__overlay[data-state='open'] {
|
|
94
|
+
animation: ylf-dialog-overlay-in var(--ylf-duration-enter, 240ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
.ylf-dialog__content {
|
|
@@ -101,7 +101,7 @@ const descriptionProps = computed(() => hasDescription.value
|
|
|
101
101
|
--_inset-left: max(var(--ylf-viewport-gutter, 16px), env(safe-area-inset-left, 0px));
|
|
102
102
|
|
|
103
103
|
position: fixed;
|
|
104
|
-
z-index: 101;
|
|
104
|
+
z-index: var(--ylf-z-modal, 101);
|
|
105
105
|
top: 50%;
|
|
106
106
|
top: calc((100dvh + var(--_inset-top) - var(--_inset-bottom)) / 2);
|
|
107
107
|
left: calc((100% + var(--_inset-left) - var(--_inset-right)) / 2);
|
|
@@ -114,24 +114,24 @@ const descriptionProps = computed(() => hasDescription.value
|
|
|
114
114
|
overflow: auto;
|
|
115
115
|
padding: 28px;
|
|
116
116
|
transform: translate(-50%, -50%);
|
|
117
|
-
border-radius: var(--ylf-radius-lg, 20px);
|
|
117
|
+
border-radius: var(--ylf-panel-radius, var(--ylf-radius-lg, 20px));
|
|
118
118
|
background: var(--ylf-c-panel, var(--ylf-c-surface, #fff));
|
|
119
119
|
border: 1px solid var(--ylf-c-border, #e2e8f0);
|
|
120
|
-
box-shadow: var(--ylf-shadow-panel, 0 22px 56px -14px rgba(15, 23, 42, 0.22));
|
|
121
|
-
-webkit-backdrop-filter: var(--ylf-glass-blur, blur(16px));
|
|
122
|
-
backdrop-filter: var(--ylf-glass-blur, blur(16px));
|
|
120
|
+
box-shadow: var(--ylf-shadow-panel, var(--ylf-shadow-lg, 0 22px 56px -14px rgba(15, 23, 42, 0.22)));
|
|
121
|
+
-webkit-backdrop-filter: var(--ylf-glass-blur, saturate(160%) blur(16px));
|
|
122
|
+
backdrop-filter: var(--ylf-glass-blur, saturate(160%) blur(16px));
|
|
123
|
+
}
|
|
123
124
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
.ylf-dialog__content[data-state='closed'] {
|
|
126
|
+
animation: ylf-dialog-out var(--ylf-duration-exit, 160ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
127
|
+
}
|
|
127
128
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
.ylf-dialog__content[data-state='open'] {
|
|
130
|
+
animation: ylf-dialog-in var(--ylf-duration-enter, 240ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
131
|
+
}
|
|
131
132
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
133
|
+
.ylf-dialog__content:focus-visible {
|
|
134
|
+
outline: none;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
.ylf-dialog__title {
|
|
@@ -139,7 +139,7 @@ const descriptionProps = computed(() => hasDescription.value
|
|
|
139
139
|
padding-right: var(--ylf-touch-target, 44px);
|
|
140
140
|
overflow-wrap: anywhere;
|
|
141
141
|
font-family: var(--ylf-font-heading, inherit);
|
|
142
|
-
font-size:
|
|
142
|
+
font-size: var(--ylf-text-xl, 1.5rem);
|
|
143
143
|
font-weight: 650;
|
|
144
144
|
line-height: 1.35;
|
|
145
145
|
letter-spacing: -0.03em;
|
|
@@ -149,8 +149,8 @@ const descriptionProps = computed(() => hasDescription.value
|
|
|
149
149
|
.ylf-dialog__desc {
|
|
150
150
|
margin: 0 0 24px;
|
|
151
151
|
overflow-wrap: anywhere;
|
|
152
|
-
font-size:
|
|
153
|
-
line-height: 1.75;
|
|
152
|
+
font-size: var(--ylf-text-sm, 0.875rem);
|
|
153
|
+
line-height: var(--ylf-leading-body, 1.75);
|
|
154
154
|
color: var(--ylf-c-text-2, #475569);
|
|
155
155
|
}
|
|
156
156
|
|
|
@@ -165,30 +165,30 @@ const descriptionProps = computed(() => hasDescription.value
|
|
|
165
165
|
padding: 0;
|
|
166
166
|
border: none;
|
|
167
167
|
border-radius: var(--ylf-radius-sm, 10px);
|
|
168
|
-
background: var(--ylf-c-surface-raised,
|
|
169
|
-
box-shadow: inset 0 1px 0 var(--ylf-c-highlight,
|
|
170
|
-
color: var(--ylf-c-text-3, #
|
|
168
|
+
background: var(--ylf-c-surface-raised, #f6f9ff);
|
|
169
|
+
box-shadow: inset 0 1px 0 var(--ylf-c-highlight, rgba(255, 255, 255, 0.9));
|
|
170
|
+
color: var(--ylf-c-text-3, #5a697e);
|
|
171
171
|
cursor: pointer;
|
|
172
172
|
transition:
|
|
173
|
-
background var(--ylf-duration-fast, 160ms) var(--ylf-ease-standard,
|
|
174
|
-
color var(--ylf-duration-fast, 160ms) var(--ylf-ease-standard,
|
|
175
|
-
|
|
176
|
-
@media (hover: hover) and (pointer: fine) {
|
|
177
|
-
&:hover {
|
|
178
|
-
background: var(--ylf-c-bg-mute, #e2e8f0);
|
|
179
|
-
color: var(--ylf-c-text, #0f172a);
|
|
180
|
-
}
|
|
181
|
-
}
|
|
173
|
+
background var(--ylf-duration-fast, 160ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1)),
|
|
174
|
+
color var(--ylf-duration-fast, 160ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
175
|
+
}
|
|
182
176
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
177
|
+
@media (hover: hover) and (pointer: fine) {
|
|
178
|
+
.ylf-dialog__close:hover {
|
|
179
|
+
background: var(--ylf-c-bg-mute, #e2e8f0);
|
|
180
|
+
color: var(--ylf-c-text, #0f172a);
|
|
186
181
|
}
|
|
182
|
+
}
|
|
187
183
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
184
|
+
.ylf-dialog__close:focus-visible {
|
|
185
|
+
outline: var(--ylf-ring-width, 2px) solid var(--ylf-ring-color, var(--ylf-c-brand, #006aeb));
|
|
186
|
+
outline-offset: 2px;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.ylf-dialog__close svg {
|
|
190
|
+
width: 16px;
|
|
191
|
+
height: 16px;
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
@media (pointer: coarse) {
|
|
@@ -223,6 +223,7 @@ const descriptionProps = computed(() => hasDescription.value
|
|
|
223
223
|
transition: none;
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
|
+
|
|
226
227
|
@keyframes ylf-dialog-overlay-out {
|
|
227
228
|
to {
|
|
228
229
|
opacity: 0;
|
|
@@ -44,9 +44,9 @@ const open = defineModel<boolean>('open', { default: false })
|
|
|
44
44
|
</DropdownMenuRoot>
|
|
45
45
|
</template>
|
|
46
46
|
|
|
47
|
-
<style
|
|
47
|
+
<style>
|
|
48
48
|
.ylf-menu {
|
|
49
|
-
z-index: 105;
|
|
49
|
+
z-index: var(--ylf-z-popover, 105);
|
|
50
50
|
box-sizing: border-box;
|
|
51
51
|
min-width: min(180px, var(--reka-dropdown-menu-content-available-width, 100vw));
|
|
52
52
|
max-width: var(--reka-dropdown-menu-content-available-width, calc(100vw - 32px));
|
|
@@ -58,65 +58,69 @@ const open = defineModel<boolean>('open', { default: false })
|
|
|
58
58
|
background: var(--ylf-c-panel, var(--ylf-c-surface, #fff));
|
|
59
59
|
border: 1px solid var(--ylf-c-border, #e2e8f0);
|
|
60
60
|
border-radius: var(--ylf-radius, 14px);
|
|
61
|
-
box-shadow: var(--ylf-shadow-panel, 0 22px 56px -14px rgba(15, 23, 42, 0.22));
|
|
62
|
-
backdrop-filter: var(--ylf-glass-blur, blur(16px));
|
|
61
|
+
box-shadow: var(--ylf-shadow-panel, var(--ylf-shadow-lg, 0 22px 56px -14px rgba(15, 23, 42, 0.22)));
|
|
62
|
+
backdrop-filter: var(--ylf-glass-blur, saturate(160%) blur(16px));
|
|
63
63
|
transform-origin: var(--reka-dropdown-menu-content-transform-origin);
|
|
64
|
+
}
|
|
64
65
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
.ylf-menu[data-state='open'] {
|
|
67
|
+
animation: ylf-menu-in var(--ylf-duration-enter, 240ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
68
|
+
}
|
|
68
69
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
.ylf-menu[data-state='closed'] {
|
|
71
|
+
animation: ylf-menu-out var(--ylf-duration-exit, 160ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
72
|
+
}
|
|
72
73
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
&[data-side='top'] {
|
|
77
|
-
--_enter-y: 4px;
|
|
78
|
-
}
|
|
79
|
-
&[data-side='left'] {
|
|
80
|
-
--_enter-x: 4px;
|
|
81
|
-
}
|
|
82
|
-
&[data-side='right'] {
|
|
83
|
-
--_enter-x: -4px;
|
|
84
|
-
}
|
|
74
|
+
.ylf-menu[data-side='bottom'] {
|
|
75
|
+
--_enter-y: -4px;
|
|
76
|
+
}
|
|
85
77
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
padding: 8px 12px;
|
|
90
|
-
font-size: 14px;
|
|
91
|
-
color: var(--ylf-c-text, #0f172a);
|
|
92
|
-
border-radius: var(--ylf-radius-sm, 10px);
|
|
93
|
-
cursor: pointer;
|
|
94
|
-
user-select: none;
|
|
95
|
-
outline: none;
|
|
96
|
-
transition: background var(--ylf-duration-fast, 160ms) ease;
|
|
97
|
-
|
|
98
|
-
&[data-highlighted] {
|
|
99
|
-
background: var(--ylf-c-brand-soft, #eff6ff);
|
|
100
|
-
color: var(--ylf-c-brand, #2563eb);
|
|
101
|
-
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ylf-c-brand, #2563eb) 12%, transparent);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
&[data-disabled] {
|
|
105
|
-
opacity: 0.45;
|
|
106
|
-
pointer-events: none;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
78
|
+
.ylf-menu[data-side='top'] {
|
|
79
|
+
--_enter-y: 4px;
|
|
80
|
+
}
|
|
109
81
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
82
|
+
.ylf-menu[data-side='left'] {
|
|
83
|
+
--_enter-x: 4px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.ylf-menu[data-side='right'] {
|
|
87
|
+
--_enter-x: -4px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.ylf-menu__item {
|
|
91
|
+
display: flex;
|
|
92
|
+
align-items: center;
|
|
93
|
+
padding: 8px 12px;
|
|
94
|
+
font-size: var(--ylf-text-sm, 0.875rem);
|
|
95
|
+
color: var(--ylf-c-text, #0f172a);
|
|
96
|
+
border-radius: var(--ylf-control-radius-sm, var(--ylf-radius-sm, 10px));
|
|
97
|
+
cursor: pointer;
|
|
98
|
+
user-select: none;
|
|
99
|
+
outline: none;
|
|
100
|
+
transition: background var(--ylf-duration-fast, 160ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.ylf-menu__item[data-highlighted] {
|
|
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
|
+
}
|
|
108
|
+
|
|
109
|
+
.ylf-menu__item[data-disabled] {
|
|
110
|
+
opacity: var(--ylf-disabled-opacity, 0.48);
|
|
111
|
+
pointer-events: none;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.ylf-menu__sep {
|
|
115
|
+
height: 1px;
|
|
116
|
+
margin: 6px 4px;
|
|
117
|
+
background: var(--ylf-c-border, #e2e8f0);
|
|
115
118
|
}
|
|
116
119
|
|
|
117
120
|
@media (pointer: coarse) {
|
|
118
121
|
.ylf-menu__item {
|
|
119
|
-
|
|
122
|
+
box-sizing: border-box;
|
|
123
|
+
min-height: var(--ylf-touch-target, 44px);
|
|
120
124
|
}
|
|
121
125
|
}
|
|
122
126
|
|
|
@@ -143,10 +147,4 @@ const open = defineModel<boolean>('open', { default: false })
|
|
|
143
147
|
transition: none;
|
|
144
148
|
}
|
|
145
149
|
}
|
|
146
|
-
@media (pointer: coarse) {
|
|
147
|
-
.ylf-menu__item {
|
|
148
|
-
box-sizing: border-box;
|
|
149
|
-
min-height: var(--ylf-touch-target, 44px);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
150
|
</style>
|