@veltra/desktop 1.15.0 → 1.15.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.
Files changed (212) hide show
  1. package/dist/components/alert/alert.js +31 -28
  2. package/dist/components/alert/alert.js.map +1 -1
  3. package/dist/components/alert/style.d.ts +1 -1
  4. package/dist/components/alert/style.js +1 -0
  5. package/dist/components/alert/style2.css +5 -1
  6. package/dist/components/auto-complete/style2.css +1 -0
  7. package/dist/components/back-top/style2.css +11 -2
  8. package/dist/components/badge/badge.js +15 -15
  9. package/dist/components/badge/badge.js.map +1 -1
  10. package/dist/components/badge/style2.css +10 -1
  11. package/dist/components/batch-edit/batch-edit-form.js +108 -97
  12. package/dist/components/batch-edit/batch-edit-form.js.map +1 -1
  13. package/dist/components/batch-edit/batch-edit.js +11 -5
  14. package/dist/components/batch-edit/batch-edit.js.map +1 -1
  15. package/dist/components/batch-edit/style2.css +25 -1
  16. package/dist/components/breadcrumb/style2.css +4 -1
  17. package/dist/components/button/style2.css +3 -2
  18. package/dist/components/carousel/carousel.js +5 -3
  19. package/dist/components/carousel/carousel.js.map +1 -1
  20. package/dist/components/carousel/style2.css +7 -1
  21. package/dist/components/carousel/use-carousel.js +16 -2
  22. package/dist/components/carousel/use-carousel.js.map +1 -1
  23. package/dist/components/cascade/style2.css +16 -0
  24. package/dist/components/check-tag/check-tag.js +11 -5
  25. package/dist/components/check-tag/check-tag.js.map +1 -1
  26. package/dist/components/check-tag/style2.css +10 -0
  27. package/dist/components/checkbox/checkbox-button.js +8 -3
  28. package/dist/components/checkbox/checkbox-button.js.map +1 -1
  29. package/dist/components/checkbox/checkbox.js +5 -9
  30. package/dist/components/checkbox/checkbox.js.map +1 -1
  31. package/dist/components/checkbox/style2.css +32 -2
  32. package/dist/components/chip/style2.css +4 -0
  33. package/dist/components/code-editor/code-editor.js +26 -3
  34. package/dist/components/code-editor/code-editor.js.map +1 -1
  35. package/dist/components/code-editor/style2.css +38 -3
  36. package/dist/components/collapse/collapse-item.js +4 -1
  37. package/dist/components/collapse/collapse-item.js.map +1 -1
  38. package/dist/components/collapse/collapse.js +1 -1
  39. package/dist/components/collapse/collapse.js.map +1 -1
  40. package/dist/components/collapse/style2.css +6 -3
  41. package/dist/components/condition-editor/style2.css +24 -6
  42. package/dist/components/contextmenu/contextmenu-sub.js +13 -7
  43. package/dist/components/contextmenu/contextmenu-sub.js.map +1 -1
  44. package/dist/components/contextmenu/style2.css +14 -1
  45. package/dist/components/date-panel/style2.css +9 -1
  46. package/dist/components/dialog/style2.css +5 -1
  47. package/dist/components/dialog/use-maximum.js +6 -0
  48. package/dist/components/dialog/use-maximum.js.map +1 -1
  49. package/dist/components/drawer/style2.css +4 -0
  50. package/dist/components/dual-nav/style2.css +5 -2
  51. package/dist/components/expression-editor/style2.css +17 -5
  52. package/dist/components/file-viewer/style2.css +8 -2
  53. package/dist/components/float-button/float-button.js +1 -1
  54. package/dist/components/float-button/float-button.js.map +1 -1
  55. package/dist/components/float-button/style2.css +2 -3
  56. package/dist/components/form-item/style2.css +13 -1
  57. package/dist/components/grid-input/style2.css +15 -3
  58. package/dist/components/group-nav/style2.css +16 -7
  59. package/dist/components/icon/style2.css +1 -1
  60. package/dist/components/image-cropper/style2.css +4 -1
  61. package/dist/components/image-previewer/image-previewer.js +14 -2
  62. package/dist/components/image-previewer/image-previewer.js.map +1 -1
  63. package/dist/components/image-previewer/style.d.ts +1 -1
  64. package/dist/components/image-previewer/style.js +1 -0
  65. package/dist/components/image-previewer/style2.css +9 -14
  66. package/dist/components/input/input.js.map +1 -1
  67. package/dist/components/input/input.vue_vue_type_script_setup_true_lang.js +4 -4
  68. package/dist/components/input/input.vue_vue_type_script_setup_true_lang.js.map +1 -1
  69. package/dist/components/input/style2.css +13 -1
  70. package/dist/components/kanban/kanban-column.js +1 -0
  71. package/dist/components/kanban/kanban-column.js.map +1 -1
  72. package/dist/components/kanban/style2.css +6 -2
  73. package/dist/components/layout/layout-resizer.js +8 -1
  74. package/dist/components/layout/layout-resizer.js.map +1 -1
  75. package/dist/components/layout/layout.js +11 -1
  76. package/dist/components/layout/layout.js.map +1 -1
  77. package/dist/components/layout/style2.css +22 -0
  78. package/dist/components/loading/style2.css +26 -7
  79. package/dist/components/message/style2.css +18 -2
  80. package/dist/components/message-confirm/style2.css +11 -0
  81. package/dist/components/multi-select/multi-select.js +21 -18
  82. package/dist/components/multi-select/multi-select.js.map +1 -1
  83. package/dist/components/multi-select/style2.css +13 -0
  84. package/dist/components/nav/nav-sub.js +8 -2
  85. package/dist/components/nav/nav-sub.js.map +1 -1
  86. package/dist/components/nav/style2.css +50 -26
  87. package/dist/components/notification/style2.css +21 -0
  88. package/dist/components/number-input/style2.css +5 -2
  89. package/dist/components/paginator/style2.css +1 -0
  90. package/dist/components/password-input/style2.css +10 -1
  91. package/dist/components/pop-confirm/pop-confirm.js +1 -1
  92. package/dist/components/pop-confirm/pop-confirm.js.map +1 -1
  93. package/dist/components/progress/style2.css +2 -2
  94. package/dist/components/progress-nodes/style2.css +3 -3
  95. package/dist/components/radio/radio.js +1 -4
  96. package/dist/components/radio/radio.js.map +1 -1
  97. package/dist/components/radio/style2.css +11 -1
  98. package/dist/components/rate/style2.css +7 -0
  99. package/dist/components/rich-text-editor/style2.css +6 -3
  100. package/dist/components/scroll/style2.css +2 -2
  101. package/dist/components/segment/segment.js +5 -1
  102. package/dist/components/segment/segment.js.map +1 -1
  103. package/dist/components/segment/style2.css +6 -0
  104. package/dist/components/select/select.js +5 -1
  105. package/dist/components/select/select.js.map +1 -1
  106. package/dist/components/select/style2.css +11 -1
  107. package/dist/components/steps/style2.css +21 -2
  108. package/dist/components/switch/style2.css +10 -2
  109. package/dist/components/table/style2.css +20 -7
  110. package/dist/components/tabs/style2.css +9 -3
  111. package/dist/components/tag/style2.css +16 -7
  112. package/dist/components/textarea/style2.css +9 -1
  113. package/dist/components/theme/style2.css +38 -29
  114. package/dist/components/time-picker/style2.css +4 -1
  115. package/dist/components/tip/style2.css +11 -0
  116. package/dist/components/transfer/style2.css +21 -1
  117. package/dist/components/transfer/transfer-list.js +20 -17
  118. package/dist/components/transfer/transfer-list.js.map +1 -1
  119. package/dist/components/tree/style2.css +5 -2
  120. package/package.json +1 -1
  121. package/src/components/alert/alert.vue +18 -16
  122. package/src/components/alert/style.scss +9 -1
  123. package/src/components/alert/style.ts +1 -0
  124. package/src/components/auto-complete/style.scss +3 -0
  125. package/src/components/back-top/style.scss +17 -3
  126. package/src/components/badge/badge.vue +6 -7
  127. package/src/components/badge/style.scss +20 -1
  128. package/src/components/batch-edit/__test__/batch-edit.test.ts +10 -0
  129. package/src/components/batch-edit/batch-edit-form.vue +95 -83
  130. package/src/components/batch-edit/batch-edit.vue +18 -3
  131. package/src/components/batch-edit/style.scss +39 -3
  132. package/src/components/breadcrumb/style.scss +5 -1
  133. package/src/components/button/style.scss +4 -2
  134. package/src/components/carousel/carousel.vue +8 -2
  135. package/src/components/carousel/style.scss +10 -1
  136. package/src/components/carousel/use-carousel.ts +17 -2
  137. package/src/components/cascade/style.scss +27 -0
  138. package/src/components/check-tag/check-tag.vue +13 -3
  139. package/src/components/check-tag/style.scss +21 -0
  140. package/src/components/checkbox/checkbox-button.vue +11 -1
  141. package/src/components/checkbox/checkbox.vue +6 -2
  142. package/src/components/checkbox/style.scss +51 -2
  143. package/src/components/chip/style.scss +11 -0
  144. package/src/components/code-editor/code-editor.vue +24 -3
  145. package/src/components/code-editor/style.scss +54 -4
  146. package/src/components/collapse/collapse-item.vue +10 -1
  147. package/src/components/collapse/collapse.vue +3 -1
  148. package/src/components/collapse/style.scss +10 -7
  149. package/src/components/condition-editor/style.scss +39 -12
  150. package/src/components/contextmenu/contextmenu-sub.vue +9 -7
  151. package/src/components/contextmenu/style.scss +17 -1
  152. package/src/components/date-panel/style.scss +22 -1
  153. package/src/components/dialog/style.scss +6 -1
  154. package/src/components/dialog/use-maximum.ts +8 -0
  155. package/src/components/drawer/style.scss +5 -0
  156. package/src/components/dual-nav/style.scss +9 -4
  157. package/src/components/expression-editor/style.scss +27 -9
  158. package/src/components/file-viewer/style.scss +12 -2
  159. package/src/components/float-button/float-button.vue +1 -1
  160. package/src/components/float-button/style.scss +4 -3
  161. package/src/components/form-item/style.scss +16 -2
  162. package/src/components/grid-input/style.scss +6 -1
  163. package/src/components/group-nav/style.scss +30 -13
  164. package/src/components/icon/style.scss +2 -1
  165. package/src/components/image-cropper/style.scss +6 -1
  166. package/src/components/image-previewer/image-previewer.vue +20 -2
  167. package/src/components/image-previewer/style.scss +17 -14
  168. package/src/components/image-previewer/style.ts +1 -0
  169. package/src/components/input/input.vue +2 -8
  170. package/src/components/input/style.scss +19 -1
  171. package/src/components/kanban/kanban-column.vue +2 -0
  172. package/src/components/kanban/style.scss +11 -2
  173. package/src/components/layout/__test__/layout.test.ts +135 -0
  174. package/src/components/layout/layout-resizer.vue +8 -1
  175. package/src/components/layout/layout.vue +17 -1
  176. package/src/components/layout/style.scss +31 -6
  177. package/src/components/loading/style.scss +39 -8
  178. package/src/components/message/style.scss +20 -2
  179. package/src/components/message-confirm/style.scss +13 -0
  180. package/src/components/multi-select/multi-select.vue +13 -10
  181. package/src/components/multi-select/style.scss +14 -0
  182. package/src/components/multi-tree-select/__test__/multi-tree-select.test.ts +4 -2
  183. package/src/components/nav/nav-sub.vue +10 -2
  184. package/src/components/nav/style.scss +37 -13
  185. package/src/components/notification/style.scss +13 -0
  186. package/src/components/number-input/style.scss +8 -2
  187. package/src/components/paginator/style.scss +3 -0
  188. package/src/components/password-input/style.scss +15 -1
  189. package/src/components/pop-confirm/pop-confirm.vue +1 -1
  190. package/src/components/progress/style.scss +3 -3
  191. package/src/components/progress-nodes/style.scss +5 -5
  192. package/src/components/radio/radio.vue +1 -1
  193. package/src/components/radio/style.scss +19 -1
  194. package/src/components/rate/style.scss +9 -0
  195. package/src/components/rich-text-editor/style.scss +11 -6
  196. package/src/components/scroll/style.scss +3 -3
  197. package/src/components/segment/segment.vue +13 -1
  198. package/src/components/segment/style.scss +13 -3
  199. package/src/components/select/select.vue +1 -1
  200. package/src/components/select/style.scss +22 -1
  201. package/src/components/steps/style.scss +27 -5
  202. package/src/components/switch/style.scss +13 -2
  203. package/src/components/table/style.scss +44 -20
  204. package/src/components/tabs/style.scss +16 -3
  205. package/src/components/tag/style.scss +18 -1
  206. package/src/components/textarea/style.scss +15 -2
  207. package/src/components/theme/style.scss +62 -40
  208. package/src/components/time-picker/style.scss +9 -1
  209. package/src/components/tip/style.scss +13 -0
  210. package/src/components/transfer/style.scss +31 -1
  211. package/src/components/transfer/transfer-list.vue +18 -15
  212. package/src/components/tree/style.scss +8 -3
