@dao-style/core 1.4.2-beta.4 → 1.4.2-beta.6
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/tabs/props.d.ts +6 -2
- package/dist/components/tabs/tab-item.d.ts +12 -1
- package/dist/components/tabs/tab-item.vue.d.ts +3 -0
- package/dist/components/tabs/tab-nav.d.ts +3 -3
- package/dist/components/tabs/tab-nav.vue.d.ts +3 -4
- package/dist/components/tabs/tabs.d.ts +3 -0
- package/dist/components/tabs/tabs.vue.d.ts +1 -0
- package/dist/components/tabs/types.d.ts +5 -2
- package/dist/dao-style.js +6 -6
- package/dist/dao-style.mjs +3140 -3111
- package/dist/style.css +1 -1
- package/dist/utils/constant.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropType, ExtractPropTypes } from 'vue';
|
|
2
|
-
import { DaoTabItemLabel } from './types';
|
|
2
|
+
import { DaoTabItemLabel, TabItemInfo } from './types';
|
|
3
3
|
declare const tabsType: readonly ["card", "line", "pill"];
|
|
4
4
|
type TabsType = typeof tabsType[number];
|
|
5
5
|
declare const tabsDirection: readonly ["left", "right"];
|
|
@@ -48,6 +48,10 @@ export declare const tabItemProps: {
|
|
|
48
48
|
export type TabItemProp = Pick<ExtractPropTypes<typeof tabItemProps>, 'label' | 'value'> & {
|
|
49
49
|
disabled?: boolean;
|
|
50
50
|
};
|
|
51
|
+
export interface LabelSlotMap {
|
|
52
|
+
value: string;
|
|
53
|
+
hasSlot: boolean;
|
|
54
|
+
}
|
|
51
55
|
export declare const tabNavProps: {
|
|
52
56
|
type: {
|
|
53
57
|
type: StringConstructor;
|
|
@@ -58,7 +62,7 @@ export declare const tabNavProps: {
|
|
|
58
62
|
default: null;
|
|
59
63
|
};
|
|
60
64
|
tabList: {
|
|
61
|
-
type: PropType<
|
|
65
|
+
type: PropType<TabItemInfo[]>;
|
|
62
66
|
required: boolean;
|
|
63
67
|
default: () => never[];
|
|
64
68
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { SlotFn } from '../../utils/types';
|
|
1
|
+
import { ParamsSlotFn, SlotFn } from '../../utils/types';
|
|
2
|
+
import { TabItemProp } from './props';
|
|
2
3
|
declare const DaoTabItem: {
|
|
3
4
|
new (...args: any[]): {
|
|
4
5
|
$: import("vue").ComponentInternalInstance;
|
|
@@ -54,6 +55,9 @@ declare const DaoTabItem: {
|
|
|
54
55
|
}>>, {
|
|
55
56
|
active: import("vue").ComputedRef<boolean>;
|
|
56
57
|
tabItem: import("vue").Ref<HTMLElement | undefined>;
|
|
58
|
+
tabLabelTargets: import("vue").Ref<Record<string, HTMLLIElement>> | undefined;
|
|
59
|
+
targetRef: import("vue").Ref<HTMLLIElement | undefined>;
|
|
60
|
+
checkSlot: (isLabelSlotExist: boolean) => boolean;
|
|
57
61
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
58
62
|
label: import("./types").DaoTabItemLabel;
|
|
59
63
|
value: string;
|
|
@@ -96,6 +100,9 @@ declare const DaoTabItem: {
|
|
|
96
100
|
}>> & import("vue").ShallowUnwrapRef<{
|
|
97
101
|
active: import("vue").ComputedRef<boolean>;
|
|
98
102
|
tabItem: import("vue").Ref<HTMLElement | undefined>;
|
|
103
|
+
tabLabelTargets: import("vue").Ref<Record<string, HTMLLIElement>> | undefined;
|
|
104
|
+
targetRef: import("vue").Ref<HTMLLIElement | undefined>;
|
|
105
|
+
checkSlot: (isLabelSlotExist: boolean) => boolean;
|
|
99
106
|
}> & {} & import("vue").ComponentCustomProperties & {};
|
|
100
107
|
__isFragment?: undefined;
|
|
101
108
|
__isTeleport?: undefined;
|
|
@@ -118,6 +125,9 @@ declare const DaoTabItem: {
|
|
|
118
125
|
}>>, {
|
|
119
126
|
active: import("vue").ComputedRef<boolean>;
|
|
120
127
|
tabItem: import("vue").Ref<HTMLElement | undefined>;
|
|
128
|
+
tabLabelTargets: import("vue").Ref<Record<string, HTMLLIElement>> | undefined;
|
|
129
|
+
targetRef: import("vue").Ref<HTMLLIElement | undefined>;
|
|
130
|
+
checkSlot: (isLabelSlotExist: boolean) => boolean;
|
|
121
131
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
122
132
|
label: import("./types").DaoTabItemLabel;
|
|
123
133
|
value: string;
|
|
@@ -125,6 +135,7 @@ declare const DaoTabItem: {
|
|
|
125
135
|
}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
126
136
|
$slots: {
|
|
127
137
|
default: SlotFn;
|
|
138
|
+
label: ParamsSlotFn<TabItemProp>;
|
|
128
139
|
};
|
|
129
140
|
});
|
|
130
141
|
export default DaoTabItem;
|
|
@@ -16,6 +16,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
16
16
|
}, {
|
|
17
17
|
active: import("vue").ComputedRef<boolean>;
|
|
18
18
|
tabItem: import("vue").Ref<HTMLElement | undefined>;
|
|
19
|
+
tabLabelTargets: import("vue").Ref<Record<string, HTMLLIElement>> | undefined;
|
|
20
|
+
targetRef: import("vue").Ref<HTMLLIElement | undefined>;
|
|
21
|
+
checkSlot: (isLabelSlotExist: boolean) => boolean;
|
|
19
22
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20
23
|
label: {
|
|
21
24
|
type: import("vue").PropType<import("./types").DaoTabItemLabel>;
|
|
@@ -8,7 +8,7 @@ declare const DaoTabNav: import("vue").DefineComponent<{
|
|
|
8
8
|
default: null;
|
|
9
9
|
};
|
|
10
10
|
tabList: {
|
|
11
|
-
type: import("vue").PropType<import("./
|
|
11
|
+
type: import("vue").PropType<import("./types").TabItemInfo[]>;
|
|
12
12
|
required: boolean;
|
|
13
13
|
default: () => never[];
|
|
14
14
|
};
|
|
@@ -24,7 +24,7 @@ declare const DaoTabNav: import("vue").DefineComponent<{
|
|
|
24
24
|
default: null;
|
|
25
25
|
};
|
|
26
26
|
tabList: {
|
|
27
|
-
type: import("vue").PropType<import("./
|
|
27
|
+
type: import("vue").PropType<import("./types").TabItemInfo[]>;
|
|
28
28
|
required: boolean;
|
|
29
29
|
default: () => never[];
|
|
30
30
|
};
|
|
@@ -34,6 +34,6 @@ declare const DaoTabNav: import("vue").DefineComponent<{
|
|
|
34
34
|
}, {
|
|
35
35
|
type: string;
|
|
36
36
|
currentTab: string;
|
|
37
|
-
tabList: import("./
|
|
37
|
+
tabList: import("./types").TabItemInfo[];
|
|
38
38
|
}>;
|
|
39
39
|
export default DaoTabNav;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { TabItemProp } from './props';
|
|
2
1
|
declare const _default: import("vue").DefineComponent<{
|
|
3
2
|
type: {
|
|
4
3
|
type: StringConstructor;
|
|
@@ -9,7 +8,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
9
8
|
default: null;
|
|
10
9
|
};
|
|
11
10
|
tabList: {
|
|
12
|
-
type: import("vue").PropType<
|
|
11
|
+
type: import("vue").PropType<import("./types").TabItemInfo[]>;
|
|
13
12
|
required: boolean;
|
|
14
13
|
default: () => never[];
|
|
15
14
|
};
|
|
@@ -25,7 +24,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
25
24
|
default: null;
|
|
26
25
|
};
|
|
27
26
|
tabList: {
|
|
28
|
-
type: import("vue").PropType<
|
|
27
|
+
type: import("vue").PropType<import("./types").TabItemInfo[]>;
|
|
29
28
|
required: boolean;
|
|
30
29
|
default: () => never[];
|
|
31
30
|
};
|
|
@@ -35,6 +34,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
35
34
|
}, {
|
|
36
35
|
type: string;
|
|
37
36
|
currentTab: string;
|
|
38
|
-
tabList:
|
|
37
|
+
tabList: import("./types").TabItemInfo[];
|
|
39
38
|
}>;
|
|
40
39
|
export default _default;
|
|
@@ -66,6 +66,7 @@ declare const DaoTabs: {
|
|
|
66
66
|
label: import("./types").DaoTabItemLabel;
|
|
67
67
|
value: string;
|
|
68
68
|
disabled?: boolean | undefined;
|
|
69
|
+
hasSlot: boolean;
|
|
69
70
|
}[];
|
|
70
71
|
tabBody: import("vue").Ref<HTMLElement | undefined>;
|
|
71
72
|
onClick: (e: MouseEvent, tabValue: string) => void;
|
|
@@ -119,6 +120,7 @@ declare const DaoTabs: {
|
|
|
119
120
|
label: import("./types").DaoTabItemLabel;
|
|
120
121
|
value: string;
|
|
121
122
|
disabled?: boolean | undefined;
|
|
123
|
+
hasSlot: boolean;
|
|
122
124
|
}[];
|
|
123
125
|
tabBody: import("vue").Ref<HTMLElement | undefined>;
|
|
124
126
|
onClick: (e: MouseEvent, tabValue: string) => void;
|
|
@@ -152,6 +154,7 @@ declare const DaoTabs: {
|
|
|
152
154
|
label: import("./types").DaoTabItemLabel;
|
|
153
155
|
value: string;
|
|
154
156
|
disabled?: boolean | undefined;
|
|
157
|
+
hasSlot: boolean;
|
|
155
158
|
}[];
|
|
156
159
|
tabBody: import("vue").Ref<HTMLElement | undefined>;
|
|
157
160
|
onClick: (e: MouseEvent, tabValue: string) => void;
|
|
@@ -19,6 +19,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
19
19
|
label: import("./types").DaoTabItemLabel;
|
|
20
20
|
value: string;
|
|
21
21
|
disabled?: boolean | undefined;
|
|
22
|
+
hasSlot: boolean;
|
|
22
23
|
}[];
|
|
23
24
|
tabBody: import("vue").Ref<HTMLElement | undefined>;
|
|
24
25
|
onClick: (e: MouseEvent, tabValue: string) => void;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { VNode, Ref } from 'vue';
|
|
2
2
|
import { TabItemProp } from './props';
|
|
3
3
|
export type DaoTabItemLabel = string | (() => VNode);
|
|
4
|
-
export type
|
|
5
|
-
|
|
4
|
+
export type TabItemInfo = TabItemProp & {
|
|
5
|
+
hasSlot: boolean;
|
|
6
|
+
};
|
|
7
|
+
export type AddTabFn = (tab: TabItemInfo, itemDom: Ref<HTMLElement | undefined>) => void;
|
|
8
|
+
export type RemoveTabFn = (tab: TabItemInfo) => void;
|