@veltra/desktop 1.14.1 → 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.
- package/dist/components/alert/alert.js +31 -28
- package/dist/components/alert/alert.js.map +1 -1
- package/dist/components/alert/style.d.ts +1 -1
- package/dist/components/alert/style.js +1 -0
- package/dist/components/alert/style2.css +5 -1
- package/dist/components/auto-complete/style.d.ts +0 -1
- package/dist/components/auto-complete/style2.css +1 -0
- package/dist/components/back-top/style2.css +11 -2
- package/dist/components/badge/badge.js +15 -15
- package/dist/components/badge/badge.js.map +1 -1
- package/dist/components/badge/style2.css +10 -1
- package/dist/components/batch-edit/batch-edit-form.js +108 -97
- package/dist/components/batch-edit/batch-edit-form.js.map +1 -1
- package/dist/components/batch-edit/batch-edit.js +11 -5
- package/dist/components/batch-edit/batch-edit.js.map +1 -1
- package/dist/components/batch-edit/style2.css +25 -1
- package/dist/components/breadcrumb/style2.css +4 -1
- package/dist/components/button/style2.css +3 -2
- package/dist/components/carousel/carousel.js +5 -3
- package/dist/components/carousel/carousel.js.map +1 -1
- package/dist/components/carousel/style2.css +7 -1
- package/dist/components/carousel/use-carousel.js +16 -2
- package/dist/components/carousel/use-carousel.js.map +1 -1
- package/dist/components/cascade/cascade.js +13 -19
- package/dist/components/cascade/cascade.js.map +1 -1
- package/dist/components/cascade/style.d.ts +1 -3
- package/dist/components/cascade/style2.css +16 -0
- package/dist/components/check-tag/check-tag.js +11 -5
- package/dist/components/check-tag/check-tag.js.map +1 -1
- package/dist/components/check-tag/style2.css +10 -0
- package/dist/components/checkbox/checkbox-button.js +8 -3
- package/dist/components/checkbox/checkbox-button.js.map +1 -1
- package/dist/components/checkbox/checkbox.js +6 -16
- package/dist/components/checkbox/checkbox.js.map +1 -1
- package/dist/components/checkbox/style.d.ts +1 -1
- package/dist/components/checkbox/style.js +0 -1
- package/dist/components/checkbox/style2.css +32 -2
- package/dist/components/checkbox-group/style.d.ts +1 -1
- package/dist/components/chip/chip.js +63 -0
- package/dist/components/chip/chip.js.map +1 -0
- package/dist/components/chip/style.d.ts +1 -0
- package/dist/components/chip/style.js +1 -0
- package/dist/components/chip/style2.css +94 -0
- package/dist/components/chip-group/chip-group.js +279 -0
- package/dist/components/chip-group/chip-group.js.map +1 -0
- package/dist/components/chip-group/reveal.js +80 -0
- package/dist/components/chip-group/reveal.js.map +1 -0
- package/dist/components/chip-group/style.d.ts +1 -0
- package/dist/components/chip-group/style.js +2 -0
- package/dist/components/chip-group/style2.css +68 -0
- package/dist/components/code-editor/code-editor.js +26 -3
- package/dist/components/code-editor/code-editor.js.map +1 -1
- package/dist/components/code-editor/style2.css +38 -3
- package/dist/components/collapse/collapse-item.js +4 -1
- package/dist/components/collapse/collapse-item.js.map +1 -1
- package/dist/components/collapse/collapse.js +1 -1
- package/dist/components/collapse/collapse.js.map +1 -1
- package/dist/components/collapse/style2.css +6 -3
- package/dist/components/condition-editor/style.d.ts +0 -1
- package/dist/components/condition-editor/style2.css +24 -6
- package/dist/components/contextmenu/contextmenu-sub.js +13 -7
- package/dist/components/contextmenu/contextmenu-sub.js.map +1 -1
- package/dist/components/contextmenu/style2.css +14 -1
- package/dist/components/date-panel/style2.css +9 -1
- package/dist/components/date-picker/style.d.ts +1 -2
- package/dist/components/date-range-picker/date-range-picker.js +14 -20
- package/dist/components/date-range-picker/date-range-picker.js.map +1 -1
- package/dist/components/dialog/dialog.js +5 -2
- package/dist/components/dialog/dialog.js.map +1 -1
- package/dist/components/dialog/style2.css +5 -11
- package/dist/components/dialog/use-maximum.js +83 -20
- package/dist/components/dialog/use-maximum.js.map +1 -1
- package/dist/components/drawer/style2.css +8 -4
- package/dist/components/dual-nav/style2.css +5 -2
- package/dist/components/expression-editor/style2.css +17 -5
- package/dist/components/file-viewer/style2.css +8 -2
- package/dist/components/float-button/float-button.js +1 -1
- package/dist/components/float-button/float-button.js.map +1 -1
- package/dist/components/float-button/style2.css +2 -3
- package/dist/components/form-item/style2.css +13 -1
- package/dist/components/grid-input/style2.css +15 -3
- package/dist/components/group-nav/style2.css +16 -7
- package/dist/components/icon/style2.css +1 -1
- package/dist/components/image-cropper/style2.css +4 -1
- package/dist/components/image-previewer/image-previewer.js +14 -2
- package/dist/components/image-previewer/image-previewer.js.map +1 -1
- package/dist/components/image-previewer/style.d.ts +1 -1
- package/dist/components/image-previewer/style.js +1 -0
- package/dist/components/image-previewer/style2.css +9 -14
- package/dist/components/index.d.ts +32 -30
- package/dist/components/index.js +63 -59
- package/dist/components/index.js.map +1 -1
- package/dist/components/input/input.js.map +1 -1
- package/dist/components/input/input.vue_vue_type_script_setup_true_lang.js +13 -19
- package/dist/components/input/input.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/input/style.d.ts +1 -1
- package/dist/components/input/style.js +0 -1
- package/dist/components/input/style2.css +13 -1
- package/dist/components/kanban/kanban-column.js +1 -0
- package/dist/components/kanban/kanban-column.js.map +1 -1
- package/dist/components/kanban/style2.css +6 -2
- package/dist/components/layout/layout-resizer.js +8 -1
- package/dist/components/layout/layout-resizer.js.map +1 -1
- package/dist/components/layout/layout.js +11 -1
- package/dist/components/layout/layout.js.map +1 -1
- package/dist/components/layout/style2.css +22 -0
- package/dist/components/loading/style2.css +26 -7
- package/dist/components/message/style2.css +31 -2
- package/dist/components/message-confirm/style2.css +21 -0
- package/dist/components/multi-select/multi-select.js +33 -36
- package/dist/components/multi-select/multi-select.js.map +1 -1
- package/dist/components/multi-select/style.d.ts +1 -4
- package/dist/components/multi-select/style.js +0 -1
- package/dist/components/multi-select/style2.css +13 -0
- package/dist/components/multi-tree-select/multi-tree-select.js +10 -19
- package/dist/components/multi-tree-select/multi-tree-select.js.map +1 -1
- package/dist/components/multi-tree-select/style.d.ts +1 -5
- package/dist/components/multi-tree-select/style.js +0 -1
- package/dist/components/nav/nav-sub.js +62 -51
- package/dist/components/nav/nav-sub.js.map +1 -1
- package/dist/components/nav/style2.css +50 -26
- package/dist/components/notification/notification-box.js +4 -2
- package/dist/components/notification/notification-box.js.map +1 -1
- package/dist/components/notification/style2.css +37 -0
- package/dist/components/number-input/style.d.ts +0 -1
- package/dist/components/number-input/style2.css +5 -2
- package/dist/components/paginator/style2.css +1 -0
- package/dist/components/palette/style.d.ts +1 -2
- package/dist/components/password-input/style.d.ts +1 -1
- package/dist/components/password-input/style2.css +10 -1
- package/dist/components/pop-confirm/pop-confirm.js +1 -1
- package/dist/components/pop-confirm/pop-confirm.js.map +1 -1
- package/dist/components/progress/style2.css +2 -2
- package/dist/components/progress-nodes/style2.css +3 -3
- package/dist/components/radio/radio.js +2 -8
- package/dist/components/radio/radio.js.map +1 -1
- package/dist/components/radio/style.d.ts +1 -1
- package/dist/components/radio/style.js +0 -1
- package/dist/components/radio/style2.css +11 -1
- package/dist/components/radio-group/style.d.ts +1 -1
- package/dist/components/rate/style2.css +7 -0
- package/dist/components/rich-text-editor/style2.css +6 -3
- package/dist/components/scroll/style2.css +27 -13
- package/dist/components/segment/segment.js +54 -3
- package/dist/components/segment/segment.js.map +1 -1
- package/dist/components/segment/style2.css +26 -2
- package/dist/components/select/select.js +29 -26
- package/dist/components/select/select.js.map +1 -1
- package/dist/components/select/style.d.ts +0 -1
- package/dist/components/select/style2.css +11 -1
- package/dist/components/steps/style2.css +21 -2
- package/dist/components/switch/style2.css +10 -2
- package/dist/components/table/style.d.ts +1 -3
- package/dist/components/table/style2.css +20 -7
- package/dist/components/tabs/style.d.ts +1 -2
- package/dist/components/tabs/style.js +0 -1
- package/dist/components/tabs/style2.css +37 -2
- package/dist/components/tabs/tabs-horizontal.js +7 -3
- package/dist/components/tabs/tabs-horizontal.js.map +1 -1
- package/dist/components/tabs/tabs.js +2 -8
- package/dist/components/tabs/tabs.js.map +1 -1
- package/dist/components/tabs/use-tabs-bar.js +41 -9
- package/dist/components/tabs/use-tabs-bar.js.map +1 -1
- package/dist/components/tag/style2.css +19 -10
- package/dist/components/textarea/style.d.ts +1 -1
- package/dist/components/textarea/style.js +0 -1
- package/dist/components/textarea/style2.css +9 -1
- package/dist/components/textarea/textarea.js +7 -13
- package/dist/components/textarea/textarea.js.map +1 -1
- package/dist/components/theme/style.d.ts +0 -1
- package/dist/components/theme/style2.css +43 -30
- package/dist/components/time-picker/style.d.ts +1 -2
- package/dist/components/time-picker/style2.css +4 -1
- package/dist/components/tip/style2.css +16 -5
- package/dist/components/tip/tip.js +22 -1
- package/dist/components/tip/tip.js.map +1 -1
- package/dist/components/transfer/style.d.ts +1 -2
- package/dist/components/transfer/style2.css +21 -1
- package/dist/components/transfer/transfer-list.js +20 -17
- package/dist/components/transfer/transfer-list.js.map +1 -1
- package/dist/components/tree/style.d.ts +1 -1
- package/dist/components/tree/style2.css +5 -2
- package/dist/components/tree-select/style.d.ts +1 -3
- package/dist/components/tree-select/tree-select.js +24 -25
- package/dist/components/tree-select/tree-select.js.map +1 -1
- package/dist/index.d.ts +86 -82
- package/dist/index.js +84 -82
- package/dist/style.d.ts +0 -8
- package/dist/style.js +2 -0
- package/dist/types/chip-group.d.ts +35 -0
- package/dist/types/chip.d.ts +28 -0
- package/dist/types/index.d.ts +3 -1
- package/package.json +1 -1
- package/src/components/alert/alert.vue +18 -16
- package/src/components/alert/style.scss +9 -1
- package/src/components/alert/style.ts +1 -0
- package/src/components/auto-complete/style.scss +3 -0
- package/src/components/back-top/style.scss +17 -3
- package/src/components/badge/badge.vue +6 -7
- package/src/components/badge/style.scss +20 -1
- package/src/components/batch-edit/__test__/batch-edit.test.ts +10 -0
- package/src/components/batch-edit/batch-edit-form.vue +95 -83
- package/src/components/batch-edit/batch-edit.vue +18 -3
- package/src/components/batch-edit/style.scss +39 -3
- package/src/components/breadcrumb/style.scss +5 -1
- package/src/components/button/style.scss +4 -2
- package/src/components/carousel/carousel.vue +8 -2
- package/src/components/carousel/style.scss +10 -1
- package/src/components/carousel/use-carousel.ts +17 -2
- package/src/components/cascade/cascade.vue +9 -11
- package/src/components/cascade/style.scss +27 -0
- package/src/components/check-tag/check-tag.vue +13 -3
- package/src/components/check-tag/style.scss +21 -0
- package/src/components/checkbox/checkbox-button.vue +11 -1
- package/src/components/checkbox/checkbox.vue +10 -8
- package/src/components/checkbox/style.scss +51 -2
- package/src/components/checkbox/style.ts +0 -1
- package/src/components/chip/__test__/chip.test.ts +69 -0
- package/src/components/chip/chip.vue +54 -0
- package/src/components/chip/index.ts +1 -0
- package/src/components/chip/style.scss +102 -0
- package/src/components/chip/style.ts +1 -0
- package/src/components/chip-group/__test__/chip-group.test.ts +411 -0
- package/src/components/chip-group/__test__/reveal.test.ts +74 -0
- package/src/components/chip-group/chip-group.vue +326 -0
- package/src/components/chip-group/index.ts +1 -0
- package/src/components/chip-group/reveal.ts +106 -0
- package/src/components/chip-group/style.scss +72 -0
- package/src/components/chip-group/style.ts +2 -0
- package/src/components/code-editor/code-editor.vue +24 -3
- package/src/components/code-editor/style.scss +54 -4
- package/src/components/collapse/collapse-item.vue +10 -1
- package/src/components/collapse/collapse.vue +3 -1
- package/src/components/collapse/style.scss +10 -7
- package/src/components/condition-editor/style.scss +39 -12
- package/src/components/contextmenu/contextmenu-sub.vue +9 -7
- package/src/components/contextmenu/style.scss +17 -1
- package/src/components/date-panel/style.scss +22 -1
- package/src/components/date-range-picker/date-range-picker.vue +10 -12
- package/src/components/dialog/dialog.vue +2 -1
- package/src/components/dialog/style.scss +6 -13
- package/src/components/dialog/use-maximum.ts +95 -27
- package/src/components/drawer/style.scss +6 -1
- package/src/components/dual-nav/style.scss +9 -4
- package/src/components/expression-editor/style.scss +27 -9
- package/src/components/file-viewer/style.scss +12 -2
- package/src/components/float-button/float-button.vue +1 -1
- package/src/components/float-button/style.scss +4 -3
- package/src/components/form-item/style.scss +16 -2
- package/src/components/grid-input/style.scss +6 -1
- package/src/components/group-nav/style.scss +30 -13
- package/src/components/icon/style.scss +2 -1
- package/src/components/image-cropper/style.scss +6 -1
- package/src/components/image-previewer/image-previewer.vue +20 -2
- package/src/components/image-previewer/style.scss +17 -14
- package/src/components/image-previewer/style.ts +1 -0
- package/src/components/index.ts +4 -0
- package/src/components/input/input.vue +8 -16
- package/src/components/input/style.scss +19 -1
- package/src/components/input/style.ts +0 -1
- package/src/components/kanban/kanban-column.vue +2 -0
- package/src/components/kanban/style.scss +11 -2
- package/src/components/layout/__test__/layout.test.ts +135 -0
- package/src/components/layout/layout-resizer.vue +8 -1
- package/src/components/layout/layout.vue +17 -1
- package/src/components/layout/style.scss +31 -6
- package/src/components/loading/style.scss +39 -8
- package/src/components/message/style.scss +35 -2
- package/src/components/message-confirm/style.scss +27 -0
- package/src/components/multi-select/multi-select.vue +21 -20
- package/src/components/multi-select/style.scss +14 -0
- package/src/components/multi-select/style.ts +0 -1
- package/src/components/multi-tree-select/__test__/multi-tree-select.test.ts +4 -2
- package/src/components/multi-tree-select/multi-tree-select.vue +8 -10
- package/src/components/multi-tree-select/style.ts +0 -1
- package/src/components/nav/nav-sub.vue +30 -11
- package/src/components/nav/style.scss +37 -13
- package/src/components/notification/notification-box.vue +5 -2
- package/src/components/notification/style.scss +31 -0
- package/src/components/number-input/style.scss +8 -2
- package/src/components/paginator/style.scss +3 -0
- package/src/components/password-input/style.scss +15 -1
- package/src/components/pop-confirm/pop-confirm.vue +1 -1
- package/src/components/progress/style.scss +3 -3
- package/src/components/progress-nodes/style.scss +5 -5
- package/src/components/radio/radio.vue +1 -3
- package/src/components/radio/style.scss +19 -1
- package/src/components/radio/style.ts +0 -1
- package/src/components/rate/style.scss +9 -0
- package/src/components/rich-text-editor/style.scss +13 -3
- package/src/components/scroll/style.scss +39 -20
- package/src/components/segment/segment.vue +56 -2
- package/src/components/segment/style.scss +32 -2
- package/src/components/select/select.vue +25 -20
- package/src/components/select/style.scss +22 -1
- package/src/components/steps/style.scss +27 -5
- package/src/components/switch/style.scss +16 -2
- package/src/components/table/style.scss +44 -20
- package/src/components/tabs/style.scss +50 -2
- package/src/components/tabs/style.ts +0 -1
- package/src/components/tabs/tabs-horizontal.vue +2 -1
- package/src/components/tabs/tabs.vue +4 -6
- package/src/components/tabs/use-tabs-bar.ts +55 -8
- package/src/components/tag/style.scss +22 -5
- package/src/components/textarea/style.scss +15 -2
- package/src/components/textarea/style.ts +0 -1
- package/src/components/textarea/textarea.vue +7 -9
- package/src/components/theme/style.scss +73 -31
- package/src/components/time-picker/style.scss +9 -1
- package/src/components/tip/style.scss +18 -5
- package/src/components/tip/tip.vue +33 -1
- package/src/components/transfer/style.scss +31 -1
- package/src/components/transfer/transfer-list.vue +18 -15
- package/src/components/tree/style.scss +8 -3
- package/src/components/tree-select/tree-select.vue +21 -17
- package/src/style.ts +2 -0
- package/src/types/chip-group.ts +36 -0
- package/src/types/chip.ts +29 -0
- package/src/types/index.ts +2 -0
|
@@ -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:
|
|
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
|
-
|
|
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
|
-
|
|
169
|
-
|
|
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
|
|
|
@@ -48,6 +48,12 @@ $root-name: switch;
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
&:active {
|
|
52
|
+
@include m.bem($root-name, button) {
|
|
53
|
+
transform: scale(0.98);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
51
57
|
// label 不可聚焦,ring 由视觉隐藏的原生 input 驱动
|
|
52
58
|
#{fn.bem($root-name, native)}:focus-visible ~ #{fn.bem($root-name, button)} {
|
|
53
59
|
box-shadow: fn.use-var(focus-ring);
|
|
@@ -82,7 +88,11 @@ $root-name: switch;
|
|
|
82
88
|
border-radius: 100px;
|
|
83
89
|
background-color: fn.use-var(bg-color, bottom);
|
|
84
90
|
border: 1px solid fn.use-var(border, muted-color);
|
|
85
|
-
transition:
|
|
91
|
+
transition:
|
|
92
|
+
background-color fn.use-var(transition, fast) fn.use-var(transition, ease),
|
|
93
|
+
border-color fn.use-var(transition, fast) fn.use-var(transition, ease),
|
|
94
|
+
box-shadow fn.use-var(transition, fast) fn.use-var(transition, ease),
|
|
95
|
+
transform fn.use-var(transition, fast) fn.use-var(transition, ease-out);
|
|
86
96
|
padding: 2px;
|
|
87
97
|
flex-shrink: 0;
|
|
88
98
|
}
|
|
@@ -91,9 +101,13 @@ $root-name: switch;
|
|
|
91
101
|
display: block;
|
|
92
102
|
background-color: fn.use-var(bg-color, top);
|
|
93
103
|
border-radius: 50%;
|
|
94
|
-
box-shadow:
|
|
104
|
+
box-shadow: fn.use-var(shadow, sm);
|
|
95
105
|
transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
96
106
|
pointer-events: none;
|
|
107
|
+
|
|
108
|
+
@media (prefers-reduced-motion: reduce) {
|
|
109
|
+
transition: none;
|
|
110
|
+
}
|
|
97
111
|
}
|
|
98
112
|
|
|
99
113
|
@include m.e(text) {
|
|
@@ -90,7 +90,7 @@ $root-name: table;
|
|
|
90
90
|
margin-right: fn.use-var(gap, small);
|
|
91
91
|
|
|
92
92
|
& > i {
|
|
93
|
-
transition: transform
|
|
93
|
+
transition: transform fn.use-var(transition, normal) fn.use-var(transition, ease);
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
|
|
@@ -121,7 +121,8 @@ $root-name: table;
|
|
|
121
121
|
@include m.e(head) {
|
|
122
122
|
position: sticky;
|
|
123
123
|
top: 0;
|
|
124
|
-
z-index: 1
|
|
124
|
+
// 高于固定列单元格(z-index: 1):否则竖向滚动时固定列按 DOM 序反超、盖住表头
|
|
125
|
+
z-index: 2;
|
|
125
126
|
user-select: none;
|
|
126
127
|
|
|
127
128
|
@include m.bem($root-name, cell) {
|
|
@@ -147,6 +148,13 @@ $root-name: table;
|
|
|
147
148
|
right: 0px;
|
|
148
149
|
top: 0;
|
|
149
150
|
cursor: col-resize;
|
|
151
|
+
transition: background-color fn.use-var(transition, fast) fn.use-var(transition, ease);
|
|
152
|
+
|
|
153
|
+
// 悬浮/按压给出一侧指示条,弥补仅有 cursor 的弱交互暗示
|
|
154
|
+
&:hover,
|
|
155
|
+
&:active {
|
|
156
|
+
background-color: fn.use-var(color, primary);
|
|
157
|
+
}
|
|
150
158
|
}
|
|
151
159
|
|
|
152
160
|
@include m.e(resize-line) {
|
|
@@ -160,8 +168,6 @@ $root-name: table;
|
|
|
160
168
|
}
|
|
161
169
|
|
|
162
170
|
@include m.e(body) {
|
|
163
|
-
will-change: transform;
|
|
164
|
-
|
|
165
171
|
@include m.bem($root-name, row) {
|
|
166
172
|
&:last-child {
|
|
167
173
|
@include m.bem($root-name, cell) {
|
|
@@ -184,6 +190,8 @@ $root-name: table;
|
|
|
184
190
|
position: sticky;
|
|
185
191
|
left: 0;
|
|
186
192
|
bottom: 0;
|
|
193
|
+
// 同表头:高于固定列单元格,防竖向滚动时被盖
|
|
194
|
+
z-index: 2;
|
|
187
195
|
|
|
188
196
|
// 表脚与表体之间的分隔线,使用负边距避免叠加
|
|
189
197
|
@include m.bem($root-name, cell) {
|
|
@@ -201,6 +209,8 @@ $root-name: table;
|
|
|
201
209
|
|
|
202
210
|
position: relative;
|
|
203
211
|
line-height: 1;
|
|
212
|
+
// 行 hover / 条纹 / 选中态之间切换背景色时的平滑过渡
|
|
213
|
+
transition: background-color fn.use-var(transition, fast) fn.use-var(transition, ease);
|
|
204
214
|
|
|
205
215
|
@each $position in (left, center, right) {
|
|
206
216
|
@include m.is($position) {
|
|
@@ -214,31 +224,45 @@ $root-name: table;
|
|
|
214
224
|
}
|
|
215
225
|
|
|
216
226
|
@include m.is(fixed-left) {
|
|
227
|
+
// 阴影伪元素恒渲染 + opacity 过渡:滚动触达时由 last-fixed 类只切透明度,
|
|
228
|
+
// 避免伪元素挂载/卸载导致阴影瞬现瞬灭。
|
|
229
|
+
&::after {
|
|
230
|
+
content: '';
|
|
231
|
+
position: absolute;
|
|
232
|
+
right: -10px;
|
|
233
|
+
top: 0;
|
|
234
|
+
width: 10px;
|
|
235
|
+
height: 100%;
|
|
236
|
+
pointer-events: none;
|
|
237
|
+
box-shadow: 10px 0 10px -10px fn.use-var(shadow-color) inset;
|
|
238
|
+
opacity: 0;
|
|
239
|
+
transition: opacity fn.use-var(transition, fast) fn.use-var(transition, ease);
|
|
240
|
+
}
|
|
241
|
+
|
|
217
242
|
@include m.is(last-fixed) {
|
|
218
243
|
&::after {
|
|
219
|
-
|
|
220
|
-
position: absolute;
|
|
221
|
-
right: -10px;
|
|
222
|
-
top: 0;
|
|
223
|
-
width: 10px;
|
|
224
|
-
height: 100%;
|
|
225
|
-
pointer-events: none;
|
|
226
|
-
box-shadow: 10px 0 10px -10px fn.use-var(shadow-color) inset;
|
|
244
|
+
opacity: 1;
|
|
227
245
|
}
|
|
228
246
|
}
|
|
229
247
|
}
|
|
230
248
|
|
|
231
249
|
@include m.is(fixed-right) {
|
|
250
|
+
&::before {
|
|
251
|
+
content: '';
|
|
252
|
+
position: absolute;
|
|
253
|
+
left: -10px;
|
|
254
|
+
top: 0;
|
|
255
|
+
width: 10px;
|
|
256
|
+
height: 100%;
|
|
257
|
+
pointer-events: none;
|
|
258
|
+
box-shadow: -10px 0 10px -10px fn.use-var(shadow-color) inset;
|
|
259
|
+
opacity: 0;
|
|
260
|
+
transition: opacity fn.use-var(transition, fast) fn.use-var(transition, ease);
|
|
261
|
+
}
|
|
262
|
+
|
|
232
263
|
@include m.is(first-fixed) {
|
|
233
264
|
&::before {
|
|
234
|
-
|
|
235
|
-
position: absolute;
|
|
236
|
-
left: -10px;
|
|
237
|
-
top: 0;
|
|
238
|
-
width: 10px;
|
|
239
|
-
height: 100%;
|
|
240
|
-
pointer-events: none;
|
|
241
|
-
box-shadow: -10px 0 10px -10px fn.use-var(shadow-color) inset;
|
|
265
|
+
opacity: 1;
|
|
242
266
|
}
|
|
243
267
|
}
|
|
244
268
|
}
|
|
@@ -116,7 +116,12 @@ $active-shadow: fn.use-var(shadow, sm);
|
|
|
116
116
|
transition:
|
|
117
117
|
color 0.22s cubic-bezier(0.4, 0, 0.2, 1),
|
|
118
118
|
background-color 0.22s cubic-bezier(0.4, 0, 0.2, 1),
|
|
119
|
-
box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1)
|
|
119
|
+
box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1),
|
|
120
|
+
transform fn.use-var(transition, fast) fn.use-var(transition, ease-out);
|
|
121
|
+
|
|
122
|
+
&:active:not(.is-disabled) {
|
|
123
|
+
transform: scale(0.97);
|
|
124
|
+
}
|
|
120
125
|
|
|
121
126
|
@include m.is-not(active, disabled) {
|
|
122
127
|
&:hover {
|
|
@@ -229,7 +234,8 @@ $active-shadow: fn.use-var(shadow, sm);
|
|
|
229
234
|
color 0.2s ease,
|
|
230
235
|
background-color 0.2s ease,
|
|
231
236
|
box-shadow 0.2s ease,
|
|
232
|
-
opacity 0.2s ease
|
|
237
|
+
opacity 0.2s ease,
|
|
238
|
+
transform fn.use-var(transition, fast) fn.use-var(transition, ease-out);
|
|
233
239
|
|
|
234
240
|
&:hover:not(:disabled) {
|
|
235
241
|
color: fn.use-var(text-color, title);
|
|
@@ -237,6 +243,10 @@ $active-shadow: fn.use-var(shadow, sm);
|
|
|
237
243
|
box-shadow: $active-shadow;
|
|
238
244
|
}
|
|
239
245
|
|
|
246
|
+
&:active:not(:disabled) {
|
|
247
|
+
transform: scale(0.95);
|
|
248
|
+
}
|
|
249
|
+
|
|
240
250
|
&:disabled {
|
|
241
251
|
cursor: not-allowed;
|
|
242
252
|
opacity: 0.4;
|
|
@@ -273,6 +283,10 @@ $active-shadow: fn.use-var(shadow, sm);
|
|
|
273
283
|
@include m.bem(tabs-bar, nav) {
|
|
274
284
|
border-radius: 9999px;
|
|
275
285
|
}
|
|
286
|
+
|
|
287
|
+
@include m.bem(tabs-bar, indicator) {
|
|
288
|
+
border-radius: 9999px;
|
|
289
|
+
}
|
|
276
290
|
}
|
|
277
291
|
|
|
278
292
|
@include m.m(horizontal) {
|
|
@@ -280,4 +294,38 @@ $active-shadow: fn.use-var(shadow, sm);
|
|
|
280
294
|
border-radius: 9999px;
|
|
281
295
|
}
|
|
282
296
|
}
|
|
297
|
+
|
|
298
|
+
@include m.m(horizontal) {
|
|
299
|
+
@include m.bem(tabs-bar, list) {
|
|
300
|
+
position: relative;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
@include m.bem(tabs-bar, indicator) {
|
|
304
|
+
position: absolute;
|
|
305
|
+
left: 0;
|
|
306
|
+
top: 0;
|
|
307
|
+
z-index: 0;
|
|
308
|
+
pointer-events: none;
|
|
309
|
+
border-radius: $item-radius;
|
|
310
|
+
background-color: $active-bg;
|
|
311
|
+
box-shadow: $active-shadow;
|
|
312
|
+
// 宽度(激活项宽窄变化)与位移同曲线过渡,避免 width 内联直变导致的瞬跳
|
|
313
|
+
transition:
|
|
314
|
+
transform 200ms cubic-bezier(0.77, 0, 0.175, 1),
|
|
315
|
+
width 200ms cubic-bezier(0.77, 0, 0.175, 1);
|
|
316
|
+
|
|
317
|
+
@media (prefers-reduced-motion: reduce) {
|
|
318
|
+
transition: none;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
@include m.bem(tabs-bar, item) {
|
|
323
|
+
z-index: 1;
|
|
324
|
+
|
|
325
|
+
@include m.is(active) {
|
|
326
|
+
background-color: transparent;
|
|
327
|
+
box-shadow: none;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
}
|
|
283
331
|
}
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
<div ref="viewportRef" :class="cls.e('viewport')">
|
|
23
23
|
<div ref="listRef" :class="cls.e('list')">
|
|
24
|
+
<div :class="cls.e('indicator')" :style="indicatorStyle" aria-hidden="true" />
|
|
24
25
|
<button
|
|
25
26
|
type="button"
|
|
26
27
|
role="tab"
|
|
@@ -99,7 +100,7 @@ const listRef = shallowRef<HTMLElement>()
|
|
|
99
100
|
|
|
100
101
|
const itemsRef = computed(() => props.items)
|
|
101
102
|
|
|
102
|
-
const { showNav, canPrev, canNext, scrollByStep } = useTabsBar({
|
|
103
|
+
const { showNav, canPrev, canNext, scrollByStep, indicatorStyle } = useTabsBar({
|
|
103
104
|
viewportRef,
|
|
104
105
|
listRef,
|
|
105
106
|
items: itemsRef,
|
|
@@ -24,12 +24,10 @@
|
|
|
24
24
|
@close="onClose"
|
|
25
25
|
/>
|
|
26
26
|
|
|
27
|
-
<
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<component v-else :key="model" :is="renderSlots()" />
|
|
32
|
-
</transition>
|
|
27
|
+
<KeepAlive v-if="keepAlive">
|
|
28
|
+
<component :key="model" :is="renderSlots()" />
|
|
29
|
+
</KeepAlive>
|
|
30
|
+
<component v-else :key="model" :is="renderSlots()" />
|
|
33
31
|
</div>
|
|
34
32
|
</template>
|
|
35
33
|
|
|
@@ -6,9 +6,11 @@ import {
|
|
|
6
6
|
scrollViewportByStep
|
|
7
7
|
} from '@veltra/utils'
|
|
8
8
|
import {
|
|
9
|
+
type CSSProperties,
|
|
9
10
|
type ModelRef,
|
|
10
11
|
type Ref,
|
|
11
12
|
type ShallowRef,
|
|
13
|
+
computed,
|
|
12
14
|
nextTick,
|
|
13
15
|
onBeforeUnmount,
|
|
14
16
|
onMounted,
|
|
@@ -61,15 +63,41 @@ export function useTabsBar(options: UseTabsBarOptions) {
|
|
|
61
63
|
const vp = viewportRef.value
|
|
62
64
|
const list = listRef.value
|
|
63
65
|
if (!vp || !list) return
|
|
64
|
-
const
|
|
65
|
-
if (!activeKey) return
|
|
66
|
-
const activeIndex = items.value.findIndex((i) => i.key === activeKey)
|
|
67
|
-
if (activeIndex < 0) return
|
|
68
|
-
const el = list.children[activeIndex] as HTMLElement | undefined
|
|
66
|
+
const el = list.querySelector<HTMLElement>('[role="tab"].is-active')
|
|
69
67
|
if (!el) return
|
|
70
68
|
scrollElementIntoView(vp, el)
|
|
71
69
|
}
|
|
72
70
|
|
|
71
|
+
const indicatorX = shallowRef(0)
|
|
72
|
+
const indicatorY = shallowRef(0)
|
|
73
|
+
const indicatorW = shallowRef(0)
|
|
74
|
+
const indicatorH = shallowRef(0)
|
|
75
|
+
const indicatorOn = shallowRef(false)
|
|
76
|
+
|
|
77
|
+
const indicatorStyle = computed<CSSProperties>(() => ({
|
|
78
|
+
width: `${indicatorW.value}px`,
|
|
79
|
+
height: `${indicatorH.value}px`,
|
|
80
|
+
transform: `translate(${indicatorX.value}px, ${indicatorY.value}px)`,
|
|
81
|
+
opacity: indicatorOn.value ? '1' : '0'
|
|
82
|
+
}))
|
|
83
|
+
|
|
84
|
+
function measureIndicator() {
|
|
85
|
+
const list = listRef.value
|
|
86
|
+
if (!list) return
|
|
87
|
+
const el = list.querySelector<HTMLElement>('[role="tab"].is-active')
|
|
88
|
+
if (!el) {
|
|
89
|
+
indicatorOn.value = false
|
|
90
|
+
return
|
|
91
|
+
}
|
|
92
|
+
const listBox = list.getBoundingClientRect()
|
|
93
|
+
const box = el.getBoundingClientRect()
|
|
94
|
+
indicatorX.value = box.left - listBox.left
|
|
95
|
+
indicatorY.value = box.top - listBox.top
|
|
96
|
+
indicatorW.value = box.width
|
|
97
|
+
indicatorH.value = box.height
|
|
98
|
+
indicatorOn.value = true
|
|
99
|
+
}
|
|
100
|
+
|
|
73
101
|
/** 鼠标滚轮(纵向)驱动水平滚动;触控板横滑(已有 deltaX)不拦截 */
|
|
74
102
|
const handleWheel = (e: WheelEvent) => {
|
|
75
103
|
const vp = viewportRef.value
|
|
@@ -77,11 +105,18 @@ export function useTabsBar(options: UseTabsBarOptions) {
|
|
|
77
105
|
applyWheelHorizontalScroll(e, vp, showNav.value)
|
|
78
106
|
}
|
|
79
107
|
|
|
80
|
-
useResizeObserver({
|
|
108
|
+
useResizeObserver({
|
|
109
|
+
targets: [viewportRef, listRef],
|
|
110
|
+
onResize: () => {
|
|
111
|
+
updateNavState()
|
|
112
|
+
measureIndicator()
|
|
113
|
+
}
|
|
114
|
+
})
|
|
81
115
|
|
|
82
116
|
watch(model, async () => {
|
|
83
117
|
await nextTick()
|
|
84
118
|
ensureActiveVisible()
|
|
119
|
+
measureIndicator()
|
|
85
120
|
})
|
|
86
121
|
|
|
87
122
|
watch(
|
|
@@ -90,6 +125,7 @@ export function useTabsBar(options: UseTabsBarOptions) {
|
|
|
90
125
|
await nextTick()
|
|
91
126
|
updateNavState()
|
|
92
127
|
ensureActiveVisible()
|
|
128
|
+
measureIndicator()
|
|
93
129
|
},
|
|
94
130
|
{ deep: false }
|
|
95
131
|
)
|
|
@@ -100,7 +136,10 @@ export function useTabsBar(options: UseTabsBarOptions) {
|
|
|
100
136
|
vp.addEventListener('wheel', handleWheel, { passive: false })
|
|
101
137
|
vp.addEventListener('scroll', updateNavState, { passive: true })
|
|
102
138
|
updateNavState()
|
|
103
|
-
nextTick(
|
|
139
|
+
nextTick(() => {
|
|
140
|
+
ensureActiveVisible()
|
|
141
|
+
measureIndicator()
|
|
142
|
+
})
|
|
104
143
|
})
|
|
105
144
|
|
|
106
145
|
onBeforeUnmount(() => {
|
|
@@ -110,5 +149,13 @@ export function useTabsBar(options: UseTabsBarOptions) {
|
|
|
110
149
|
vp.removeEventListener('scroll', updateNavState)
|
|
111
150
|
})
|
|
112
151
|
|
|
113
|
-
return {
|
|
152
|
+
return {
|
|
153
|
+
showNav,
|
|
154
|
+
canPrev,
|
|
155
|
+
canNext,
|
|
156
|
+
updateNavState,
|
|
157
|
+
scrollByStep,
|
|
158
|
+
ensureActiveVisible,
|
|
159
|
+
indicatorStyle
|
|
160
|
+
}
|
|
114
161
|
}
|
|
@@ -14,8 +14,8 @@ $root-name: tag;
|
|
|
14
14
|
border: 1px solid fn.use-var(text-color, main);
|
|
15
15
|
@include m.flex(inline-flex, flex-start, center);
|
|
16
16
|
|
|
17
|
-
//
|
|
18
|
-
animation: tag-zoom-in 0.25s cubic-bezier(0.
|
|
17
|
+
// 进入动画:从 0.96 淡入,不从 0 放大
|
|
18
|
+
animation: tag-zoom-in 0.25s cubic-bezier(0.23, 1, 0.32, 1);
|
|
19
19
|
|
|
20
20
|
@include m.e(content) {
|
|
21
21
|
overflow: hidden;
|
|
@@ -28,6 +28,23 @@ $root-name: tag;
|
|
|
28
28
|
cursor: pointer;
|
|
29
29
|
flex-shrink: 0;
|
|
30
30
|
border-radius: 50%;
|
|
31
|
+
// 默认透明边框占位,hover 只变边框色,避免凭空加边框引起的布局抖动
|
|
32
|
+
border: 1px solid transparent;
|
|
33
|
+
transition:
|
|
34
|
+
border-color fn.use-var(transition, fast) fn.use-var(transition, ease),
|
|
35
|
+
background-color fn.use-var(transition, fast) fn.use-var(transition, ease),
|
|
36
|
+
transform fn.use-var(transition, fast) fn.use-var(transition, ease-out);
|
|
37
|
+
|
|
38
|
+
// 中性底色 hover,无 type 的默认标签也有可见反馈
|
|
39
|
+
&:hover {
|
|
40
|
+
background-color: fn.color-a(text-color, 8, title);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// 点击即移除标签,过渡来不及显示——按下瞬间缩到位,松手回弹才走过渡
|
|
44
|
+
&:active {
|
|
45
|
+
transform: scale(0.92);
|
|
46
|
+
transition-duration: 0s;
|
|
47
|
+
}
|
|
31
48
|
}
|
|
32
49
|
|
|
33
50
|
@include m.size using ($size) {
|
|
@@ -63,7 +80,7 @@ $root-name: tag;
|
|
|
63
80
|
|
|
64
81
|
@include m.bem($root-name, icon-close) {
|
|
65
82
|
&:hover {
|
|
66
|
-
border:
|
|
83
|
+
border-color: fn.use-var(color, $type);
|
|
67
84
|
// background-color: #ddd;
|
|
68
85
|
}
|
|
69
86
|
}
|
|
@@ -75,11 +92,11 @@ $root-name: tag;
|
|
|
75
92
|
@keyframes tag-zoom-in {
|
|
76
93
|
0% {
|
|
77
94
|
opacity: 0;
|
|
78
|
-
transform:
|
|
95
|
+
transform: scale(0.96);
|
|
79
96
|
}
|
|
80
97
|
|
|
81
98
|
100% {
|
|
82
99
|
opacity: 1;
|
|
83
|
-
transform:
|
|
100
|
+
transform: scale(1);
|
|
84
101
|
}
|
|
85
102
|
}
|
|
@@ -10,8 +10,8 @@ $root-name: textarea;
|
|
|
10
10
|
border: fn.use-var(border-muted);
|
|
11
11
|
box-shadow: fn.use-var(shadow, emboss);
|
|
12
12
|
transition:
|
|
13
|
-
border-color
|
|
14
|
-
box-shadow
|
|
13
|
+
border-color fn.use-var(transition, fast) fn.use-var(transition, ease),
|
|
14
|
+
box-shadow fn.use-var(transition, fast) fn.use-var(transition, ease);
|
|
15
15
|
overflow: hidden;
|
|
16
16
|
vertical-align: middle;
|
|
17
17
|
|
|
@@ -87,5 +87,18 @@ $root-name: textarea;
|
|
|
87
87
|
cursor: pointer;
|
|
88
88
|
color: fn.use-var(text-color, main);
|
|
89
89
|
min-width: 20px;
|
|
90
|
+
transition:
|
|
91
|
+
color fn.use-var(transition, fast) fn.use-var(transition, ease),
|
|
92
|
+
transform fn.use-var(transition, fast) fn.use-var(transition, ease-out);
|
|
93
|
+
|
|
94
|
+
&:hover {
|
|
95
|
+
color: fn.use-var(color, primary);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// 高频小图标:按下瞬间缩到位,松手回弹走过渡
|
|
99
|
+
&:active {
|
|
100
|
+
transform: translateY(-50%) scale(0.92);
|
|
101
|
+
transition-duration: 0s;
|
|
102
|
+
}
|
|
90
103
|
}
|
|
91
104
|
}
|
|
@@ -23,15 +23,13 @@
|
|
|
23
23
|
<span v-if="props.maxlength && props.showCount" :class="cls.m('count')">
|
|
24
24
|
{{ initNum }}/{{ props.maxlength }}
|
|
25
25
|
</span>
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
</u-icon>
|
|
34
|
-
</Transition>
|
|
26
|
+
<u-icon
|
|
27
|
+
v-if="props.clearable && model! && hovered && !disabled && !readonly"
|
|
28
|
+
:class="cls.m('clear')"
|
|
29
|
+
@click.stop="handleClear"
|
|
30
|
+
>
|
|
31
|
+
<Close />
|
|
32
|
+
</u-icon>
|
|
35
33
|
</div>
|
|
36
34
|
|
|
37
35
|
<span v-else style="white-space: pre-wrap">
|