@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
|
@@ -26,8 +26,16 @@ watch(model, () => {
|
|
|
26
26
|
})
|
|
27
27
|
|
|
28
28
|
function selectFocusedRadio(event: KeyboardEvent) {
|
|
29
|
-
if (props.disabled || !event.defaultPrevented || ![
|
|
29
|
+
if (props.disabled || !event.defaultPrevented || ![
|
|
30
|
+
'ArrowUp',
|
|
31
|
+
'ArrowDown',
|
|
32
|
+
'ArrowLeft',
|
|
33
|
+
'ArrowRight',
|
|
34
|
+
'Home',
|
|
35
|
+
'End',
|
|
36
|
+
].includes(event.key)) {
|
|
30
37
|
return
|
|
38
|
+
}
|
|
31
39
|
const group = event.currentTarget as HTMLElement
|
|
32
40
|
// Reka 2.10.x defers selection until after focus; a fast keyup can clear its flag.
|
|
33
41
|
// Let Reka move focus and skip disabled items, then synchronize that choice.
|
|
@@ -66,19 +74,19 @@ function selectFocusedRadio(event: KeyboardEvent) {
|
|
|
66
74
|
</RadioGroupRoot>
|
|
67
75
|
</template>
|
|
68
76
|
|
|
69
|
-
<style
|
|
77
|
+
<style>
|
|
70
78
|
.ylf-radio-group {
|
|
71
79
|
display: flex;
|
|
72
80
|
gap: 14px;
|
|
81
|
+
}
|
|
73
82
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
83
|
+
.ylf-radio-group--vertical {
|
|
84
|
+
flex-direction: column;
|
|
85
|
+
}
|
|
77
86
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
87
|
+
.ylf-radio-group--horizontal {
|
|
88
|
+
flex-direction: row;
|
|
89
|
+
flex-wrap: wrap;
|
|
82
90
|
}
|
|
83
91
|
|
|
84
92
|
.ylf-radio {
|
|
@@ -92,81 +100,88 @@ function selectFocusedRadio(event: KeyboardEvent) {
|
|
|
92
100
|
font: inherit;
|
|
93
101
|
cursor: pointer;
|
|
94
102
|
-webkit-tap-highlight-color: transparent;
|
|
103
|
+
}
|
|
95
104
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
105
|
+
.ylf-radio__control {
|
|
106
|
+
flex: none;
|
|
107
|
+
width: 20px;
|
|
108
|
+
height: 20px;
|
|
109
|
+
display: inline-grid;
|
|
110
|
+
place-items: center;
|
|
111
|
+
border: 2px solid var(--ylf-c-border-control, #7d8ca0);
|
|
112
|
+
border-radius: 50%;
|
|
113
|
+
background: var(--ylf-c-surface, #fff);
|
|
114
|
+
box-shadow: var(--ylf-shadow-control);
|
|
115
|
+
transition:
|
|
116
|
+
border-color var(--ylf-duration-fast, 160ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1)),
|
|
117
|
+
box-shadow var(--ylf-duration-fast, 160ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1)),
|
|
118
|
+
transform var(--ylf-duration-slow, 480ms)
|
|
119
|
+
var(--ylf-ease-spring, var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1)));
|
|
120
|
+
}
|
|
111
121
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
122
|
+
@media (hover: hover) and (pointer: fine) {
|
|
123
|
+
.ylf-radio:hover:not([data-disabled]) .ylf-radio__control {
|
|
124
|
+
border-color: var(--ylf-c-brand, #006aeb);
|
|
116
125
|
}
|
|
126
|
+
}
|
|
117
127
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
128
|
+
.ylf-radio:focus-visible {
|
|
129
|
+
outline: none;
|
|
130
|
+
}
|
|
121
131
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
132
|
+
.ylf-radio:focus-visible .ylf-radio__control {
|
|
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
|
+
outline-offset: 3px;
|
|
136
|
+
}
|
|
127
137
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
138
|
+
.ylf-radio[data-state='checked'] .ylf-radio__control {
|
|
139
|
+
border-color: var(--ylf-c-brand, #006aeb);
|
|
140
|
+
}
|
|
131
141
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
142
|
+
.ylf-radio[data-disabled] {
|
|
143
|
+
opacity: var(--ylf-disabled-opacity, 0.48);
|
|
144
|
+
cursor: not-allowed;
|
|
145
|
+
}
|
|
136
146
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
147
|
+
.ylf-radio__dot {
|
|
148
|
+
display: block;
|
|
149
|
+
width: 10px;
|
|
150
|
+
height: 10px;
|
|
151
|
+
border-radius: 50%;
|
|
152
|
+
background: var(--ylf-c-brand, #006aeb);
|
|
153
|
+
}
|
|
144
154
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
155
|
+
.ylf-radio:active:not([data-disabled]) .ylf-radio__control {
|
|
156
|
+
transform: scale(0.9);
|
|
157
|
+
transition-duration: var(--ylf-duration-press, 100ms);
|
|
158
|
+
}
|
|
149
159
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
}
|
|
160
|
+
.ylf-radio__label {
|
|
161
|
+
font-size: var(--ylf-control-font-size, 0.9375rem);
|
|
153
162
|
}
|
|
163
|
+
|
|
154
164
|
.ylf-radio-group.is-animated .ylf-radio__dot {
|
|
155
|
-
animation: ylf-radio-dot var(--ylf-duration-slow, 480ms)
|
|
165
|
+
animation: ylf-radio-dot var(--ylf-duration-slow, 480ms)
|
|
166
|
+
var(--ylf-ease-spring, var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1)));
|
|
156
167
|
}
|
|
168
|
+
|
|
157
169
|
@keyframes ylf-radio-dot {
|
|
158
170
|
from {
|
|
159
171
|
transform: scale(0);
|
|
160
172
|
}
|
|
161
173
|
}
|
|
174
|
+
|
|
162
175
|
@media (prefers-reduced-motion: reduce) {
|
|
163
176
|
.ylf-radio-group.is-animated .ylf-radio__dot {
|
|
164
177
|
animation: none;
|
|
165
178
|
}
|
|
179
|
+
|
|
166
180
|
.ylf-radio__control {
|
|
167
181
|
transition: none;
|
|
168
182
|
}
|
|
169
183
|
}
|
|
184
|
+
|
|
170
185
|
@media (pointer: coarse) {
|
|
171
186
|
.ylf-radio {
|
|
172
187
|
min-width: var(--ylf-touch-target, 44px);
|
|
@@ -38,7 +38,7 @@ const fadeStyle = useScrollFade(toRef(() => props.viewport))
|
|
|
38
38
|
.ylf-scroll-fade::before,
|
|
39
39
|
.ylf-scroll-fade::after {
|
|
40
40
|
position: absolute;
|
|
41
|
-
z-index: 1;
|
|
41
|
+
z-index: var(--ylf-z-base, 1);
|
|
42
42
|
inset-inline: 0;
|
|
43
43
|
height: min(var(--ylf-scroll-fade-size), 50%);
|
|
44
44
|
pointer-events: none;
|
|
@@ -37,7 +37,12 @@ let resizeObserver: ResizeObserver | undefined
|
|
|
37
37
|
function measurePill() {
|
|
38
38
|
const item = root.value?.$el?.querySelector<HTMLElement>('.ylf-segmented__item[aria-pressed="true"]')
|
|
39
39
|
pill.value = item?.offsetWidth
|
|
40
|
-
? {
|
|
40
|
+
? {
|
|
41
|
+
x: item.offsetLeft,
|
|
42
|
+
y: item.offsetTop,
|
|
43
|
+
width: item.offsetWidth,
|
|
44
|
+
height: item.offsetHeight,
|
|
45
|
+
}
|
|
41
46
|
: null
|
|
42
47
|
}
|
|
43
48
|
|
|
@@ -132,22 +137,22 @@ onBeforeUnmount(() => resizeObserver?.disconnect())
|
|
|
132
137
|
border-radius: calc(var(--ylf-radius-sm, 10px) - 4px);
|
|
133
138
|
background: transparent;
|
|
134
139
|
color: var(--ylf-c-text-2, #475569);
|
|
135
|
-
font: inherit;
|
|
136
|
-
font-size: var(--ylf-text-sm,
|
|
140
|
+
font-family: var(--ylf-font-body, inherit);
|
|
141
|
+
font-size: var(--ylf-text-sm, 0.875rem);
|
|
137
142
|
font-weight: 500;
|
|
138
143
|
line-height: 1.4;
|
|
139
144
|
white-space: normal;
|
|
140
145
|
overflow-wrap: anywhere;
|
|
141
146
|
cursor: pointer;
|
|
142
147
|
transition:
|
|
143
|
-
background var(--ylf-duration-fast, 160ms),
|
|
144
|
-
color var(--ylf-duration-fast, 160ms),
|
|
145
|
-
box-shadow var(--ylf-duration-fast, 160ms);
|
|
148
|
+
background var(--ylf-duration-fast, 160ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1)),
|
|
149
|
+
color var(--ylf-duration-fast, 160ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1)),
|
|
150
|
+
box-shadow var(--ylf-duration-fast, 160ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
146
151
|
}
|
|
147
152
|
|
|
148
153
|
.ylf-segmented[data-size='sm'] .ylf-segmented__item {
|
|
149
154
|
padding-inline: 8px;
|
|
150
|
-
font-size:
|
|
155
|
+
font-size: var(--ylf-text-xs, 0.75rem);
|
|
151
156
|
}
|
|
152
157
|
|
|
153
158
|
.ylf-segmented[data-icon-only] .ylf-segmented__item {
|
|
@@ -163,10 +168,10 @@ onBeforeUnmount(() => resizeObserver?.disconnect())
|
|
|
163
168
|
}
|
|
164
169
|
|
|
165
170
|
.ylf-segmented__item[aria-pressed='true'] {
|
|
166
|
-
color: var(--ylf-c-brand, #
|
|
171
|
+
color: var(--ylf-c-brand, #006aeb);
|
|
167
172
|
background: var(--ylf-c-surface, #fff);
|
|
168
173
|
border-color: var(--ylf-c-border, #e2e8f0);
|
|
169
|
-
box-shadow: var(--ylf-shadow-control
|
|
174
|
+
box-shadow: var(--ylf-shadow-control);
|
|
170
175
|
}
|
|
171
176
|
|
|
172
177
|
.ylf-segmented__pill {
|
|
@@ -178,15 +183,16 @@ onBeforeUnmount(() => resizeObserver?.disconnect())
|
|
|
178
183
|
border: 1px solid var(--ylf-c-border, #e2e8f0);
|
|
179
184
|
border-radius: calc(var(--ylf-radius-sm, 10px) - 4px);
|
|
180
185
|
background: var(--ylf-c-surface, #fff);
|
|
181
|
-
box-shadow: var(--ylf-shadow-control
|
|
186
|
+
box-shadow: var(--ylf-shadow-control);
|
|
182
187
|
pointer-events: none;
|
|
183
188
|
}
|
|
184
189
|
|
|
185
190
|
.ylf-segmented.is-pill-animated .ylf-segmented__pill {
|
|
186
191
|
transition:
|
|
187
|
-
transform var(--ylf-duration-slow, 480ms)
|
|
188
|
-
|
|
189
|
-
|
|
192
|
+
transform var(--ylf-duration-slow, 480ms)
|
|
193
|
+
var(--ylf-ease-spring, var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1))),
|
|
194
|
+
width var(--ylf-duration-normal, 240ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1)),
|
|
195
|
+
height var(--ylf-duration-normal, 240ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
190
196
|
}
|
|
191
197
|
|
|
192
198
|
.ylf-segmented.has-pill .ylf-segmented__item[aria-pressed='true'] {
|
|
@@ -197,14 +203,14 @@ onBeforeUnmount(() => resizeObserver?.disconnect())
|
|
|
197
203
|
|
|
198
204
|
.ylf-segmented__item:focus-visible {
|
|
199
205
|
position: relative;
|
|
200
|
-
z-index: 1;
|
|
201
|
-
outline: 2px solid var(--ylf-c-brand, #
|
|
206
|
+
z-index: var(--ylf-z-base, 1);
|
|
207
|
+
outline: var(--ylf-ring-width, 2px) solid var(--ylf-ring-color, var(--ylf-c-brand, #006aeb));
|
|
202
208
|
outline-offset: 2px;
|
|
203
209
|
}
|
|
204
210
|
|
|
205
211
|
.ylf-segmented__item[data-disabled] {
|
|
206
212
|
cursor: not-allowed;
|
|
207
|
-
opacity: 0.
|
|
213
|
+
opacity: var(--ylf-disabled-opacity, 0.48);
|
|
208
214
|
}
|
|
209
215
|
|
|
210
216
|
.ylf-segmented__icon {
|
package/components/YlfSelect.vue
CHANGED
|
@@ -76,7 +76,7 @@ const viewport = useTemplateRef<HTMLElement>('viewport')
|
|
|
76
76
|
</SelectRoot>
|
|
77
77
|
</template>
|
|
78
78
|
|
|
79
|
-
<style
|
|
79
|
+
<style>
|
|
80
80
|
.ylf-select__trigger {
|
|
81
81
|
display: inline-flex;
|
|
82
82
|
align-items: center;
|
|
@@ -85,48 +85,49 @@ const viewport = useTemplateRef<HTMLElement>('viewport')
|
|
|
85
85
|
box-sizing: border-box;
|
|
86
86
|
max-width: 100%;
|
|
87
87
|
min-width: min(180px, 100%);
|
|
88
|
-
min-height: 44px;
|
|
89
|
-
padding:
|
|
88
|
+
min-height: var(--ylf-control-h, 44px);
|
|
89
|
+
padding: 4px 14px;
|
|
90
90
|
font-family: inherit;
|
|
91
|
-
font-size:
|
|
91
|
+
font-size: var(--ylf-control-font-size, 0.9375rem);
|
|
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-
|
|
96
|
-
border-radius: var(--ylf-radius, 14px);
|
|
95
|
+
border: 1px solid var(--ylf-c-border-control, #7d8ca0);
|
|
96
|
+
border-radius: var(--ylf-control-radius, var(--ylf-radius, 14px));
|
|
97
97
|
box-shadow: var(--ylf-shadow-control);
|
|
98
98
|
cursor: pointer;
|
|
99
99
|
transition:
|
|
100
|
-
border-color var(--ylf-duration-fast, 160ms) var(--ylf-ease-standard,
|
|
101
|
-
box-shadow var(--ylf-duration-fast, 160ms) var(--ylf-ease-standard,
|
|
100
|
+
border-color var(--ylf-duration-fast, 160ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1)),
|
|
101
|
+
box-shadow var(--ylf-duration-fast, 160ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
102
|
+
}
|
|
102
103
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
.ylf-select__trigger[data-placeholder] {
|
|
105
|
+
color: var(--ylf-c-placeholder, var(--ylf-c-text-3, #5a697e));
|
|
106
|
+
}
|
|
106
107
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
108
|
+
@media (hover: hover) and (pointer: fine) {
|
|
109
|
+
.ylf-select__trigger:hover:not([data-disabled]) {
|
|
110
|
+
border-color: var(--ylf-c-brand, #006aeb);
|
|
111
111
|
}
|
|
112
|
+
}
|
|
112
113
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
114
|
+
.ylf-select__trigger[data-state='open'] {
|
|
115
|
+
border-color: var(--ylf-c-brand, #006aeb);
|
|
116
|
+
box-shadow:
|
|
117
|
+
var(--ylf-shadow-control),
|
|
118
|
+
0 0 0 3px var(--ylf-c-brand-soft, #f0f7ff);
|
|
119
|
+
}
|
|
119
120
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
121
|
+
.ylf-select__trigger:focus-visible {
|
|
122
|
+
outline: var(--ylf-ring-width, 2px) solid var(--ylf-ring-color, var(--ylf-c-brand, #006aeb));
|
|
123
|
+
outline-offset: 2px;
|
|
124
|
+
border-color: var(--ylf-c-brand, #006aeb);
|
|
125
|
+
box-shadow: 0 0 0 3px var(--ylf-c-brand-soft, #f0f7ff);
|
|
126
|
+
}
|
|
125
127
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
128
|
+
.ylf-select__trigger[data-disabled] {
|
|
129
|
+
opacity: var(--ylf-disabled-opacity, 0.48);
|
|
130
|
+
cursor: not-allowed;
|
|
130
131
|
}
|
|
131
132
|
|
|
132
133
|
.ylf-select__label {
|
|
@@ -149,13 +150,13 @@ const viewport = useTemplateRef<HTMLElement>('viewport')
|
|
|
149
150
|
.ylf-select__icon {
|
|
150
151
|
flex: none;
|
|
151
152
|
display: inline-flex;
|
|
152
|
-
color: var(--ylf-c-text-3, #
|
|
153
|
-
transition: transform var(--ylf-duration-fast, 160ms) ease;
|
|
153
|
+
color: var(--ylf-c-text-3, #5a697e);
|
|
154
|
+
transition: transform var(--ylf-duration-fast, 160ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
155
|
+
}
|
|
154
156
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}
|
|
157
|
+
.ylf-select__icon :where(svg, i, span) {
|
|
158
|
+
width: 18px;
|
|
159
|
+
height: 18px;
|
|
159
160
|
}
|
|
160
161
|
|
|
161
162
|
.ylf-select__trigger[data-state='open'] .ylf-select__icon {
|
|
@@ -163,7 +164,7 @@ const viewport = useTemplateRef<HTMLElement>('viewport')
|
|
|
163
164
|
}
|
|
164
165
|
|
|
165
166
|
.ylf-select__content {
|
|
166
|
-
z-index: 105;
|
|
167
|
+
z-index: var(--ylf-z-popover, 105);
|
|
167
168
|
box-sizing: border-box;
|
|
168
169
|
min-width: var(--reka-select-trigger-width);
|
|
169
170
|
max-width: var(--reka-select-content-available-width);
|
|
@@ -172,30 +173,33 @@ const viewport = useTemplateRef<HTMLElement>('viewport')
|
|
|
172
173
|
background: var(--ylf-c-panel, var(--ylf-c-surface, #fff));
|
|
173
174
|
border: 1px solid var(--ylf-c-border, #e2e8f0);
|
|
174
175
|
border-radius: var(--ylf-radius, 14px);
|
|
175
|
-
box-shadow: var(--ylf-shadow-panel, 0 22px 56px -14px rgba(15, 23, 42, 0.22));
|
|
176
|
-
backdrop-filter: var(--ylf-glass-blur, blur(16px));
|
|
176
|
+
box-shadow: var(--ylf-shadow-panel, var(--ylf-shadow-lg, 0 22px 56px -14px rgba(15, 23, 42, 0.22)));
|
|
177
|
+
backdrop-filter: var(--ylf-glass-blur, saturate(160%) blur(16px));
|
|
177
178
|
transform-origin: var(--reka-select-content-transform-origin);
|
|
179
|
+
}
|
|
178
180
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
181
|
+
.ylf-select__content[data-state='open'] {
|
|
182
|
+
animation: ylf-select-in var(--ylf-duration-enter, 240ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
183
|
+
}
|
|
182
184
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
185
|
+
.ylf-select__content[data-state='closed'] {
|
|
186
|
+
animation: ylf-select-out var(--ylf-duration-exit, 160ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
187
|
+
}
|
|
186
188
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
189
|
+
.ylf-select__content[data-side='bottom'] {
|
|
190
|
+
--_enter-y: -4px;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.ylf-select__content[data-side='top'] {
|
|
194
|
+
--_enter-y: 4px;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.ylf-select__content[data-side='left'] {
|
|
198
|
+
--_enter-x: 4px;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.ylf-select__content[data-side='right'] {
|
|
202
|
+
--_enter-x: -4px;
|
|
199
203
|
}
|
|
200
204
|
|
|
201
205
|
.ylf-select__viewport {
|
|
@@ -209,48 +213,48 @@ const viewport = useTemplateRef<HTMLElement>('viewport')
|
|
|
209
213
|
justify-content: space-between;
|
|
210
214
|
gap: 8px;
|
|
211
215
|
padding: 8px 12px;
|
|
212
|
-
font-size:
|
|
216
|
+
font-size: var(--ylf-text-sm, 0.875rem);
|
|
213
217
|
color: var(--ylf-c-text, #0f172a);
|
|
214
|
-
border-radius: var(--ylf-radius-sm, 10px);
|
|
218
|
+
border-radius: var(--ylf-control-radius-sm, var(--ylf-radius-sm, 10px));
|
|
215
219
|
cursor: pointer;
|
|
216
220
|
user-select: none;
|
|
217
221
|
outline: none;
|
|
218
|
-
transition: background var(--ylf-duration-fast, 160ms) ease;
|
|
222
|
+
transition: background var(--ylf-duration-fast, 160ms) var(--ylf-ease-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
223
|
+
}
|
|
219
224
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
+
.ylf-select__item[data-highlighted] {
|
|
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
|
+
}
|
|
225
230
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
}
|
|
231
|
+
.ylf-select__item[data-disabled] {
|
|
232
|
+
opacity: var(--ylf-disabled-opacity, 0.48);
|
|
233
|
+
pointer-events: none;
|
|
230
234
|
}
|
|
231
235
|
|
|
232
236
|
.ylf-select__check {
|
|
233
237
|
display: inline-flex;
|
|
234
|
-
color: var(--ylf-c-brand, #
|
|
238
|
+
color: var(--ylf-c-brand, #006aeb);
|
|
239
|
+
}
|
|
235
240
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
}
|
|
241
|
+
.ylf-select__check :where(svg, i, span) {
|
|
242
|
+
width: 15px;
|
|
243
|
+
height: 15px;
|
|
240
244
|
}
|
|
241
245
|
|
|
242
246
|
.ylf-select__trigger[data-size='sm'] {
|
|
243
247
|
min-width: 0;
|
|
244
|
-
min-height: 34px;
|
|
245
|
-
padding:
|
|
246
|
-
font-size:
|
|
247
|
-
border-radius: var(--ylf-radius-sm, 10px);
|
|
248
|
+
min-height: var(--ylf-control-h-sm, 34px);
|
|
249
|
+
padding: 2px 10px;
|
|
250
|
+
font-size: var(--ylf-control-font-size-sm, 0.8125rem);
|
|
251
|
+
border-radius: var(--ylf-control-radius-sm, var(--ylf-radius-sm, 10px));
|
|
248
252
|
}
|
|
249
253
|
|
|
250
254
|
.ylf-select__content[data-size='sm'] .ylf-select__item {
|
|
251
255
|
min-height: 30px;
|
|
252
256
|
padding: 5px 8px;
|
|
253
|
-
font-size:
|
|
257
|
+
font-size: var(--ylf-text-xs, 0.75rem);
|
|
254
258
|
}
|
|
255
259
|
|
|
256
260
|
@media (pointer: coarse) {
|
|
@@ -12,7 +12,6 @@ withDefaults(defineProps<{
|
|
|
12
12
|
orientation: 'horizontal',
|
|
13
13
|
decorative: true,
|
|
14
14
|
variant: 'neutral',
|
|
15
|
-
tone: 'blue',
|
|
16
15
|
})
|
|
17
16
|
</script>
|
|
18
17
|
|
|
@@ -26,43 +25,49 @@ withDefaults(defineProps<{
|
|
|
26
25
|
/>
|
|
27
26
|
</template>
|
|
28
27
|
|
|
29
|
-
<style
|
|
28
|
+
<style>
|
|
30
29
|
.ylf-separator {
|
|
31
30
|
--_separator-size: 1px;
|
|
32
31
|
|
|
33
32
|
flex: none;
|
|
34
33
|
background: var(--ylf-c-border, #e2e8f0);
|
|
34
|
+
}
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
.ylf-separator--horizontal {
|
|
37
|
+
width: 100%;
|
|
38
|
+
height: var(--_separator-size);
|
|
39
|
+
}
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
.ylf-separator--vertical {
|
|
42
|
+
width: var(--_separator-size);
|
|
43
|
+
height: 100%;
|
|
44
|
+
align-self: stretch;
|
|
45
|
+
}
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
.ylf-separator--brand {
|
|
48
|
+
background: var(--ylf-c-brand, #006aeb);
|
|
49
|
+
}
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
.ylf-separator--accent {
|
|
52
|
+
--_separator-size: 2px;
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
background: var(--ylf-accent, var(--ylf-c-brand, #006aeb));
|
|
55
|
+
}
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
.ylf-separator--spectrum {
|
|
58
|
+
--_separator-size: 4px;
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
border-radius: var(--ylf-radius-pill, 999px);
|
|
61
|
+
background: linear-gradient(
|
|
62
|
+
90deg,
|
|
63
|
+
var(--ylf-spectrum-stops, var(--ylf-palette-blue, #006aeb), var(--ylf-palette-sun, #facc15))
|
|
64
|
+
);
|
|
65
|
+
}
|
|
62
66
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
+
.ylf-separator--spectrum.ylf-separator--vertical {
|
|
68
|
+
background: linear-gradient(
|
|
69
|
+
180deg,
|
|
70
|
+
var(--ylf-spectrum-stops, var(--ylf-palette-blue, #006aeb), var(--ylf-palette-sun, #facc15))
|
|
71
|
+
);
|
|
67
72
|
}
|
|
68
73
|
</style>
|