vdesign-ui 0.2.16 → 0.2.17

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 (40) hide show
  1. package/dist/components/actionbar-cell/index.js +1 -1
  2. package/dist/components/actionbar-cell/index.vue +4 -0
  3. package/dist/components/actionbar-cell/style.less +0 -0
  4. package/dist/components/activityviews/index.vue +1 -1
  5. package/dist/components/activityviews/style.less +10 -0
  6. package/dist/components/checkbox-group/index.js +1 -1
  7. package/dist/components/checkbox-group/index.vue +4 -0
  8. package/dist/components/checkbox-group/style.less +0 -0
  9. package/dist/components/dialog/index.vue +1 -1
  10. package/dist/components/dialog/style.less +1 -1
  11. package/dist/components/footer/style.less +1 -1
  12. package/dist/components/form/index.vue +3 -1
  13. package/dist/components/form/style.less +0 -0
  14. package/dist/components/input/style.less +2 -1
  15. package/dist/components/overlay/style.less +2 -1
  16. package/dist/components/password/index.vue +4 -0
  17. package/dist/components/password/style.less +0 -0
  18. package/dist/components/popup/index.js +1 -1
  19. package/dist/components/popup/index.vue +2 -80
  20. package/dist/components/popup/style.less +79 -0
  21. package/dist/components/radio-group/index.js +1 -0
  22. package/dist/components/radio-group/index.vue +4 -0
  23. package/dist/components/radio-group/style.less +0 -0
  24. package/dist/components/search/index.vue +4 -0
  25. package/dist/components/search/style.less +0 -0
  26. package/dist/components/stepper/index.vue +4 -0
  27. package/dist/components/stepper/style.less +0 -0
  28. package/dist/components/tab/index.js +1 -1
  29. package/dist/components/tab/index.vue +4 -2
  30. package/dist/components/tab/style.less +0 -0
  31. package/dist/components/tabs/index.vue +23 -1
  32. package/dist/components/tabs/style.less +54 -3
  33. package/dist/components/title/style.less +1 -1
  34. package/dist/components/toast/style.less +1 -1
  35. package/dist/token.css +754 -715
  36. package/dist/vdesign-ui.common.js +338 -161
  37. package/dist/vdesign-ui.css +1 -1
  38. package/dist/vdesign-ui.umd.js +338 -161
  39. package/dist/vdesign-ui.umd.min.js +2 -2
  40. package/package.json +2 -2
@@ -1,5 +1,5 @@
1
1
  import ActionbarCell from './index.vue';
2
-
2
+ import './style.less';
3
3
  ActionbarCell.install = function (Vue) {
4
4
  Vue.component(ActionbarCell.name, ActionbarCell);
5
5
  };
@@ -36,3 +36,7 @@ export default {
36
36
  },
37
37
  };
38
38
  </script>
39
+
40
+ <style lang="less">
41
+ @import './style.less';
42
+ </style>
File without changes
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div>
3
- <div class="vd-overlay" v-if="overlay && visible" @click="handleOverlayClick"></div>
3
+ <div class="vd-activity-views__overlay" v-if="overlay && visible" @click="handleOverlayClick"></div>
4
4
  <transition name="vd-activity-views-slide-up">
5
5
  <div :class="['vd-activity-views',{'vd-activity-views--safe-area-inset-bottom':safeAreaInsetBottom}]" :style="transitionStyle" v-if="visible">
6
6
  <div class="vd-activity-views__header" v-if="withHeader">
@@ -149,4 +149,14 @@
149
149
  .vd-activity-views-slide-up-enter,
150
150
  .vd-activity-views-slide-up-leave-to {
151
151
  transform: translateY(100%);
152
+ }
153
+
154
+ .vd-activity-views__overlay{
155
+ position: fixed;
156
+ top: 0;
157
+ left: 0;
158
+ width: 100%;
159
+ height: 100%;
160
+ z-index: 2001;
161
+ background-color: var(--color-activityviews-mask-bg);
152
162
  }
@@ -1,5 +1,5 @@
1
1
  import CheckboxGroup from './index.vue';
2
-
2
+ import './style.less';
3
3
  CheckboxGroup.install = function (Vue) {
4
4
  Vue.component(CheckboxGroup.name, CheckboxGroup);
5
5
  };
@@ -67,3 +67,7 @@ export default {
67
67
  }
68
68
  };
69
69
  </script>
70
+
71
+ <style lang="less">
72
+ @import './style.less';
73
+ </style>
File without changes
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div class="vd-dialog-wrap">
3
- <div class="vd-overlay" v-if="visible && isOverlayVisible && overlay" :style="{ zIndex: overlayZIndex }"
3
+ <div class="vd-dialog__overlay" v-if="visible && isOverlayVisible && overlay" :style="{ zIndex: overlayZIndex }"
4
4
  @click="handleOverlayClick"></div>
