zartui 3.1.67 → 3.1.69
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/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/multiple-picker/MultiplePicker.d.ts +22 -22
- package/es/multiple-picker/MultiplePicker.mjs +48 -21
- package/es/multiple-picker/index.d.ts +2 -2
- package/es/tabs/TabsTitle.mjs +12 -0
- package/es/tabs/index.css +1 -1
- package/es/tabs/types.d.ts +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/multiple-picker/MultiplePicker.d.ts +22 -22
- package/lib/multiple-picker/MultiplePicker.js +48 -21
- package/lib/multiple-picker/index.d.ts +2 -2
- package/lib/tabs/TabsTitle.js +12 -0
- package/lib/tabs/index.css +1 -1
- package/lib/tabs/types.d.ts +1 -1
- package/lib/web-types.json +1 -1
- package/lib/zartui.cjs.js +61 -22
- package/lib/zartui.es.js +61 -22
- package/lib/zartui.js +61 -22
- package/lib/zartui.min.js +2 -2
- package/package.json +3 -3
package/es/index.d.ts
CHANGED
package/es/index.mjs
CHANGED
|
@@ -77,7 +77,7 @@ import { Timeline } from "./timeline/index.mjs";
|
|
|
77
77
|
import { Toast } from "./toast/index.mjs";
|
|
78
78
|
import { Uploader } from "./uploader/index.mjs";
|
|
79
79
|
import { Video } from "./video/index.mjs";
|
|
80
|
-
const version = "3.1.
|
|
80
|
+
const version = "3.1.69";
|
|
81
81
|
function install(app) {
|
|
82
82
|
const components = [
|
|
83
83
|
ActionSheet,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExtractPropTypes } from 'vue';
|
|
1
|
+
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
2
|
import { Numeric } from '../utils';
|
|
3
3
|
import { PickerOption } from './types';
|
|
4
4
|
declare const multiplePickerProps: {
|
|
@@ -34,19 +34,19 @@ declare const multiplePickerProps: {
|
|
|
34
34
|
default: true;
|
|
35
35
|
};
|
|
36
36
|
options: {
|
|
37
|
-
type:
|
|
37
|
+
type: PropType<PickerOption[]>;
|
|
38
38
|
default: () => PickerOption[];
|
|
39
39
|
};
|
|
40
40
|
filteredOptions: {
|
|
41
|
-
type:
|
|
42
|
-
default:
|
|
41
|
+
type: PropType<PickerOption[]>;
|
|
42
|
+
default: undefined;
|
|
43
43
|
};
|
|
44
44
|
toolbarPosition: {
|
|
45
|
-
type:
|
|
45
|
+
type: PropType<string>;
|
|
46
46
|
default: string;
|
|
47
47
|
};
|
|
48
48
|
textKey: {
|
|
49
|
-
type:
|
|
49
|
+
type: PropType<string>;
|
|
50
50
|
default: string;
|
|
51
51
|
};
|
|
52
52
|
columnCounts: {
|
|
@@ -54,11 +54,11 @@ declare const multiplePickerProps: {
|
|
|
54
54
|
default: number;
|
|
55
55
|
};
|
|
56
56
|
selectedIndex: {
|
|
57
|
-
type:
|
|
57
|
+
type: PropType<number[]>;
|
|
58
58
|
default: () => number[];
|
|
59
59
|
};
|
|
60
60
|
selectedValue: {
|
|
61
|
-
type:
|
|
61
|
+
type: PropType<Numeric[]>;
|
|
62
62
|
default: () => Numeric[];
|
|
63
63
|
};
|
|
64
64
|
popup: {
|
|
@@ -107,19 +107,19 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
107
107
|
default: true;
|
|
108
108
|
};
|
|
109
109
|
options: {
|
|
110
|
-
type:
|
|
110
|
+
type: PropType<PickerOption[]>;
|
|
111
111
|
default: () => PickerOption[];
|
|
112
112
|
};
|
|
113
113
|
filteredOptions: {
|
|
114
|
-
type:
|
|
115
|
-
default:
|
|
114
|
+
type: PropType<PickerOption[]>;
|
|
115
|
+
default: undefined;
|
|
116
116
|
};
|
|
117
117
|
toolbarPosition: {
|
|
118
|
-
type:
|
|
118
|
+
type: PropType<string>;
|
|
119
119
|
default: string;
|
|
120
120
|
};
|
|
121
121
|
textKey: {
|
|
122
|
-
type:
|
|
122
|
+
type: PropType<string>;
|
|
123
123
|
default: string;
|
|
124
124
|
};
|
|
125
125
|
columnCounts: {
|
|
@@ -127,11 +127,11 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
127
127
|
default: number;
|
|
128
128
|
};
|
|
129
129
|
selectedIndex: {
|
|
130
|
-
type:
|
|
130
|
+
type: PropType<number[]>;
|
|
131
131
|
default: () => number[];
|
|
132
132
|
};
|
|
133
133
|
selectedValue: {
|
|
134
|
-
type:
|
|
134
|
+
type: PropType<Numeric[]>;
|
|
135
135
|
default: () => Numeric[];
|
|
136
136
|
};
|
|
137
137
|
popup: {
|
|
@@ -172,19 +172,19 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
172
172
|
default: true;
|
|
173
173
|
};
|
|
174
174
|
options: {
|
|
175
|
-
type:
|
|
175
|
+
type: PropType<PickerOption[]>;
|
|
176
176
|
default: () => PickerOption[];
|
|
177
177
|
};
|
|
178
178
|
filteredOptions: {
|
|
179
|
-
type:
|
|
180
|
-
default:
|
|
179
|
+
type: PropType<PickerOption[]>;
|
|
180
|
+
default: undefined;
|
|
181
181
|
};
|
|
182
182
|
toolbarPosition: {
|
|
183
|
-
type:
|
|
183
|
+
type: PropType<string>;
|
|
184
184
|
default: string;
|
|
185
185
|
};
|
|
186
186
|
textKey: {
|
|
187
|
-
type:
|
|
187
|
+
type: PropType<string>;
|
|
188
188
|
default: string;
|
|
189
189
|
};
|
|
190
190
|
columnCounts: {
|
|
@@ -192,11 +192,11 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
192
192
|
default: number;
|
|
193
193
|
};
|
|
194
194
|
selectedIndex: {
|
|
195
|
-
type:
|
|
195
|
+
type: PropType<number[]>;
|
|
196
196
|
default: () => number[];
|
|
197
197
|
};
|
|
198
198
|
selectedValue: {
|
|
199
|
-
type:
|
|
199
|
+
type: PropType<Numeric[]>;
|
|
200
200
|
default: () => Numeric[];
|
|
201
201
|
};
|
|
202
202
|
popup: {
|
|
@@ -25,7 +25,10 @@ const multiplePickerProps = {
|
|
|
25
25
|
showToolbar: truthProp,
|
|
26
26
|
showTitle: truthProp,
|
|
27
27
|
options: makeArrayProp(),
|
|
28
|
-
filteredOptions:
|
|
28
|
+
filteredOptions: {
|
|
29
|
+
type: Array,
|
|
30
|
+
default: void 0
|
|
31
|
+
},
|
|
29
32
|
toolbarPosition: makeStringProp("bottom"),
|
|
30
33
|
textKey: makeStringProp("text"),
|
|
31
34
|
columnCounts: makeNumberProp(3),
|
|
@@ -49,7 +52,7 @@ var stdin_default = defineComponent({
|
|
|
49
52
|
const confirmIndexes = ref(props.selectedIndex);
|
|
50
53
|
const confirmValues = ref(props.selectedValue);
|
|
51
54
|
const displayOptions = computed(() => {
|
|
52
|
-
return props.filteredOptions
|
|
55
|
+
return props.filteredOptions !== void 0 ? props.filteredOptions : currentOptions.value;
|
|
53
56
|
});
|
|
54
57
|
const displaySelectedIndexes = computed(() => {
|
|
55
58
|
if (!props.filteredOptions || props.filteredOptions.length === 0) {
|
|
@@ -147,11 +150,13 @@ var stdin_default = defineComponent({
|
|
|
147
150
|
if (newValue !== props.showPicker) {
|
|
148
151
|
emit("update:showPicker", newValue);
|
|
149
152
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
153
|
+
if (newValue) {
|
|
154
|
+
currentOptions.value = deepClone(props.options);
|
|
155
|
+
confirmIndexes.value = deepClone(currentSelectedIndex.value);
|
|
156
|
+
confirmValues.value = deepClone(currentSelectedValue.value);
|
|
157
|
+
getIndexesByValues();
|
|
158
|
+
updateAllSelectedOptions();
|
|
159
|
+
}
|
|
155
160
|
});
|
|
156
161
|
watch(() => props.showPicker, (newValue) => {
|
|
157
162
|
var _a;
|
|
@@ -277,65 +282,87 @@ var stdin_default = defineComponent({
|
|
|
277
282
|
const handleSelectAll = () => {
|
|
278
283
|
if (props.filteredOptions && props.filteredOptions.length === 0) {
|
|
279
284
|
confirmIndexes.value = [];
|
|
285
|
+
confirmValues.value = [];
|
|
286
|
+
emit("update:selectedValue", confirmValues.value);
|
|
287
|
+
emit("update:selectedIndex", confirmIndexes.value);
|
|
280
288
|
updateAllSelectedOptions();
|
|
289
|
+
onChange();
|
|
281
290
|
return;
|
|
282
291
|
}
|
|
292
|
+
let newIndexes = [];
|
|
283
293
|
if (!isAllSelected.value) {
|
|
284
294
|
if (props.filteredOptions && props.filteredOptions.length > 0) {
|
|
285
|
-
const selectedIndexes = [];
|
|
286
295
|
displayOptions.value.forEach((option) => {
|
|
287
296
|
const originalIndex = currentOptions.value.findIndex((opt) => opt.value === option.value);
|
|
288
297
|
if (originalIndex >= 0) {
|
|
289
|
-
|
|
298
|
+
newIndexes.push(originalIndex);
|
|
290
299
|
}
|
|
291
300
|
});
|
|
292
|
-
confirmIndexes.value = selectedIndexes;
|
|
293
301
|
} else {
|
|
294
|
-
|
|
302
|
+
newIndexes = currentOptions.value.map((_, index) => index);
|
|
295
303
|
}
|
|
296
304
|
} else {
|
|
297
|
-
|
|
305
|
+
newIndexes = [];
|
|
306
|
+
}
|
|
307
|
+
confirmIndexes.value = newIndexes;
|
|
308
|
+
if (confirmIndexes.value.length > 0) {
|
|
309
|
+
getValuesByIndexes();
|
|
310
|
+
} else {
|
|
311
|
+
confirmValues.value = [];
|
|
298
312
|
}
|
|
313
|
+
emit("update:selectedValue", confirmValues.value);
|
|
314
|
+
emit("update:selectedIndex", confirmIndexes.value);
|
|
299
315
|
updateAllSelectedOptions();
|
|
316
|
+
onChange();
|
|
300
317
|
};
|
|
301
318
|
const onSelectOther = () => {
|
|
302
319
|
if (props.filteredOptions && props.filteredOptions.length === 0) {
|
|
303
320
|
confirmIndexes.value = [];
|
|
321
|
+
confirmValues.value = [];
|
|
322
|
+
emit("update:selectedValue", confirmValues.value);
|
|
323
|
+
emit("update:selectedIndex", confirmIndexes.value);
|
|
304
324
|
updateAllSelectedOptions();
|
|
325
|
+
onChange();
|
|
305
326
|
return;
|
|
306
327
|
}
|
|
328
|
+
let newIndexes = [];
|
|
307
329
|
if (props.filteredOptions && props.filteredOptions.length > 0) {
|
|
308
|
-
const filteredValues = new Set(displayOptions.value.map((opt) => opt.value));
|
|
309
330
|
const currentSelectedInFiltered = /* @__PURE__ */ new Set();
|
|
310
331
|
confirmIndexes.value.forEach((idx) => {
|
|
311
332
|
var _a;
|
|
312
333
|
if (idx >= 0 && idx < currentOptions.value.length) {
|
|
313
334
|
const value = (_a = currentOptions.value[idx]) == null ? void 0 : _a.value;
|
|
314
|
-
|
|
335
|
+
const isInFilteredList = displayOptions.value.some((opt) => opt.value === value);
|
|
336
|
+
if (isInFilteredList) {
|
|
315
337
|
currentSelectedInFiltered.add(idx);
|
|
316
338
|
}
|
|
317
339
|
}
|
|
318
340
|
});
|
|
319
|
-
const newSelectedIndexes = [];
|
|
320
341
|
displayOptions.value.forEach((option) => {
|
|
321
342
|
const originalIndex = currentOptions.value.findIndex((opt) => opt.value === option.value);
|
|
322
343
|
if (originalIndex >= 0) {
|
|
323
344
|
if (!currentSelectedInFiltered.has(originalIndex)) {
|
|
324
|
-
|
|
345
|
+
newIndexes.push(originalIndex);
|
|
325
346
|
}
|
|
326
347
|
}
|
|
327
348
|
});
|
|
328
|
-
confirmIndexes.value = newSelectedIndexes;
|
|
329
349
|
} else {
|
|
330
|
-
const temp = new Array();
|
|
331
350
|
currentOptions.value.forEach((_, index) => {
|
|
332
351
|
if (!confirmIndexes.value.includes(index)) {
|
|
333
|
-
|
|
352
|
+
newIndexes.push(index);
|
|
334
353
|
}
|
|
335
354
|
});
|
|
336
|
-
confirmIndexes.value = temp;
|
|
337
355
|
}
|
|
356
|
+
confirmIndexes.value = newIndexes;
|
|
357
|
+
if (confirmIndexes.value.length > 0) {
|
|
358
|
+
getValuesByIndexes();
|
|
359
|
+
} else {
|
|
360
|
+
confirmValues.value = [];
|
|
361
|
+
}
|
|
362
|
+
emit("update:selectedValue", confirmValues.value);
|
|
363
|
+
emit("update:selectedIndex", confirmIndexes.value);
|
|
338
364
|
updateAllSelectedOptions();
|
|
365
|
+
onChange();
|
|
339
366
|
};
|
|
340
367
|
const genOptionItems = () => {
|
|
341
368
|
let formatOptions = [];
|
|
@@ -350,7 +377,7 @@ var stdin_default = defineComponent({
|
|
|
350
377
|
return _createVNode(MultiplePickerOptions, {
|
|
351
378
|
"ref": pickerOptions,
|
|
352
379
|
"currentIndexes": displaySelectedIndexes.value,
|
|
353
|
-
"onUpdate:currentIndexes":
|
|
380
|
+
"onUpdate:currentIndexes": onUpdateCurrentIndexes,
|
|
354
381
|
"columnCounts": props.columnCounts,
|
|
355
382
|
"initialOptions": formatOptions,
|
|
356
383
|
"allowHtml": props.allowHtml,
|
|
@@ -38,7 +38,7 @@ export declare const MultiplePicker: import("../utils").WithInstall<import("vue"
|
|
|
38
38
|
};
|
|
39
39
|
filteredOptions: {
|
|
40
40
|
type: import("vue").PropType<import("./types").PickerOption[]>;
|
|
41
|
-
default:
|
|
41
|
+
default: undefined;
|
|
42
42
|
};
|
|
43
43
|
toolbarPosition: {
|
|
44
44
|
type: import("vue").PropType<string>;
|
|
@@ -103,7 +103,7 @@ export declare const MultiplePicker: import("../utils").WithInstall<import("vue"
|
|
|
103
103
|
};
|
|
104
104
|
filteredOptions: {
|
|
105
105
|
type: import("vue").PropType<import("./types").PickerOption[]>;
|
|
106
|
-
default:
|
|
106
|
+
default: undefined;
|
|
107
107
|
};
|
|
108
108
|
toolbarPosition: {
|
|
109
109
|
type: import("vue").PropType<string>;
|
package/es/tabs/TabsTitle.mjs
CHANGED
|
@@ -41,6 +41,7 @@ var stdin_default = defineComponent({
|
|
|
41
41
|
scrollable
|
|
42
42
|
} = props;
|
|
43
43
|
const isCard = type === "card";
|
|
44
|
+
const isCapsule = type === "capsule";
|
|
44
45
|
if (color && isCard) {
|
|
45
46
|
style2.borderColor = color;
|
|
46
47
|
if (!disabled) {
|
|
@@ -51,6 +52,17 @@ var stdin_default = defineComponent({
|
|
|
51
52
|
}
|
|
52
53
|
}
|
|
53
54
|
}
|
|
55
|
+
if (isCapsule) {
|
|
56
|
+
if (!disabled) {
|
|
57
|
+
if (isActive) {
|
|
58
|
+
style2.backgroundImage = "linear-gradient(-80deg, #85C0FF 0%, #3388FF 100%)";
|
|
59
|
+
style2.borderRadius = "14px";
|
|
60
|
+
style2.color = "#ffffff";
|
|
61
|
+
} else {
|
|
62
|
+
style2.backgroundColor = "#ffffff";
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
54
66
|
const titleColor = isActive ? activeColor : inactiveColor;
|
|
55
67
|
if (titleColor) {
|
|
56
68
|
style2.color = titleColor;
|
package/es/tabs/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-tab-active-text-color: var(--zt-text-color);--zt-tab-disabled-text-color: var(--zt-text-color-3);--zt-tab-active-opacity: .2;--zt-tabs-default-color: var(--zt-primary-color);--zt-tabs-line-height: 44px;--zt-tabs-line-bottom: 16px;--zt-tabs-card-height: 32px;--zt-tabs-bottom-bar-width: 12px;--zt-tabs-bottom-bar-height: 4px;--zt-tabs-bottom-bar-color: var(--zt-primary-color);--zt-tabs-bottom-bar-radius: 2px;--zt-tabs-nav-background: var(--zt-background);--zt-tab-text-color: var(--zt-gray-a6);--zt-tabs-overlay-left-background: linear-gradient(90deg, #ffffff 0%, rgba(245, 250, 255, 0) 100%);--zt-tabs-overlay-right-background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, #ffffff 100%)}.zt-tab{position:relative;display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:0 var(--zt-padding-md);color:var(--zt-tab-text-color);font-size:var(--zt-font-size-md);line-height:var(--zt-line-height-md);cursor:pointer}.zt-tab--active{color:var(--zt-tab-active-text-color);font-size:var(--zt-font-size-lg);font-weight:var(--zt-font-bold)}.zt-tab--active:active{opacity:var(--zt-tab-active-opacity)}.zt-tab--disabled{color:var(--zt-tab-disabled-text-color);cursor:not-allowed;font-size:var(--zt-font-size-md)}.zt-tab--grow{flex:1 0 auto;padding:0 var(--zt-padding-sm)}.zt-tab--shrink{flex:none;padding:0 var(--zt-padding-xs)}.zt-tab--card{color:var(--zt-tabs-default-color)}.zt-tab--card.zt-tab--active{color:var(--zt-white);background-color:var(--zt-tabs-default-color)}.zt-tab--card--disabled{color:var(--zt-tab-disabled-text-color)}.zt-tab__title{flex:1;display:flex;align-items:center;justify-content:center}.zt-tab__text--ellipsis{display:-webkit-box;overflow:hidden;-webkit-line-clamp:1;-webkit-box-orient:vertical}.zt-tab__text-wrapper,.zt-tabs{position:relative}.zt-tabs__wrap{overflow:hidden;position:relative}.zt-tabs__wrap--page-top{position:fixed}.zt-tabs__wrap--content-bottom{top:auto;bottom:0}.zt-tabs__overlay-left,.zt-tabs__overlay-right{position:absolute;top:0;width:var(--zt-tabs-line-height);height:var(--zt-tabs-line-height);pointer-events:none}.zt-tabs__overlay-left{left:0;background:var(--zt-tabs-overlay-left-background)}.zt-tabs__overlay-right{right:0;background:var(--zt-tabs-overlay-right-background)}.zt-tabs__nav{position:relative;display:flex;justify-content:flex-start;background-color:var(--zt-tabs-nav-background);-webkit-user-select:none;-moz-user-select:none;user-select:none}.zt-tabs__nav--complete{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.zt-tabs__nav--complete::-webkit-scrollbar{display:none}.zt-tabs__nav--line{box-sizing:content-box;height:100%;padding-bottom:var(--zt-tabs-line-bottom)}.zt-tabs__nav--line.zt-tabs__nav--shrink .zt-tab,.zt-tabs__nav--line.zt-tabs__nav--complete .zt-tab{flex:1 0 auto;padding:0 var(--zt-padding-sm)}.zt-tabs__nav--line.zt-tabs__nav--shrink .zt-tabs__nav,.zt-tabs__nav--line.zt-tabs__nav--complete .zt-tabs__nav{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.zt-tabs__nav--line.zt-tabs__nav--shrink .zt-tabs__nav::-webkit-scrollbar,.zt-tabs__nav--line.zt-tabs__nav--complete .zt-tabs__nav::-webkit-scrollbar{display:none}.zt-tabs__nav--card.zt-tabs__nav--shrink{display:inline-flex}.zt-tabs__line{position:absolute;bottom:var(--zt-tabs-line-bottom);left:0;z-index:1;width:var(--zt-tabs-bottom-bar-width);height:var(--zt-tabs-bottom-bar-height);background:var(--zt-tabs-bottom-bar-color);border-radius:var(--zt-tabs-bottom-bar-radius)}.zt-tabs__track{position:relative;display:flex;width:100%;height:100%;will-change:left}.zt-tabs__content--animated{overflow:hidden}.zt-tabs--line .zt-tabs__wrap{height:var(--zt-tabs-line-height)}.zt-tabs--card>.zt-tabs__wrap{height:var(--zt-tabs-card-height);display:flex;justify-content:center}.zt-theme-dark{--zt-tabs-overlay-left-background: linear-gradient(90deg, #0f1923 0%, rgba(15, 25, 35, 0) 100%);--zt-tabs-overlay-right-background: linear-gradient(90deg, rgba(15, 25, 35, 0) 3%, #0f1923 100%)}
|
|
1
|
+
:root{--zt-tab-active-text-color: var(--zt-text-color);--zt-tab-disabled-text-color: var(--zt-text-color-3);--zt-tab-active-opacity: .2;--zt-tabs-default-color: var(--zt-primary-color);--zt-tabs-line-height: 44px;--zt-tabs-line-bottom: 16px;--zt-tabs-card-height: 32px;--zt-tabs-bottom-bar-width: 12px;--zt-tabs-bottom-bar-height: 4px;--zt-tabs-bottom-bar-color: var(--zt-primary-color);--zt-tabs-bottom-bar-radius: 2px;--zt-tabs-nav-background: var(--zt-background);--zt-tab-text-color: var(--zt-gray-a6);--zt-tabs-overlay-left-background: linear-gradient(90deg, #ffffff 0%, rgba(245, 250, 255, 0) 100%);--zt-tabs-overlay-right-background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, #ffffff 100%)}.zt-tab{position:relative;display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:0 var(--zt-padding-md);color:var(--zt-tab-text-color);font-size:var(--zt-font-size-md);line-height:var(--zt-line-height-md);cursor:pointer}.zt-tab--active{color:var(--zt-tab-active-text-color);font-size:var(--zt-font-size-lg);font-weight:var(--zt-font-bold)}.zt-tab--active:active{opacity:var(--zt-tab-active-opacity)}.zt-tab--disabled{color:var(--zt-tab-disabled-text-color);cursor:not-allowed;font-size:var(--zt-font-size-md)}.zt-tab--grow{flex:1 0 auto;padding:0 var(--zt-padding-sm)}.zt-tab--shrink{flex:none;padding:0 var(--zt-padding-xs)}.zt-tab--card{color:var(--zt-tabs-default-color)}.zt-tab--card.zt-tab--active{color:var(--zt-white);background-color:var(--zt-tabs-default-color)}.zt-tab--card--disabled{color:var(--zt-tab-disabled-text-color)}.zt-tab--capsule{color:var(--zt-black)}.zt-tab--capsule.zt-tab--active{color:var(--zt-white);font-size:var(--zt-font-size-md);background-image:linear-gradient(-80deg,#85C0FF 0%,#3388FF 100%);border-radius:14px}.zt-tab--capsule--disabled{color:var(--zt-tab-disabled-text-color)}.zt-tab__title{flex:1;display:flex;align-items:center;justify-content:center}.zt-tab__text--ellipsis{display:-webkit-box;overflow:hidden;-webkit-line-clamp:1;-webkit-box-orient:vertical}.zt-tab__text-wrapper,.zt-tabs{position:relative}.zt-tabs__wrap{overflow:hidden;position:relative}.zt-tabs__wrap--page-top{position:fixed}.zt-tabs__wrap--content-bottom{top:auto;bottom:0}.zt-tabs__overlay-left,.zt-tabs__overlay-right{position:absolute;top:0;width:var(--zt-tabs-line-height);height:var(--zt-tabs-line-height);pointer-events:none}.zt-tabs__overlay-left{left:0;background:var(--zt-tabs-overlay-left-background)}.zt-tabs__overlay-right{right:0;background:var(--zt-tabs-overlay-right-background)}.zt-tabs__nav{position:relative;display:flex;justify-content:flex-start;background-color:var(--zt-tabs-nav-background);-webkit-user-select:none;-moz-user-select:none;user-select:none}.zt-tabs__nav--complete{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.zt-tabs__nav--complete::-webkit-scrollbar{display:none}.zt-tabs__nav--line{box-sizing:content-box;height:100%;padding-bottom:var(--zt-tabs-line-bottom)}.zt-tabs__nav--line.zt-tabs__nav--shrink .zt-tab,.zt-tabs__nav--line.zt-tabs__nav--complete .zt-tab{flex:1 0 auto;padding:0 var(--zt-padding-sm)}.zt-tabs__nav--line.zt-tabs__nav--shrink .zt-tabs__nav,.zt-tabs__nav--line.zt-tabs__nav--complete .zt-tabs__nav{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.zt-tabs__nav--line.zt-tabs__nav--shrink .zt-tabs__nav::-webkit-scrollbar,.zt-tabs__nav--line.zt-tabs__nav--complete .zt-tabs__nav::-webkit-scrollbar{display:none}.zt-tabs__nav--card.zt-tabs__nav--shrink{display:inline-flex}.zt-tabs__nav--capsule{flex:1;box-sizing:border-box;justify-content:space-around;align-items:center;height:var(--zt-tabs-card-height);background:#ffffff;border-radius:18px;padding:4px}.zt-tabs__nav--capsule .zt-tab{flex:1;color:var(--zt-black)}.zt-tabs__nav--capsule .zt-tab.zt-tab--active{height:24px;color:var(--zt-white);font-size:var(--zt-font-size-md);background-image:linear-gradient(-80deg,#85C0FF 0%,#3388FF 100%);border-radius:14px}.zt-tabs__nav--capsule .zt-tab--disabled{color:var(--zt-tab-disabled-text-color)}.zt-tabs__nav--capsule.zt-tabs__nav--shrink{display:inline-flex}.zt-tabs__line{position:absolute;bottom:var(--zt-tabs-line-bottom);left:0;z-index:1;width:var(--zt-tabs-bottom-bar-width);height:var(--zt-tabs-bottom-bar-height);background:var(--zt-tabs-bottom-bar-color);border-radius:var(--zt-tabs-bottom-bar-radius)}.zt-tabs__track{position:relative;display:flex;width:100%;height:100%;will-change:left}.zt-tabs__content--animated{overflow:hidden}.zt-tabs--line .zt-tabs__wrap{height:var(--zt-tabs-line-height)}.zt-tabs--card>.zt-tabs__wrap,.zt-tabs--capsule>.zt-tabs__wrap{height:var(--zt-tabs-card-height);display:flex;justify-content:center}.zt-theme-dark{--zt-tabs-overlay-left-background: linear-gradient(90deg, #0f1923 0%, rgba(15, 25, 35, 0) 100%);--zt-tabs-overlay-right-background: linear-gradient(90deg, rgba(15, 25, 35, 0) 3%, #0f1923 100%)}
|
package/es/tabs/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ComponentPublicInstance, ComputedRef } from 'vue';
|
|
2
2
|
import type { Numeric } from '../utils';
|
|
3
3
|
import type { TabsProps } from './Tabs';
|
|
4
|
-
export type TabsType = 'line' | 'card';
|
|
4
|
+
export type TabsType = 'line' | 'card' | 'capsule';
|
|
5
5
|
export type TabsClickTabEventParams = {
|
|
6
6
|
name: Numeric;
|
|
7
7
|
title: string;
|