@yunlefun/vue 0.7.0 → 0.8.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/README.md +5 -6
- package/components/YlfAccordion.vue +30 -29
- package/components/YlfAgentCard.vue +4 -4
- package/components/YlfAgentStatus.vue +1 -1
- package/components/YlfAgentTask.vue +4 -4
- package/components/YlfAiPromptLauncher.vue +18 -8
- package/components/YlfAvatar.vue +30 -30
- package/components/YlfBadge.vue +92 -73
- package/components/YlfBottomMenu.vue +5 -5
- package/components/YlfBottomMenuItem.vue +15 -15
- package/components/YlfButton.vue +300 -265
- package/components/YlfCard.vue +32 -32
- package/components/YlfCheckbox.vue +61 -54
- package/components/YlfCloud.vue +5 -18
- package/components/YlfDialog.vue +47 -46
- package/components/YlfDropdownMenu.vue +55 -57
- package/components/YlfInput.vue +22 -15
- 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 +10 -6
- package/components/YlfRadioGroup.vue +73 -58
- package/components/YlfScrollFade.vue +1 -1
- package/components/YlfSegmentedControl.vue +21 -15
- package/components/YlfSelect.vue +81 -77
- package/components/YlfSeparator.vue +31 -26
- package/components/YlfSlider.vue +49 -46
- package/components/YlfSwitch.vue +67 -64
- package/components/YlfTabs.vue +30 -28
- package/components/YlfTooltip.vue +30 -27
- package/components/ai-prompt.ts +33 -6
- 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/YlfLogo.vue
CHANGED
|
@@ -26,63 +26,79 @@ const viewBox = `0 0 ${mark.width || icons.width || 16} ${mark.height || icons.h
|
|
|
26
26
|
</div>
|
|
27
27
|
</template>
|
|
28
28
|
|
|
29
|
-
<style
|
|
29
|
+
<style>
|
|
30
30
|
.ylf-logo {
|
|
31
31
|
display: inline-flex;
|
|
32
32
|
align-items: center;
|
|
33
33
|
gap: 10px;
|
|
34
34
|
cursor: default;
|
|
35
35
|
line-height: 1;
|
|
36
|
+
}
|
|
36
37
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
.ylf-logo--vertical {
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
gap: 8px;
|
|
41
|
+
}
|
|
41
42
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
.ylf-logo__mark {
|
|
44
|
+
flex: none;
|
|
45
|
+
display: grid;
|
|
46
|
+
place-items: center;
|
|
47
|
+
color: var(--ylf-c-brand, #2563eb);
|
|
48
|
+
}
|
|
47
49
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
50
|
+
.ylf-logo__mark svg {
|
|
51
|
+
width: 100%;
|
|
52
|
+
height: 100%;
|
|
53
|
+
}
|
|
53
54
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
font-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
.ylf-logo__name {
|
|
56
|
+
font-family: var(
|
|
57
|
+
--ylf-font-wordmark,
|
|
58
|
+
var(
|
|
59
|
+
--ylf-font-display,
|
|
60
|
+
'Baloo 2',
|
|
61
|
+
'ZCOOL KuaiLe',
|
|
62
|
+
ui-rounded,
|
|
63
|
+
'Hiragino Maru Gothic ProN',
|
|
64
|
+
'Hiragino Maru Gothic Pro',
|
|
65
|
+
'PingFang SC',
|
|
66
|
+
'Hiragino Sans GB',
|
|
67
|
+
'Microsoft YaHei',
|
|
68
|
+
'微软雅黑',
|
|
69
|
+
'Source Han Sans SC',
|
|
70
|
+
sans-serif
|
|
71
|
+
)
|
|
72
|
+
);
|
|
73
|
+
font-weight: 700;
|
|
74
|
+
color: var(--ylf-c-text, #0f172a);
|
|
75
|
+
}
|
|
59
76
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
77
|
+
/* sizes */
|
|
78
|
+
.ylf-logo--sm .ylf-logo__mark {
|
|
79
|
+
width: 36px;
|
|
80
|
+
height: 25.2px;
|
|
81
|
+
}
|
|
65
82
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
83
|
+
.ylf-logo--sm .ylf-logo__name {
|
|
84
|
+
font-size: 18px;
|
|
85
|
+
}
|
|
69
86
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
87
|
+
.ylf-logo--md .ylf-logo__mark {
|
|
88
|
+
width: 48px;
|
|
89
|
+
height: 33.6px;
|
|
90
|
+
}
|
|
74
91
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
92
|
+
.ylf-logo--md .ylf-logo__name {
|
|
93
|
+
font-size: 24px;
|
|
94
|
+
}
|
|
78
95
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
96
|
+
.ylf-logo--lg .ylf-logo__mark {
|
|
97
|
+
width: 72px;
|
|
98
|
+
height: 50.4px;
|
|
99
|
+
}
|
|
83
100
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
101
|
+
.ylf-logo--lg .ylf-logo__name {
|
|
102
|
+
font-size: 34px;
|
|
87
103
|
}
|
|
88
104
|
</style>
|
|
@@ -35,7 +35,7 @@ const indicator = useNavigationIndicator(root, {
|
|
|
35
35
|
</nav>
|
|
36
36
|
</template>
|
|
37
37
|
|
|
38
|
-
<style
|
|
38
|
+
<style scoped>
|
|
39
39
|
.ylf-navigation {
|
|
40
40
|
--_ylf-nav-justify: center;
|
|
41
41
|
--_ylf-nav-active-bg: transparent;
|
|
@@ -47,33 +47,33 @@ const indicator = useNavigationIndicator(root, {
|
|
|
47
47
|
align-items: center;
|
|
48
48
|
gap: var(--ylf-space-2, 8px);
|
|
49
49
|
min-width: 0;
|
|
50
|
+
}
|
|
50
51
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
.ylf-navigation[data-indicator] {
|
|
53
|
+
--_ylf-nav-indicator: none;
|
|
54
|
+
}
|
|
54
55
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
56
|
+
.ylf-navigation__indicator {
|
|
57
|
+
position: absolute;
|
|
58
|
+
top: 0;
|
|
59
|
+
left: 0;
|
|
60
|
+
width: 16px;
|
|
61
|
+
height: 2px;
|
|
62
|
+
border-radius: var(--ylf-radius-pill, 999px);
|
|
63
|
+
background: var(--ylf-c-brand, #2563eb);
|
|
64
|
+
pointer-events: none;
|
|
65
|
+
transition: transform var(--ylf-duration-normal, 240ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
66
|
+
}
|
|
66
67
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
.ylf-navigation[data-orientation='vertical'] {
|
|
69
|
+
--_ylf-nav-justify: flex-start;
|
|
70
|
+
--_ylf-nav-active-bg: var(--ylf-c-brand-soft, #eff6ff);
|
|
71
|
+
--_ylf-nav-indicator: none;
|
|
71
72
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
73
|
+
flex-direction: column;
|
|
74
|
+
flex-wrap: nowrap;
|
|
75
|
+
align-items: stretch;
|
|
76
|
+
gap: var(--ylf-space-1, 4px);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -23,37 +23,70 @@ withDefaults(defineProps<{
|
|
|
23
23
|
</Primitive>
|
|
24
24
|
</template>
|
|
25
25
|
|
|
26
|
-
<style
|
|
27
|
-
@use './navigation' as navigation;
|
|
28
|
-
|
|
26
|
+
<style scoped>
|
|
29
27
|
.ylf-navigation-link {
|
|
30
|
-
@include navigation.control;
|
|
31
|
-
|
|
32
28
|
position: relative;
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
display: inline-flex;
|
|
31
|
+
align-items: center;
|
|
33
32
|
justify-content: var(--_ylf-nav-justify, center);
|
|
34
33
|
min-width: 60px;
|
|
34
|
+
min-height: var(--ylf-touch-target, 44px);
|
|
35
|
+
gap: var(--ylf-space-2, 8px);
|
|
35
36
|
padding: var(--ylf-space-2, 8px) var(--ylf-space-4, 16px);
|
|
37
|
+
border: 1px solid transparent;
|
|
38
|
+
border-radius: var(--ylf-radius-sm, 10px);
|
|
39
|
+
background: transparent;
|
|
40
|
+
color: var(--ylf-c-text-2, #475569);
|
|
41
|
+
font-family: var(--ylf-font-body, inherit);
|
|
42
|
+
font-size: var(--ylf-text-sm, 0.875rem);
|
|
43
|
+
font-weight: 500;
|
|
44
|
+
line-height: 1.25rem;
|
|
45
|
+
text-decoration: none;
|
|
46
|
+
white-space: nowrap;
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
transition:
|
|
49
|
+
background-color var(--ylf-duration-fast, 160ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1)),
|
|
50
|
+
color var(--ylf-duration-fast, 160ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.ylf-navigation-link:hover:not(:disabled) {
|
|
54
|
+
background: var(--ylf-c-bg-soft, #f1f5f9);
|
|
55
|
+
color: var(--ylf-c-text, #0f172a);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Focus stays inside the target so it cannot overlap a neighboring state. */
|
|
59
|
+
.ylf-navigation-link:focus-visible {
|
|
60
|
+
outline: var(--ylf-ring-width, 2px) solid var(--ylf-ring-color, var(--ylf-c-brand, #2563eb));
|
|
61
|
+
outline-offset: -2px;
|
|
62
|
+
box-shadow: none;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.ylf-navigation-link[data-active] {
|
|
66
|
+
background: var(--_ylf-nav-active-bg, transparent);
|
|
67
|
+
color: var(--ylf-c-brand, #2563eb);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.ylf-navigation-link[data-active]::after {
|
|
71
|
+
position: absolute;
|
|
72
|
+
display: var(--_ylf-nav-indicator, block);
|
|
73
|
+
bottom: 4px;
|
|
74
|
+
inset-inline-start: calc(50% - 8px);
|
|
75
|
+
width: 16px;
|
|
76
|
+
height: 2px;
|
|
77
|
+
border-radius: var(--ylf-radius-pill, 999px);
|
|
78
|
+
background: currentColor;
|
|
79
|
+
content: '';
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.ylf-navigation-link[data-active]:hover {
|
|
83
|
+
background: var(--ylf-c-bg-soft, #f1f5f9);
|
|
84
|
+
color: var(--ylf-c-brand, #2563eb);
|
|
85
|
+
}
|
|
36
86
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
&::after {
|
|
42
|
-
position: absolute;
|
|
43
|
-
display: var(--_ylf-nav-indicator, block);
|
|
44
|
-
bottom: 4px;
|
|
45
|
-
inset-inline-start: calc(50% - 8px);
|
|
46
|
-
width: 16px;
|
|
47
|
-
height: 2px;
|
|
48
|
-
border-radius: var(--ylf-radius-pill, 999px);
|
|
49
|
-
background: currentColor;
|
|
50
|
-
content: '';
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
&:hover {
|
|
54
|
-
background: var(--ylf-c-bg-soft, #f1f5f9);
|
|
55
|
-
color: var(--ylf-c-brand, #2563eb);
|
|
56
|
-
}
|
|
87
|
+
@media (prefers-reduced-motion: reduce) {
|
|
88
|
+
.ylf-navigation-link {
|
|
89
|
+
transition: none;
|
|
57
90
|
}
|
|
58
91
|
}
|
|
59
92
|
</style>
|
|
@@ -15,37 +15,65 @@ withDefaults(defineProps<{
|
|
|
15
15
|
</button>
|
|
16
16
|
</template>
|
|
17
17
|
|
|
18
|
-
<style
|
|
19
|
-
@use './navigation' as navigation;
|
|
20
|
-
|
|
18
|
+
<style scoped>
|
|
21
19
|
.ylf-navigation-trigger {
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
display: inline-flex;
|
|
22
|
+
align-items: center;
|
|
24
23
|
justify-content: center;
|
|
24
|
+
min-height: var(--ylf-touch-target, 44px);
|
|
25
|
+
gap: var(--ylf-space-2, 8px);
|
|
25
26
|
padding: var(--ylf-space-2, 8px) var(--ylf-space-3, 12px);
|
|
27
|
+
border: 1px solid transparent;
|
|
28
|
+
border-radius: var(--ylf-radius-sm, 10px);
|
|
29
|
+
background: transparent;
|
|
30
|
+
color: var(--ylf-c-text-2, #475569);
|
|
31
|
+
font-family: var(--ylf-font-body, inherit);
|
|
32
|
+
font-size: var(--ylf-text-sm, 0.875rem);
|
|
33
|
+
font-weight: 500;
|
|
34
|
+
line-height: 1.25rem;
|
|
35
|
+
text-decoration: none;
|
|
36
|
+
white-space: nowrap;
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
transition:
|
|
39
|
+
background-color var(--ylf-duration-fast, 160ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1)),
|
|
40
|
+
color var(--ylf-duration-fast, 160ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
41
|
+
}
|
|
26
42
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
43
|
+
.ylf-navigation-trigger:hover:not(:disabled) {
|
|
44
|
+
background: var(--ylf-c-bg-soft, #f1f5f9);
|
|
45
|
+
color: var(--ylf-c-text, #0f172a);
|
|
46
|
+
}
|
|
31
47
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
48
|
+
/* Focus stays inside the target so it cannot overlap a neighboring state. */
|
|
49
|
+
.ylf-navigation-trigger:focus-visible {
|
|
50
|
+
outline: var(--ylf-ring-width, 2px) solid var(--ylf-ring-color, var(--ylf-c-brand, #2563eb));
|
|
51
|
+
outline-offset: -2px;
|
|
52
|
+
box-shadow: none;
|
|
53
|
+
}
|
|
36
54
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
55
|
+
.ylf-navigation-trigger[aria-expanded='true'] {
|
|
56
|
+
background: var(--ylf-c-bg-soft, #f1f5f9);
|
|
57
|
+
color: var(--ylf-c-text, #0f172a);
|
|
58
|
+
}
|
|
42
59
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
60
|
+
.ylf-navigation-trigger:disabled {
|
|
61
|
+
opacity: var(--ylf-disabled-opacity, 0.48);
|
|
62
|
+
cursor: not-allowed;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.ylf-navigation-trigger__chevron {
|
|
66
|
+
flex: none;
|
|
67
|
+
color: var(--ylf-c-text-3, #5a697e);
|
|
68
|
+
transition: transform var(--ylf-duration-fast, 160ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.ylf-navigation-trigger[aria-expanded='true'] .ylf-navigation-trigger__chevron {
|
|
72
|
+
transform: rotate(180deg);
|
|
46
73
|
}
|
|
47
74
|
|
|
48
75
|
@media (prefers-reduced-motion: reduce) {
|
|
76
|
+
.ylf-navigation-trigger,
|
|
49
77
|
.ylf-navigation-trigger__chevron {
|
|
50
78
|
transition: none;
|
|
51
79
|
}
|
|
@@ -31,9 +31,9 @@ const open = defineModel<boolean>('open', { default: false })
|
|
|
31
31
|
</PopoverRoot>
|
|
32
32
|
</template>
|
|
33
33
|
|
|
34
|
-
<style
|
|
34
|
+
<style>
|
|
35
35
|
.ylf-popover {
|
|
36
|
-
z-index: 105;
|
|
36
|
+
z-index: var(--ylf-z-popover, 105);
|
|
37
37
|
box-sizing: border-box;
|
|
38
38
|
min-width: min(180px, var(--reka-popover-content-available-width, 100vw));
|
|
39
39
|
max-width: min(320px, var(--reka-popover-content-available-width, calc(100vw - 32px)));
|
|
@@ -45,41 +45,44 @@ const open = defineModel<boolean>('open', { default: false })
|
|
|
45
45
|
background: var(--ylf-c-panel, var(--ylf-c-surface, #fff));
|
|
46
46
|
border: 1px solid var(--ylf-c-border, #e2e8f0);
|
|
47
47
|
border-radius: var(--ylf-radius, 14px);
|
|
48
|
-
box-shadow: var(--ylf-shadow-panel, 0 22px 56px -14px rgba(15, 23, 42, 0.22));
|
|
49
|
-
backdrop-filter: var(--ylf-glass-blur, blur(16px));
|
|
48
|
+
box-shadow: var(--ylf-shadow-panel, var(--ylf-shadow-lg, 0 22px 56px -14px rgba(15, 23, 42, 0.22)));
|
|
49
|
+
backdrop-filter: var(--ylf-glass-blur, saturate(160%) blur(16px));
|
|
50
50
|
transform-origin: var(--reka-popover-content-transform-origin);
|
|
51
|
+
}
|
|
51
52
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
.ylf-popover[data-state='open'] {
|
|
54
|
+
animation: ylf-popover-in var(--ylf-duration-enter, 240ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
55
|
+
}
|
|
55
56
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
.ylf-popover[data-state='closed'] {
|
|
58
|
+
animation: ylf-popover-out var(--ylf-duration-exit, 160ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
59
|
+
}
|
|
59
60
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
&[data-side='top'] {
|
|
64
|
-
--_enter-y: 4px;
|
|
65
|
-
}
|
|
66
|
-
&[data-side='left'] {
|
|
67
|
-
--_enter-x: 4px;
|
|
68
|
-
}
|
|
69
|
-
&[data-side='right'] {
|
|
70
|
-
--_enter-x: -4px;
|
|
71
|
-
}
|
|
61
|
+
.ylf-popover[data-side='bottom'] {
|
|
62
|
+
--_enter-y: -4px;
|
|
63
|
+
}
|
|
72
64
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
overscroll-behavior: contain;
|
|
77
|
-
}
|
|
65
|
+
.ylf-popover[data-side='top'] {
|
|
66
|
+
--_enter-y: 4px;
|
|
67
|
+
}
|
|
78
68
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
69
|
+
.ylf-popover[data-side='left'] {
|
|
70
|
+
--_enter-x: 4px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.ylf-popover[data-side='right'] {
|
|
74
|
+
--_enter-x: -4px;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.ylf-popover__body {
|
|
78
|
+
max-height: calc(var(--reka-popover-content-available-height, calc(100dvh - 32px)) - 34px);
|
|
79
|
+
overflow: auto;
|
|
80
|
+
overscroll-behavior: contain;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.ylf-popover__arrow {
|
|
84
|
+
fill: var(--ylf-c-surface, #fff);
|
|
85
|
+
stroke: var(--ylf-c-border, #e2e8f0);
|
|
83
86
|
}
|
|
84
87
|
|
|
85
88
|
@keyframes ylf-popover-in {
|
|
@@ -14,14 +14,17 @@ const props = withDefaults(defineProps<{
|
|
|
14
14
|
value: 0,
|
|
15
15
|
max: 100,
|
|
16
16
|
variant: 'brand',
|
|
17
|
-
tone: 'blue',
|
|
18
17
|
})
|
|
19
18
|
|
|
20
|
-
const safeMax = computed(() => Number.isFinite(props.max) && props.max > 0
|
|
19
|
+
const safeMax = computed(() => Number.isFinite(props.max) && props.max > 0
|
|
20
|
+
? props.max
|
|
21
|
+
: 100)
|
|
21
22
|
const safeValue = computed(() => props.value === null || !Number.isFinite(props.value)
|
|
22
23
|
? null
|
|
23
24
|
: Math.max(0, Math.min(safeMax.value, props.value)))
|
|
24
|
-
const percent = computed(() => safeValue.value === null
|
|
25
|
+
const percent = computed(() => safeValue.value === null
|
|
26
|
+
? null
|
|
27
|
+
: safeValue.value / safeMax.value * 100)
|
|
25
28
|
</script>
|
|
26
29
|
|
|
27
30
|
<template>
|
|
@@ -39,20 +42,20 @@ const percent = computed(() => safeValue.value === null ? null : safeValue.value
|
|
|
39
42
|
</ProgressRoot>
|
|
40
43
|
</template>
|
|
41
44
|
|
|
42
|
-
<style
|
|
45
|
+
<style>
|
|
43
46
|
.ylf-progress {
|
|
44
47
|
position: relative;
|
|
45
48
|
width: 100%;
|
|
46
49
|
height: 8px;
|
|
47
50
|
overflow: hidden;
|
|
48
|
-
border-radius: 999px;
|
|
51
|
+
border-radius: var(--ylf-radius-pill, 999px);
|
|
49
52
|
background: var(--ylf-c-bg-mute, #e2e8f0);
|
|
50
53
|
}
|
|
51
54
|
|
|
52
55
|
.ylf-progress__indicator {
|
|
53
56
|
width: 100%;
|
|
54
57
|
height: 100%;
|
|
55
|
-
border-radius: 999px;
|
|
58
|
+
border-radius: var(--ylf-radius-pill, 999px);
|
|
56
59
|
background: var(--ylf-c-brand, #2563eb);
|
|
57
60
|
transition: transform 0.4s var(--ylf-ease-bounce, cubic-bezier(0.34, 1.56, 0.64, 1));
|
|
58
61
|
}
|
|
@@ -66,6 +69,7 @@ const percent = computed(() => safeValue.value === null ? null : safeValue.value
|
|
|
66
69
|
from {
|
|
67
70
|
transform: translateX(-100%);
|
|
68
71
|
}
|
|
72
|
+
|
|
69
73
|
to {
|
|
70
74
|
transform: translateX(250%);
|
|
71
75
|
}
|