5
5
  <transition name="vd-dialog-fade">
6
6
  <div class="vd-dialog" v-if="visible" :class="computedClassName" :style="{width : width, zIndex: overlayZIndex + 1}">
@@ -111,7 +111,7 @@
111
111
  }
112
112
  }
113
113
 
114
- .vd-overlay {
114
+ .vd-dialog__overlay {
115
115
  position: fixed;
116
116
  top: 0;
117
117
  left: 0;
@@ -16,6 +16,6 @@
16
16
  &__text {
17
17
  font-size: var(--en-single-f-b-r-fontSize);
18
18
  font-weight: var(--en-single-f-b-r-fontWeight);
19
- color: var(--text-color-h2);
19
+ color: var(--text-color-h3);
20
20
  }
21
21
  }
@@ -9,4 +9,6 @@ export default {
9
9
  }
10
10
  </script>
11
11
 
12
- <style lang="less"></style>
12
+ <style lang="less">
13
+ @import './style.less';
14
+ </style>
File without changes
@@ -237,6 +237,7 @@
237
237
  height: var(--height-input-search_content);
238
238
  padding-inline-start: var(--spacing-input-search_textarea-padding_y);
239
239
  padding-inline-end: var(--spacing-input-search_textarea-padding_y);
240
+ background-color: var(--color-input-trade-bg);
240
241
 
241
242
  .@{input-prefix-cls} {
242
243
  &-search {
@@ -250,7 +251,7 @@
250
251
  flex: 1;
251
252
  display: flex;
252
253
  align-items: center;
253
- background-color: rgba(0, 0, 0, 0.05);
254
+ background-color: var(--color-input-trade-bg);
254
255
  padding-inline-start: var(--spacing-input-textarea-padding_y);
255
256
  padding-inline-end: var(--spacing-input-textarea-padding_y);
256
257
  border-radius: var(--radius-input-bg);
@@ -15,7 +15,8 @@
15
15
  left: 0;
16
16
  width: 100%;
17
17
  height: 100%;
18
- background: var(--color-dialog-mask_bg);
18
+ z-index: 2001;
19
+ background-color: var(--color-dialog-mask_bg);
19
20
  }
20
21
 
21
22
  .vd-overflow-hidden {
@@ -58,3 +58,7 @@ export default {
58
58
  },
59
59
  };
60
60
  </script>
61
+
62
+ <style lang="less">
63
+ @import './style.less';
64
+ </style>
File without changes
@@ -1,5 +1,5 @@
1
1
  import Popup from './index.vue';
2
-
2
+ import './style.less';
3
3
  Popup.install = function (Vue) {
4
4
  Vue.component(Popup.name, Popup);
5
5
  };
@@ -160,84 +160,6 @@ export default {
160
160
  };
161
161
  </script>
162
162
 
163
- <style scoped>
164
- .popup-overlay {
165
- position: fixed;
166
- top: 0;
167
- left: 0;
168
- width: 100%;
169
- height: 100%;
170
- z-index: 999;
171
- }
172
-
173
- .popup {
174
- position: fixed;
175
- z-index: 1000;
176
- }
177
-
178
- .popup-center {
179
- top: 50%;
180
- left: 50%;
181
- transform: translate(-50%, -50%);
182
- }
183
-
184
- .popup-top {
185
- top: 0;
186
- left: 0;
187
- width: 100%;
188
- }
189
-
190
- .popup-bottom {
191
- bottom: 0;
192
- left: 0;
193
- width: 100%;
194
- }
195
-
196
- .popup-left {
197
- top: 0;
198
- left: 0;
199
- height: 100%;
200
- }
201
-
202
- .popup-right {
203
- top: 0;
204
- right: 0;
205
- height: 100%;
206
- }
207
-
208
- /* 过渡效果 */
209
- .popup-slide-center-enter-active,
210
- .popup-slide-center-leave-active,
211
- .popup-slide-top-enter-active,
212
- .popup-slide-top-leave-active,
213
- .popup-slide-bottom-enter-active,
214
- .popup-slide-bottom-leave-active,
215
- .popup-slide-left-enter-active,
216
- .popup-slide-left-leave-active,
217
- .popup-slide-right-enter-active,
218
- .popup-slide-right-leave-active {
219
- transition-property: all;
220
- transition-timing-function: ease;
221
- }
222
-
223
- .popup-slide-top-enter,
224
- .popup-slide-top-leave-to {
225
- transform: translateY(-100%);
226
- }
227
- .popup-slide-bottom-enter,
228
- .popup-slide-bottom-leave-to {
229
- transform: translateY(100%);
230
- }
231
- .popup-slide-left-enter,
232
- .popup-slide-left-leave-to {
233
- transform: translateX(-100%);
234
- }
235
- .popup-slide-right-enter,
236
- .popup-slide-right-leave-to {
237
- transform: translateX(100%);
238
- }
239
- .popup-slide-center-enter,
240
- .popup-slide-center-leave-to {
241
- opacity: 0;
242
- }
163
+ <style lang="less">
164
+ @import './style.less';
243
165
  </style>
@@ -0,0 +1,79 @@
1
+ .popup-overlay {
2
+ position: fixed;
3
+ top: 0;
4
+ left: 0;
5
+ width: 100%;
6
+ height: 100%;
7
+ z-index: 999;
8
+ }
9
+
10
+ .popup {
11
+ position: fixed;
12
+ z-index: 1000;
13
+ }
14
+
15
+ .popup-center {
16
+ top: 50%;
17
+ left: 50%;
18
+ transform: translate(-50%, -50%);
19
+ }
20
+
21
+ .popup-top {
22
+ top: 0;
23
+ left: 0;
24
+ width: 100%;
25
+ }
26
+
27
+ .popup-bottom {
28
+ bottom: 0;
29
+ left: 0;
30
+ width: 100%;
31
+ }
32
+
33
+ .popup-left {
34
+ top: 0;
35
+ left: 0;
36
+ height: 100%;
37
+ }
38
+
39
+ .popup-right {
40
+ top: 0;
41
+ right: 0;
42
+ height: 100%;
43
+ }
44
+
45
+ /* 过渡效果 */
46
+ .popup-slide-center-enter-active,
47
+ .popup-slide-center-leave-active,
48
+ .popup-slide-top-enter-active,
49
+ .popup-slide-top-leave-active,
50
+ .popup-slide-bottom-enter-active,
51
+ .popup-slide-bottom-leave-active,
52
+ .popup-slide-left-enter-active,
53
+ .popup-slide-left-leave-active,
54
+ .popup-slide-right-enter-active,
55
+ .popup-slide-right-leave-active {
56
+ transition-property: all;
57
+ transition-timing-function: ease;
58
+ }
59
+
60
+ .popup-slide-top-enter,
61
+ .popup-slide-top-leave-to {
62
+ transform: translateY(-100%);
63
+ }
64
+ .popup-slide-bottom-enter,
65
+ .popup-slide-bottom-leave-to {
66
+ transform: translateY(100%);
67
+ }
68
+ .popup-slide-left-enter,
69
+ .popup-slide-left-leave-to {
70
+ transform: translateX(-100%);
71
+ }
72
+ .popup-slide-right-enter,
73
+ .popup-slide-right-leave-to {
74
+ transform: translateX(100%);
75
+ }
76
+ .popup-slide-center-enter,
77
+ .popup-slide-center-leave-to {
78
+ opacity: 0;
79
+ }
@@ -1,4 +1,5 @@
1
1
  import RadioGroup from './index.vue';
2
+ import './style.less';
2
3
  RadioGroup.install = function (Vue) {
3
4
  Vue.component(RadioGroup.name, RadioGroup);
4
5
  };
@@ -56,3 +56,7 @@ export default {
56
56
  },
57
57
  };
58
58
  </script>
59
+
60
+ <style lang="less">
61
+ @import './style.less';
62
+ </style>
File without changes
@@ -64,3 +64,7 @@ export default {
64
64
  }
65
65
  }
