cosey 0.8.2 → 0.9.0
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/components/components.d.ts +3 -1
- package/components/components.js +1 -0
- package/components/descriptions/descriptions.api.d.ts +28 -0
- package/components/descriptions/descriptions.api.js +22 -0
- package/components/descriptions/descriptions.d.ts +41 -0
- package/components/descriptions/descriptions.js +37 -0
- package/components/descriptions/descriptions.style.d.ts +4 -0
- package/components/descriptions/descriptions.style.js +69 -0
- package/components/descriptions/index.d.ts +82 -0
- package/components/descriptions/index.js +7 -0
- package/components/index.d.ts +1 -0
- package/components/index.js +1 -0
- package/package.json +1 -1
|
@@ -7,6 +7,7 @@ import { ConfigProvider } from './config-provider';
|
|
|
7
7
|
import { Container } from './container';
|
|
8
8
|
import { ContextMenu, ContextMenuItem, ContextSubMenu } from './context-menu';
|
|
9
9
|
import { Copy } from './copy';
|
|
10
|
+
import { Descriptions } from './descriptions';
|
|
10
11
|
import { DndSort, DndSortItem } from './dnd-sort';
|
|
11
12
|
import { Editor } from './editor';
|
|
12
13
|
import { Field } from './field';
|
|
@@ -63,6 +64,7 @@ declare module 'vue' {
|
|
|
63
64
|
CoContextMenuItem: typeof ContextMenuItem;
|
|
64
65
|
CoContextSubMenu: typeof ContextSubMenu;
|
|
65
66
|
CoCopy: typeof Copy;
|
|
67
|
+
CoDescriptions: typeof Descriptions;
|
|
66
68
|
CoDndSort: typeof DndSort;
|
|
67
69
|
CoDndSortItem: typeof DndSortItem;
|
|
68
70
|
CoEditor: typeof Editor;
|
|
@@ -111,4 +113,4 @@ declare module 'vue' {
|
|
|
111
113
|
CoWeekRangePicker: typeof WeekRangePicker;
|
|
112
114
|
}
|
|
113
115
|
}
|
|
114
|
-
export { AudioCard, AudioViewer, Card, Close, Col, ConfigProvider, Container, ContextMenu, ContextMenuItem, ContextSubMenu, Copy, DndSort, DndSortItem, Editor, Field, FileCard, Form, FormDialog, FormDrawer, FormGroup, FormItem, FormList, FormQuery, Highlight, HorizontalTree, Icon, IconifyIcon, ImageCard, InputNumberRange, LongText, Mask, MediaCard, MediaCardGroup, MediaViewer, NumberFormat, OnlyChild, OptionalWrapper, Panel, RemoteSelect, Ribbon, Row, ScrollView, SnugMenu, SnugMenuItem, StackDialog, SvgIcon, SvgaCard, SvgaViewer, Table, TableAction, Toggle, Transition, TransitionGroup, Upload, VideoCard, VideoViewer, WeekRangePicker, };
|
|
116
|
+
export { AudioCard, AudioViewer, Card, Close, Col, ConfigProvider, Container, ContextMenu, ContextMenuItem, ContextSubMenu, Copy, Descriptions, DndSort, DndSortItem, Editor, Field, FileCard, Form, FormDialog, FormDrawer, FormGroup, FormItem, FormList, FormQuery, Highlight, HorizontalTree, Icon, IconifyIcon, ImageCard, InputNumberRange, LongText, Mask, MediaCard, MediaCardGroup, MediaViewer, NumberFormat, OnlyChild, OptionalWrapper, Panel, RemoteSelect, Ribbon, Row, ScrollView, SnugMenu, SnugMenuItem, StackDialog, SvgIcon, SvgaCard, SvgaViewer, Table, TableAction, Toggle, Transition, TransitionGroup, Upload, VideoCard, VideoViewer, WeekRangePicker, };
|
package/components/components.js
CHANGED
|
@@ -7,6 +7,7 @@ export { ConfigProvider } from './config-provider/index.js';
|
|
|
7
7
|
export { Container } from './container/index.js';
|
|
8
8
|
export { ContextMenu, ContextMenuItem, ContextSubMenu } from './context-menu/index.js';
|
|
9
9
|
export { Copy } from './copy/index.js';
|
|
10
|
+
export { Descriptions } from './descriptions/index.js';
|
|
10
11
|
export { DndSort, DndSortItem } from './dnd-sort/index.js';
|
|
11
12
|
export { Editor } from './editor/index.js';
|
|
12
13
|
export { Field } from './field/index.js';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ExtractPropTypes, PropType, SlotsType } from 'vue';
|
|
2
|
+
export declare const descriptionsProps: {
|
|
3
|
+
data: {
|
|
4
|
+
type: PropType<any[][]>;
|
|
5
|
+
default: () => never[];
|
|
6
|
+
};
|
|
7
|
+
labelAlign: {
|
|
8
|
+
type: PropType<"left" | "center" | "right">;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
border: {
|
|
12
|
+
type: BooleanConstructor;
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
15
|
+
colon: {
|
|
16
|
+
type: BooleanConstructor;
|
|
17
|
+
default: boolean;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export type DescriptionsProps = ExtractPropTypes<typeof descriptionsProps>;
|
|
21
|
+
export interface DescriptionsSlots {
|
|
22
|
+
default: {};
|
|
23
|
+
}
|
|
24
|
+
export declare const descriptionsSlots: SlotsType<DescriptionsSlots>;
|
|
25
|
+
export declare const descriptionsEmits: {};
|
|
26
|
+
export type DescriptionsEmits = typeof descriptionsEmits;
|
|
27
|
+
export interface DescriptionsExpose {
|
|
28
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const descriptionsProps = {
|
|
2
|
+
data: {
|
|
3
|
+
type: Array,
|
|
4
|
+
default: () => []
|
|
5
|
+
},
|
|
6
|
+
labelAlign: {
|
|
7
|
+
type: String,
|
|
8
|
+
default: "right"
|
|
9
|
+
},
|
|
10
|
+
border: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: false
|
|
13
|
+
},
|
|
14
|
+
colon: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: true
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
const descriptionsSlots = {};
|
|
20
|
+
const descriptionsEmits = {};
|
|
21
|
+
|
|
22
|
+
export { descriptionsEmits, descriptionsProps, descriptionsSlots };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
data: {
|
|
3
|
+
type: import("vue").PropType<any[][]>;
|
|
4
|
+
default: () => never[];
|
|
5
|
+
};
|
|
6
|
+
labelAlign: {
|
|
7
|
+
type: import("vue").PropType<"left" | "center" | "right">;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
border: {
|
|
11
|
+
type: BooleanConstructor;
|
|
12
|
+
default: boolean;
|
|
13
|
+
};
|
|
14
|
+
colon: {
|
|
15
|
+
type: BooleanConstructor;
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
18
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
|
+
data: {
|
|
20
|
+
type: import("vue").PropType<any[][]>;
|
|
21
|
+
default: () => never[];
|
|
22
|
+
};
|
|
23
|
+
labelAlign: {
|
|
24
|
+
type: import("vue").PropType<"left" | "center" | "right">;
|
|
25
|
+
default: string;
|
|
26
|
+
};
|
|
27
|
+
border: {
|
|
28
|
+
type: BooleanConstructor;
|
|
29
|
+
default: boolean;
|
|
30
|
+
};
|
|
31
|
+
colon: {
|
|
32
|
+
type: BooleanConstructor;
|
|
33
|
+
default: boolean;
|
|
34
|
+
};
|
|
35
|
+
}>> & Readonly<{}>, {
|
|
36
|
+
border: boolean;
|
|
37
|
+
data: any[][];
|
|
38
|
+
labelAlign: "left" | "right" | "center";
|
|
39
|
+
colon: boolean;
|
|
40
|
+
}, import("vue").SlotsType<import("./descriptions.api").DescriptionsSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
41
|
+
export default _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { defineComponent, createVNode } from 'vue';
|
|
2
|
+
import { descriptionsEmits, descriptionsSlots, descriptionsProps } from './descriptions.api.js';
|
|
3
|
+
import stdin_default$1 from './descriptions.style.js';
|
|
4
|
+
import { useComponentConfig } from '../config-provider/config-provider.api.js';
|
|
5
|
+
|
|
6
|
+
var stdin_default = defineComponent({
|
|
7
|
+
name: "CoDescriptions",
|
|
8
|
+
props: descriptionsProps,
|
|
9
|
+
slots: descriptionsSlots,
|
|
10
|
+
emits: descriptionsEmits,
|
|
11
|
+
setup(props) {
|
|
12
|
+
const {
|
|
13
|
+
prefixCls
|
|
14
|
+
} = useComponentConfig("descriptions", props);
|
|
15
|
+
const {
|
|
16
|
+
hashId
|
|
17
|
+
} = stdin_default$1(prefixCls);
|
|
18
|
+
return () => {
|
|
19
|
+
return createVNode("table", {
|
|
20
|
+
"class": [hashId.value, prefixCls.value, `is-label-${props.labelAlign}`, {
|
|
21
|
+
"is-bordered": props.border,
|
|
22
|
+
"has-colon": props.colon
|
|
23
|
+
}]
|
|
24
|
+
}, [createVNode("tbody", null, [props.data?.map((row, i) => {
|
|
25
|
+
return createVNode("tr", {
|
|
26
|
+
"key": i
|
|
27
|
+
}, [row.map((cell, j) => {
|
|
28
|
+
return createVNode("td", {
|
|
29
|
+
"key": j
|
|
30
|
+
}, [createVNode("span", null, [cell])]);
|
|
31
|
+
})]);
|
|
32
|
+
})])]);
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export { stdin_default as default };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { getSimpleStyleHook } from '../theme/getSimpleStyleHook.js';
|
|
2
|
+
|
|
3
|
+
var stdin_default = getSimpleStyleHook("CoDescriptions", (token) => {
|
|
4
|
+
const { componentCls } = token;
|
|
5
|
+
return {
|
|
6
|
+
[`${componentCls}`]: {
|
|
7
|
+
borderCollapse: "collapse",
|
|
8
|
+
tr: {
|
|
9
|
+
background: "transparent"
|
|
10
|
+
},
|
|
11
|
+
td: {
|
|
12
|
+
"&:nth-child(2n-1)": {
|
|
13
|
+
color: token.colorTextTertiary
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"&.is-label-left": {
|
|
17
|
+
td: {
|
|
18
|
+
"&:nth-child(2n-1)": {
|
|
19
|
+
textAlign: "left"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"&.is-label-center": {
|
|
24
|
+
td: {
|
|
25
|
+
"&:nth-child(2n-1)": {
|
|
26
|
+
textAlign: "center"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"&.is-label-right": {
|
|
31
|
+
td: {
|
|
32
|
+
"&:nth-child(2n-1)": {
|
|
33
|
+
textAlign: "right"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"&:not(.is-bordered)": {
|
|
38
|
+
td: {
|
|
39
|
+
"&:nth-child(2n)": {
|
|
40
|
+
paddingInlineStart: token.paddingXS
|
|
41
|
+
},
|
|
42
|
+
"&:nth-child(2n-1)": {
|
|
43
|
+
"&:not(:first-child)": {
|
|
44
|
+
paddingInlineStart: token.paddingSM
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"&.is-bordered": {
|
|
50
|
+
td: {
|
|
51
|
+
border: `1px solid ${token.colorBorderSecondary}`,
|
|
52
|
+
paddingBlock: token.paddingXXS,
|
|
53
|
+
paddingInline: token.paddingXS
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"&.has-colon": {
|
|
57
|
+
td: {
|
|
58
|
+
"&:nth-child(2n-1)": {
|
|
59
|
+
"span::after": {
|
|
60
|
+
content: '": "'
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
export { stdin_default as default };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export * from './descriptions';
|
|
2
|
+
declare const _Descriptions: {
|
|
3
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
4
|
+
data: {
|
|
5
|
+
type: import("vue").PropType<any[][]>;
|
|
6
|
+
default: () => never[];
|
|
7
|
+
};
|
|
8
|
+
labelAlign: {
|
|
9
|
+
type: import("vue").PropType<"left" | "center" | "right">;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
border: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
default: boolean;
|
|
15
|
+
};
|
|
16
|
+
colon: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
21
|
+
border: boolean;
|
|
22
|
+
data: any[][];
|
|
23
|
+
labelAlign: "left" | "right" | "center";
|
|
24
|
+
colon: boolean;
|
|
25
|
+
}, true, {}, import("vue").SlotsType<import("./descriptions.api").DescriptionsSlots>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
26
|
+
P: {};
|
|
27
|
+
B: {};
|
|
28
|
+
D: {};
|
|
29
|
+
C: {};
|
|
30
|
+
M: {};
|
|
31
|
+
Defaults: {};
|
|
32
|
+
}, Readonly<import("vue").ExtractPropTypes<{
|
|
33
|
+
data: {
|
|
34
|
+
type: import("vue").PropType<any[][]>;
|
|
35
|
+
default: () => never[];
|
|
36
|
+
};
|
|
37
|
+
labelAlign: {
|
|
38
|
+
type: import("vue").PropType<"left" | "center" | "right">;
|
|
39
|
+
default: string;
|
|
40
|
+
};
|
|
41
|
+
border: {
|
|
42
|
+
type: BooleanConstructor;
|
|
43
|
+
default: boolean;
|
|
44
|
+
};
|
|
45
|
+
colon: {
|
|
46
|
+
type: BooleanConstructor;
|
|
47
|
+
default: boolean;
|
|
48
|
+
};
|
|
49
|
+
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
|
|
50
|
+
border: boolean;
|
|
51
|
+
data: any[][];
|
|
52
|
+
labelAlign: "left" | "right" | "center";
|
|
53
|
+
colon: boolean;
|
|
54
|
+
}>;
|
|
55
|
+
__isFragment?: never;
|
|
56
|
+
__isTeleport?: never;
|
|
57
|
+
__isSuspense?: never;
|
|
58
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
59
|
+
data: {
|
|
60
|
+
type: import("vue").PropType<any[][]>;
|
|
61
|
+
default: () => never[];
|
|
62
|
+
};
|
|
63
|
+
labelAlign: {
|
|
64
|
+
type: import("vue").PropType<"left" | "center" | "right">;
|
|
65
|
+
default: string;
|
|
66
|
+
};
|
|
67
|
+
border: {
|
|
68
|
+
type: BooleanConstructor;
|
|
69
|
+
default: boolean;
|
|
70
|
+
};
|
|
71
|
+
colon: {
|
|
72
|
+
type: BooleanConstructor;
|
|
73
|
+
default: boolean;
|
|
74
|
+
};
|
|
75
|
+
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
76
|
+
border: boolean;
|
|
77
|
+
data: any[][];
|
|
78
|
+
labelAlign: "left" | "right" | "center";
|
|
79
|
+
colon: boolean;
|
|
80
|
+
}, {}, string, import("vue").SlotsType<import("./descriptions.api").DescriptionsSlots>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("vue").Plugin;
|
|
81
|
+
export { _Descriptions as Descriptions };
|
|
82
|
+
export default _Descriptions;
|
package/components/index.d.ts
CHANGED
package/components/index.js
CHANGED
|
@@ -7,6 +7,7 @@ export { ConfigProvider } from './config-provider/index.js';
|
|
|
7
7
|
export { Container } from './container/index.js';
|
|
8
8
|
export { ContextMenu, ContextMenuItem, ContextSubMenu } from './context-menu/index.js';
|
|
9
9
|
export { Copy } from './copy/index.js';
|
|
10
|
+
export { Descriptions } from './descriptions/index.js';
|
|
10
11
|
export { DndSort, DndSortItem } from './dnd-sort/index.js';
|
|
11
12
|
export { Editor } from './editor/index.js';
|
|
12
13
|
export { Field } from './field/index.js';
|