vdesign-ui 0.2.8 → 0.2.11

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.
@@ -1,4 +1,5 @@
1
1
  @tabs-prefix-cls: vd-tabs;
2
+ @tab-prefix-cls: vd-tab;
2
3
 
3
4
  .@{tabs-prefix-cls} {
4
5
 
@@ -12,312 +13,307 @@
12
13
  top: 0;
13
14
  z-index: 99;
14
15
  }
15
-
16
- &-primary {
17
- position: relative;
18
- display: inline-block;
19
- cursor: pointer;
20
- padding-inline-start: var(--spacing-tab-primary-padding_left);
21
- padding-inline-end: var(--spacing-tab-primary-padding_right);
22
- color: var(--color-tab-primary-text-default);
23
- font-size: var(--en-single-f-d-r-fontSize);
24
- font-weight: var(--en-single-f-d-r-fontWeight);
25
16
 
26
- &-bar {
17
+ &__nav{
18
+ display: flex;
19
+ align-items: center;
20
+ &--primary {
27
21
  position: relative;
28
22
  white-space: nowrap;
29
23
  padding-inline-start: var(--spacing-tab-primary-margin_left);
30
24
  height: var(--height-super-large);
31
25
  line-height: var(--height-super-large);
32
- }
33
-
34
- &-active {
35
- color: var(--color-tab-primary-text-active);
36
- font-size: var(--en-single-f-e-s-fontSize);
37
- font-weight: var(--en-single-f-e-s-fontWeight);
38
-
39
- &::before {
40
- content: "";
41
- bottom: 11px;
42
- height: var(--height-tab-primary-bar);
43
- width: var(--width-tab-primary-bar);
44
- display: block;
45
- position: absolute;
46
- background-color: var(--color-tab-primary-bar-active);
47
- left: 50%;
48
- transform: translateX(-50%);
49
- border-radius: var(--radius-tab-primary_bar);
26
+
27
+ .@{tab-prefix-cls}{
28
+ position: relative;
29
+ display: inline-block;
30
+ cursor: pointer;
31
+ padding-inline-start: var(--spacing-tab-primary-padding_left);
32
+ padding-inline-end: var(--spacing-tab-primary-padding_right);
33
+ color: var(--color-tab-primary-text-default);
34
+ font-size: var(--en-single-f-d-r-fontSize);
35
+ font-weight: var(--en-single-f-d-r-fontWeight);
36
+
37
+ &--active {
38
+ color: var(--color-tab-primary-text-active);
39
+ font-size: var(--en-single-f-e-s-fontSize);
40
+ font-weight: var(--en-single-f-e-s-fontWeight);
41
+
42
+ &::before {
43
+ content: "";
44
+ bottom: 11px;
45
+ height: var(--height-tab-primary-bar);
46
+ width: var(--width-tab-primary-bar);
47
+ display: block;
48
+ position: absolute;
49
+ background-color: var(--color-tab-primary-bar-active);
50
+ left: 50%;
51
+ transform: translateX(-50%);
52
+ border-radius: var(--radius-tab-primary_bar);
53
+ }
54
+ }
55
+ &__none--line {
56
+ &::before {
57
+ display: none;
58
+ }
59
+ }
50
60
  }
51
61
  }
52
- }
53
62
 
54
- &-card {
55
- min-width: 1%;
56
- flex: 1;
57
- display: flex;
58
- justify-content: center;
59
- align-items: center;
60
- position: relative;
61
- cursor: pointer;
62
- text-align: center;
63
- color: var(--color-tab-primary-text-default);
64
- font-size: var(--en-single-f-d-r-fontSize);
65
- font-weight: var(--en-single-f-d-r-fontWeight);
66
-
67
- &-bar {
63
+ &--card {
68
64
  position: relative;
69
65
  display: flex;
70
66
  padding-inline-start: 20px;
71
67
  padding-inline-end: 20px;
72
68
  height: var(--height-super-large);
73
69
  line-height: var(--height-super-large);
74
- }
75
-
76
- &-active {
77
- color: var(--color-tab-primary-text-active);
78
- font-size: var(--en-single-f-e-s-fontSize);
79
- font-weight: var(--en-single-f-e-s-fontWeight);
80
-
81
- &::before {
82
- content: "";
83
- bottom: 11px;
84
- height: var(--height-tab-primary-bar);
85
- width: var(--width-tab-primary-bar);
86
- display: block;
87
- position: absolute;
88
- background-color: var(--color-tab-primary-bar-active);
89
- left: 50%;
90
- transform: translateX(-50%);
91
- border-radius: 1px;
70
+
71
+ .@{tab-prefix-cls}{
72
+ min-width: 1%;
73
+ flex: 1;
74
+ display: flex;
75
+ justify-content: center;
76
+ align-items: center;
77
+ position: relative;
78
+ cursor: pointer;
79
+ text-align: center;
80
+ color: var(--color-tab-primary-text-default);
81
+ font-size: var(--en-single-f-d-r-fontSize);
82
+ font-weight: var(--en-single-f-d-r-fontWeight);
83
+
84
+ &--active {
85
+ color: var(--color-tab-primary-text-active);
86
+ font-size: var(--en-single-f-e-s-fontSize);
87
+ font-weight: var(--en-single-f-e-s-fontWeight);
88
+
89
+ &::before {
90
+ content: "";
91
+ bottom: 11px;
92
+ height: var(--height-tab-primary-bar);
93
+ width: var(--width-tab-primary-bar);
94
+ display: block;
95
+ position: absolute;
96
+ background-color: var(--color-tab-primary-bar-active);
97
+ left: 50%;
98
+ transform: translateX(-50%);
99
+ border-radius: 1px;
100
+ }
101
+ }
102
+ &__none--line {
103
+ &::before {
104
+ display: none;
105
+ }
106
+ }
92
107
  }
93
108
  }
94
- }
95
-
96
- &-secondary {
97
- position: relative;
98
- display: inline-block;
99
- cursor: pointer;
100
- margin-inline-start: var(--spacing-tab-secondary-padding_left);
101
- margin-inline-end: var(--spacing-tab-secondary-padding_right);
102
- color: var(--color-tab-primary-text-default);
103
- font-size: var(--en-single-f-c-r-fontSize);
104
- font-weight: var(--en-single-f-c-r-fontWeigh);
105
-
106
- &-bar {
109
+
110
+ &--secondary {
107
111
  display: flex;
108
112
  align-items: center;
109
113
  position: relative;
110
114
  padding-inline-start: var(--spacing-tab-secondary-margin_left);
111
115
  height: var(--height-tab-secondary);
112
116
  line-height: var(--height-tab-secondary);
113
- }
114
117
 
115
- &-active {
116
- color: var(--color-tab-primary-text-active);
117
- font-size: var(--en-single-f-c-s-fontSize);
118
- font-weight: var(--en-single-f-c-s-fontWeight);
118
+ .@{tab-prefix-cls}{
119
+ position: relative;
120
+ display: inline-block;
121
+ cursor: pointer;
122
+ margin-inline-start: var(--spacing-tab-secondary-padding_left);
123
+ margin-inline-end: var(--spacing-tab-secondary-padding_right);
124
+ color: var(--color-tab-primary-text-default);
125
+ font-size: var(--en-single-f-c-r-fontSize);
126
+ font-weight: var(--en-single-f-c-r-fontWeight);
127
+ &--active {
128
+ color: var(--color-tab-primary-text-active);
129
+ font-size: var(--en-single-f-c-s-fontSize);
130
+ font-weight: var(--en-single-f-c-s-fontWeight);
119
131
 
120
- &::before {
121
- content: "";
122
- bottom: 0;
123
- height: var(--height-tab-secondary-bar);
124
- display: block;
125
- position: absolute;
126
- background-color: var(--color-tab-secondary-bar-active);
127
- left: 0;
128
- right: 0;
129
- width: 100%;
130
- border-radius: var(--radius-tab-secondary-bar_top) var(--radius-tab-secondary-bar_top) var(--radius-tab-secondary-bar_bottom) var(--radius-tab-secondary-bar_bottom);
132
+ &::before {
133
+ content: "";
134
+ bottom: 0;
135
+ height: var(--height-tab-secondary-bar);
136
+ display: block;
137
+ position: absolute;
138
+ background-color: var(--color-tab-secondary-bar-active);
139
+ left: 0;
140
+ right: 0;
141
+ width: 100%;
142
+ border-radius: var(--radius-tab-secondary-bar_top) var(--radius-tab-secondary-bar_top) var(--radius-tab-secondary-bar_bottom) var(--radius-tab-secondary-bar_bottom);
143
+ }
144
+ }
145
+ &__none--line {
146
+ &::before {
147
+ display: none;
148
+ }
149
+ }
131
150
  }
151
+
132
152
  }
133
- }
134
153
 
135
- &-capsule {
136
- position: relative;
137
- display: inline-block;
138
- cursor: pointer;
139
- vertical-align: middle;
140
- height: var(--height-tab-capsule_btn);
141
- line-height: var(--height-tab-capsule_btn);
142
- padding-inline-start: var(--spacing-tab-capsule_btn-padding_left);
143
- padding-inline-end: var(--spacing-tab-capsule_btn-padding_right);
144
- margin-inline-start: var(--spacing-tab-capsule_btn-margin_right);
145
- margin-inline-end: var(--spacing-tab-capsule_btn-margin_right);
146
- background-color: var(--color-tab-capsule_btn-bg-default);
147
- color: var(--color-tab-capsule-text-default);
148
- font-size: var(--en-single-f-c-r-fontSize);
149
- font-weight: var(--en-single-f-c-r-fontWeight);
150
- border-radius: var(--radius-tab-capsule_button);
154
+
151
155
 
152
- &-bar {
156
+ &--capsule {
153
157
  position: relative;
154
158
  white-space: nowrap;
155
159
  align-items: center;
156
160
  padding-inline-start: var(--spacing-tab-capsule-margin_left);
157
161
  height: var(--height-tab-capsule);
158
162
  line-height: var(--height-tab-capsule);
159
- }
160
163
 
161
- &-active {
162
- color: var(--color-tab-capsule-text-active);
163
- font-size: var(--en-single-f-c-s-fontSize);
164
- font-weight: var(--en-single-f-c-s-fontWeight);
165
- background-color: var(--color-tab-capsule_btn-bg-active);
164
+
165
+ .@{tab-prefix-cls}{
166
+ position: relative;
167
+ display: inline-block;
168
+ cursor: pointer;
169
+ vertical-align: middle;
170
+ height: var(--height-tab-capsule_btn);
171
+ line-height: var(--height-tab-capsule_btn);
172
+ padding-inline-start: var(--spacing-tab-capsule_btn-padding_left);
173
+ padding-inline-end: var(--spacing-tab-capsule_btn-padding_right);
174
+ margin-inline-start: var(--spacing-tab-capsule_btn-margin_right);
175
+ margin-inline-end: var(--spacing-tab-capsule_btn-margin_right);
176
+ background-color: var(--color-tab-capsule_btn-bg-default);
177
+ color: var(--color-tab-capsule-text-default);
178
+ font-size: var(--en-single-f-c-r-fontSize);
179
+ font-weight: var(--en-single-f-c-r-fontWeight);
180
+ border-radius: var(--radius-tab-capsule_button);
166
181
 
167
- .@{tabs-prefix-cls}-arrow {
168
- color: var(--color-tab-filter_down-active);
169
- transform: rotate(180deg);
182
+ &--active {
183
+ color: var(--color-tab-capsule-text-active);
184
+ font-size: var(--en-single-f-c-s-fontSize);
185
+ font-weight: var(--en-single-f-c-s-fontWeight);
186
+ background-color: var(--color-tab-capsule_btn-bg-active);
187
+ }
170
188
  }
171
189
  }
172
- }
173
-
190
+
191
+
192
+ &--selector-l {
193
+ position: relative;
194
+ display: flex;
195
+ background-color: var(--color-tab-selector-bg-default);
196
+ border-radius: var(--radius-tab-selector_card);
197
+ padding-inline-start: var(--spacing-tab-selector-margin_left);
198
+ padding-inline-end: var(--spacing-tab-selector-margin_right);
199
+ padding-block-start: var(--spacing-tab-selector-margin_top);
200
+ padding-block-end: var(--spacing-tab-selector-margin_bottom);
201
+
202
+ .@{tab-prefix-cls}{
203
+ flex: 1;
204
+ position: relative;
205
+ display: inline-block;
206
+ text-align: center;
207
+ cursor: pointer;
208
+ height: var(--height-tab-selector_l_btn);
209
+ line-height: var(--height-tab-selector_l_btn);
210
+ color: var(--color-tab-selector-text-default);
211
+ font-size: var(--en-single-f-c-r-fontSize);
212
+ font-weight: var(--en-single-f-c-r-fontWeight);
213
+
214
+ &--active {
215
+ color: var(--color-tab-selector-text-active);
216
+ font-size: var(--en-single-f-c-s-fontSize);
217
+ font-weight: var(--en-single-f-c-s-fontWeight);
218
+ background-color: var(--color-tab-selector-bg-active);
219
+ box-shadow: var(--shadow-s1);
220
+ border-radius: var(--radius-tab-selector_card);
221
+ }
222
+ }
174
223
 
175
- &-selector-l {
176
- flex: 1;
177
- position: relative;
178
- display: inline-block;
179
- text-align: center;
180
- cursor: pointer;
181
- height: var(--height-tab-selector_l_btn);
182
- line-height: var(--height-tab-selector_l_btn);
183
- color: var(--color-tab-selector-text-default);
184
- font-size: var(--en-single-f-c-r-fontSize);
185
- font-weight: var(--en-single-f-c-r-fontWeight);
186
-
187
- &-bar {
188
- position: relative;
189
- display: flex;
190
- background-color: var(--color-tab-selector-bg-default);
191
- border-radius: var(--radius-tab-selector_card);
192
- padding-inline-start: var(--spacing-tab-selector-margin_left);
193
- padding-inline-end: var(--spacing-tab-selector-margin_right);
194
- padding-block-start: var(--spacing-tab-selector-margin_top);
195
- padding-block-end: var(--spacing-tab-selector-margin_bottom);
196
- }
197
-
198
- &-active {
199
- color: var(--color-tab-selector-text-active);
200
- font-size: var(--en-single-f-c-s-fontSize);
201
- font-weight: var(--en-single-f-c-s-fontWeight);
202
- background-color: var(--color-tab-selector-bg-active);
203
- box-shadow: var(--shadow-s1);
204
- border-radius: var(--radius-tab-selector_card);
205
- }
206
- }
207
-
208
- &-selector-m {
209
- flex: 1;
210
- position: relative;
211
- display: inline-block;
212
- text-align: center;
213
- cursor: pointer;
214
- height: var(--height-tab-selector_m_btn);
215
- line-height: var(--height-tab-selector_m_btn);
216
- color: var(--color-tab-selector-text-default);
217
- font-size: var(--en-single-f-b-r-fontSize);
218
- font-weight: var(--en-single-f-b-r-fontWeight);
219
-
220
- &-bar {
221
- position: relative;
222
- display: flex;
223
- background-color: var(--color-tab-selector-bg-default);
224
- border-radius: var(--radius-tab-selector_card);
225
- padding-inline-start: var(--spacing-tab-selector-margin_left);
226
- padding-inline-end: var(--spacing-tab-selector-margin_right);
227
- padding-block-start: var(--spacing-tab-selector-margin_top);
228
- padding-block-end: var(--spacing-tab-selector-margin_bottom);
229
- }
230
-
231
- &-active {
232
- color: var(--color-tab-selector-text-active);
233
- font-size: var(--en-single-f-b-s-fontSize);
234
- font-weight: var(--en-single-f-b-s-fontWeight);
235
- background-color: var(--color-tab-selector-bg-active);
236
- box-shadow: var(--shadow-s1);
237
- border-radius: var(--radius-tab-selector_card);
238
224
  }
239
- }
240
-
225
+
226
+
227
+
228
+ &--selector-m{
229
+ position: relative;
230
+ display: flex;
231
+ background-color: var(--color-tab-selector-bg-default);
232
+ border-radius: var(--radius-tab-selector_card);
233
+ padding-inline-start: var(--spacing-tab-selector-margin_left);
234
+ padding-inline-end: var(--spacing-tab-selector-margin_right);
235
+ padding-block-start: var(--spacing-tab-selector-margin_top);
236
+ padding-block-end: var(--spacing-tab-selector-margin_bottom);
237
+
238
+ .@{tab-prefix-cls}{
239
+ flex: 1;
240
+ position: relative;
241
+ display: inline-block;
242
+ text-align: center;
243
+ cursor: pointer;
244
+ height: var(--height-tab-selector_m_btn);
245
+ line-height: var(--height-tab-selector_m_btn);
246
+ color: var(--color-tab-selector-text-default);
247
+ font-size: var(--en-single-f-b-r-fontSize);
248
+ font-weight: var(--en-single-f-b-r-fontWeight);
249
+
250
+ &--active {
251
+ color: var(--color-tab-selector-text-active);
252
+ font-size: var(--en-single-f-b-s-fontSize);
253
+ font-weight: var(--en-single-f-b-s-fontWeight);
254
+ background-color: var(--color-tab-selector-bg-active);
255
+ box-shadow: var(--shadow-s1);
256
+ border-radius: var(--radius-tab-selector_card);
257
+ }
258
+ }
241
259
 
242
- &-filter {
243
- flex: 1;
244
- position: relative;
245
- cursor: pointer;
246
- text-align: center;
247
- color: var(--color-tab-filter-text-default);
248
- font-size: var(--en-single-f-c-r-fontSize);
249
- font-weight: var(--en-single-f-c-r-fontWeight);
250
-
251
- &-bar {
252
- position: relative;
253
- display: flex;
254
- height: var(--height-tab-filter);
255
- line-height: var(--height-tab-filter);
256
- padding-inline-start: var(--spacing-tab-filter-margin_y);
257
- padding-inline-end: var(--spacing-tab-filter-margin_y);
258
- }
259
-
260
- &-active {
261
- color: var(--color-tab-filter-text-active);
262
- font-size: var(--en-single-f-c-s-fontSize);
263
- font-weight: var(--en-single-f-c-s-fontWeight);
264
-
265
- .@{tabs-prefix-cls}-arrow {
266
- color: var(--color-tab-filter_down);
267
- transform: rotate(180deg);
268
- }
269
- }
270
- }
271
-
272
- &-click-filter {
273
- flex: 1;
274
- position: relative;
275
- cursor: pointer;
276
- text-align: center;
277
- color: var(--color-tab-double_click_filter-text-default);
278
- font-size: var(--en-single-f-c-r-fontSize);
279
- font-weight: var(--en-single-f-c-r-fontWeight);
280
-
281
- &-bar {
282
- position: relative;
283
- display: flex;
284
- height: var(--height-tab-filter);
285
- line-height: var(--height-tab-filter);
286
- }
287
-
288
- &-active {
289
- color: var(--color-tab-double_click_filter-text-active);
290
- font-size: var(--en-single-f-c-s-fontSize);
291
- font-weight: var(--en-single-f-c-s-fontWeight);
292
260
  }
293
- }
294
-
261
+
262
+
263
+ &--filter {
264
+ position: relative;
265
+ display: flex;
266
+ height: var(--height-tab-filter);
267
+ line-height: var(--height-tab-filter);
268
+ padding-inline-start: var(--spacing-tab-filter-margin_y);
269
+ padding-inline-end: var(--spacing-tab-filter-margin_y);
295
270
 
296
- &-menu-btn {
297
- cursor: pointer;
298
- font-size: var(--icon-large)!important;
299
- }
271
+ .@{tab-prefix-cls}{
272
+ flex: 1;
273
+ position: relative;
274
+ cursor: pointer;
275
+ text-align: center;
276
+ color: var(--color-tab-filter-text-default);
277
+ font-size: var(--en-single-f-c-r-fontSize);
278
+ font-weight: var(--en-single-f-c-r-fontWeight);
279
+ &--active {
280
+ color: var(--color-tab-filter-text-active);
281
+ font-size: var(--en-single-f-c-s-fontSize);
282
+ font-weight: var(--en-single-f-c-s-fontWeight);
283
+
284
+ }
285
+ }
286
+
300
287
 
301
- &-text-cell {
302
- display: flex;
303
- align-items: center;
304
- justify-content: center;
305
- }
288
+ }
289
+
290
+ &--click-filter {
291
+ position: relative;
292
+ display: flex;
293
+ height: var(--height-tab-filter);
294
+ line-height: var(--height-tab-filter);
306
295
 
307
- &-arrow {
308
- display: inline-block;
309
- vertical-align: -1px;
310
- font-size: var(--icon-small) !important;
311
- color: var(--color-tab-filter_down);
312
- }
296
+ .@{tab-prefix-cls}{
297
+ flex: 1;
298
+ position: relative;
299
+ cursor: pointer;
300
+ text-align: center;
301
+ color: var(--color-tab-double_click_filter-text-default);
302
+ font-size: var(--en-single-f-c-r-fontSize);
303
+ font-weight: var(--en-single-f-c-r-fontWeight);
304
+ &--active {
305
+ color: var(--color-tab-double_click_filter-text-active);
306
+ font-size: var(--en-single-f-c-s-fontSize);
307
+ font-weight: var(--en-single-f-c-s-fontWeight);
308
+ }
309
+ }
310
+
313
311
 
314
- &__line {
315
- &::before {
316
- display: none;
317
312
  }
318
313
  }
319
-
320
- &-menu {
314
+
315
+
316
+ &__menu {
321
317
  display: flex;
322
318
  justify-content: space-between;
323
319
  align-items: center;
@@ -341,10 +337,13 @@
341
337
 
342
338
 
343
339
  }
340
+ &--btn {
341
+ cursor: pointer;
342
+ font-size: var(--icon-large)!important;
343
+ }
344
344
 
345
345
  }
346
346
 
347
-
348
347
  &__wrap--bg {
349
348
  background-color: transparent;
350
349
  }
@@ -360,24 +359,46 @@
360
359
  }
361
360
  }
362
361
 
363
- &-text--ellipsis {
362
+
363
+ &__content--animated {
364
+ overflow: hidden;
365
+ }
366
+ &__track {
367
+ display: flex;
368
+ transition: transform 0.3s;
369
+ position: relative;
370
+ width: 100%;
371
+ height: 100%;
372
+ will-change: left;
373
+ }
374
+
375
+
376
+ }
377
+
378
+ .@{tab-prefix-cls}{
379
+
380
+ &__text {
381
+ display: flex;
382
+ align-items: center;
383
+ justify-content: center;
384
+ }
385
+
386
+ &__text--ellipsis {
364
387
  display: -webkit-box;
365
388
  overflow: hidden;
366
389
  -webkit-line-clamp: 1;
367
390
  -webkit-box-orient: vertical;
368
391
  }
369
- }
370
392
 
371
- [lang='ar'] .vd-tabs-menu--right::before {
372
- transform: scaleX(-1);
393
+ &__pane {
394
+ flex-shrink: 0;
395
+ width: 100%;
396
+ }
397
+
373
398
  }
374
399
 
375
400
 
376
- .vd-tab {
377
- width: 100%;
378
- display: none;
379
- }
380
401
 
381
- .vd-tab-active {
382
- display: block;
402
+ [lang='ar'] .@{tabs-prefix-cls}__menu--right::before {
403
+ transform: scaleX(-1);
383
404
  }