66
66
  </script>
67
+
68
+ <style lang="less">
69
+ @import './style.less';
70
+ </style>
File without changes
@@ -144,3 +144,7 @@ export default {
144
144
  }
145
145
  }
146
146
  </script>
147
+
148
+ <style lang="less">
149
+ @import './style.less';
150
+ </style>
File without changes
@@ -1,5 +1,5 @@
1
1
  import Tab from './index.vue';
2
-
2
+ import './style.less';
3
3
  Tab.install = function (Vue) {
4
4
  Vue.component(Tab.name, Tab);
5
5
  };
@@ -91,5 +91,7 @@
91
91
  },
92
92
  };
93
93
  </script>
94
-
95
-
94
+
95
+ <style lang="less">
96
+ @import './style.less';
97
+ </style>
File without changes
@@ -74,6 +74,7 @@ export default {
74
74
  return {
75
75
  tabs: [],
76
76
  currentName: this.value !== undefined ? this.value : 0, // 默认为 0
77
+ firstTabOut: false, // 第一个标签是否超出
77
78
  };
78
79
  },
79
80
  watch: {
@@ -129,6 +130,7 @@ export default {
129
130
  [`${prefixCls}__menu`]: this.menu,
130
131
  [`${prefixCls}__wrap--bg`]: this.backgroundColor,
131
132
  "vd-hairline--bottom": this.divider,
133
+ "vd-tabs__scroll": this.firstTabOut, // 当第一个标签超出时,添加滚动类名
132
134
  };
133
135
  },
