vdesign-ui 0.2.8 → 0.2.9

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