@katlux/toolkit 0.1.0-beta.46 → 0.1.0-beta.48
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/module.json +1 -1
- package/dist/runtime/components/KButton/KButton.logic.d.ts +1 -1
- package/dist/runtime/components/KCombobox/KCombobox.global.d.vue.ts +9 -0
- package/dist/runtime/components/KCombobox/KCombobox.global.vue +2 -1
- package/dist/runtime/components/KCombobox/KCombobox.global.vue.d.ts +9 -0
- package/dist/runtime/components/KCombobox/KCombobox.logic.d.ts +5 -0
- package/dist/runtime/components/KCombobox/KCombobox.logic.js +4 -0
- package/dist/runtime/components/KDatatable/KDataIterator.logic.d.ts +20 -0
- package/dist/runtime/components/KDatatable/KDatatable.logic.d.ts +12 -0
- package/dist/runtime/components/KDatePicker/KDatePicker.global.d.vue.ts +9 -0
- package/dist/runtime/components/KDatePicker/KDatePicker.global.vue +2 -1
- package/dist/runtime/components/KDatePicker/KDatePicker.global.vue.d.ts +9 -0
- package/dist/runtime/components/KDatePicker/KDatePicker.logic.d.ts +5 -0
- package/dist/runtime/components/KDatePicker/KDatePicker.logic.js +4 -0
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.d.vue.ts +9 -0
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue +2 -1
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue.d.ts +9 -0
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.logic.d.ts +5 -0
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.logic.js +4 -0
- package/dist/runtime/components/KDropdown/KDropdown.global.d.vue.ts +9 -0
- package/dist/runtime/components/KDropdown/KDropdown.global.vue +11 -4
- package/dist/runtime/components/KDropdown/KDropdown.global.vue.d.ts +9 -0
- package/dist/runtime/components/KDropdown/KDropdown.logic.d.ts +11 -3
- package/dist/runtime/components/KDropdown/KDropdown.logic.js +56 -17
- package/dist/runtime/components/KModal/KModal.global.vue +4 -1
- package/dist/runtime/components/KModal/KModal.logic.d.ts +3 -1
- package/dist/runtime/components/KModal/KModal.logic.js +6 -2
- package/dist/runtime/components/KTreePicker/KTreePicker.global.d.vue.ts +2 -2
- package/dist/runtime/components/KTreePicker/KTreePicker.global.vue.d.ts +2 -2
- package/dist/runtime/components/KTreeView/KTreeView.global.d.vue.ts +3 -3
- package/dist/runtime/components/KTreeView/KTreeView.global.vue.d.ts +3 -3
- package/dist/runtime/presets/default/assets/scss/css-variables.css +6 -3
- package/dist/runtime/presets/default/assets/scss/css-variables.scss +6 -3
- package/dist/runtime/presets/default/assets/scss/index.css +6 -3
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.d.vue.ts +1 -0
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue +2 -1
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue.d.ts +1 -0
- package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.d.vue.ts +1 -0
- package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue +2 -1
- package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue.d.ts +1 -0
- package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.d.vue.ts +1 -0
- package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.vue +2 -1
- package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.vue.d.ts +1 -0
- package/dist/runtime/presets/default/components/KDropdown/KDropdown.d.vue.ts +2 -0
- package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue +15 -6
- package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue.d.ts +2 -0
- package/dist/runtime/presets/default/components/KModal/KModal.d.vue.ts +1 -0
- package/dist/runtime/presets/default/components/KModal/KModal.vue +3 -0
- package/dist/runtime/presets/default/components/KModal/KModal.vue.d.ts +1 -0
- package/dist/runtime/presets/default/components/KPanel/KPanel.vue +2 -2
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -22,7 +22,7 @@ export interface KButtonEmits {
|
|
|
22
22
|
export declare function useKButtonLogic(props: KButtonProps, emit: KButtonEmits): {
|
|
23
23
|
isLink: import("vue").ComputedRef<boolean>;
|
|
24
24
|
isDisabled: import("vue").ComputedRef<boolean | undefined>;
|
|
25
|
-
buttonClasses: import("vue").ComputedRef<("info" | "default" | "
|
|
25
|
+
buttonClasses: import("vue").ComputedRef<("info" | "default" | "primary" | "danger" | "success" | "warning" | "light" | "dark" | "small" | "large" | "medium" | {
|
|
26
26
|
disabled: boolean | undefined;
|
|
27
27
|
})[]>;
|
|
28
28
|
onClick: () => void;
|
|
@@ -39,6 +39,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
39
39
|
type: import("vue").PropType<import("./KCombobox.logic.js").ComboboxItem | import("./KCombobox.logic.js").ComboboxItem[] | null>;
|
|
40
40
|
default: null;
|
|
41
41
|
};
|
|
42
|
+
teleportTo: {
|
|
43
|
+
type: import("vue").PropType<string>;
|
|
44
|
+
default: undefined;
|
|
45
|
+
};
|
|
42
46
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
43
47
|
"update:modelValue": (value: import("@katlux/providers").TDataRow | import("@katlux/providers").TDataRow[] | null) => any;
|
|
44
48
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -82,6 +86,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
82
86
|
type: import("vue").PropType<import("./KCombobox.logic.js").ComboboxItem | import("./KCombobox.logic.js").ComboboxItem[] | null>;
|
|
83
87
|
default: null;
|
|
84
88
|
};
|
|
89
|
+
teleportTo: {
|
|
90
|
+
type: import("vue").PropType<string>;
|
|
91
|
+
default: undefined;
|
|
92
|
+
};
|
|
85
93
|
}>> & Readonly<{
|
|
86
94
|
"onUpdate:modelValue"?: ((value: import("@katlux/providers").TDataRow | import("@katlux/providers").TDataRow[] | null) => any) | undefined;
|
|
87
95
|
}>, {
|
|
@@ -89,6 +97,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
89
97
|
modelValue: import("@katlux/providers").TDataRow | import("@katlux/providers").TDataRow[] | null;
|
|
90
98
|
searchbox: boolean;
|
|
91
99
|
placeholder: string;
|
|
100
|
+
teleportTo: string;
|
|
92
101
|
closeOnSelect: boolean;
|
|
93
102
|
multiSelect: boolean;
|
|
94
103
|
maxSelectedDisplay: string | number | boolean;
|
|
@@ -39,6 +39,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
39
39
|
type: import("vue").PropType<import("./KCombobox.logic.js").ComboboxItem | import("./KCombobox.logic.js").ComboboxItem[] | null>;
|
|
40
40
|
default: null;
|
|
41
41
|
};
|
|
42
|
+
teleportTo: {
|
|
43
|
+
type: import("vue").PropType<string>;
|
|
44
|
+
default: undefined;
|
|
45
|
+
};
|
|
42
46
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
43
47
|
"update:modelValue": (value: import("@katlux/providers").TDataRow | import("@katlux/providers").TDataRow[] | null) => any;
|
|
44
48
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -82,6 +86,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
82
86
|
type: import("vue").PropType<import("./KCombobox.logic.js").ComboboxItem | import("./KCombobox.logic.js").ComboboxItem[] | null>;
|
|
83
87
|
default: null;
|
|
84
88
|
};
|
|
89
|
+
teleportTo: {
|
|
90
|
+
type: import("vue").PropType<string>;
|
|
91
|
+
default: undefined;
|
|
92
|
+
};
|
|
85
93
|
}>> & Readonly<{
|
|
86
94
|
"onUpdate:modelValue"?: ((value: import("@katlux/providers").TDataRow | import("@katlux/providers").TDataRow[] | null) => any) | undefined;
|
|
87
95
|
}>, {
|
|
@@ -89,6 +97,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
89
97
|
modelValue: import("@katlux/providers").TDataRow | import("@katlux/providers").TDataRow[] | null;
|
|
90
98
|
searchbox: boolean;
|
|
91
99
|
placeholder: string;
|
|
100
|
+
teleportTo: string;
|
|
92
101
|
closeOnSelect: boolean;
|
|
93
102
|
multiSelect: boolean;
|
|
94
103
|
maxSelectedDisplay: string | number | boolean;
|
|
@@ -13,6 +13,7 @@ export interface KComboboxProps {
|
|
|
13
13
|
visibleFields?: Array<String> | null;
|
|
14
14
|
labelField: string;
|
|
15
15
|
modelValue?: ComboboxItem | ComboboxItem[] | null;
|
|
16
|
+
teleportTo?: string;
|
|
16
17
|
}
|
|
17
18
|
export interface KComboboxEmits {
|
|
18
19
|
(e: 'update:modelValue', value: ComboboxItem | ComboboxItem[] | null): void;
|
|
@@ -58,6 +59,10 @@ export declare const KComboboxDefaultProps: {
|
|
|
58
59
|
type: PropType<ComboboxItem | ComboboxItem[] | null>;
|
|
59
60
|
default: null;
|
|
60
61
|
};
|
|
62
|
+
teleportTo: {
|
|
63
|
+
type: PropType<string>;
|
|
64
|
+
default: undefined;
|
|
65
|
+
};
|
|
61
66
|
};
|
|
62
67
|
export declare function useKComboboxLogic(props: KComboboxProps, emit: KComboboxEmits): {
|
|
63
68
|
selectedItems: import("vue").Ref<TDataRow[] | null, TDataRow[] | null>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ADataProvider } from '@katlux/providers';
|
|
2
|
+
export interface KDataIteratorProps {
|
|
3
|
+
dataProvider: ADataProvider;
|
|
4
|
+
visibleFields?: Array<string> | null;
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
search?: string;
|
|
7
|
+
itemsPerPage?: number;
|
|
8
|
+
page?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const KDataIteratorDefaultProps: {
|
|
11
|
+
visibleFields: null;
|
|
12
|
+
loading: boolean;
|
|
13
|
+
search: string;
|
|
14
|
+
itemsPerPage: number;
|
|
15
|
+
page: number;
|
|
16
|
+
};
|
|
17
|
+
export declare function useKDataIteratorLogic(props: KDataIteratorProps): {
|
|
18
|
+
selectedRows: import("vue").Ref<any[], any[]>;
|
|
19
|
+
selectAll: import("vue").Ref<boolean, boolean>;
|
|
20
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ADataProvider } from '@katlux/providers';
|
|
2
|
+
export interface KDatatableProps {
|
|
3
|
+
dataProvider: ADataProvider;
|
|
4
|
+
visibleFields?: Array<string> | null;
|
|
5
|
+
}
|
|
6
|
+
export declare const KDatatableDefaultProps: {
|
|
7
|
+
visibleFields: null;
|
|
8
|
+
};
|
|
9
|
+
export declare function useKDatatableLogic(props: KDatatableProps): {
|
|
10
|
+
selectedRows: import("vue").Ref<any[], any[]>;
|
|
11
|
+
selectAll: import("vue").Ref<boolean, boolean>;
|
|
12
|
+
};
|
|
@@ -27,6 +27,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
27
27
|
type: import("vue").PropType<import("../KCalendar/types.js").IMarkedDay[]>;
|
|
28
28
|
default: () => never[];
|
|
29
29
|
};
|
|
30
|
+
teleportTo: {
|
|
31
|
+
type: import("vue").PropType<string>;
|
|
32
|
+
default: undefined;
|
|
33
|
+
};
|
|
30
34
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
31
35
|
"update:modelValue": (value: string | Date) => any;
|
|
32
36
|
"update:maskedModel": (value: string) => any;
|
|
@@ -62,6 +66,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
62
66
|
type: import("vue").PropType<import("../KCalendar/types.js").IMarkedDay[]>;
|
|
63
67
|
default: () => never[];
|
|
64
68
|
};
|
|
69
|
+
teleportTo: {
|
|
70
|
+
type: import("vue").PropType<string>;
|
|
71
|
+
default: undefined;
|
|
72
|
+
};
|
|
65
73
|
}>> & Readonly<{
|
|
66
74
|
"onUpdate:modelValue"?: ((value: string | Date) => any) | undefined;
|
|
67
75
|
"onUpdate:maskedModel"?: ((value: string) => any) | undefined;
|
|
@@ -72,6 +80,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
72
80
|
isOpen: boolean;
|
|
73
81
|
day: string | Date;
|
|
74
82
|
modelValue: string | Date;
|
|
83
|
+
teleportTo: string;
|
|
75
84
|
format: string;
|
|
76
85
|
showClear: boolean;
|
|
77
86
|
calendarDefinedDays: import("../KCalendar/types.js").IDefinedDay[];
|
|
@@ -25,7 +25,8 @@ const templateProps = computed(() => ({
|
|
|
25
25
|
calendarMarkedDays: props.calendarMarkedDays,
|
|
26
26
|
textboxClicked,
|
|
27
27
|
onClear: handleClear,
|
|
28
|
-
dateSelected: handleDateSelected
|
|
28
|
+
dateSelected: handleDateSelected,
|
|
29
|
+
teleportTo: props.teleportTo
|
|
29
30
|
}));
|
|
30
31
|
const handleClear = () => {
|
|
31
32
|
_date.value = "";
|
|
@@ -27,6 +27,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
27
27
|
type: import("vue").PropType<import("../KCalendar/types.js").IMarkedDay[]>;
|
|
28
28
|
default: () => never[];
|
|
29
29
|
};
|
|
30
|
+
teleportTo: {
|
|
31
|
+
type: import("vue").PropType<string>;
|
|
32
|
+
default: undefined;
|
|
33
|
+
};
|
|
30
34
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
31
35
|
"update:modelValue": (value: string | Date) => any;
|
|
32
36
|
"update:maskedModel": (value: string) => any;
|
|
@@ -62,6 +66,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
62
66
|
type: import("vue").PropType<import("../KCalendar/types.js").IMarkedDay[]>;
|
|
63
67
|
default: () => never[];
|
|
64
68
|
};
|
|
69
|
+
teleportTo: {
|
|
70
|
+
type: import("vue").PropType<string>;
|
|
71
|
+
default: undefined;
|
|
72
|
+
};
|
|
65
73
|
}>> & Readonly<{
|
|
66
74
|
"onUpdate:modelValue"?: ((value: string | Date) => any) | undefined;
|
|
67
75
|
"onUpdate:maskedModel"?: ((value: string) => any) | undefined;
|
|
@@ -72,6 +80,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
72
80
|
isOpen: boolean;
|
|
73
81
|
day: string | Date;
|
|
74
82
|
modelValue: string | Date;
|
|
83
|
+
teleportTo: string;
|
|
75
84
|
format: string;
|
|
76
85
|
showClear: boolean;
|
|
77
86
|
calendarDefinedDays: import("../KCalendar/types.js").IDefinedDay[];
|
|
@@ -8,6 +8,7 @@ export interface KDatePickerProps {
|
|
|
8
8
|
showClear?: boolean;
|
|
9
9
|
calendarDefinedDays: IDefinedDay[];
|
|
10
10
|
calendarMarkedDays: IMarkedDay[];
|
|
11
|
+
teleportTo?: string;
|
|
11
12
|
}
|
|
12
13
|
export declare const KDatePickerDefaultProps: {
|
|
13
14
|
format: {
|
|
@@ -38,6 +39,10 @@ export declare const KDatePickerDefaultProps: {
|
|
|
38
39
|
type: PropType<IMarkedDay[]>;
|
|
39
40
|
default: () => never[];
|
|
40
41
|
};
|
|
42
|
+
teleportTo: {
|
|
43
|
+
type: PropType<string>;
|
|
44
|
+
default: undefined;
|
|
45
|
+
};
|
|
41
46
|
};
|
|
42
47
|
export declare function useKDatePickerLogic(props: KDatePickerProps): {
|
|
43
48
|
_date: import("vue").Ref<string | Date, string | Date>;
|
|
@@ -35,6 +35,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
35
35
|
type: import("vue").PropType<import("../KCalendar/types.js").IMarkedDay[]>;
|
|
36
36
|
default: () => never[];
|
|
37
37
|
};
|
|
38
|
+
teleportTo: {
|
|
39
|
+
type: import("vue").PropType<string>;
|
|
40
|
+
default: undefined;
|
|
41
|
+
};
|
|
38
42
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
39
43
|
"update:modelValue": (value: string | Date) => any;
|
|
40
44
|
"update:maskedModel": (value: string) => any;
|
|
@@ -77,6 +81,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
77
81
|
type: import("vue").PropType<import("../KCalendar/types.js").IMarkedDay[]>;
|
|
78
82
|
default: () => never[];
|
|
79
83
|
};
|
|
84
|
+
teleportTo: {
|
|
85
|
+
type: import("vue").PropType<string>;
|
|
86
|
+
default: undefined;
|
|
87
|
+
};
|
|
80
88
|
}>> & Readonly<{
|
|
81
89
|
"onUpdate:modelValue"?: ((value: string | Date) => any) | undefined;
|
|
82
90
|
"onUpdate:maskedModel"?: ((value: string) => any) | undefined;
|
|
@@ -86,6 +94,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
86
94
|
isOpen: boolean;
|
|
87
95
|
day: string | Date;
|
|
88
96
|
modelValue: string | Date;
|
|
97
|
+
teleportTo: string;
|
|
89
98
|
format: string;
|
|
90
99
|
showClear: boolean;
|
|
91
100
|
calendarDefinedDays: import("../KCalendar/types.js").IDefinedDay[];
|
|
@@ -35,6 +35,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
35
35
|
type: import("vue").PropType<import("../KCalendar/types.js").IMarkedDay[]>;
|
|
36
36
|
default: () => never[];
|
|
37
37
|
};
|
|
38
|
+
teleportTo: {
|
|
39
|
+
type: import("vue").PropType<string>;
|
|
40
|
+
default: undefined;
|
|
41
|
+
};
|
|
38
42
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
39
43
|
"update:modelValue": (value: string | Date) => any;
|
|
40
44
|
"update:maskedModel": (value: string) => any;
|
|
@@ -77,6 +81,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
77
81
|
type: import("vue").PropType<import("../KCalendar/types.js").IMarkedDay[]>;
|
|
78
82
|
default: () => never[];
|
|
79
83
|
};
|
|
84
|
+
teleportTo: {
|
|
85
|
+
type: import("vue").PropType<string>;
|
|
86
|
+
default: undefined;
|
|
87
|
+
};
|
|
80
88
|
}>> & Readonly<{
|
|
81
89
|
"onUpdate:modelValue"?: ((value: string | Date) => any) | undefined;
|
|
82
90
|
"onUpdate:maskedModel"?: ((value: string) => any) | undefined;
|
|
@@ -86,6 +94,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
86
94
|
isOpen: boolean;
|
|
87
95
|
day: string | Date;
|
|
88
96
|
modelValue: string | Date;
|
|
97
|
+
teleportTo: string;
|
|
89
98
|
format: string;
|
|
90
99
|
showClear: boolean;
|
|
91
100
|
calendarDefinedDays: import("../KCalendar/types.js").IDefinedDay[];
|
|
@@ -10,6 +10,7 @@ export interface KDateTimePickerProps {
|
|
|
10
10
|
timeStep?: number;
|
|
11
11
|
calendarDefinedDays?: IDefinedDay[];
|
|
12
12
|
calendarMarkedDays?: IMarkedDay[];
|
|
13
|
+
teleportTo?: string;
|
|
13
14
|
}
|
|
14
15
|
export declare const KDateTimePickerDefaultProps: {
|
|
15
16
|
format: {
|
|
@@ -48,6 +49,10 @@ export declare const KDateTimePickerDefaultProps: {
|
|
|
48
49
|
type: PropType<IMarkedDay[]>;
|
|
49
50
|
default: () => never[];
|
|
50
51
|
};
|
|
52
|
+
teleportTo: {
|
|
53
|
+
type: PropType<string>;
|
|
54
|
+
default: undefined;
|
|
55
|
+
};
|
|
51
56
|
};
|
|
52
57
|
export declare function useKDateTimePickerLogic(props: KDateTimePickerProps): {
|
|
53
58
|
_date: import("vue").Ref<string | Date, string | Date>;
|
|
@@ -11,6 +11,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
11
11
|
type: import("vue").PropType<HTMLElement>;
|
|
12
12
|
default: undefined;
|
|
13
13
|
};
|
|
14
|
+
teleportTo: {
|
|
15
|
+
type: import("vue").PropType<string>;
|
|
16
|
+
default: undefined;
|
|
17
|
+
};
|
|
14
18
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
15
19
|
"update:isOpen": (value: boolean) => any;
|
|
16
20
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -26,10 +30,15 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
26
30
|
type: import("vue").PropType<HTMLElement>;
|
|
27
31
|
default: undefined;
|
|
28
32
|
};
|
|
33
|
+
teleportTo: {
|
|
34
|
+
type: import("vue").PropType<string>;
|
|
35
|
+
default: undefined;
|
|
36
|
+
};
|
|
29
37
|
}>> & Readonly<{
|
|
30
38
|
"onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
|
|
31
39
|
}>, {
|
|
32
40
|
isOpen: boolean;
|
|
41
|
+
teleportTo: string;
|
|
33
42
|
fullWidth: boolean;
|
|
34
43
|
anchorEl: HTMLElement;
|
|
35
44
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,23 +1,30 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { useKDropdownLogic, KDropdownDefaultProps } from "./KDropdown.logic";
|
|
3
3
|
import { usePresetComponent } from "../../composables/usePresetComponent";
|
|
4
|
-
import { computed } from "vue";
|
|
4
|
+
import { computed, watch } from "vue";
|
|
5
5
|
import KDropdownDefault from "../../presets/default/components/KDropdown/KDropdown.vue";
|
|
6
6
|
const props = defineProps(KDropdownDefaultProps);
|
|
7
7
|
const emit = defineEmits(["update:isOpen"]);
|
|
8
|
-
const { open, dropdownRect, clickoutside } = useKDropdownLogic(props, emit);
|
|
8
|
+
const { open, dropdownRect, clickoutside, teleportTarget, isInModal, updatePosition } = useKDropdownLogic(props, emit);
|
|
9
9
|
const presetComponent = usePresetComponent("KDropdown", KDropdownDefault);
|
|
10
|
+
watch(presetComponent, () => {
|
|
11
|
+
if (open.value) {
|
|
12
|
+
updatePosition();
|
|
13
|
+
}
|
|
14
|
+
});
|
|
10
15
|
const templateProps = computed(() => ({
|
|
11
16
|
open: open.value,
|
|
12
17
|
fullWidth: props.fullWidth,
|
|
13
18
|
anchorEl: props.anchorEl,
|
|
14
19
|
dropdownRect: dropdownRect.value,
|
|
15
|
-
clickoutside
|
|
20
|
+
clickoutside,
|
|
21
|
+
teleportTarget: teleportTarget.value,
|
|
22
|
+
isInModal: isInModal.value
|
|
16
23
|
}));
|
|
17
24
|
</script>
|
|
18
25
|
|
|
19
26
|
<template lang="pug">
|
|
20
|
-
component(:is="presetComponent" v-bind="{ ...templateProps, ...$attrs }")
|
|
27
|
+
component(:is="presetComponent" v-bind="{ ...templateProps, ...$attrs }" @update:isOpen="emit('update:isOpen', $event)")
|
|
21
28
|
template(v-for="(_, slot) in $slots" #[slot]="scope")
|
|
22
29
|
slot(:name="slot" v-bind="scope")
|
|
23
30
|
</template>
|
|
@@ -11,6 +11,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
11
11
|
type: import("vue").PropType<HTMLElement>;
|
|
12
12
|
default: undefined;
|
|
13
13
|
};
|
|
14
|
+
teleportTo: {
|
|
15
|
+
type: import("vue").PropType<string>;
|
|
16
|
+
default: undefined;
|
|
17
|
+
};
|
|
14
18
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
15
19
|
"update:isOpen": (value: boolean) => any;
|
|
16
20
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -26,10 +30,15 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
26
30
|
type: import("vue").PropType<HTMLElement>;
|
|
27
31
|
default: undefined;
|
|
28
32
|
};
|
|
33
|
+
teleportTo: {
|
|
34
|
+
type: import("vue").PropType<string>;
|
|
35
|
+
default: undefined;
|
|
36
|
+
};
|
|
29
37
|
}>> & Readonly<{
|
|
30
38
|
"onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
|
|
31
39
|
}>, {
|
|
32
40
|
isOpen: boolean;
|
|
41
|
+
teleportTo: string;
|
|
33
42
|
fullWidth: boolean;
|
|
34
43
|
anchorEl: HTMLElement;
|
|
35
44
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { type PropType } from 'vue';
|
|
1
|
+
import { type PropType, type Ref } from 'vue';
|
|
2
2
|
export interface KDropdownProps {
|
|
3
3
|
isOpen: boolean;
|
|
4
4
|
fullWidth: boolean;
|
|
5
5
|
anchorEl?: HTMLElement;
|
|
6
|
+
teleportTo?: string;
|
|
6
7
|
}
|
|
7
8
|
export interface KDropdownEmits {
|
|
8
9
|
(e: 'update:isOpen', value: boolean): void;
|
|
@@ -20,10 +21,14 @@ export declare const KDropdownDefaultProps: {
|
|
|
20
21
|
type: PropType<HTMLElement>;
|
|
21
22
|
default: undefined;
|
|
22
23
|
};
|
|
24
|
+
teleportTo: {
|
|
25
|
+
type: PropType<string>;
|
|
26
|
+
default: undefined;
|
|
27
|
+
};
|
|
23
28
|
};
|
|
24
29
|
export declare function useKDropdownLogic(props: KDropdownProps, emit: KDropdownEmits): {
|
|
25
|
-
open:
|
|
26
|
-
dropdownRect:
|
|
30
|
+
open: Ref<boolean, boolean>;
|
|
31
|
+
dropdownRect: Ref<{
|
|
27
32
|
top: number;
|
|
28
33
|
left: number;
|
|
29
34
|
width: number;
|
|
@@ -37,4 +42,7 @@ export declare function useKDropdownLogic(props: KDropdownProps, emit: KDropdown
|
|
|
37
42
|
width: number;
|
|
38
43
|
}>;
|
|
39
44
|
clickoutside: () => void;
|
|
45
|
+
teleportTarget: import("vue").ComputedRef<string>;
|
|
46
|
+
isInModal: import("vue").ComputedRef<boolean>;
|
|
47
|
+
updatePosition: () => void;
|
|
40
48
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ref, watch, onMounted, onUnmounted, nextTick } from "vue";
|
|
1
|
+
import { ref, watch, onMounted, onUnmounted, nextTick, inject, computed } from "vue";
|
|
2
|
+
import { KMODAL_PORTAL_ID_KEY } from "../KModal/KModal.logic.js";
|
|
2
3
|
export const KDropdownDefaultProps = {
|
|
3
4
|
isOpen: {
|
|
4
5
|
type: Boolean,
|
|
@@ -11,24 +12,58 @@ export const KDropdownDefaultProps = {
|
|
|
11
12
|
anchorEl: {
|
|
12
13
|
type: Object,
|
|
13
14
|
default: void 0
|
|
15
|
+
},
|
|
16
|
+
teleportTo: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: void 0
|
|
14
19
|
}
|
|
15
20
|
};
|
|
16
21
|
export function useKDropdownLogic(props, emit) {
|
|
22
|
+
const modalPortalId = inject(KMODAL_PORTAL_ID_KEY, null);
|
|
23
|
+
const isInModal = computed(() => !!modalPortalId?.value);
|
|
24
|
+
const teleportTarget = computed(() => {
|
|
25
|
+
if (props.teleportTo) return props.teleportTo;
|
|
26
|
+
if (isInModal.value && modalPortalId?.value) {
|
|
27
|
+
const targetId = `#${modalPortalId.value}`;
|
|
28
|
+
if (typeof document !== "undefined" && !document.querySelector(targetId)) {
|
|
29
|
+
const activePortal = document.querySelector(".modal-portal");
|
|
30
|
+
if (activePortal && activePortal.id) return `#${activePortal.id}`;
|
|
31
|
+
}
|
|
32
|
+
return targetId;
|
|
33
|
+
}
|
|
34
|
+
return "body";
|
|
35
|
+
});
|
|
17
36
|
const open = ref(false);
|
|
18
37
|
const dropdownRect = ref({ top: 0, left: 0, width: 0 });
|
|
19
38
|
const clickoutside = () => {
|
|
20
39
|
open.value = false;
|
|
21
40
|
emit("update:isOpen", open.value);
|
|
22
41
|
};
|
|
23
|
-
const updatePosition =
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
42
|
+
const updatePosition = () => {
|
|
43
|
+
try {
|
|
44
|
+
if (props.anchorEl) {
|
|
45
|
+
const el = props.anchorEl.$el || props.anchorEl;
|
|
46
|
+
if (el && typeof el.getBoundingClientRect === "function") {
|
|
47
|
+
const rect = el.getBoundingClientRect();
|
|
48
|
+
if (teleportTarget.value === "body" || teleportTarget.value === void 0) {
|
|
49
|
+
dropdownRect.value = {
|
|
50
|
+
top: rect.bottom + window.scrollY,
|
|
51
|
+
left: rect.left + window.scrollX,
|
|
52
|
+
width: rect.width
|
|
53
|
+
};
|
|
54
|
+
} else {
|
|
55
|
+
const portalEl = document.querySelector(teleportTarget.value);
|
|
56
|
+
const portalRect = portalEl ? portalEl.getBoundingClientRect() : { top: 0, left: 0 };
|
|
57
|
+
dropdownRect.value = {
|
|
58
|
+
top: rect.bottom - portalRect.top,
|
|
59
|
+
left: rect.left - portalRect.left,
|
|
60
|
+
width: rect.width
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
} catch (e) {
|
|
66
|
+
console.error("[KDropdown] Failed to update position", e);
|
|
32
67
|
}
|
|
33
68
|
};
|
|
34
69
|
const onScrollResize = () => {
|
|
@@ -39,11 +74,16 @@ export function useKDropdownLogic(props, emit) {
|
|
|
39
74
|
watch(
|
|
40
75
|
() => props.isOpen,
|
|
41
76
|
(newValue) => {
|
|
42
|
-
open.value = newValue;
|
|
43
77
|
if (newValue) {
|
|
44
78
|
updatePosition();
|
|
79
|
+
nextTick(() => {
|
|
80
|
+
open.value = true;
|
|
81
|
+
});
|
|
82
|
+
} else {
|
|
83
|
+
open.value = false;
|
|
45
84
|
}
|
|
46
|
-
}
|
|
85
|
+
},
|
|
86
|
+
{ immediate: true }
|
|
47
87
|
);
|
|
48
88
|
watch(
|
|
49
89
|
() => props.anchorEl,
|
|
@@ -54,10 +94,6 @@ export function useKDropdownLogic(props, emit) {
|
|
|
54
94
|
}
|
|
55
95
|
);
|
|
56
96
|
onMounted(() => {
|
|
57
|
-
open.value = props.isOpen;
|
|
58
|
-
if (open.value) {
|
|
59
|
-
updatePosition();
|
|
60
|
-
}
|
|
61
97
|
window.addEventListener("scroll", onScrollResize, true);
|
|
62
98
|
window.addEventListener("resize", onScrollResize);
|
|
63
99
|
});
|
|
@@ -68,6 +104,9 @@ export function useKDropdownLogic(props, emit) {
|
|
|
68
104
|
return {
|
|
69
105
|
open,
|
|
70
106
|
dropdownRect,
|
|
71
|
-
clickoutside
|
|
107
|
+
clickoutside,
|
|
108
|
+
teleportTarget,
|
|
109
|
+
isInModal,
|
|
110
|
+
updatePosition
|
|
72
111
|
};
|
|
73
112
|
}
|
|
@@ -4,13 +4,16 @@ import { usePresetComponent } from "../../composables/usePresetComponent";
|
|
|
4
4
|
import { computed } from "vue";
|
|
5
5
|
import KModalDefault from "../../presets/default/components/KModal/KModal.vue";
|
|
6
6
|
const props = defineProps(KModalDefaultProps);
|
|
7
|
-
const
|
|
7
|
+
const useId = globalThis.useId || (() => `k-modal-${Math.random().toString(36).slice(2, 9)}`);
|
|
8
|
+
const stableId = useId();
|
|
9
|
+
const { modalId, opened, openModal, closeModal } = useKModalLogic(props, stableId);
|
|
8
10
|
defineExpose({
|
|
9
11
|
openModal,
|
|
10
12
|
closeModal
|
|
11
13
|
});
|
|
12
14
|
const presetComponent = usePresetComponent("KModal", KModalDefault);
|
|
13
15
|
const templateProps = computed(() => ({
|
|
16
|
+
modalId: modalId.value,
|
|
14
17
|
opened: opened.value,
|
|
15
18
|
closeModal
|
|
16
19
|
}));
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
export declare const KMODAL_PORTAL_ID_KEY = "KMODAL_PORTAL_ID";
|
|
1
2
|
export interface KModalProps {
|
|
2
3
|
}
|
|
3
4
|
export declare const KModalDefaultProps: {};
|
|
4
|
-
export declare function useKModalLogic(props: KModalProps): {
|
|
5
|
+
export declare function useKModalLogic(props: KModalProps, stableId: string): {
|
|
6
|
+
modalId: import("vue").ComputedRef<string>;
|
|
5
7
|
opened: import("vue").Ref<boolean, boolean>;
|
|
6
8
|
openModal: () => void;
|
|
7
9
|
closeModal: () => void;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { ref } from "vue";
|
|
1
|
+
import { ref, provide, computed } from "vue";
|
|
2
|
+
export const KMODAL_PORTAL_ID_KEY = "KMODAL_PORTAL_ID";
|
|
2
3
|
export const KModalDefaultProps = {};
|
|
3
|
-
export function useKModalLogic(props) {
|
|
4
|
+
export function useKModalLogic(props, stableId) {
|
|
5
|
+
const modalId = computed(() => stableId);
|
|
6
|
+
provide(KMODAL_PORTAL_ID_KEY, modalId);
|
|
4
7
|
const opened = ref(false);
|
|
5
8
|
function openModal() {
|
|
6
9
|
opened.value = true;
|
|
@@ -9,6 +12,7 @@ export function useKModalLogic(props) {
|
|
|
9
12
|
opened.value = false;
|
|
10
13
|
}
|
|
11
14
|
return {
|
|
15
|
+
modalId,
|
|
12
16
|
opened,
|
|
13
17
|
openModal,
|
|
14
18
|
closeModal
|
|
@@ -103,6 +103,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
103
103
|
onChange?: ((value: any) => any) | undefined;
|
|
104
104
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
105
105
|
}>, {
|
|
106
|
+
parentKey: string;
|
|
107
|
+
idKey: string;
|
|
106
108
|
disabled: boolean;
|
|
107
109
|
loading: boolean;
|
|
108
110
|
modelValue: any;
|
|
@@ -112,8 +114,6 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
112
114
|
closeOnSelect: boolean;
|
|
113
115
|
multiSelect: boolean;
|
|
114
116
|
iconField: string;
|
|
115
|
-
idKey: string;
|
|
116
|
-
parentKey: string;
|
|
117
117
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
118
118
|
declare const _default: typeof __VLS_export;
|
|
119
119
|
export default _default;
|
|
@@ -103,6 +103,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
103
103
|
onChange?: ((value: any) => any) | undefined;
|
|
104
104
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
105
105
|
}>, {
|
|
106
|
+
parentKey: string;
|
|
107
|
+
idKey: string;
|
|
106
108
|
disabled: boolean;
|
|
107
109
|
loading: boolean;
|
|
108
110
|
modelValue: any;
|
|
@@ -112,8 +114,6 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
112
114
|
closeOnSelect: boolean;
|
|
113
115
|
multiSelect: boolean;
|
|
114
116
|
iconField: string;
|
|
115
|
-
idKey: string;
|
|
116
|
-
parentKey: string;
|
|
117
117
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
118
118
|
declare const _default: typeof __VLS_export;
|
|
119
119
|
export default _default;
|
|
@@ -81,14 +81,14 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
81
81
|
default: () => {};
|
|
82
82
|
};
|
|
83
83
|
}>> & Readonly<{}>, {
|
|
84
|
+
parentKey: string;
|
|
85
|
+
idKey: string;
|
|
86
|
+
expandedByDefault: boolean;
|
|
84
87
|
bulkActions: import("@katlux/providers").IKDatatableAction[];
|
|
85
88
|
rowActions: import("./KTreeView.logic.js").IRowAction[];
|
|
86
89
|
cellSlots: Record<string, any>;
|
|
87
90
|
headerSlots: Record<string, any>;
|
|
88
91
|
treeColumnIndex: number;
|
|
89
|
-
idKey: string;
|
|
90
|
-
parentKey: string;
|
|
91
|
-
expandedByDefault: boolean;
|
|
92
92
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
93
93
|
declare const _default: typeof __VLS_export;
|
|
94
94
|
export default _default;
|
|
@@ -81,14 +81,14 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
81
81
|
default: () => {};
|
|
82
82
|
};
|
|
83
83
|
}>> & Readonly<{}>, {
|
|
84
|
+
parentKey: string;
|
|
85
|
+
idKey: string;
|
|
86
|
+
expandedByDefault: boolean;
|
|
84
87
|
bulkActions: import("@katlux/providers").IKDatatableAction[];
|
|
85
88
|
rowActions: import("./KTreeView.logic.js").IRowAction[];
|
|
86
89
|
cellSlots: Record<string, any>;
|
|
87
90
|
headerSlots: Record<string, any>;
|
|
88
91
|
treeColumnIndex: number;
|
|
89
|
-
idKey: string;
|
|
90
|
-
parentKey: string;
|
|
91
|
-
expandedByDefault: boolean;
|
|
92
92
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
93
93
|
declare const _default: typeof __VLS_export;
|
|
94
94
|
export default _default;
|
|
@@ -124,9 +124,11 @@
|
|
|
124
124
|
--button-bg-dark: var(--neutral-900);
|
|
125
125
|
--button-text-dark: var(--font-color-light);
|
|
126
126
|
--button-hover-bg-dark: var(--neutral-700);
|
|
127
|
-
--panel-bg-
|
|
128
|
-
--panel-
|
|
129
|
-
--panel-
|
|
127
|
+
--panel-bg-opacity: 1;
|
|
128
|
+
--panel-blur: 0px;
|
|
129
|
+
--panel-bg-default: var(--neutral-50);
|
|
130
|
+
--panel-header-bg-default: var(--neutral-100);
|
|
131
|
+
--panel-footer-bg-default: var(--neutral-100);
|
|
130
132
|
--panel-bg-primary: var(--blue-300);
|
|
131
133
|
--panel-header-bg-primary: var(--blue-500);
|
|
132
134
|
--panel-footer-bg-primary: var(--blue-100);
|
|
@@ -162,6 +164,7 @@
|
|
|
162
164
|
--component-gap: var(--gap-sm);
|
|
163
165
|
--layover: var(--neutral-600);
|
|
164
166
|
--modal-overlay-bg: rgba(0, 0, 0, 0.5);
|
|
167
|
+
--modal-backdrop-blur: 0px;
|
|
165
168
|
--layout-header-height: 60px;
|
|
166
169
|
--layout-header-bg: var(--background-color);
|
|
167
170
|
--layout-sidebar-width: 200px;
|
|
@@ -178,9 +178,11 @@
|
|
|
178
178
|
--button-hover-bg-dark: var(--neutral-700);
|
|
179
179
|
|
|
180
180
|
// Panel Colors - Default
|
|
181
|
-
--panel-bg-
|
|
182
|
-
--panel-
|
|
183
|
-
--panel-
|
|
181
|
+
--panel-bg-opacity: 1;
|
|
182
|
+
--panel-blur: 0px;
|
|
183
|
+
--panel-bg-default: var(--neutral-50);
|
|
184
|
+
--panel-header-bg-default: var(--neutral-100);
|
|
185
|
+
--panel-footer-bg-default: var(--neutral-100);
|
|
184
186
|
|
|
185
187
|
// Panel Colors - Primary
|
|
186
188
|
--panel-bg-primary: var(--blue-300);
|
|
@@ -236,6 +238,7 @@
|
|
|
236
238
|
--component-gap: var(--gap-sm);
|
|
237
239
|
--layover: var(--neutral-600);
|
|
238
240
|
--modal-overlay-bg: rgba(0, 0, 0, 0.5);
|
|
241
|
+
--modal-backdrop-blur: 0px;
|
|
239
242
|
|
|
240
243
|
// Layout Variables
|
|
241
244
|
--layout-header-height: 60px;
|
|
@@ -141,9 +141,11 @@ li {
|
|
|
141
141
|
--button-bg-dark: var(--neutral-900);
|
|
142
142
|
--button-text-dark: var(--font-color-light);
|
|
143
143
|
--button-hover-bg-dark: var(--neutral-700);
|
|
144
|
-
--panel-bg-
|
|
145
|
-
--panel-
|
|
146
|
-
--panel-
|
|
144
|
+
--panel-bg-opacity: 1;
|
|
145
|
+
--panel-blur: 0px;
|
|
146
|
+
--panel-bg-default: var(--neutral-50);
|
|
147
|
+
--panel-header-bg-default: var(--neutral-100);
|
|
148
|
+
--panel-footer-bg-default: var(--neutral-100);
|
|
147
149
|
--panel-bg-primary: var(--blue-300);
|
|
148
150
|
--panel-header-bg-primary: var(--blue-500);
|
|
149
151
|
--panel-footer-bg-primary: var(--blue-100);
|
|
@@ -179,6 +181,7 @@ li {
|
|
|
179
181
|
--component-gap: var(--gap-sm);
|
|
180
182
|
--layover: var(--neutral-600);
|
|
181
183
|
--modal-overlay-bg: rgba(0, 0, 0, 0.5);
|
|
184
|
+
--modal-backdrop-blur: 0px;
|
|
182
185
|
--layout-header-height: 60px;
|
|
183
186
|
--layout-header-bg: var(--background-color);
|
|
184
187
|
--layout-sidebar-width: 200px;
|
|
@@ -13,6 +13,7 @@ type __VLS_Props = {
|
|
|
13
13
|
selectItem: (option: ComboboxItem) => void;
|
|
14
14
|
isSelected: (option: ComboboxItem) => boolean;
|
|
15
15
|
loading: boolean;
|
|
16
|
+
teleportTo?: string;
|
|
16
17
|
};
|
|
17
18
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
18
19
|
"update:searchtext": (value: string) => any;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
) {{ item[labelField] }}
|
|
10
10
|
.KCombobox__selected-content-placeholder(v-else) {{placeholder}}
|
|
11
11
|
KIcon(iconname="chevron" width="12" height="12").chevron
|
|
12
|
-
KDropdown(:isOpen="isOptionsOpen" :anchorEl="activatorRef" fullWidth).KCombobox__options
|
|
12
|
+
KDropdown(:isOpen="isOptionsOpen" :anchorEl="activatorRef" fullWidth :teleportTo="teleportTo").KCombobox__options
|
|
13
13
|
slot
|
|
14
14
|
KComboboxList(
|
|
15
15
|
:searchbox="searchbox"
|
|
@@ -42,6 +42,7 @@ const props = defineProps<{
|
|
|
42
42
|
selectItem: (option: ComboboxItem) => void
|
|
43
43
|
isSelected: (option: ComboboxItem) => boolean
|
|
44
44
|
loading: boolean
|
|
45
|
+
teleportTo?: string
|
|
45
46
|
}>()
|
|
46
47
|
|
|
47
48
|
const emit = defineEmits<{
|
|
@@ -13,6 +13,7 @@ type __VLS_Props = {
|
|
|
13
13
|
selectItem: (option: ComboboxItem) => void;
|
|
14
14
|
isSelected: (option: ComboboxItem) => boolean;
|
|
15
15
|
loading: boolean;
|
|
16
|
+
teleportTo?: string;
|
|
16
17
|
};
|
|
17
18
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
18
19
|
"update:searchtext": (value: string) => any;
|
|
@@ -11,6 +11,7 @@ type __VLS_Props = {
|
|
|
11
11
|
textboxClicked: () => void;
|
|
12
12
|
onClear?: () => void;
|
|
13
13
|
dateSelected: (date: Date) => void;
|
|
14
|
+
teleportTo?: string;
|
|
14
15
|
};
|
|
15
16
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
16
17
|
"update:maskedModel": (value: string) => any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
2
|
.KDatePicker(ref="activatorRef")
|
|
3
3
|
KMaskTextbox(v-model="maskedModel" :key="maskedModel" :mask="format" :placeholder="format" @click.stop="textboxClicked" :showClear="showClear" @clear="onClear")
|
|
4
|
-
KDropdown(v-model:isOpen="calendarShow" :anchorEl="activatorRef")
|
|
4
|
+
KDropdown(v-model:isOpen="calendarShow" :anchorEl="activatorRef" :teleportTo="teleportTo")
|
|
5
5
|
KCalendar(view="month" :viewCount="1" :day="calendarDay" :selectedDay="_date" @dayClicked="dateSelected" :definedDays="calendarDefinedDays" :markedDays="calendarMarkedDays")
|
|
6
6
|
</template>
|
|
7
7
|
|
|
@@ -25,6 +25,7 @@ const props = defineProps<{
|
|
|
25
25
|
textboxClicked: () => void
|
|
26
26
|
onClear?: () => void
|
|
27
27
|
dateSelected: (date: Date) => void
|
|
28
|
+
teleportTo?: string
|
|
28
29
|
}>()
|
|
29
30
|
|
|
30
31
|
const emit = defineEmits<{
|
|
@@ -11,6 +11,7 @@ type __VLS_Props = {
|
|
|
11
11
|
textboxClicked: () => void;
|
|
12
12
|
onClear?: () => void;
|
|
13
13
|
dateSelected: (date: Date) => void;
|
|
14
|
+
teleportTo?: string;
|
|
14
15
|
};
|
|
15
16
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
16
17
|
"update:maskedModel": (value: string) => any;
|
|
@@ -15,6 +15,7 @@ type __VLS_Props = {
|
|
|
15
15
|
onClear?: () => void;
|
|
16
16
|
dateSelected: (date: Date) => void;
|
|
17
17
|
timeSelected: (time: string) => void;
|
|
18
|
+
teleportTo?: string;
|
|
18
19
|
};
|
|
19
20
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
20
21
|
"update:maskedModel": (value: string) => any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
2
|
.KDateTimePicker(ref="activatorRef" @click.stop="textboxClicked")
|
|
3
3
|
KMaskTextbox(v-model="maskedModel" :key="maskedModel" :mask="format" :placeholder="format" :showClear="showClear" @clear="onClear")
|
|
4
|
-
KDropdown(v-model:isOpen="calendarShow" :anchorEl="activatorRef")
|
|
4
|
+
KDropdown(v-model:isOpen="calendarShow" :anchorEl="activatorRef" :teleportTo="teleportTo")
|
|
5
5
|
KGrid(direction="row" align="start" :noGap="false" wrap="nowrap").datetime-picker-grid
|
|
6
6
|
.calendar-section
|
|
7
7
|
KCalendar(view="month" :viewCount="1" :day="calendarDay" :selectedDay="_date" @dayClicked="dateSelected" :definedDays="calendarDefinedDays" :markedDays="calendarMarkedDays")
|
|
@@ -33,6 +33,7 @@ const props = defineProps<{
|
|
|
33
33
|
onClear?: () => void
|
|
34
34
|
dateSelected: (date: Date) => void
|
|
35
35
|
timeSelected: (time: string) => void
|
|
36
|
+
teleportTo?: string
|
|
36
37
|
}>()
|
|
37
38
|
|
|
38
39
|
const emit = defineEmits<{
|
|
@@ -15,6 +15,7 @@ type __VLS_Props = {
|
|
|
15
15
|
onClear?: () => void;
|
|
16
16
|
dateSelected: (date: Date) => void;
|
|
17
17
|
timeSelected: (time: string) => void;
|
|
18
|
+
teleportTo?: string;
|
|
18
19
|
};
|
|
19
20
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
20
21
|
"update:maskedModel": (value: string) => any;
|
|
@@ -8,6 +8,8 @@ type __VLS_Props = {
|
|
|
8
8
|
width: number;
|
|
9
9
|
};
|
|
10
10
|
clickoutside: () => void;
|
|
11
|
+
teleportTarget: string | null;
|
|
12
|
+
isInModal: boolean;
|
|
11
13
|
};
|
|
12
14
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
15
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
.KDropdown-source
|
|
3
|
+
Teleport(v-if="isMounted && open && teleportTarget" :to="teleportTarget")
|
|
4
|
+
.KDropdown-teleported
|
|
5
|
+
.KDropdown(v-click-outside="clickoutside" :style="dialogStyle" v-bind="$attrs")
|
|
6
|
+
KPanel.KDropdown-container(:class="{'fullWidth': fullWidth}")
|
|
7
|
+
slot
|
|
6
8
|
</template>
|
|
7
9
|
|
|
8
10
|
<script lang="ts" setup>
|
|
9
|
-
import { computed } from 'vue'
|
|
11
|
+
import { computed, ref, onMounted } from 'vue'
|
|
10
12
|
|
|
11
13
|
defineOptions({
|
|
12
14
|
inheritAttrs: false
|
|
@@ -18,14 +20,21 @@ const props = defineProps<{
|
|
|
18
20
|
anchorEl?: HTMLElement
|
|
19
21
|
dropdownRect: { top: number, left: number, width: number }
|
|
20
22
|
clickoutside: () => void
|
|
23
|
+
teleportTarget: string | null
|
|
24
|
+
isInModal: boolean
|
|
21
25
|
}>()
|
|
22
26
|
|
|
27
|
+
const isMounted = ref(false)
|
|
28
|
+
onMounted(() => {
|
|
29
|
+
isMounted.value = true
|
|
30
|
+
})
|
|
31
|
+
|
|
23
32
|
const dialogStyle = computed(() => ({
|
|
24
33
|
position: 'absolute',
|
|
25
34
|
top: `${props.dropdownRect.top}px`,
|
|
26
35
|
left: `${props.dropdownRect.left}px`,
|
|
27
36
|
width: props.fullWidth ? `${props.dropdownRect.width}px` : 'fit-content',
|
|
28
|
-
zIndex:
|
|
37
|
+
zIndex: 2000
|
|
29
38
|
}))
|
|
30
39
|
</script>
|
|
31
40
|
|
|
@@ -8,6 +8,8 @@ type __VLS_Props = {
|
|
|
8
8
|
width: number;
|
|
9
9
|
};
|
|
10
10
|
clickoutside: () => void;
|
|
11
|
+
teleportTarget: string | null;
|
|
12
|
+
isInModal: boolean;
|
|
11
13
|
};
|
|
12
14
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
15
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
2
|
dialog.k-dialog(ref="dialogRef" @close="closeModal" @click="handleBackdropClick")
|
|
3
|
+
.modal-portal(:id="modalId" style="position: absolute; top: 0; left: 0; z-index: 2000;")
|
|
3
4
|
KPanel(no-gap flex-content scrollable).modal-container
|
|
4
5
|
template(#header)
|
|
5
6
|
slot(name="header")
|
|
@@ -12,6 +13,7 @@ dialog.k-dialog(ref="dialogRef" @close="closeModal" @click="handleBackdropClick"
|
|
|
12
13
|
import { ref, watch, onMounted } from 'vue'
|
|
13
14
|
|
|
14
15
|
const props = defineProps<{
|
|
16
|
+
modalId: string
|
|
15
17
|
opened: boolean
|
|
16
18
|
closeModal: () => void
|
|
17
19
|
}>()
|
|
@@ -55,6 +57,7 @@ const handleBackdropClick = (event: MouseEvent) => {
|
|
|
55
57
|
|
|
56
58
|
&::backdrop {
|
|
57
59
|
background-color: var(--modal-overlay-bg);
|
|
60
|
+
backdrop-filter: blur(var(--modal-backdrop-blur));
|
|
58
61
|
}
|
|
59
62
|
|
|
60
63
|
.modal-container {
|
|
@@ -33,8 +33,8 @@ const props = withDefaults(defineProps<{
|
|
|
33
33
|
border-radius: var(--border-radius-lg);
|
|
34
34
|
border: 1px solid var(--neutral-200);
|
|
35
35
|
box-shadow: var(--shadow-md);
|
|
36
|
-
background-color: color-mix(in srgb, var(--current-panel-bg), transparent
|
|
37
|
-
backdrop-filter: blur(
|
|
36
|
+
background-color: color-mix(in srgb, var(--current-panel-bg), transparent calc((1 - var(--panel-bg-opacity)) * 100%));
|
|
37
|
+
backdrop-filter: blur(var(--panel-blur));
|
|
38
38
|
width: 100%;
|
|
39
39
|
display: flex;
|
|
40
40
|
flex-direction: column;
|