134
136
  // 计算标签下方线条的类名
@@ -262,7 +264,19 @@ export default {
262
264
  left: scrollLeft,
263
265
  behavior: 'smooth'
264
266
  });
265
- }, 0); // You can adjust the timeout value if needed
267
+ }, 0);
268
+ },
269
+ checkFirstTabOverflow() {
270
+ const nav = this.$refs.nav;
271
+ if (nav) {
272
+ if (this.language === 'ar') {
273
+ // 在 RTL 模式下,scrollLeft 可能为负,判断是否滚出视口可以检测 scrollLeft 是否小于 0
274
+ this.firstTabOut = nav.scrollLeft < 0;
275
+ } else {
276
+ // LTR 模式下,滚出视口时 scrollLeft 大于 0
277
+ this.firstTabOut = nav.scrollLeft > 0;
278
+ }
279
+ }
266
280
  },
267
281
  renderTitle(titleEl, tab) {
268
282
  this.$nextTick(() => {
@@ -309,8 +323,16 @@ export default {
309
323
  // 初始加载时,滚动到当前激活的标签
310
324
  this.$nextTick(() => {
311
325
  this.scrollToActiveTab();
326
+ if (this.$refs.nav) {
327
+ this.$refs.nav.addEventListener('scroll', this.checkFirstTabOverflow);
328
+ }
312
329
  });
313
330
  },
331
+ beforeDestroy() {
332
+ if (this.$refs.nav) {
333
+ this.$refs.nav.removeEventListener('scroll', this.checkFirstTabOverflow);
334
+ }
335
+ },
314
336
  };
315
337
  </script>
316
338
  <style lang="less">
@@ -312,6 +312,29 @@
312
312
  }
313
313
  }
314
314
 
315
+ &__scroll {
316
+ &::before {
317
+ content: '';
318
+ position: absolute;
319
+ z-index: 1;
320
+ top: 0;
321
+ left: 0;
322
+ width: 20px;
323
+ height: 48px;
324
+ background-color: var(--bg-color-1);
325
+ }
326
+ &::after {
327
+ content: '';
328
+ box-shadow: 4px 0 6px rgba(0, 0, 0, 0.05);
329
+ position: absolute;
330
+ top: 50%;
331
+ transform: translateY(-50%);
332
+ left: 0;
333
+ width: 20px;
334
+ height: 30px;
335
+ background-color: transparent;
336
+ }
337
+ }
315
338
 
316
339
  &__menu {
317
340
  display: flex;
@@ -353,7 +376,6 @@
353
376
  overflow-y: hidden;
354
377
  -webkit-overflow-scrolling: touch;
355
378
  padding-inline-end: var(--spacing-tab-primary_icon-margin_right);
356
-
357
379
  &::-webkit-scrollbar {
358
380
  display: none;
359
381
  }
@@ -403,6 +425,35 @@
403
425
 
404
426
 
405
427
 
406
- [lang='ar'] .@{tabs-prefix-cls}__menu--right::before {
407
- transform: scaleX(-1);
428
+ [lang='ar'] {
429
+ .@{tabs-prefix-cls}__scroll {
430
+ &::before {
431
+ right: 0;
432
+ left: auto;
433
+ }
434
+ &::after {
435
+ right: 0;
436
+ left: auto;
437
+ box-shadow: -4px 0 6px rgba(0, 0, 0, 0.05);
438
+ }
439
+ }
440
+ .@{tabs-prefix-cls}__menu--right::before {
441
+ transform: scaleX(-1);
442
+ }
408
443
  }
444
+
445
+ [theme='dark'] {
446
+ .@{tabs-prefix-cls}__scroll {
447
+ &::after {
448
+ box-shadow: 4px 0 6px rgba(0, 0, 0, 0.35);
449
+ }
450
+ }
451
+ }
452
+
453
+ [theme='dark'][lang='ar']{
454
+ .@{tabs-prefix-cls}__scroll {
455
+ &::after {
456
+ box-shadow: -4px 0 6px rgba(0, 0, 0, 0.35);
457
+ }
458
+ }
459
+ }
@@ -7,7 +7,7 @@
7
7
  justify-content: space-between;
8
8
  padding-inline-start: var(--spacing-title-padding_left);
9
9
  padding-inline-end: var(--spacing-title-padding_right);
10
- background-color: var(--bg-color-1);
10
+ // background-color: var(--bg-color-1);
11
11
 
12
12
  &--sticky {
13
13
  position: sticky;
@@ -9,7 +9,7 @@
9
9
  transform: translate(-50%, -50%);
10
10
  box-sizing: border-box;
11
11
  text-align: center;
12
- z-index: 1000;
12
+ z-index: 3000;
13
13
  transition: all .3s linear;
14
14
  opacity: 0;
15
15
  visibility: hidden;