@yunlefun/vue 0.6.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.
Files changed (77) hide show
  1. package/README.md +5 -6
  2. package/components/YlfAccordion.vue +30 -29
  3. package/components/YlfAgentCard.vue +4 -4
  4. package/components/YlfAgentStatus.vue +1 -1
  5. package/components/YlfAgentTask.vue +4 -4
  6. package/components/YlfAiPromptLauncher.vue +18 -8
  7. package/components/YlfAvatar.vue +30 -30
  8. package/components/YlfBadge.vue +92 -73
  9. package/components/YlfBottomMenu.vue +5 -5
  10. package/components/YlfBottomMenuItem.vue +15 -15
  11. package/components/YlfButton.vue +300 -265
  12. package/components/YlfCard.vue +32 -32
  13. package/components/YlfCheckbox.vue +61 -54
  14. package/components/YlfCloud.vue +5 -18
  15. package/components/YlfDialog.vue +47 -46
  16. package/components/YlfDropdownMenu.vue +55 -57
  17. package/components/YlfInput.vue +22 -15
  18. package/components/YlfLogo.vue +58 -42
  19. package/components/YlfNavigation.vue +24 -24
  20. package/components/YlfNavigationLink.vue +58 -25
  21. package/components/YlfNavigationTrigger.vue +49 -21
  22. package/components/YlfPopover.vue +34 -31
  23. package/components/YlfProgress.vue +10 -6
  24. package/components/YlfRadioGroup.vue +73 -58
  25. package/components/YlfScrollFade.vue +66 -0
  26. package/components/YlfSegmentedControl.vue +21 -15
  27. package/components/YlfSelect.vue +110 -99
  28. package/components/YlfSeparator.vue +31 -26
  29. package/components/YlfSlider.vue +49 -46
  30. package/components/YlfSwitch.vue +67 -64
  31. package/components/YlfTabs.vue +30 -28
  32. package/components/YlfTooltip.vue +30 -27
  33. package/components/ai-prompt.ts +33 -6
  34. package/components/cloud.ts +21 -1
  35. package/components/navigation-indicator.ts +9 -3
  36. package/components/scroll-fade/demo.vue +49 -0
  37. package/components/scroll-fade/index.md +40 -0
  38. package/components/scroll-fade.ts +54 -0
  39. package/components/segmented-control/demo.vue +9 -2
  40. package/dist/ag-ui.cjs +11 -2
  41. package/dist/ag-ui.mjs +11 -2
  42. package/dist/ai-prompt.cjs +30 -5
  43. package/dist/ai-prompt.mjs +30 -5
  44. package/dist/components/YlfAccordion.vue.d.ts +5 -3
  45. package/dist/components/YlfAgentCard.vue.d.ts +9 -7
  46. package/dist/components/YlfAgentTask.vue.d.ts +7 -5
  47. package/dist/components/YlfBadge.vue.d.ts +5 -4
  48. package/dist/components/YlfBottomMenu.vue.d.ts +5 -3
  49. package/dist/components/YlfBottomMenuItem.vue.d.ts +5 -3
  50. package/dist/components/YlfButton.vue.d.ts +7 -6
  51. package/dist/components/YlfCard.vue.d.ts +5 -4
  52. package/dist/components/YlfDialog.vue.d.ts +11 -9
  53. package/dist/components/YlfDropdownMenu.vue.d.ts +5 -3
  54. package/dist/components/YlfNavigation.vue.d.ts +5 -3
  55. package/dist/components/YlfNavigationLink.vue.d.ts +5 -3
  56. package/dist/components/YlfNavigationTrigger.vue.d.ts +5 -3
  57. package/dist/components/YlfPopover.vue.d.ts +7 -5
  58. package/dist/components/YlfProgress.vue.d.ts +0 -1
  59. package/dist/components/YlfScrollFade.vue.d.ts +26 -0
  60. package/dist/components/YlfSeparator.vue.d.ts +0 -1
  61. package/dist/components/YlfSwitch.vue.d.ts +0 -1
  62. package/dist/components/YlfTabs.vue.d.ts +5 -3
  63. package/dist/components/YlfTooltip.vue.d.ts +7 -5
  64. package/dist/components/cloud.d.ts +2 -0
  65. package/dist/components/scroll-fade.d.ts +3 -0
  66. package/dist/index.cjs +20 -10
  67. package/dist/index.d.cts +3 -4
  68. package/dist/index.d.mts +3 -4
  69. package/dist/index.d.ts +3 -4
  70. package/dist/index.mjs +20 -8
  71. package/dist/node.cjs +11 -0
  72. package/dist/node.d.cts +4 -0
  73. package/dist/node.d.mts +4 -0
  74. package/dist/node.d.ts +4 -0
  75. package/dist/node.mjs +7 -0
  76. package/package.json +11 -4
  77. 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 || !['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'Home', 'End'].includes(event.key))
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 lang="scss">
77
+ <style>
70
78
  .ylf-radio-group {
71
79
  display: flex;
72
80
  gap: 14px;
81
+ }
73
82
 
74
- &--vertical {
75
- flex-direction: column;
76
- }
83
+ .ylf-radio-group--vertical {
84
+ flex-direction: column;
85
+ }
77
86
 
78
- &--horizontal {
79
- flex-direction: row;
80
- flex-wrap: wrap;
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
- &__control {
97
- flex: none;
98
- width: 20px;
99
- height: 20px;
100
- display: inline-grid;
101
- place-items: center;
102
- border: 2px solid var(--ylf-c-border-strong, #cbd5e1);
103
- border-radius: 50%;
104
- background: var(--ylf-c-surface, #fff);
105
- box-shadow: var(--ylf-shadow-control);
106
- transition:
107
- border-color var(--ylf-duration-fast, 160ms) var(--ylf-ease-standard, ease),
108
- box-shadow var(--ylf-duration-fast, 160ms) var(--ylf-ease-standard, ease),
109
- transform var(--ylf-duration-slow, 480ms) var(--ylf-ease-spring, var(--ylf-ease-standard, ease));
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-strong, #cbd5e1);
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
- @media (hover: hover) and (pointer: fine) {
113
- &:hover:not([data-disabled]) .ylf-radio__control {
114
- border-color: var(--ylf-c-brand, #2563eb);
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, #2563eb);
116
125
  }
126
+ }
117
127
 
118
- &:focus-visible {
119
- outline: none;
120
- }
128
+ .ylf-radio:focus-visible {
129
+ outline: none;
130
+ }
121
131
 
122
- &:focus-visible .ylf-radio__control {
123
- box-shadow: 0 0 0 3px var(--ylf-c-brand-soft, #eff6ff);
124
- outline: 2px solid var(--ylf-c-brand, #2563eb);
125
- outline-offset: 3px;
126
- }
132
+ .ylf-radio:focus-visible .ylf-radio__control {
133
+ box-shadow: 0 0 0 3px var(--ylf-c-brand-soft, #eff6ff);
134
+ outline: var(--ylf-ring-width, 2px) solid var(--ylf-ring-color, var(--ylf-c-brand, #2563eb));
135
+ outline-offset: 3px;
136
+ }
127
137
 
128
- &[data-state='checked'] .ylf-radio__control {
129
- border-color: var(--ylf-c-brand, #2563eb);
130
- }
138
+ .ylf-radio[data-state='checked'] .ylf-radio__control {
139
+ border-color: var(--ylf-c-brand, #2563eb);
140
+ }
131
141
 
132
- &[data-disabled] {
133
- opacity: 0.5;
134
- cursor: not-allowed;
135
- }
142
+ .ylf-radio[data-disabled] {
143
+ opacity: var(--ylf-disabled-opacity, 0.48);
144
+ cursor: not-allowed;
145
+ }
136
146
 
137
- &__dot {
138
- display: block;
139
- width: 10px;
140
- height: 10px;
141
- border-radius: 50%;
142
- background: var(--ylf-c-brand, #2563eb);
143
- }
147
+ .ylf-radio__dot {
148
+ display: block;
149
+ width: 10px;
150
+ height: 10px;
151
+ border-radius: 50%;
152
+ background: var(--ylf-c-brand, #2563eb);
153
+ }
144
154
 
145
- &:active:not([data-disabled]) .ylf-radio__control {
146
- transform: scale(0.9);
147
- transition-duration: var(--ylf-duration-press, 100ms);
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
- &__label {
151
- font-size: 15px;
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) var(--ylf-ease-spring, var(--ylf-ease-standard, ease));
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);
@@ -0,0 +1,66 @@
1
+ <script setup lang="ts">
2
+ import { toRef } from 'vue'
3
+ import { useScrollFade } from './scroll-fade'
4
+
5
+ const props = withDefaults(defineProps<{
6
+ /** The element inside the frame that owns vertical scrolling. */
7
+ viewport?: HTMLElement | null
8
+ /** CSS color of the surface behind the content. */
9
+ surface?: string
10
+ /** CSS length of the fade at each scroll edge. */
11
+ size?: string
12
+ }>(), {
13
+ surface: 'var(--ylf-c-surface, #fff)',
14
+ size: '24px',
15
+ })
16
+
17
+ const fadeStyle = useScrollFade(toRef(() => props.viewport))
18
+ </script>
19
+
20
+ <template>
21
+ <div
22
+ class="ylf-scroll-fade"
23
+ :style="[fadeStyle, { '--ylf-scroll-fade-surface': surface, '--ylf-scroll-fade-size': size }]"
24
+ >
25
+ <slot />
26
+ </div>
27
+ </template>
28
+
29
+ <style scoped>
30
+ .ylf-scroll-fade {
31
+ position: relative;
32
+ isolation: isolate;
33
+ min-width: 0;
34
+ min-height: 0;
35
+ overflow: hidden;
36
+ }
37
+
38
+ .ylf-scroll-fade::before,
39
+ .ylf-scroll-fade::after {
40
+ position: absolute;
41
+ z-index: var(--ylf-z-base, 1);
42
+ inset-inline: 0;
43
+ height: min(var(--ylf-scroll-fade-size), 50%);
44
+ pointer-events: none;
45
+ content: '';
46
+ }
47
+
48
+ .ylf-scroll-fade::before {
49
+ top: 0;
50
+ opacity: var(--scroll-fade-top);
51
+ background: linear-gradient(to bottom, var(--ylf-scroll-fade-surface), transparent);
52
+ }
53
+
54
+ .ylf-scroll-fade::after {
55
+ bottom: 0;
56
+ opacity: var(--scroll-fade-bottom);
57
+ background: linear-gradient(to top, var(--ylf-scroll-fade-surface), transparent);
58
+ }
59
+
60
+ @media (prefers-reduced-transparency: reduce), (forced-colors: active) {
61
+ .ylf-scroll-fade::before,
62
+ .ylf-scroll-fade::after {
63
+ display: none;
64
+ }
65
+ }
66
+ </style>
@@ -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
- ? { x: item.offsetLeft, y: item.offsetTop, width: item.offsetWidth, height: item.offsetHeight }
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, 14px);
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: 12px;
155
+ font-size: var(--ylf-text-xs, 0.75rem);
151
156
  }
152
157
 
153
158
  .ylf-segmented[data-icon-only] .ylf-segmented__item {
@@ -166,7 +171,7 @@ onBeforeUnmount(() => resizeObserver?.disconnect())
166
171
  color: var(--ylf-c-brand, #2563eb);
167
172
  background: var(--ylf-c-surface, #fff);
168
173
  border-color: var(--ylf-c-border, #e2e8f0);
169
- box-shadow: var(--ylf-shadow-control, var(--ylf-shadow-sm));
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, var(--ylf-shadow-sm));
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) var(--ylf-ease-spring, var(--ylf-ease-standard, ease)),
188
- width var(--ylf-duration-normal, 240ms) var(--ylf-ease-standard, ease),
189
- height var(--ylf-duration-normal, 240ms) var(--ylf-ease-standard, ease);
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, #2563eb);
206
+ z-index: var(--ylf-z-base, 1);
207
+ outline: var(--ylf-ring-width, 2px) solid var(--ylf-ring-color, var(--ylf-c-brand, #2563eb));
202
208
  outline-offset: 2px;
203
209
  }
204
210
 
205
211
  .ylf-segmented__item[data-disabled] {
206
212
  cursor: not-allowed;
207
- opacity: 0.45;
213
+ opacity: var(--ylf-disabled-opacity, 0.48);
208
214
  }
209
215
 
210
216
  .ylf-segmented__icon {
@@ -1,6 +1,7 @@
1
1
  <script lang="ts" setup generic="T extends string = string">
2
2
  import { SelectContent, SelectIcon, SelectItem, SelectItemIndicator, SelectItemText, SelectPortal, SelectRoot, SelectTrigger, SelectValue, SelectViewport } from 'reka-ui'
3
- import { computed } from 'vue'
3
+ import { computed, useTemplateRef } from 'vue'
4
+ import YlfScrollFade from './YlfScrollFade.vue'
4
5
 
5
6
  defineOptions({ inheritAttrs: false })
6
7
 
@@ -25,6 +26,7 @@ const props = withDefaults(defineProps<{
25
26
 
26
27
  const model = defineModel<T>()
27
28
  const selectedOption = computed(() => props.options.find(option => option.value === model.value))
29
+ const viewport = useTemplateRef<HTMLElement>('viewport')
28
30
  </script>
29
31
 
30
32
  <template>
@@ -44,33 +46,37 @@ const selectedOption = computed(() => props.options.find(option => option.value
44
46
  </SelectTrigger>
45
47
  <SelectPortal :to="portalTo">
46
48
  <SelectContent class="ylf-select__content" :data-size="size" position="popper" :side-offset="6" :collision-padding="16">
47
- <SelectViewport class="ylf-select__viewport">
48
- <SelectItem
49
- v-for="o in options"
50
- :key="o.value"
51
- :value="o.value"
52
- :disabled="o.disabled"
53
- class="ylf-select__item"
54
- >
55
- <SelectItemText class="ylf-select__label">
56
- <span v-if="o.color" class="ylf-select__swatch" :style="{ backgroundColor: o.color }" aria-hidden="true" />
57
- <span>{{ o.label }}</span>
58
- </SelectItemText>
59
- <SelectItemIndicator class="ylf-select__check">
60
- <slot name="indicator">
61
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round">
62
- <path d="M5 12.5l4.5 4.5L19 7" />
63
- </svg>
64
- </slot>
65
- </SelectItemIndicator>
66
- </SelectItem>
67
- </SelectViewport>
49
+ <YlfScrollFade :viewport="viewport" surface="var(--ylf-c-panel, var(--ylf-c-surface, #fff))">
50
+ <SelectViewport as-child>
51
+ <div ref="viewport" class="ylf-select__viewport">
52
+ <SelectItem
53
+ v-for="o in options"
54
+ :key="o.value"
55
+ :value="o.value"
56
+ :disabled="o.disabled"
57
+ class="ylf-select__item"
58
+ >
59
+ <SelectItemText class="ylf-select__label">
60
+ <span v-if="o.color" class="ylf-select__swatch" :style="{ backgroundColor: o.color }" aria-hidden="true" />
61
+ <span>{{ o.label }}</span>
62
+ </SelectItemText>
63
+ <SelectItemIndicator class="ylf-select__check">
64
+ <slot name="indicator">
65
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round">
66
+ <path d="M5 12.5l4.5 4.5L19 7" />
67
+ </svg>
68
+ </slot>
69
+ </SelectItemIndicator>
70
+ </SelectItem>
71
+ </div>
72
+ </SelectViewport>
73
+ </YlfScrollFade>
68
74
  </SelectContent>
69
75
  </SelectPortal>
70
76
  </SelectRoot>
71
77
  </template>
72
78
 
73
- <style lang="scss">
79
+ <style>
74
80
  .ylf-select__trigger {
75
81
  display: inline-flex;
76
82
  align-items: center;
@@ -79,48 +85,49 @@ const selectedOption = computed(() => props.options.find(option => option.value
79
85
  box-sizing: border-box;
80
86
  max-width: 100%;
81
87
  min-width: min(180px, 100%);
82
- min-height: 44px;
83
- padding: 10px 14px;
88
+ min-height: var(--ylf-control-h, 44px);
89
+ padding: 4px 14px;
84
90
  font-family: inherit;
85
- font-size: 15px;
91
+ font-size: var(--ylf-control-font-size, 0.9375rem);
86
92
  line-height: 1.5;
87
93
  color: var(--ylf-c-text, #0f172a);
88
94
  background: var(--ylf-c-surface, #fff);
89
95
  border: 1px solid var(--ylf-c-border-strong, #cbd5e1);
90
- border-radius: var(--ylf-radius, 14px);
96
+ border-radius: var(--ylf-control-radius, var(--ylf-radius, 14px));
91
97
  box-shadow: var(--ylf-shadow-control);
92
98
  cursor: pointer;
93
99
  transition:
94
- border-color var(--ylf-duration-fast, 160ms) var(--ylf-ease-standard, ease),
95
- box-shadow var(--ylf-duration-fast, 160ms) var(--ylf-ease-standard, ease);
96
-
97
- &[data-placeholder] {
98
- color: var(--ylf-c-text-3, #64748b);
99
- }
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
+ }
100
103
 
101
- @media (hover: hover) and (pointer: fine) {
102
- &:hover:not([data-disabled]) {
103
- border-color: var(--ylf-c-brand, #2563eb);
104
- }
105
- }
104
+ .ylf-select__trigger[data-placeholder] {
105
+ color: var(--ylf-c-placeholder, var(--ylf-c-text-3, #5a697e));
106
+ }
106
107
 
107
- &[data-state='open'] {
108
+ @media (hover: hover) and (pointer: fine) {
109
+ .ylf-select__trigger:hover:not([data-disabled]) {
108
110
  border-color: var(--ylf-c-brand, #2563eb);
109
- box-shadow:
110
- var(--ylf-shadow-control),
111
- 0 0 0 3px var(--ylf-c-brand-soft, #eff6ff);
112
111
  }
112
+ }
113
113
 
114
- &:focus-visible {
115
- outline: none;
116
- border-color: var(--ylf-c-brand, #2563eb);
117
- box-shadow: 0 0 0 3px var(--ylf-c-brand-soft, #eff6ff);
118
- }
114
+ .ylf-select__trigger[data-state='open'] {
115
+ border-color: var(--ylf-c-brand, #2563eb);
116
+ box-shadow:
117
+ var(--ylf-shadow-control),
118
+ 0 0 0 3px var(--ylf-c-brand-soft, #eff6ff);
119
+ }
119
120
 
120
- &[data-disabled] {
121
- opacity: 0.5;
122
- cursor: not-allowed;
123
- }
121
+ .ylf-select__trigger:focus-visible {
122
+ outline: var(--ylf-ring-width, 2px) solid var(--ylf-ring-color, var(--ylf-c-brand, #2563eb));
123
+ outline-offset: 2px;
124
+ border-color: var(--ylf-c-brand, #2563eb);
125
+ box-shadow: 0 0 0 3px var(--ylf-c-brand-soft, #eff6ff);
126
+ }
127
+
128
+ .ylf-select__trigger[data-disabled] {
129
+ opacity: var(--ylf-disabled-opacity, 0.48);
130
+ cursor: not-allowed;
124
131
  }
125
132
 
126
133
  .ylf-select__label {
@@ -143,13 +150,13 @@ const selectedOption = computed(() => props.options.find(option => option.value
143
150
  .ylf-select__icon {
144
151
  flex: none;
145
152
  display: inline-flex;
146
- color: var(--ylf-c-text-3, #64748b);
147
- 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
+ }
148
156
 
149
- :where(svg, i, span) {
150
- width: 18px;
151
- height: 18px;
152
- }
157
+ .ylf-select__icon :where(svg, i, span) {
158
+ width: 18px;
159
+ height: 18px;
153
160
  }
154
161
 
155
162
  .ylf-select__trigger[data-state='open'] .ylf-select__icon {
@@ -157,7 +164,7 @@ const selectedOption = computed(() => props.options.find(option => option.value
157
164
  }
158
165
 
159
166
  .ylf-select__content {
160
- z-index: 105;
167
+ z-index: var(--ylf-z-popover, 105);
161
168
  box-sizing: border-box;
162
169
  min-width: var(--reka-select-trigger-width);
163
170
  max-width: var(--reka-select-content-available-width);
@@ -166,34 +173,38 @@ const selectedOption = computed(() => props.options.find(option => option.value
166
173
  background: var(--ylf-c-panel, var(--ylf-c-surface, #fff));
167
174
  border: 1px solid var(--ylf-c-border, #e2e8f0);
168
175
  border-radius: var(--ylf-radius, 14px);
169
- box-shadow: var(--ylf-shadow-panel, 0 22px 56px -14px rgba(15, 23, 42, 0.22));
170
- 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));
171
178
  transform-origin: var(--reka-select-content-transform-origin);
179
+ }
172
180
 
173
- &[data-state='open'] {
174
- animation: ylf-select-in var(--ylf-duration-enter, 240ms) var(--ylf-ease-standard, ease);
175
- }
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
+ }
176
184
 
177
- &[data-state='closed'] {
178
- animation: ylf-select-out var(--ylf-duration-exit, 160ms) var(--ylf-ease-standard, ease);
179
- }
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
+ }
180
188
 
181
- &[data-side='bottom'] {
182
- --_enter-y: -4px;
183
- }
184
- &[data-side='top'] {
185
- --_enter-y: 4px;
186
- }
187
- &[data-side='left'] {
188
- --_enter-x: 4px;
189
- }
190
- &[data-side='right'] {
191
- --_enter-x: -4px;
192
- }
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;
193
203
  }
194
204
 
195
205
  .ylf-select__viewport {
196
206
  max-height: calc(var(--reka-select-content-available-height) - 14px);
207
+ scroll-padding-block: 24px;
197
208
  }
198
209
 
199
210
  .ylf-select__item {
@@ -202,48 +213,48 @@ const selectedOption = computed(() => props.options.find(option => option.value
202
213
  justify-content: space-between;
203
214
  gap: 8px;
204
215
  padding: 8px 12px;
205
- font-size: 14px;
216
+ font-size: var(--ylf-text-sm, 0.875rem);
206
217
  color: var(--ylf-c-text, #0f172a);
207
- border-radius: var(--ylf-radius-sm, 10px);
218
+ border-radius: var(--ylf-control-radius-sm, var(--ylf-radius-sm, 10px));
208
219
  cursor: pointer;
209
220
  user-select: none;
210
221
  outline: none;
211
- 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
+ }
212
224
 
213
- &[data-highlighted] {
214
- background: var(--ylf-c-brand-soft, #eff6ff);
215
- color: var(--ylf-c-brand, #2563eb);
216
- box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ylf-c-brand, #2563eb) 12%, transparent);
217
- }
225
+ .ylf-select__item[data-highlighted] {
226
+ background: var(--ylf-c-brand-soft, #eff6ff);
227
+ color: var(--ylf-c-brand, #2563eb);
228
+ box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ylf-c-brand, #2563eb) 12%, transparent);
229
+ }
218
230
 
219
- &[data-disabled] {
220
- opacity: 0.45;
221
- pointer-events: none;
222
- }
231
+ .ylf-select__item[data-disabled] {
232
+ opacity: var(--ylf-disabled-opacity, 0.48);
233
+ pointer-events: none;
223
234
  }
224
235
 
225
236
  .ylf-select__check {
226
237
  display: inline-flex;
227
238
  color: var(--ylf-c-brand, #2563eb);
239
+ }
228
240
 
229
- :where(svg, i, span) {
230
- width: 15px;
231
- height: 15px;
232
- }
241
+ .ylf-select__check :where(svg, i, span) {
242
+ width: 15px;
243
+ height: 15px;
233
244
  }
234
245
 
235
246
  .ylf-select__trigger[data-size='sm'] {
236
247
  min-width: 0;
237
- min-height: 34px;
238
- padding: 5px 10px;
239
- font-size: 12px;
240
- 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));
241
252
  }
242
253
 
243
254
  .ylf-select__content[data-size='sm'] .ylf-select__item {
244
255
  min-height: 30px;
245
256
  padding: 5px 8px;
246
- font-size: 12px;
257
+ font-size: var(--ylf-text-xs, 0.75rem);
247
258
  }
248
259
 
249
260
  @media (pointer: coarse) {