@codemonster-ru/vueforge 0.22.0 → 0.23.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/README.md +74 -3
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.ts.mjs +1325 -1116
- package/dist/index.ts.umd.js +3 -3
- package/dist/package/components/__tests__/data-table.test.d.ts +1 -0
- package/dist/package/components/data-table.vue.d.ts +83 -0
- package/dist/package/config/theme-core.d.ts +33 -0
- package/dist/package/themes/default/components/datatable.d.ts +33 -0
- package/dist/package/themes/default/index.d.ts +32 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
type Size = 'small' | 'normal' | 'large';
|
|
2
|
+
type Variant = 'filled' | 'outlined';
|
|
3
|
+
type Align = 'left' | 'center' | 'right';
|
|
4
|
+
type SortOrder = 'asc' | 'desc' | null;
|
|
5
|
+
export interface DataTableColumn {
|
|
6
|
+
field: string;
|
|
7
|
+
header?: string;
|
|
8
|
+
sortable?: boolean;
|
|
9
|
+
align?: Align;
|
|
10
|
+
width?: string;
|
|
11
|
+
minWidth?: string;
|
|
12
|
+
formatter?: (row: Record<string, unknown>, value: unknown, column: DataTableColumn) => string | number;
|
|
13
|
+
}
|
|
14
|
+
interface Props {
|
|
15
|
+
rows?: Array<Record<string, unknown>>;
|
|
16
|
+
columns?: Array<DataTableColumn>;
|
|
17
|
+
rowKey?: string | ((row: Record<string, unknown>, index: number) => string | number);
|
|
18
|
+
sortable?: boolean;
|
|
19
|
+
sortField?: string | null;
|
|
20
|
+
sortOrder?: SortOrder;
|
|
21
|
+
loading?: boolean;
|
|
22
|
+
loadingText?: string;
|
|
23
|
+
emptyText?: string;
|
|
24
|
+
striped?: boolean;
|
|
25
|
+
hover?: boolean;
|
|
26
|
+
size?: Size;
|
|
27
|
+
variant?: Variant;
|
|
28
|
+
showHeader?: boolean;
|
|
29
|
+
ariaLabel?: string;
|
|
30
|
+
}
|
|
31
|
+
declare function __VLS_template(): {
|
|
32
|
+
attrs: Partial<{}>;
|
|
33
|
+
slots: Partial<Record<`header-${string}`, (_: {
|
|
34
|
+
column: DataTableColumn;
|
|
35
|
+
}) => any>> & Partial<Record<`header-${string}`, (_: {
|
|
36
|
+
column: DataTableColumn;
|
|
37
|
+
}) => any>> & Partial<Record<`cell-${string}`, (_: {
|
|
38
|
+
row: Record<string, unknown>;
|
|
39
|
+
column: DataTableColumn;
|
|
40
|
+
value: unknown;
|
|
41
|
+
index: number;
|
|
42
|
+
}) => any>> & {
|
|
43
|
+
loading?(_: {}): any;
|
|
44
|
+
empty?(_: {}): any;
|
|
45
|
+
};
|
|
46
|
+
refs: {};
|
|
47
|
+
rootEl: HTMLDivElement;
|
|
48
|
+
};
|
|
49
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
50
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
51
|
+
sort: (...args: any[]) => void;
|
|
52
|
+
"update:sortField": (...args: any[]) => void;
|
|
53
|
+
"update:sortOrder": (...args: any[]) => void;
|
|
54
|
+
rowClick: (...args: any[]) => void;
|
|
55
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
56
|
+
onSort?: ((...args: any[]) => any) | undefined;
|
|
57
|
+
"onUpdate:sortField"?: ((...args: any[]) => any) | undefined;
|
|
58
|
+
"onUpdate:sortOrder"?: ((...args: any[]) => any) | undefined;
|
|
59
|
+
onRowClick?: ((...args: any[]) => any) | undefined;
|
|
60
|
+
}>, {
|
|
61
|
+
size: Size;
|
|
62
|
+
loading: boolean;
|
|
63
|
+
variant: Variant;
|
|
64
|
+
rows: Array<Record<string, unknown>>;
|
|
65
|
+
loadingText: string;
|
|
66
|
+
emptyText: string;
|
|
67
|
+
ariaLabel: string;
|
|
68
|
+
columns: Array<DataTableColumn>;
|
|
69
|
+
rowKey: string | ((row: Record<string, unknown>, index: number) => string | number);
|
|
70
|
+
sortable: boolean;
|
|
71
|
+
sortField: string | null;
|
|
72
|
+
sortOrder: SortOrder;
|
|
73
|
+
striped: boolean;
|
|
74
|
+
hover: boolean;
|
|
75
|
+
showHeader: boolean;
|
|
76
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
77
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
78
|
+
export default _default;
|
|
79
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
80
|
+
new (): {
|
|
81
|
+
$slots: S;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
@@ -466,6 +466,38 @@ export type SkeletonTokens = {
|
|
|
466
466
|
shimmerColor?: string;
|
|
467
467
|
animationDuration?: string;
|
|
468
468
|
};
|
|
469
|
+
export type DataTableTokens = {
|
|
470
|
+
borderColor?: string;
|
|
471
|
+
borderRadius?: string;
|
|
472
|
+
backgroundColor?: string;
|
|
473
|
+
fontSize?: string;
|
|
474
|
+
textColor?: string;
|
|
475
|
+
headerBackgroundColor?: string;
|
|
476
|
+
headerTextColor?: string;
|
|
477
|
+
headerFontSize?: string;
|
|
478
|
+
headerFontWeight?: string;
|
|
479
|
+
headerBorderColor?: string;
|
|
480
|
+
headerGap?: string;
|
|
481
|
+
rowBackgroundColor?: string;
|
|
482
|
+
rowTextColor?: string;
|
|
483
|
+
rowBorderColor?: string;
|
|
484
|
+
cellPadding?: string;
|
|
485
|
+
stripedBackgroundColor?: string;
|
|
486
|
+
hoverBackgroundColor?: string;
|
|
487
|
+
sortIconColor?: string;
|
|
488
|
+
sortIconActiveColor?: string;
|
|
489
|
+
sortIconSize?: string;
|
|
490
|
+
statePadding?: string;
|
|
491
|
+
stateTextColor?: string;
|
|
492
|
+
small?: {
|
|
493
|
+
fontSize?: string;
|
|
494
|
+
cellPadding?: string;
|
|
495
|
+
};
|
|
496
|
+
large?: {
|
|
497
|
+
fontSize?: string;
|
|
498
|
+
cellPadding?: string;
|
|
499
|
+
};
|
|
500
|
+
};
|
|
469
501
|
export type ToastTokens = {
|
|
470
502
|
gap?: string;
|
|
471
503
|
padding?: string;
|
|
@@ -567,6 +599,7 @@ export type ThemeComponentTokens = {
|
|
|
567
599
|
switch?: SwitchTokens;
|
|
568
600
|
tooltip?: TooltipTokens;
|
|
569
601
|
skeleton?: SkeletonTokens;
|
|
602
|
+
datatable?: DataTableTokens;
|
|
570
603
|
toast?: ToastTokens;
|
|
571
604
|
alert?: AlertTokens;
|
|
572
605
|
[key: string]: unknown;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
borderColor: string;
|
|
3
|
+
borderRadius: string;
|
|
4
|
+
backgroundColor: string;
|
|
5
|
+
fontSize: string;
|
|
6
|
+
textColor: string;
|
|
7
|
+
headerBackgroundColor: string;
|
|
8
|
+
headerTextColor: string;
|
|
9
|
+
headerFontSize: string;
|
|
10
|
+
headerFontWeight: string;
|
|
11
|
+
headerBorderColor: string;
|
|
12
|
+
headerGap: string;
|
|
13
|
+
rowBackgroundColor: string;
|
|
14
|
+
rowTextColor: string;
|
|
15
|
+
rowBorderColor: string;
|
|
16
|
+
cellPadding: string;
|
|
17
|
+
stripedBackgroundColor: string;
|
|
18
|
+
hoverBackgroundColor: string;
|
|
19
|
+
sortIconColor: string;
|
|
20
|
+
sortIconActiveColor: string;
|
|
21
|
+
sortIconSize: string;
|
|
22
|
+
statePadding: string;
|
|
23
|
+
stateTextColor: string;
|
|
24
|
+
small: {
|
|
25
|
+
fontSize: string;
|
|
26
|
+
cellPadding: string;
|
|
27
|
+
};
|
|
28
|
+
large: {
|
|
29
|
+
fontSize: string;
|
|
30
|
+
cellPadding: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export default _default;
|
|
@@ -648,6 +648,38 @@ declare const _default: {
|
|
|
648
648
|
shimmerColor: string;
|
|
649
649
|
animationDuration: string;
|
|
650
650
|
};
|
|
651
|
+
datatable: {
|
|
652
|
+
borderColor: string;
|
|
653
|
+
borderRadius: string;
|
|
654
|
+
backgroundColor: string;
|
|
655
|
+
fontSize: string;
|
|
656
|
+
textColor: string;
|
|
657
|
+
headerBackgroundColor: string;
|
|
658
|
+
headerTextColor: string;
|
|
659
|
+
headerFontSize: string;
|
|
660
|
+
headerFontWeight: string;
|
|
661
|
+
headerBorderColor: string;
|
|
662
|
+
headerGap: string;
|
|
663
|
+
rowBackgroundColor: string;
|
|
664
|
+
rowTextColor: string;
|
|
665
|
+
rowBorderColor: string;
|
|
666
|
+
cellPadding: string;
|
|
667
|
+
stripedBackgroundColor: string;
|
|
668
|
+
hoverBackgroundColor: string;
|
|
669
|
+
sortIconColor: string;
|
|
670
|
+
sortIconActiveColor: string;
|
|
671
|
+
sortIconSize: string;
|
|
672
|
+
statePadding: string;
|
|
673
|
+
stateTextColor: string;
|
|
674
|
+
small: {
|
|
675
|
+
fontSize: string;
|
|
676
|
+
cellPadding: string;
|
|
677
|
+
};
|
|
678
|
+
large: {
|
|
679
|
+
fontSize: string;
|
|
680
|
+
cellPadding: string;
|
|
681
|
+
};
|
|
682
|
+
};
|
|
651
683
|
toast: {
|
|
652
684
|
gap: string;
|
|
653
685
|
padding: string;
|