@@ -118,6 +118,7 @@ $root-name: multi-select;
118
118
  cursor: pointer;
119
119
  user-select: none;
120
120
  @include m.flex($align: center);
121
+ transition: background-color fn.use-var(transition, fast) fn.use-var(transition, ease);
121
122
 
122
123
  &:hover {
123
124
  background-color: fn.use-var(bg-color, hover);
@@ -177,3 +178,16 @@ $root-name: multi-select;
177
178
  min-height: 240px;
178
179
  }
179
180
  }
181
+
182
+ // 标签离场:纯 opacity 淡出(出场快于入场的 zoom-in);其余标签经 -move 过渡平滑收拢
183
+ .u-multi-select-tags-leave-active {
184
+ transition: opacity fn.use-var(transition, fast) fn.use-var(transition, ease-out);
185
+ }
186
+
187
+ .u-multi-select-tags-leave-to {
188
+ opacity: 0;
189
+ }
190
+
191
+ .u-multi-select-tags-move {
192
+ transition: transform fn.use-var(transition, normal) fn.use-var(transition, ease);
193
+ }
@@ -144,11 +144,13 @@ describe('UMultiTreeSelect check-strictly and ctrl-key behavior', () => {
144
144
  await openDropdown(host)
145
145
  await clickNodeByLabel('中国')
146
146
 
147
- // 父节点「亚洲」不应有半选状态
147
+ // 父节点「亚洲」不应有半选状态(半选条常驻渲染,仅 is-on 时可见)
148
148
  const asiaNodeContent = queryNodeContents().find((el) => el.textContent?.includes('亚洲'))
149
149
  const asiaCheckbox = asiaNodeContent?.closest('.u-tree__node')?.querySelector('.u-checkbox')
150
150
  expect(asiaCheckbox?.classList.contains('is-indeterminate')).toBe(false)
151
- expect(asiaCheckbox?.querySelector('.u-checkbox--indeterminate')).toBeNull()
151
+ expect(
152
+ asiaCheckbox?.querySelector('.u-checkbox--indeterminate')?.classList.contains('is-on')
153
+ ).toBe(false)
152
154
  } finally {
153
155
  unmount()
154
156
  }
@@ -62,8 +62,16 @@ onMounted(() => {
62
62
 
63
63
  watch(expanded, (open) => {
64
64
  if (!wrapperEl.value) return
65
- if (open) expandTransition.expand(wrapperEl.value)
66
- else expandTransition.collapse(wrapperEl.value)
65
+ if (open) {
66
+ // 内容淡入:ExpandTransition 的 opacity 选项不作用于 expand() 路径,
67
+ // 此处手动驱动(enterTransition 已含 opacity 时长)
68
+ wrapperEl.value.style.opacity = '0'
69
+ expandTransition.expand(wrapperEl.value)
70
+ wrapperEl.value.style.opacity = '1'
71
+ } else {
72
+ expandTransition.collapse(wrapperEl.value)
73
+ wrapperEl.value.style.opacity = '0'
74
+ }
67
75
  })
68
76
 
69
77
  onBeforeUnmount(() => {
@@ -15,6 +15,7 @@ $collapsed-nav: collapsed-nav;
15
15
  }
16
16
 
17
17
  @include m.e(item, sub-content) {
18
+ position: relative;
18
19
  width: 100%;
19
20
  cursor: pointer;
20
21
  gap: 8px;
@@ -23,7 +24,8 @@ $collapsed-nav: collapsed-nav;
23
24
  color: inherit;
24
25
  transition:
25
26
  background-color 0.15s ease,
26
- color 0.15s ease;
27
+ color 0.15s ease,
28
+ transform fn.use-var(transition, fast) fn.use-var(transition, ease-out);
27
29
 
28
30
  @include m.flex;
29
31
 
@@ -32,38 +34,60 @@ $collapsed-nav: collapsed-nav;
32
34
  color: var(--u-nav-hover-color);
33
35
  }
34
36
 
37
+ // active 左侧指示条:默认纵向收起且透明,激活时展开淡入
38
+ &::before {
39
+ content: '';
40
+ position: absolute;
41
+ left: 0;
42
+ top: 50%;
43
+ width: 3px;
44
+ height: 56%;
45
+ min-height: 10px;
46
+ border-radius: 9999px;
47
+ background-color: fn.use-var(color, primary);
48
+ transform: translateY(-50%) scaleY(0);
49
+ opacity: 0;
50
+ pointer-events: none;
51
+ transition:
52
+ transform fn.use-var(transition, fast) fn.use-var(transition, ease-out),
53
+ opacity fn.use-var(transition, fast) fn.use-var(transition, ease-out);
54
+ }
55
+
35
56
  @include m.is(expanded, branch-active) {
36
57
  color: var(--u-nav-strong-color);
37
58
  }
38
59
 
39
60
  @include m.is(active) {
40
- position: relative;
41
61
  background-color: var(--u-nav-active-bg);
42
62
  color: var(--u-nav-active-color);
43
63
 
44
64
  &::before {
45
- content: '';
46
- position: absolute;
47
- left: 0;
48
- top: 50%;
49
- width: 3px;
50
- height: 56%;
51
- min-height: 10px;
52
- border-radius: 9999px;
53
- background-color: fn.use-var(color, primary);
54
- transform: translateY(-50%);
55
- pointer-events: none;
65
+ transform: translateY(-50%) scaleY(1);
66
+ opacity: 1;
56
67
  }
57
68
  }
58
69
  }
59
70
 
60
71
  @include m.e(item) {
72
+ @include m.is-not(disabled) {
73
+ &:active {
74
+ transform: scale(0.97);
75
+ }
76
+ }
77
+
61
78
  @include m.is(disabled) {
62
79
  opacity: 0.55;
63
80
  cursor: not-allowed;
64
81
  }
65
82
  }
66
83
 
84
+ // 分组标题(可点击展开/收起,无禁用态)
85
+ @include m.e(sub-content) {
86
+ &:active {
87
+ transform: scale(0.97);
88
+ }
89
+ }
90
+
67
91
  @include m.e(item-title, sub-title) {
68
92
  flex: 1;
69
93
  min-width: 0;
@@ -68,10 +68,17 @@ $stack-positions: (
68
68
  position: absolute;
69
69
  right: fn.use-var(gap, $size);
70
70
  top: fn.use-var(gap, $size);
71
+ transition: transform fn.use-var(transition, fast) fn.use-var(transition, ease-out);
71
72
 
72
73
  &:hover {
73
74
  color: fn.use-var(color, primary, 'dark-9');
74
75
  }
76
+
77
+ // 点击即关闭,过渡来不及显示——按下瞬间缩到位
78
+ &:active {
79
+ transform: scale(0.9);
80
+ transition-duration: 0s;
81
+ }
75
82
  }
76
83
  }
77
84
 
@@ -121,6 +128,12 @@ $stack-positions: (
121
128
  transform fn.use-var(transition, normal) fn.use-var(transition, ease-out);
122
129
  }
123
130
 
131
+ /* 出场比入场快 */
132
+ .#{$root-name}-bottom-leave-active,
133
+ .#{$root-name}-top-leave-active {
134
+ transition-duration: fn.use-var(transition, fast);
135
+ }
136
+
124
137
  .#{$root-name}-bottom-enter-from,
125
138
  .#{$root-name}-bottom-leave-to {
126
139
  opacity: 0;
@@ -22,12 +22,18 @@ $root-name: number-input;
22
22
  flex-shrink: 0;
23
23
  width: 20px;
24
24
  border-radius: fn.use-var(radius, default);
25
- transition: color 0.25s;
25
+ transition:
26
+ color fn.use-var(transition, fast) fn.use-var(transition, ease),
27
+ transform fn.use-var(transition, fast) fn.use-var(transition, ease-out);
26
28
 
27
29
  &:hover {
28
30
  color: fn.use-var(color, primary);
29
31
  }
30
32
 
33
+ &:active {
34
+ transform: scale(0.92);
35
+ }
36
+
31
37
  @include m.is(hidden) {
32
38
  visibility: hidden;
33
39
  pointer-events: none;
@@ -42,7 +48,7 @@ $root-name: number-input;
42
48
 
43
49
  @include m.bem(icon) {
44
50
  cursor: pointer;
45
- transition: color 0.25s;
51
+ transition: color fn.use-var(transition, fast) fn.use-var(transition, ease);
46
52
  width: 20px;
47
53
  border-radius: fn.use-var(radius, default);
48
54
 
@@ -36,6 +36,9 @@ $root-name: paginator;
36
36
  margin: 0;
37
37
  list-style: none;
38
38
  cursor: pointer;
39
+ transition:
40
+ background-color fn.use-var(transition, fast) fn.use-var(transition, ease),
41
+ color fn.use-var(transition, fast) fn.use-var(transition, ease);
39
42
  @include m.flex($justify: center);
40
43
 
41
44
  &:hover {
@@ -18,7 +18,7 @@ $root-name: password-input;
18
18
  flex-shrink: 0;
19
19
  width: 20px;
20
20
  border-radius: fn.use-var(radius, default);
21
- transition: color 0.25s;
21
+ transition: color fn.use-var(transition, fast) fn.use-var(transition, ease);
22
22
 
23
23
  &:hover {
24
24
  color: fn.use-var(color, primary);
@@ -28,5 +28,19 @@ $root-name: password-input;
28
28
  @include m.e(visibility-toggle) {
29
29
  cursor: pointer;
30
30
  flex-shrink: 0;
31
+ color: fn.use-var(text-color, main);
32
+ transition:
33
+ color fn.use-var(transition, fast) fn.use-var(transition, ease),
34
+ transform fn.use-var(transition, fast) fn.use-var(transition, ease-out);
35
+
36
+ &:hover {
37
+ color: fn.use-var(color, primary);
38
+ }
39
+
40
+ // 高频小图标:按下瞬间缩到位,松手回弹走过渡
41
+ &:active {
42
+ transform: scale(0.92);
43
+ transition-duration: 0s;
44
+ }
31
45
  }
32
46
  }
@@ -51,7 +51,7 @@ withDefaults(defineProps<PopConfirmProps>(), {
51
51
  trigger: 'click',
52
52
  icon: QuestionFilled,
53
53
  direction: 'bottom',
54
- iconColor: '#ffc107',
54
+ iconColor: '',
55
55
  confirmText: '确认',
56
56
  cancelText: '取消'
57
57
  })
@@ -20,8 +20,8 @@ $root-name: progress;
20
20
  color: fn.use-var(text-color, white);
21
21
  overflow: hidden;
22
22
  transition:
23
- width 0.4s cubic-bezier(0.25, 0.1, 0.25, 1),
24
- background-color 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
23
+ width fn.use-var(transition, normal) fn.use-var(transition, ease),
24
+ background-color fn.use-var(transition, normal) fn.use-var(transition, ease);
25
25
  @include m.flex($justify: center);
26
26
  }
27
27
 
@@ -47,7 +47,7 @@ $root-name: progress;
47
47
  }
48
48
 
49
49
  @include m.e(circle-ring) {
50
- transition: stroke-dasharray 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
50
+ transition: stroke-dasharray fn.use-var(transition, normal) fn.use-var(transition, ease);
51
51
  }
52
52
  // 颜色
53
53
  @each $type, $_ in vars.$color-types {
@@ -37,8 +37,8 @@ $root-name: progress-nodes;
37
37
  color: inherit;
38
38
  flex: 0 0 auto;
39
39
  transition:
40
- background-color 0.2s,
41
- color 0.2s;
40
+ background-color fn.use-var(transition, fast) fn.use-var(transition, ease),
41
+ color fn.use-var(transition, fast) fn.use-var(transition, ease);
42
42
  border-radius: fn.use-var(radius, default);
43
43
 
44
44
  &:hover {
@@ -77,8 +77,8 @@ $root-name: progress-nodes;
77
77
  background-color: fn.use-var(bg-color, top);
78
78
  box-sizing: border-box;
79
79
  transition:
80
- background-color 0.2s,
81
- border-color 0.2s;
80
+ background-color fn.use-var(transition, fast) fn.use-var(transition, ease),
81
+ border-color fn.use-var(transition, fast) fn.use-var(transition, ease);
82
82
  z-index: 1;
83
83
  @include m.flex($align: center, $justify: center);
84
84
 
@@ -91,7 +91,7 @@ $root-name: progress-nodes;
91
91
  @include m.e(label) {
92
92
  font-size: fn.use-var(font-size-assist, small);
93
93
  color: fn.use-var(text-color, second);
94
- transition: color 0.2s;
94
+ transition: color fn.use-var(transition, fast) fn.use-var(transition, ease);
95
95
  @include m.ellipsis;
96
96
  }
97
97
 
@@ -10,7 +10,7 @@
10
10
 
11
11
  <!-- radio框 -->
12
12
  <section :class="cls.e('button')">
13
- <span :class="cls.e('inner')" v-if="radioChecked"></span>
13
+ <span :class="cls.e('inner')"></span>
14
14
  </section>
15
15
 
16
16
  <span :class="cls.e('label')">
@@ -38,13 +38,19 @@ $root-name: radio;
38
38
  overflow: hidden;
39
39
  transition:
40
40
  border-color fn.use-var(transition, fast) fn.use-var(transition, ease),
41
- box-shadow fn.use-var(transition, fast) fn.use-var(transition, ease);
41
+ box-shadow fn.use-var(transition, fast) fn.use-var(transition, ease),
42
+ transform fn.use-var(transition, fast) fn.use-var(transition, ease-out);
42
43
  }
43
44
 
44
45
  @include m.is(checked) {
45
46
  @include m.bem($root-name, button) {
46
47
  border-color: fn.use-var(color, primary);
47
48
  }
49
+
50
+ @include m.bem($root-name, inner) {
51
+ transform: scale(1);
52
+ opacity: 1;
53
+ }
48
54
  }
49
55
 
50
56
  @include m.e(native) {
@@ -65,6 +71,12 @@ $root-name: radio;
65
71
  border-radius: 50%;
66
72
  display: block;
67
73
  height: 100%;
74
+ // 常驻渲染,选中态靠 scale + opacity 平滑过渡
75
+ transform: scale(0.5);
76
+ opacity: 0;
77
+ transition:
78
+ transform fn.use-var(transition, fast) fn.use-var(transition, ease-out),
79
+ opacity fn.use-var(transition, fast) fn.use-var(transition, ease-out);
68
80
  }
69
81
 
70
82
  @include m.is-not(disabled) {
@@ -74,6 +86,12 @@ $root-name: radio;
74
86
  }
75
87
  }
76
88
 
89
+ &:active {
90
+ @include m.bem($root-name, button) {
91
+ transform: scale(0.92);
92
+ }
93
+ }
94
+
77
95
  // label 不可聚焦,ring 由视觉隐藏的原生 input 驱动
78
96
  #{fn.bem($root-name, native)}:focus-visible + #{fn.bem($root-name, button)} {
79
97
  box-shadow: fn.use-var(focus-ring);
@@ -25,6 +25,14 @@ $root-name: rate;
25
25
  &:focus-visible {
26
26
  box-shadow: fn.use-var(focus-ring);
27
27
  }
28
+
29
+ @include m.bem($root-name, item) {
30
+ transition: transform fn.use-var(transition, fast) fn.use-var(transition, ease-out);
31
+
32
+ &:active {
33
+ transform: scale(0.9);
34
+ }
35
+ }
28
36
  }
29
37
 
30
38
  @include m.e(item) {
@@ -47,5 +55,6 @@ $root-name: rate;
47
55
  white-space: nowrap;
48
56
  pointer-events: none;
49
57
  color: fn.component-var(rate, active-color, fn.use-var(color, warning));
58
+ transition: width fn.use-var(transition, fast) fn.use-var(transition, ease);
50
59
  }
51
60
  }
@@ -9,7 +9,7 @@ $root-name: rich-text-editor;
9
9
  border: 1px solid fn.use-var(border, muted-color);
10
10
  border-radius: fn.use-var(radius, default);
11
11
  background-color: fn.use-var(bg-color, top);
12
- transition: border-color 0.25s ease;
12
+ transition: border-color fn.use-var(transition, normal) fn.use-var(transition, ease);
13
13
  display: flex;
14
14
  flex-direction: column;
15
15
  overflow: hidden;
@@ -53,15 +53,20 @@ $root-name: rich-text-editor;
53
53
  color: fn.use-var(text-color, main);
54
54
  cursor: pointer;
55
55
  transition:
56
- background-color 0.15s ease,
57
- color 0.15s ease,
58
- opacity 0.15s ease;
56
+ background-color fn.use-var(transition, fast) fn.use-var(transition, ease),
57
+ color fn.use-var(transition, fast) fn.use-var(transition, ease),
58
+ opacity fn.use-var(transition, fast) fn.use-var(transition, ease),
59
+ transform fn.use-var(transition, fast) fn.use-var(transition, ease-out);
59
60
  padding: 0;
60
61
 
61
62
  @include m.is-not(disabled) {
62
63
  &:hover {
63
64
  background-color: fn.use-var(bg-color, hover);
64
65
  }
66
+
67
+ &:active {
68
+ transform: scale(0.94);
69
+ }
65
70
  }
66
71
 
67
72
  &.is-active {
@@ -112,8 +117,8 @@ $root-name: rich-text-editor;
112
117
  cursor: pointer;
113
118
  outline: none;
114
119
  transition:
115
- border-color 0.15s ease,
116
- opacity 0.15s ease;
120
+ border-color fn.use-var(transition, fast) fn.use-var(transition, ease),
121
+ opacity fn.use-var(transition, fast) fn.use-var(transition, ease);
117
122
  // Custom arrow
118
123
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
119
124
  background-repeat: no-repeat;
@@ -58,7 +58,7 @@ $root-name: scroll;
58
58
  border-radius: $bar-size;
59
59
  background-color: transparent;
60
60
  will-change: transform;
61
- transition: opacity 160ms cubic-bezier(0.23, 1, 0.32, 1);
61
+ transition: opacity fn.use-var(transition, fast) fn.use-var(transition, ease-out);
62
62
  z-index: 1;
63
63
 
64
64
  &::before {
@@ -68,8 +68,8 @@ $root-name: scroll;
68
68
  border-radius: inherit;
69
69
  background-color: fn.color-a(text-color, 40, assist);
70
70
  transition:
71
- transform 150ms cubic-bezier(0.23, 1, 0.32, 1),
72
- background-color 160ms cubic-bezier(0.23, 1, 0.32, 1);
71
+ transform fn.use-var(transition, fast) fn.use-var(transition, ease-out),
72
+ background-color fn.use-var(transition, fast) fn.use-var(transition, ease-out);
73
73
  }
74
74
 
75
75
  &:hover::before {
@@ -6,7 +6,11 @@
6
6
  :class="[cls.b, bem.is('block', block), bem.is('disabled', disabled), cls.m(size)]"
7
7
  role="radiogroup"
8
8
  >
9
- <div :class="cls.e('thumb')" :style="thumbStyle" aria-hidden="true" />
9
+ <div
10
+ :class="[cls.e('thumb'), bem.is('ready', thumbReady)]"
11
+ :style="thumbStyle"
12
+ aria-hidden="true"
13
+ />
10
14
  <div
11
15
  v-for="item of items"
12
16
  :key="item[valueKey]"
@@ -76,6 +80,8 @@ const thumbW = shallowRef(0)
76
80
  const thumbH = shallowRef(0)
77
81
  const thumbRadius = shallowRef('0px')
78
82
  const thumbOn = shallowRef(false)
83
+ // 首次定位完成(且已渲染一帧)后才允许 thumb 过渡,避免从 (0,0) 滑入
84
+ const thumbReady = shallowRef(false)
79
85
 
80
86
  const thumbStyle = computed(() => ({
81
87
  width: `${thumbW.value}px`,
@@ -101,6 +107,12 @@ function measure() {
101
107
  thumbH.value = box.height
102
108
  thumbRadius.value = getComputedStyle(active).borderRadius
103
109
  thumbOn.value = true
110
+
111
+ if (!thumbReady.value) {
112
+ requestAnimationFrame(() => {
113
+ thumbReady.value = true
114
+ })
115
+ }
104
116
  }
105
117
 
106
118
  useResizeObserver({ targets: trackRef, onResize: () => measure() })
@@ -19,9 +19,15 @@
19
19
  pointer-events: none;
20
20
  background-color: fn.use-var(bg-color, top);
21
21
  box-shadow: fn.use-var(shadow, sm);
22
- transition:
23
- transform 200ms cubic-bezier(0.77, 0, 0.175, 1),
24
- opacity 200ms cubic-bezier(0.77, 0, 0.175, 1);
22
+ // 透明度始终过渡(首次出现原地淡入)
23
+ transition: opacity 200ms cubic-bezier(0.77, 0, 0.175, 1);
24
+
25
+ // 首次定位完成前不加位移过渡,避免 thumb 从 (0,0) 滑入
26
+ @include m.is(ready) {
27
+ transition:
28
+ transform 200ms cubic-bezier(0.77, 0, 0.175, 1),
29
+ opacity 200ms cubic-bezier(0.77, 0, 0.175, 1);
30
+ }
25
31
 
26
32
  @media (prefers-reduced-motion: reduce) {
27
33
  transition: none;
@@ -63,6 +69,10 @@
63
69
  background-color: fn.color-a(color, 5, primary);
64
70
  }
65
71
 
72
+ &:active:not(.is-disabled) {
73
+ background-color: fn.color-a(color, 8, primary);
74
+ }
75
+
66
76
  @include m.is(active) {
67
77
  color: fn.use-var(color, primary);
68
78
  background-color: transparent;
@@ -3,7 +3,7 @@
3
3
  v-if="!readonly"
4
4
  v-bind="$attrs"
5
5
  trigger="click"
6
- :class="[cls.b, bem.is('disabled', disabled)]"
6
+ :class="[cls.b, bem.is('disabled', disabled), bem.is('focus', dropdownVisible)]"
7
7
  ref="dropdownRef"
8
8
  v-model:visible="dropdownVisible"
9
9
  :content-class="[cls.e('panel'), cls.em('panel', size), contentClass]"
@@ -15,6 +15,17 @@ $root-name: select;
15
15
  }
16
16
  }
17
17
 
18
+ // 下拉可见(壳 .is-focus 由 dropdownVisible 驱动)时箭头翻转作为状态回声
19
+ @include m.e(arrow) {
20
+ transition: transform fn.use-var(transition, normal) fn.use-var(transition, ease-out);
21
+ }
22
+
23
+ @include m.is(focus) {
24
+ @include m.bem($root-name, arrow) {
25
+ transform: rotate(180deg);
26
+ }
27
+ }
28
+
18
29
  @include m.e(clear) {
19
30
  cursor: pointer;
20
31
  }
@@ -35,6 +46,8 @@ $root-name: select;
35
46
  position: absolute;
36
47
  top: 0;
37
48
  left: 0;
49
+ // 虚拟项位移由内联 translateY 命令式写入,排除 transform 过渡避免滚动跟手性被拖慢
50
+ transition-property: background-color, color;
38
51
  }
39
52
  }
40
53
  }
@@ -58,10 +71,18 @@ $root-name: select;
58
71
  color: fn.use-var(text-color, main);
59
72
  transition:
60
73
  background-color 0.15s ease,
61
- color 0.15s ease;
74
+ color 0.15s ease,
75
+ transform fn.use-var(transition, fast) fn.use-var(transition, ease-out);
62
76
 
63
77
  @include m.ellipsis;
64
78
 
79
+ // 按压反馈;虚拟模式下 translateY 定位由内联样式接管,transform 过渡/缩放不生效
80
+ @include m.is-not(disabled) {
81
+ &:active {
82
+ transform: scale(0.98);
83
+ }
84
+ }
85
+
65
86
  &:hover {
66
87
  background-color: fn.component-var(select, option-hover-bg, fn.use-var(bg-color, hover));
67
88
  color: fn.component-var(select, option-hover-color, fn.use-var(text-color, title));
@@ -29,8 +29,16 @@ $root-name: steps;
29
29
 
30
30
  /** 步骤项 */
31
31
  @include m.e(item) {
32
+ cursor: pointer;
32
33
  font-weight: 600;
33
34
  color: fn.use-var(text-color, placeholder);
35
+ transition:
36
+ color fn.use-var(transition, fast) fn.use-var(transition, ease),
37
+ transform fn.use-var(transition, fast) fn.use-var(transition, ease-out);
38
+
39
+ &:active {
40
+ transform: scale(0.98);
41
+ }
34
42
  }
35
43
 
36
44
  @include m.e(node) {
@@ -87,14 +95,20 @@ $root-name: steps;
87
95
  background-color: fn.use-var(bg-color, top);
88
96
  position: relative;
89
97
  z-index: 1;
90
- transition: opacity 0.3s ease;
98
+ transition:
99
+ opacity 0.3s ease,
100
+ color fn.use-var(transition, fast) fn.use-var(transition, ease),
101
+ border-color fn.use-var(transition, fast) fn.use-var(transition, ease);
91
102
  }
92
103
 
93
104
  @include m.bem($root-name, item) {
94
105
  @include m.is(current) {
95
106
  @include m.bem($root-name, icon) {
96
107
  animation: steps-icon-breathing 2s ease-in-out infinite;
97
- will-change: opacity;
108
+
109
+ @media (prefers-reduced-motion: reduce) {
110
+ animation: none;
111
+ }
98
112
  }
99
113
  }
100
114
  }
@@ -125,6 +139,10 @@ $root-name: steps;
125
139
  );
126
140
  background-size: 10px 2px;
127
141
  animation: steps-link-flow-horizontal 1s linear infinite;
142
+
143
+ @media (prefers-reduced-motion: reduce) {
144
+ animation: none;
145
+ }
128
146
  }
129
147
  }
130
148
  }
@@ -165,9 +183,13 @@ $root-name: steps;
165
183
  transparent 50%,
166
184
  transparent 100%
167
185
  );
168
- background-size: 2px 10px;
169
- animation: steps-link-flow-vertical 1s linear infinite;
170
- }
186
+ background-size: 2px 10px;
187
+ animation: steps-link-flow-vertical 1s linear infinite;
188
+
189
+ @media (prefers-reduced-motion: reduce) {
190
+ animation: none;
191
+ }
192
+ }
171
193
  }
172
194
  }
173
195