@katlux/toolkit 0.1.0-beta.39 → 0.1.0-beta.40
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/compiled/composables/usePresetComponent.mjs +21 -16
- package/dist/module.json +1 -1
- package/dist/runtime/components/KButton/KButton.logic.d.ts +1 -1
- package/dist/runtime/components/KCombobox/KCombobox.logic.d.ts +72 -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/KPanel/KPanel.global.d.vue.ts +2 -0
- package/dist/runtime/components/KPanel/KPanel.global.vue +7 -2
- package/dist/runtime/components/KPanel/KPanel.global.vue.d.ts +2 -0
- package/dist/runtime/components/KPanel/KPanel.logic.d.ts +10 -0
- package/dist/runtime/components/KPanel/KPanel.logic.js +8 -0
- package/dist/runtime/components/KTextbox/KTextbox.global.d.vue.ts +12 -0
- package/dist/runtime/components/KTextbox/KTextbox.global.vue.d.ts +12 -0
- package/dist/runtime/components/KTextbox/KTextbox.logic.d.ts +6 -0
- package/dist/runtime/components/KTextbox/KTextbox.logic.js +7 -0
- 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/KTreePicker/KTreePicker.logic.d.ts +77 -0
- 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/composables/usePresetComponent.d.ts +16 -0
- package/dist/runtime/composables/usePresetComponent.js +21 -16
- package/dist/runtime/presets/default/assets/scss/css-variables.css +61 -13
- package/dist/runtime/presets/default/assets/scss/css-variables.scss +80 -13
- package/dist/runtime/presets/default/assets/scss/index.css +61 -13
- package/dist/runtime/presets/default/components/KButton/KButton.vue +1 -1
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue +0 -1
- package/dist/runtime/presets/default/components/KCombobox/KComboboxList.vue +6 -1
- package/dist/runtime/presets/default/components/KDatatable/KDatatable.vue +2 -1
- package/dist/runtime/presets/default/components/KPanel/KPanel.d.vue.ts +3 -0
- package/dist/runtime/presets/default/components/KPanel/KPanel.vue +68 -15
- package/dist/runtime/presets/default/components/KPanel/KPanel.vue.d.ts +3 -0
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.d.vue.ts +1 -0
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue +2 -1
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { computed, defineAsyncComponent } from "vue";
|
|
2
2
|
import { useAppConfig } from "#app";
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
export const presetLoadersRegistry = /* @__PURE__ */ new Map();
|
|
4
|
+
export function registerPresetComponents(presetName, loaders) {
|
|
5
|
+
presetLoadersRegistry.set(presetName, loaders);
|
|
6
|
+
}
|
|
6
7
|
export function usePresetComponent(componentBaseName, defaultComponent) {
|
|
7
8
|
const appConfig = useAppConfig();
|
|
8
9
|
const activePreset = computed(() => appConfig.katluxToolkit?.activePreset || "default");
|
|
@@ -10,27 +11,31 @@ export function usePresetComponent(componentBaseName, defaultComponent) {
|
|
|
10
11
|
if (activePreset.value === "default") {
|
|
11
12
|
return defaultComponent;
|
|
12
13
|
}
|
|
13
|
-
const cacheKey = `${activePreset.value}:${componentBaseName}`;
|
|
14
|
-
if (componentCache.has(cacheKey)) {
|
|
15
|
-
return componentCache.get(cacheKey);
|
|
16
|
-
}
|
|
17
14
|
let loader;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
const externalLoaders = presetLoadersRegistry.get(activePreset.value);
|
|
16
|
+
if (externalLoaders) {
|
|
17
|
+
const key = `./components/${componentBaseName}/${componentBaseName}.vue`;
|
|
18
|
+
loader = externalLoaders[key];
|
|
19
|
+
}
|
|
20
|
+
if (!loader) {
|
|
21
|
+
const internalLoaders = import.meta.glob([
|
|
22
|
+
"../presets/**/*.vue",
|
|
23
|
+
"../../runtime/presets/**/*.vue"
|
|
24
|
+
]);
|
|
25
|
+
const internalKey = `../presets/${activePreset.value}/components/${componentBaseName}/${componentBaseName}.vue`;
|
|
26
|
+
loader = internalLoaders[internalKey];
|
|
27
|
+
if (!loader) {
|
|
28
|
+
const altKey = `../../runtime/presets/${activePreset.value}/components/${componentBaseName}/${componentBaseName}.vue`;
|
|
29
|
+
loader = internalLoaders[altKey];
|
|
30
|
+
}
|
|
24
31
|
}
|
|
25
32
|
if (!loader) {
|
|
26
33
|
console.warn(`[${componentBaseName}] Preset "${activePreset.value}" not found, falling back to default`);
|
|
27
34
|
return defaultComponent;
|
|
28
35
|
}
|
|
29
|
-
|
|
36
|
+
return defineAsyncComponent({
|
|
30
37
|
loader,
|
|
31
38
|
errorComponent: defaultComponent
|
|
32
39
|
});
|
|
33
|
-
componentCache.set(cacheKey, asyncComp);
|
|
34
|
-
return asyncComp;
|
|
35
40
|
});
|
|
36
41
|
}
|
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;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { ADataProvider } from '@katlux/providers';
|
|
2
|
+
import { type TDataRow } from '@katlux/providers';
|
|
3
|
+
export type ComboboxItem = TDataRow;
|
|
4
|
+
export interface KComboboxProps {
|
|
5
|
+
dataProvider: ADataProvider;
|
|
6
|
+
closeOnSelect?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
multiSelect?: boolean;
|
|
9
|
+
maxSelectedDisplay?: number | string | false;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
searchbox?: boolean;
|
|
12
|
+
visibleFields?: Array<String> | null;
|
|
13
|
+
labelField: string;
|
|
14
|
+
modelValue?: ComboboxItem | ComboboxItem[] | null;
|
|
15
|
+
}
|
|
16
|
+
export interface KComboboxEmits {
|
|
17
|
+
(e: 'update:modelValue', value: ComboboxItem | ComboboxItem[] | null): void;
|
|
18
|
+
}
|
|
19
|
+
export declare const KComboboxDefaultProps: {
|
|
20
|
+
dataProvider: {
|
|
21
|
+
type: PropType<ADataProvider>;
|
|
22
|
+
required: boolean;
|
|
23
|
+
};
|
|
24
|
+
closeOnSelect: {
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
default: boolean;
|
|
27
|
+
};
|
|
28
|
+
disabled: {
|
|
29
|
+
type: BooleanConstructor;
|
|
30
|
+
default: boolean;
|
|
31
|
+
};
|
|
32
|
+
multiSelect: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
maxSelectedDisplay: {
|
|
37
|
+
type: (BooleanConstructor | NumberConstructor | StringConstructor)[];
|
|
38
|
+
default: boolean;
|
|
39
|
+
};
|
|
40
|
+
placeholder: {
|
|
41
|
+
type: StringConstructor;
|
|
42
|
+
default: string;
|
|
43
|
+
};
|
|
44
|
+
searchbox: {
|
|
45
|
+
type: BooleanConstructor;
|
|
46
|
+
default: boolean;
|
|
47
|
+
};
|
|
48
|
+
visibleFields: {
|
|
49
|
+
type: PropType<Array<String>>;
|
|
50
|
+
default: null;
|
|
51
|
+
};
|
|
52
|
+
labelField: {
|
|
53
|
+
type: StringConstructor;
|
|
54
|
+
required: boolean;
|
|
55
|
+
};
|
|
56
|
+
modelValue: {
|
|
57
|
+
type: PropType<ComboboxItem | ComboboxItem[] | null>;
|
|
58
|
+
default: null;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
export declare function useKComboboxLogic(props: KComboboxProps, emit: KComboboxEmits): {
|
|
62
|
+
selectedItems: import("vue").Ref<TDataRow[] | null, TDataRow[] | null>;
|
|
63
|
+
isOptionsOpen: import("vue").Ref<boolean, boolean>;
|
|
64
|
+
searchtext: import("vue").Ref<string, string>;
|
|
65
|
+
selectItem: (option: ComboboxItem) => void;
|
|
66
|
+
isSelected: (option: ComboboxItem) => boolean | undefined;
|
|
67
|
+
getSelectedContent: () => TDataRow[];
|
|
68
|
+
toggleDropdown: () => void;
|
|
69
|
+
closeDropdown: () => void;
|
|
70
|
+
filteredOptions: import("vue").ComputedRef<TDataRow[]>;
|
|
71
|
+
loading: import("vue").Ref<Boolean, Boolean>;
|
|
72
|
+
};
|
|
@@ -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
|
+
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { type KPanelProps } from './KPanel.logic.js';
|
|
2
2
|
declare const __VLS_export: import("vue").DefineComponent<KPanelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<KPanelProps> & Readonly<{}>, {
|
|
3
|
+
type: "default" | "primary" | "danger" | "success" | "warning" | "info";
|
|
3
4
|
title: string;
|
|
4
5
|
noGap: boolean;
|
|
5
6
|
flexContent: boolean;
|
|
7
|
+
scrollable: boolean;
|
|
6
8
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
9
|
declare const _default: typeof __VLS_export;
|
|
8
10
|
export default _default;
|
|
@@ -6,12 +6,17 @@ import KPanelDefault from "../../presets/default/components/KPanel/KPanel.vue";
|
|
|
6
6
|
const props = defineProps({
|
|
7
7
|
title: { type: String, required: false, default: "" },
|
|
8
8
|
noGap: { type: Boolean, required: false, default: true },
|
|
9
|
-
flexContent: { type: Boolean, required: false, default: false }
|
|
9
|
+
flexContent: { type: Boolean, required: false, default: false },
|
|
10
|
+
scrollable: { type: Boolean, required: false, default: false },
|
|
11
|
+
type: { type: String, required: false, default: "default" }
|
|
10
12
|
});
|
|
11
13
|
const presetComponent = usePresetComponent("KPanel", KPanelDefault);
|
|
12
14
|
const templateProps = computed(() => ({
|
|
15
|
+
title: props.title,
|
|
13
16
|
noGap: props.noGap,
|
|
14
|
-
flexContent: props.flexContent
|
|
17
|
+
flexContent: props.flexContent,
|
|
18
|
+
scrollable: props.scrollable,
|
|
19
|
+
type: props.type
|
|
15
20
|
}));
|
|
16
21
|
</script>
|
|
17
22
|
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { type KPanelProps } from './KPanel.logic.js';
|
|
2
2
|
declare const __VLS_export: import("vue").DefineComponent<KPanelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<KPanelProps> & Readonly<{}>, {
|
|
3
|
+
type: "default" | "primary" | "danger" | "success" | "warning" | "info";
|
|
3
4
|
title: string;
|
|
4
5
|
noGap: boolean;
|
|
5
6
|
flexContent: boolean;
|
|
7
|
+
scrollable: boolean;
|
|
6
8
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
9
|
declare const _default: typeof __VLS_export;
|
|
8
10
|
export default _default;
|
|
@@ -2,6 +2,8 @@ export interface KPanelProps {
|
|
|
2
2
|
title?: string;
|
|
3
3
|
noGap?: boolean;
|
|
4
4
|
flexContent?: boolean;
|
|
5
|
+
scrollable?: boolean;
|
|
6
|
+
type?: 'default' | 'primary' | 'danger' | 'success' | 'warning' | 'info';
|
|
5
7
|
}
|
|
6
8
|
export declare const KPanelDefaultProps: {
|
|
7
9
|
title: {
|
|
@@ -16,5 +18,13 @@ export declare const KPanelDefaultProps: {
|
|
|
16
18
|
type: BooleanConstructor;
|
|
17
19
|
default: boolean;
|
|
18
20
|
};
|
|
21
|
+
scrollable: {
|
|
22
|
+
type: BooleanConstructor;
|
|
23
|
+
default: boolean;
|
|
24
|
+
};
|
|
25
|
+
type: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
19
29
|
};
|
|
20
30
|
export declare function useKPanelLogic(props: KPanelProps): {};
|
|
@@ -10,6 +10,14 @@ export const KPanelDefaultProps = {
|
|
|
10
10
|
flexContent: {
|
|
11
11
|
type: Boolean,
|
|
12
12
|
default: false
|
|
13
|
+
},
|
|
14
|
+
scrollable: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: false
|
|
17
|
+
},
|
|
18
|
+
type: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: "default"
|
|
13
21
|
}
|
|
14
22
|
};
|
|
15
23
|
export function useKPanelLogic(props) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type KTextboxProps } from './KTextbox.logic.js';
|
|
1
2
|
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
3
|
modelValue: {
|
|
3
4
|
type: StringConstructor;
|
|
@@ -11,6 +12,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
11
12
|
type: BooleanConstructor;
|
|
12
13
|
default: boolean;
|
|
13
14
|
};
|
|
15
|
+
type: {
|
|
16
|
+
type: import("vue").PropType<KTextboxProps["type"]>;
|
|
17
|
+
default: string;
|
|
18
|
+
validator: (value: string) => boolean;
|
|
19
|
+
};
|
|
14
20
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
15
21
|
"update:modelValue": (value: string) => any;
|
|
16
22
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -26,9 +32,15 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
26
32
|
type: BooleanConstructor;
|
|
27
33
|
default: boolean;
|
|
28
34
|
};
|
|
35
|
+
type: {
|
|
36
|
+
type: import("vue").PropType<KTextboxProps["type"]>;
|
|
37
|
+
default: string;
|
|
38
|
+
validator: (value: string) => boolean;
|
|
39
|
+
};
|
|
29
40
|
}>> & Readonly<{
|
|
30
41
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
31
42
|
}>, {
|
|
43
|
+
type: "number" | "text" | "url" | "search" | "password" | "email" | "tel" | undefined;
|
|
32
44
|
placeholder: string;
|
|
33
45
|
showClear: boolean;
|
|
34
46
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type KTextboxProps } from './KTextbox.logic.js';
|
|
1
2
|
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
3
|
modelValue: {
|
|
3
4
|
type: StringConstructor;
|
|
@@ -11,6 +12,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
11
12
|
type: BooleanConstructor;
|
|
12
13
|
default: boolean;
|
|
13
14
|
};
|
|
15
|
+
type: {
|
|
16
|
+
type: import("vue").PropType<KTextboxProps["type"]>;
|
|
17
|
+
default: string;
|
|
18
|
+
validator: (value: string) => boolean;
|
|
19
|
+
};
|
|
14
20
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
15
21
|
"update:modelValue": (value: string) => any;
|
|
16
22
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -26,9 +32,15 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
26
32
|
type: BooleanConstructor;
|
|
27
33
|
default: boolean;
|
|
28
34
|
};
|
|
35
|
+
type: {
|
|
36
|
+
type: import("vue").PropType<KTextboxProps["type"]>;
|
|
37
|
+
default: string;
|
|
38
|
+
validator: (value: string) => boolean;
|
|
39
|
+
};
|
|
29
40
|
}>> & Readonly<{
|
|
30
41
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
31
42
|
}>, {
|
|
43
|
+
type: "number" | "text" | "url" | "search" | "password" | "email" | "tel" | undefined;
|
|
32
44
|
placeholder: string;
|
|
33
45
|
showClear: boolean;
|
|
34
46
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -2,6 +2,7 @@ export interface KTextboxProps {
|
|
|
2
2
|
modelValue: string;
|
|
3
3
|
placeholder: string;
|
|
4
4
|
showClear?: boolean;
|
|
5
|
+
type?: 'text' | 'password' | 'email' | 'url' | 'tel' | 'search' | 'number';
|
|
5
6
|
}
|
|
6
7
|
export interface KTextboxEmits {
|
|
7
8
|
(e: 'update:modelValue', value: string): void;
|
|
@@ -30,4 +31,9 @@ export declare const KTextboxDefaultProps: {
|
|
|
30
31
|
type: BooleanConstructor;
|
|
31
32
|
default: boolean;
|
|
32
33
|
};
|
|
34
|
+
type: {
|
|
35
|
+
type: import("vue").PropType<KTextboxProps["type"]>;
|
|
36
|
+
default: string;
|
|
37
|
+
validator: (value: string) => boolean;
|
|
38
|
+
};
|
|
33
39
|
};
|
|
@@ -28,5 +28,12 @@ export const KTextboxDefaultProps = {
|
|
|
28
28
|
showClear: {
|
|
29
29
|
type: Boolean,
|
|
30
30
|
default: false
|
|
31
|
+
},
|
|
32
|
+
type: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: "text",
|
|
35
|
+
validator: (value) => {
|
|
36
|
+
return ["text", "password", "email", "url", "tel", "search", "number"].includes(value);
|
|
37
|
+
}
|
|
31
38
|
}
|
|
32
39
|
};
|
|
@@ -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;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { ADataProvider } from '@katlux/providers';
|
|
2
|
+
export interface KTreePickerProps {
|
|
3
|
+
modelValue?: any;
|
|
4
|
+
dataProvider: ADataProvider;
|
|
5
|
+
labelField: string;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
closeOnSelect?: boolean;
|
|
9
|
+
idKey?: string;
|
|
10
|
+
parentKey?: string;
|
|
11
|
+
iconField?: string;
|
|
12
|
+
loading?: boolean;
|
|
13
|
+
multiSelect?: boolean;
|
|
14
|
+
searchbox?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare const KTreePickerDefaultProps: {
|
|
17
|
+
modelValue: {
|
|
18
|
+
type: PropType<any>;
|
|
19
|
+
default: null;
|
|
20
|
+
};
|
|
21
|
+
dataProvider: {
|
|
22
|
+
type: PropType<ADataProvider>;
|
|
23
|
+
required: boolean;
|
|
24
|
+
};
|
|
25
|
+
labelField: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
required: boolean;
|
|
28
|
+
};
|
|
29
|
+
placeholder: {
|
|
30
|
+
type: StringConstructor;
|
|
31
|
+
default: string;
|
|
32
|
+
};
|
|
33
|
+
disabled: {
|
|
34
|
+
type: BooleanConstructor;
|
|
35
|
+
default: boolean;
|
|
36
|
+
};
|
|
37
|
+
closeOnSelect: {
|
|
38
|
+
type: BooleanConstructor;
|
|
39
|
+
default: boolean;
|
|
40
|
+
};
|
|
41
|
+
idKey: {
|
|
42
|
+
type: StringConstructor;
|
|
43
|
+
default: string;
|
|
44
|
+
};
|
|
45
|
+
parentKey: {
|
|
46
|
+
type: StringConstructor;
|
|
47
|
+
default: string;
|
|
48
|
+
};
|
|
49
|
+
iconField: {
|
|
50
|
+
type: StringConstructor;
|
|
51
|
+
default: undefined;
|
|
52
|
+
};
|
|
53
|
+
loading: {
|
|
54
|
+
type: BooleanConstructor;
|
|
55
|
+
default: boolean;
|
|
56
|
+
};
|
|
57
|
+
multiSelect: {
|
|
58
|
+
type: BooleanConstructor;
|
|
59
|
+
default: boolean;
|
|
60
|
+
};
|
|
61
|
+
searchbox: {
|
|
62
|
+
type: BooleanConstructor;
|
|
63
|
+
default: boolean;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
export declare function useKTreePickerLogic(props: KTreePickerProps, emit: any): {
|
|
67
|
+
selectedItems: import("vue").Ref<import("@katlux/providers").TDataRow[] | null, import("@katlux/providers").TDataRow[] | null>;
|
|
68
|
+
isOptionsOpen: import("vue").Ref<boolean, boolean>;
|
|
69
|
+
searchtext: import("vue").Ref<string, string>;
|
|
70
|
+
selectItem: (option: import("../KCombobox/KCombobox.logic.js").ComboboxItem) => void;
|
|
71
|
+
isSelected: (option: import("../KCombobox/KCombobox.logic.js").ComboboxItem) => boolean | undefined;
|
|
72
|
+
getSelectedContent: () => import("@katlux/providers").TDataRow[];
|
|
73
|
+
toggleDropdown: () => void;
|
|
74
|
+
closeDropdown: () => void;
|
|
75
|
+
filteredOptions: import("vue").ComputedRef<import("@katlux/providers").TDataRow[]>;
|
|
76
|
+
loading: import("vue").Ref<Boolean, Boolean>;
|
|
77
|
+
};
|
|
@@ -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;
|
|
@@ -1,2 +1,18 @@
|
|
|
1
1
|
import { type Component } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Registry mapping preset names to their respective module loaders (via import.meta.glob).
|
|
4
|
+
* Preset modules must inject their components here via a Nuxt Plugin.
|
|
5
|
+
*/
|
|
6
|
+
export declare const presetLoadersRegistry: Map<string, Record<string, () => Promise<any>>>;
|
|
7
|
+
/**
|
|
8
|
+
* API for Nuxt modules to dynamically map their generated components
|
|
9
|
+
*/
|
|
10
|
+
export declare function registerPresetComponents(presetName: string, loaders: Record<string, () => Promise<any>>): void;
|
|
11
|
+
/**
|
|
12
|
+
* Composable for dynamically loading preset components
|
|
13
|
+
*
|
|
14
|
+
* @param componentBaseName - Base name of the component (e.g., 'KButton')
|
|
15
|
+
* @param defaultComponent - The default preset component to fall back to
|
|
16
|
+
* @returns The resolved Async Component
|
|
17
|
+
*/
|
|
2
18
|
export declare function usePresetComponent(componentBaseName: string, defaultComponent: Component): import("vue").ComputedRef<any>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { computed, defineAsyncComponent } from "vue";
|
|
2
2
|
import { useAppConfig } from "#app";
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
export const presetLoadersRegistry = /* @__PURE__ */ new Map();
|
|
4
|
+
export function registerPresetComponents(presetName, loaders) {
|
|
5
|
+
presetLoadersRegistry.set(presetName, loaders);
|
|
6
|
+
}
|
|
6
7
|
export function usePresetComponent(componentBaseName, defaultComponent) {
|
|
7
8
|
const appConfig = useAppConfig();
|
|
8
9
|
const activePreset = computed(() => appConfig.katluxToolkit?.activePreset || "default");
|
|
@@ -10,27 +11,31 @@ export function usePresetComponent(componentBaseName, defaultComponent) {
|
|
|
10
11
|
if (activePreset.value === "default") {
|
|
11
12
|
return defaultComponent;
|
|
12
13
|
}
|
|
13
|
-
const cacheKey = `${activePreset.value}:${componentBaseName}`;
|
|
14
|
-
if (componentCache.has(cacheKey)) {
|
|
15
|
-
return componentCache.get(cacheKey);
|
|
16
|
-
}
|
|
17
14
|
let loader;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
const externalLoaders = presetLoadersRegistry.get(activePreset.value);
|
|
16
|
+
if (externalLoaders) {
|
|
17
|
+
const key = `./components/${componentBaseName}/${componentBaseName}.vue`;
|
|
18
|
+
loader = externalLoaders[key];
|
|
19
|
+
}
|
|
20
|
+
if (!loader) {
|
|
21
|
+
const internalLoaders = import.meta.glob([
|
|
22
|
+
"../presets/**/*.vue",
|
|
23
|
+
"../../runtime/presets/**/*.vue"
|
|
24
|
+
]);
|
|
25
|
+
const internalKey = `../presets/${activePreset.value}/components/${componentBaseName}/${componentBaseName}.vue`;
|
|
26
|
+
loader = internalLoaders[internalKey];
|
|
27
|
+
if (!loader) {
|
|
28
|
+
const altKey = `../../runtime/presets/${activePreset.value}/components/${componentBaseName}/${componentBaseName}.vue`;
|
|
29
|
+
loader = internalLoaders[altKey];
|
|
30
|
+
}
|
|
24
31
|
}
|
|
25
32
|
if (!loader) {
|
|
26
33
|
console.warn(`[${componentBaseName}] Preset "${activePreset.value}" not found, falling back to default`);
|
|
27
34
|
return defaultComponent;
|
|
28
35
|
}
|
|
29
|
-
|
|
36
|
+
return defineAsyncComponent({
|
|
30
37
|
loader,
|
|
31
38
|
errorComponent: defaultComponent
|
|
32
39
|
});
|
|
33
|
-
componentCache.set(cacheKey, asyncComp);
|
|
34
|
-
return asyncComp;
|
|
35
40
|
});
|
|
36
41
|
}
|
|
@@ -20,14 +20,44 @@
|
|
|
20
20
|
--neutral-700: #616161;
|
|
21
21
|
--neutral-800: #424242;
|
|
22
22
|
--neutral-900: #212121;
|
|
23
|
+
--yellow-100: #fef9c3;
|
|
24
|
+
--yellow-300: #fde047;
|
|
25
|
+
--yellow-500: #eab308;
|
|
26
|
+
--yellow-700: #a16207;
|
|
27
|
+
--yellow-900: #713f12;
|
|
28
|
+
--red-100: #fee2e2;
|
|
29
|
+
--red-300: #fca5a5;
|
|
30
|
+
--red-500: #ef4444;
|
|
31
|
+
--red-700: #b91c1c;
|
|
32
|
+
--red-900: #7f1d1d;
|
|
33
|
+
--blue-100: #dbeafe;
|
|
34
|
+
--blue-300: #93c5fd;
|
|
35
|
+
--blue-500: #3b82f6;
|
|
36
|
+
--blue-700: #1d4ed8;
|
|
37
|
+
--blue-900: #1e3a8a;
|
|
38
|
+
--pink-100: #fce7f3;
|
|
39
|
+
--pink-300: #f9a8d4;
|
|
40
|
+
--pink-500: #ec4899;
|
|
41
|
+
--pink-700: #be185d;
|
|
42
|
+
--pink-900: #831843;
|
|
43
|
+
--cyan-100: #cffafe;
|
|
44
|
+
--cyan-300: #67e8f9;
|
|
45
|
+
--cyan-500: #06b6d4;
|
|
46
|
+
--cyan-700: #0e7490;
|
|
47
|
+
--cyan-900: #164e63;
|
|
48
|
+
--green-100: #dcfce7;
|
|
49
|
+
--green-300: #86efac;
|
|
50
|
+
--green-500: #22c55e;
|
|
51
|
+
--green-700: #15803d;
|
|
52
|
+
--green-900: #14532d;
|
|
23
53
|
--success-color: var(--accent-500);
|
|
24
54
|
--success-color-light: var(--accent-100);
|
|
25
|
-
--warning-color:
|
|
26
|
-
--warning-color-light:
|
|
27
|
-
--error-color:
|
|
28
|
-
--error-color-light:
|
|
29
|
-
--info-color: var(--
|
|
30
|
-
--info-color-light: var(--
|
|
55
|
+
--warning-color: var(--yellow-500);
|
|
56
|
+
--warning-color-light: var(--yellow-100);
|
|
57
|
+
--error-color: var(--red-500);
|
|
58
|
+
--error-color-light: var(--red-100);
|
|
59
|
+
--info-color: var(--cyan-500);
|
|
60
|
+
--info-color-light: var(--cyan-100);
|
|
31
61
|
--font-color-primary: var(--neutral-800);
|
|
32
62
|
--font-color-secondary: var(--neutral-600);
|
|
33
63
|
--font-color-heading: var(--neutral-900);
|
|
@@ -81,19 +111,37 @@
|
|
|
81
111
|
--button-hover-bg-success: var(--accent-700);
|
|
82
112
|
--button-bg-warning: var(--warning-color);
|
|
83
113
|
--button-text-warning: var(--neutral-900);
|
|
84
|
-
--button-hover-bg-warning:
|
|
114
|
+
--button-hover-bg-warning: var(--yellow-700);
|
|
85
115
|
--button-bg-danger: var(--error-color);
|
|
86
116
|
--button-text-danger: var(--font-color-light);
|
|
87
|
-
--button-hover-bg-danger:
|
|
117
|
+
--button-hover-bg-danger: var(--red-700);
|
|
88
118
|
--button-bg-info: var(--info-color);
|
|
89
119
|
--button-text-info: var(--font-color-light);
|
|
90
|
-
--button-hover-bg-info: var(--
|
|
120
|
+
--button-hover-bg-info: var(--cyan-700);
|
|
91
121
|
--button-bg-light: var(--neutral-50);
|
|
92
122
|
--button-text-light: var(--neutral-900);
|
|
93
123
|
--button-hover-bg-light: var(--neutral-200);
|
|
94
124
|
--button-bg-dark: var(--neutral-900);
|
|
95
125
|
--button-text-dark: var(--font-color-light);
|
|
96
126
|
--button-hover-bg-dark: var(--neutral-700);
|
|
127
|
+
--panel-bg-default: var(--yellow-300);
|
|
128
|
+
--panel-header-bg-default: var(--yellow-500);
|
|
129
|
+
--panel-footer-bg-default: var(--blue-100);
|
|
130
|
+
--panel-bg-primary: var(--blue-300);
|
|
131
|
+
--panel-header-bg-primary: var(--blue-500);
|
|
132
|
+
--panel-footer-bg-primary: var(--blue-100);
|
|
133
|
+
--panel-bg-success: var(--green-300);
|
|
134
|
+
--panel-header-bg-success: var(--green-500);
|
|
135
|
+
--panel-footer-bg-success: var(--green-100);
|
|
136
|
+
--panel-bg-warning: var(--yellow-300);
|
|
137
|
+
--panel-header-bg-warning: var(--yellow-500);
|
|
138
|
+
--panel-footer-bg-warning: var(--yellow-100);
|
|
139
|
+
--panel-bg-danger: var(--red-300);
|
|
140
|
+
--panel-header-bg-danger: var(--red-500);
|
|
141
|
+
--panel-footer-bg-danger: var(--red-100);
|
|
142
|
+
--panel-bg-info: var(--cyan-300);
|
|
143
|
+
--panel-header-bg-info: var(--cyan-500);
|
|
144
|
+
--panel-footer-bg-info: var(--cyan-100);
|
|
97
145
|
--input-border-radius: var(--border-radius-sm);
|
|
98
146
|
--input-border-color: var(--border-color-medium);
|
|
99
147
|
--input-focus-border-color: var(--primary-500);
|
|
@@ -102,7 +150,7 @@
|
|
|
102
150
|
--table-header-color: var(--neutral-700);
|
|
103
151
|
--table-border-color: var(--neutral-300);
|
|
104
152
|
--table-row-hover: var(--neutral-100);
|
|
105
|
-
--table-row-selected:
|
|
153
|
+
--table-row-selected: var(--blue-100);
|
|
106
154
|
--checkbox-bg: var(--neutral-50);
|
|
107
155
|
--checkbox-checked-bg: var(--primary-500);
|
|
108
156
|
--checkbox-border-color: var(--border-color-medium);
|
|
@@ -127,12 +175,12 @@
|
|
|
127
175
|
--input-button-hover-bg: var(--neutral-400);
|
|
128
176
|
--input-button-font-color: var(--font-color-primary);
|
|
129
177
|
--input-focus-border-color: var(--primary-500);
|
|
130
|
-
--button-hover-bg-danger:
|
|
131
|
-
--button-hover-bg-info: var(--
|
|
178
|
+
--button-hover-bg-danger: var(--red-700);
|
|
179
|
+
--button-hover-bg-info: var(--cyan-700);
|
|
132
180
|
--button-hover-bg-light: var(--neutral-200);
|
|
133
181
|
--button-hover-bg-primary: var(--primary-700);
|
|
134
182
|
--button-hover-bg-success: var(--accent-700);
|
|
135
|
-
--button-hover-bg-warning:
|
|
183
|
+
--button-hover-bg-warning: var(--yellow-700);
|
|
136
184
|
--button-hover-bg-dark: var(--neutral-700);
|
|
137
185
|
--button-text-danger: var(--font-color-light);
|
|
138
186
|
--button-text-primary: var(--font-color-light);
|
|
@@ -30,15 +30,52 @@
|
|
|
30
30
|
--neutral-800: #424242;
|
|
31
31
|
--neutral-900: #212121;
|
|
32
32
|
|
|
33
|
+
// New Color Palettes
|
|
34
|
+
--yellow-100: #fef9c3;
|
|
35
|
+
--yellow-300: #fde047;
|
|
36
|
+
--yellow-500: #eab308;
|
|
37
|
+
--yellow-700: #a16207;
|
|
38
|
+
--yellow-900: #713f12;
|
|
39
|
+
|
|
40
|
+
--red-100: #fee2e2;
|
|
41
|
+
--red-300: #fca5a5;
|
|
42
|
+
--red-500: #ef4444;
|
|
43
|
+
--red-700: #b91c1c;
|
|
44
|
+
--red-900: #7f1d1d;
|
|
45
|
+
|
|
46
|
+
--blue-100: #dbeafe;
|
|
47
|
+
--blue-300: #93c5fd;
|
|
48
|
+
--blue-500: #3b82f6;
|
|
49
|
+
--blue-700: #1d4ed8;
|
|
50
|
+
--blue-900: #1e3a8a;
|
|
51
|
+
|
|
52
|
+
--pink-100: #fce7f3;
|
|
53
|
+
--pink-300: #f9a8d4;
|
|
54
|
+
--pink-500: #ec4899;
|
|
55
|
+
--pink-700: #be185d;
|
|
56
|
+
--pink-900: #831843;
|
|
57
|
+
|
|
58
|
+
--cyan-100: #cffafe;
|
|
59
|
+
--cyan-300: #67e8f9;
|
|
60
|
+
--cyan-500: #06b6d4;
|
|
61
|
+
--cyan-700: #0e7490;
|
|
62
|
+
--cyan-900: #164e63;
|
|
63
|
+
|
|
64
|
+
--green-100: #dcfce7;
|
|
65
|
+
--green-300: #86efac;
|
|
66
|
+
--green-500: #22c55e;
|
|
67
|
+
--green-700: #15803d;
|
|
68
|
+
--green-900: #14532d;
|
|
69
|
+
|
|
33
70
|
// Semantic Colors
|
|
34
71
|
--success-color: var(--accent-500);
|
|
35
72
|
--success-color-light: var(--accent-100);
|
|
36
|
-
--warning-color:
|
|
37
|
-
--warning-color-light:
|
|
38
|
-
--error-color:
|
|
39
|
-
--error-color-light:
|
|
40
|
-
--info-color: var(--
|
|
41
|
-
--info-color-light: var(--
|
|
73
|
+
--warning-color: var(--yellow-500);
|
|
74
|
+
--warning-color-light: var(--yellow-100);
|
|
75
|
+
--error-color: var(--red-500);
|
|
76
|
+
--error-color-light: var(--red-100);
|
|
77
|
+
--info-color: var(--cyan-500);
|
|
78
|
+
--info-color-light: var(--cyan-100);
|
|
42
79
|
|
|
43
80
|
// Font Colors
|
|
44
81
|
--font-color-primary: var(--neutral-800);
|
|
@@ -118,17 +155,17 @@
|
|
|
118
155
|
// Button Colors - Warning
|
|
119
156
|
--button-bg-warning: var(--warning-color);
|
|
120
157
|
--button-text-warning: var(--neutral-900);
|
|
121
|
-
--button-hover-bg-warning:
|
|
158
|
+
--button-hover-bg-warning: var(--yellow-700);
|
|
122
159
|
|
|
123
160
|
// Button Colors - Danger/Error
|
|
124
161
|
--button-bg-danger: var(--error-color);
|
|
125
162
|
--button-text-danger: var(--font-color-light);
|
|
126
|
-
--button-hover-bg-danger:
|
|
163
|
+
--button-hover-bg-danger: var(--red-700);
|
|
127
164
|
|
|
128
165
|
// Button Colors - Info
|
|
129
166
|
--button-bg-info: var(--info-color);
|
|
130
167
|
--button-text-info: var(--font-color-light);
|
|
131
|
-
--button-hover-bg-info: var(--
|
|
168
|
+
--button-hover-bg-info: var(--cyan-700);
|
|
132
169
|
|
|
133
170
|
// Button Colors - Light
|
|
134
171
|
--button-bg-light: var(--neutral-50);
|
|
@@ -140,6 +177,36 @@
|
|
|
140
177
|
--button-text-dark: var(--font-color-light);
|
|
141
178
|
--button-hover-bg-dark: var(--neutral-700);
|
|
142
179
|
|
|
180
|
+
// Panel Colors - Default
|
|
181
|
+
--panel-bg-default: var(--yellow-300);
|
|
182
|
+
--panel-header-bg-default: var(--yellow-500);
|
|
183
|
+
--panel-footer-bg-default: var(--blue-100);
|
|
184
|
+
|
|
185
|
+
// Panel Colors - Primary
|
|
186
|
+
--panel-bg-primary: var(--blue-300);
|
|
187
|
+
--panel-header-bg-primary: var(--blue-500);
|
|
188
|
+
--panel-footer-bg-primary: var(--blue-100);
|
|
189
|
+
|
|
190
|
+
// Panel Colors - Success
|
|
191
|
+
--panel-bg-success: var(--green-300);
|
|
192
|
+
--panel-header-bg-success: var(--green-500);
|
|
193
|
+
--panel-footer-bg-success: var(--green-100);
|
|
194
|
+
|
|
195
|
+
// Panel Colors - Warning
|
|
196
|
+
--panel-bg-warning: var(--yellow-300);
|
|
197
|
+
--panel-header-bg-warning: var(--yellow-500);
|
|
198
|
+
--panel-footer-bg-warning: var(--yellow-100);
|
|
199
|
+
|
|
200
|
+
// Panel Colors - Danger/Error
|
|
201
|
+
--panel-bg-danger: var(--red-300);
|
|
202
|
+
--panel-header-bg-danger: var(--red-500);
|
|
203
|
+
--panel-footer-bg-danger: var(--red-100);
|
|
204
|
+
|
|
205
|
+
// Panel Colors - Info
|
|
206
|
+
--panel-bg-info: var(--cyan-300);
|
|
207
|
+
--panel-header-bg-info: var(--cyan-500);
|
|
208
|
+
--panel-footer-bg-info: var(--cyan-100);
|
|
209
|
+
|
|
143
210
|
// Input
|
|
144
211
|
--input-border-radius: var(--border-radius-sm);
|
|
145
212
|
--input-border-color: var(--border-color-medium);
|
|
@@ -151,7 +218,7 @@
|
|
|
151
218
|
--table-header-color: var(--neutral-700);
|
|
152
219
|
--table-border-color: var(--neutral-300);
|
|
153
220
|
--table-row-hover: var(--neutral-100);
|
|
154
|
-
--table-row-selected:
|
|
221
|
+
--table-row-selected: var(--blue-100);
|
|
155
222
|
|
|
156
223
|
// Checkbox
|
|
157
224
|
--checkbox-bg: var(--neutral-50);
|
|
@@ -190,12 +257,12 @@
|
|
|
190
257
|
--input-focus-border-color: var(--primary-500);
|
|
191
258
|
|
|
192
259
|
// Button Hover Specifics
|
|
193
|
-
--button-hover-bg-danger:
|
|
194
|
-
--button-hover-bg-info: var(--
|
|
260
|
+
--button-hover-bg-danger: var(--red-700);
|
|
261
|
+
--button-hover-bg-info: var(--cyan-700);
|
|
195
262
|
--button-hover-bg-light: var(--neutral-200);
|
|
196
263
|
--button-hover-bg-primary: var(--primary-700);
|
|
197
264
|
--button-hover-bg-success: var(--accent-700);
|
|
198
|
-
--button-hover-bg-warning:
|
|
265
|
+
--button-hover-bg-warning: var(--yellow-700);
|
|
199
266
|
--button-hover-bg-dark: var(--neutral-700);
|
|
200
267
|
|
|
201
268
|
--button-text-danger: var(--font-color-light);
|
|
@@ -37,14 +37,44 @@ li {
|
|
|
37
37
|
--neutral-700: #616161;
|
|
38
38
|
--neutral-800: #424242;
|
|
39
39
|
--neutral-900: #212121;
|
|
40
|
+
--yellow-100: #fef9c3;
|
|
41
|
+
--yellow-300: #fde047;
|
|
42
|
+
--yellow-500: #eab308;
|
|
43
|
+
--yellow-700: #a16207;
|
|
44
|
+
--yellow-900: #713f12;
|
|
45
|
+
--red-100: #fee2e2;
|
|
46
|
+
--red-300: #fca5a5;
|
|
47
|
+
--red-500: #ef4444;
|
|
48
|
+
--red-700: #b91c1c;
|
|
49
|
+
--red-900: #7f1d1d;
|
|
50
|
+
--blue-100: #dbeafe;
|
|
51
|
+
--blue-300: #93c5fd;
|
|
52
|
+
--blue-500: #3b82f6;
|
|
53
|
+
--blue-700: #1d4ed8;
|
|
54
|
+
--blue-900: #1e3a8a;
|
|
55
|
+
--pink-100: #fce7f3;
|
|
56
|
+
--pink-300: #f9a8d4;
|
|
57
|
+
--pink-500: #ec4899;
|
|
58
|
+
--pink-700: #be185d;
|
|
59
|
+
--pink-900: #831843;
|
|
60
|
+
--cyan-100: #cffafe;
|
|
61
|
+
--cyan-300: #67e8f9;
|
|
62
|
+
--cyan-500: #06b6d4;
|
|
63
|
+
--cyan-700: #0e7490;
|
|
64
|
+
--cyan-900: #164e63;
|
|
65
|
+
--green-100: #dcfce7;
|
|
66
|
+
--green-300: #86efac;
|
|
67
|
+
--green-500: #22c55e;
|
|
68
|
+
--green-700: #15803d;
|
|
69
|
+
--green-900: #14532d;
|
|
40
70
|
--success-color: var(--accent-500);
|
|
41
71
|
--success-color-light: var(--accent-100);
|
|
42
|
-
--warning-color:
|
|
43
|
-
--warning-color-light:
|
|
44
|
-
--error-color:
|
|
45
|
-
--error-color-light:
|
|
46
|
-
--info-color: var(--
|
|
47
|
-
--info-color-light: var(--
|
|
72
|
+
--warning-color: var(--yellow-500);
|
|
73
|
+
--warning-color-light: var(--yellow-100);
|
|
74
|
+
--error-color: var(--red-500);
|
|
75
|
+
--error-color-light: var(--red-100);
|
|
76
|
+
--info-color: var(--cyan-500);
|
|
77
|
+
--info-color-light: var(--cyan-100);
|
|
48
78
|
--font-color-primary: var(--neutral-800);
|
|
49
79
|
--font-color-secondary: var(--neutral-600);
|
|
50
80
|
--font-color-heading: var(--neutral-900);
|
|
@@ -98,19 +128,37 @@ li {
|
|
|
98
128
|
--button-hover-bg-success: var(--accent-700);
|
|
99
129
|
--button-bg-warning: var(--warning-color);
|
|
100
130
|
--button-text-warning: var(--neutral-900);
|
|
101
|
-
--button-hover-bg-warning:
|
|
131
|
+
--button-hover-bg-warning: var(--yellow-700);
|
|
102
132
|
--button-bg-danger: var(--error-color);
|
|
103
133
|
--button-text-danger: var(--font-color-light);
|
|
104
|
-
--button-hover-bg-danger:
|
|
134
|
+
--button-hover-bg-danger: var(--red-700);
|
|
105
135
|
--button-bg-info: var(--info-color);
|
|
106
136
|
--button-text-info: var(--font-color-light);
|
|
107
|
-
--button-hover-bg-info: var(--
|
|
137
|
+
--button-hover-bg-info: var(--cyan-700);
|
|
108
138
|
--button-bg-light: var(--neutral-50);
|
|
109
139
|
--button-text-light: var(--neutral-900);
|
|
110
140
|
--button-hover-bg-light: var(--neutral-200);
|
|
111
141
|
--button-bg-dark: var(--neutral-900);
|
|
112
142
|
--button-text-dark: var(--font-color-light);
|
|
113
143
|
--button-hover-bg-dark: var(--neutral-700);
|
|
144
|
+
--panel-bg-default: var(--yellow-300);
|
|
145
|
+
--panel-header-bg-default: var(--yellow-500);
|
|
146
|
+
--panel-footer-bg-default: var(--blue-100);
|
|
147
|
+
--panel-bg-primary: var(--blue-300);
|
|
148
|
+
--panel-header-bg-primary: var(--blue-500);
|
|
149
|
+
--panel-footer-bg-primary: var(--blue-100);
|
|
150
|
+
--panel-bg-success: var(--green-300);
|
|
151
|
+
--panel-header-bg-success: var(--green-500);
|
|
152
|
+
--panel-footer-bg-success: var(--green-100);
|
|
153
|
+
--panel-bg-warning: var(--yellow-300);
|
|
154
|
+
--panel-header-bg-warning: var(--yellow-500);
|
|
155
|
+
--panel-footer-bg-warning: var(--yellow-100);
|
|
156
|
+
--panel-bg-danger: var(--red-300);
|
|
157
|
+
--panel-header-bg-danger: var(--red-500);
|
|
158
|
+
--panel-footer-bg-danger: var(--red-100);
|
|
159
|
+
--panel-bg-info: var(--cyan-300);
|
|
160
|
+
--panel-header-bg-info: var(--cyan-500);
|
|
161
|
+
--panel-footer-bg-info: var(--cyan-100);
|
|
114
162
|
--input-border-radius: var(--border-radius-sm);
|
|
115
163
|
--input-border-color: var(--border-color-medium);
|
|
116
164
|
--input-focus-border-color: var(--primary-500);
|
|
@@ -119,7 +167,7 @@ li {
|
|
|
119
167
|
--table-header-color: var(--neutral-700);
|
|
120
168
|
--table-border-color: var(--neutral-300);
|
|
121
169
|
--table-row-hover: var(--neutral-100);
|
|
122
|
-
--table-row-selected:
|
|
170
|
+
--table-row-selected: var(--blue-100);
|
|
123
171
|
--checkbox-bg: var(--neutral-50);
|
|
124
172
|
--checkbox-checked-bg: var(--primary-500);
|
|
125
173
|
--checkbox-border-color: var(--border-color-medium);
|
|
@@ -144,12 +192,12 @@ li {
|
|
|
144
192
|
--input-button-hover-bg: var(--neutral-400);
|
|
145
193
|
--input-button-font-color: var(--font-color-primary);
|
|
146
194
|
--input-focus-border-color: var(--primary-500);
|
|
147
|
-
--button-hover-bg-danger:
|
|
148
|
-
--button-hover-bg-info: var(--
|
|
195
|
+
--button-hover-bg-danger: var(--red-700);
|
|
196
|
+
--button-hover-bg-info: var(--cyan-700);
|
|
149
197
|
--button-hover-bg-light: var(--neutral-200);
|
|
150
198
|
--button-hover-bg-primary: var(--primary-700);
|
|
151
199
|
--button-hover-bg-success: var(--accent-700);
|
|
152
|
-
--button-hover-bg-warning:
|
|
200
|
+
--button-hover-bg-warning: var(--yellow-700);
|
|
153
201
|
--button-hover-bg-dark: var(--neutral-700);
|
|
154
202
|
--button-text-danger: var(--font-color-light);
|
|
155
203
|
--button-text-primary: var(--font-color-light);
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
@click.stop="selectItem(option)"
|
|
11
11
|
)
|
|
12
12
|
KGrid(align="center" justify="space-between" wrap="nowrap")
|
|
13
|
-
span {{ option[labelField] }}
|
|
13
|
+
span.KCombobox__options-list-item__text {{ option[labelField] }}
|
|
14
14
|
KIcon(iconname="check" width="12" height="12" :class="{'visible': isSelected(option)}")
|
|
15
15
|
</template>
|
|
16
16
|
|
|
@@ -59,6 +59,11 @@ const searchtextModel = computed({
|
|
|
59
59
|
&:last-child {
|
|
60
60
|
border-bottom: none;
|
|
61
61
|
}
|
|
62
|
+
&__text {
|
|
63
|
+
text-overflow: ellipsis;
|
|
64
|
+
overflow: hidden;
|
|
65
|
+
white-space: nowrap;
|
|
66
|
+
}
|
|
62
67
|
}
|
|
63
68
|
|
|
64
69
|
.KIcon {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
2
|
.k-datatable(:style="{ '--page-size': props.dataProvider?.pageSize?.value || 10 }")
|
|
3
|
-
KGrid(:flex-child="true")
|
|
3
|
+
KGrid(:flex-child="true" align="stretch" direction="column")
|
|
4
4
|
.datatable-container
|
|
5
5
|
KLoader(:loading="isLoading" overlay)
|
|
6
6
|
table
|
|
@@ -106,6 +106,7 @@ const isLoading = computed(() => {
|
|
|
106
106
|
border: 1px solid #cccccc;
|
|
107
107
|
thead {
|
|
108
108
|
tr {
|
|
109
|
+
background-color: color-mix(in srgb, var(--yellow-500), transparent 92%);
|
|
109
110
|
height: var(--page-height);
|
|
110
111
|
th {
|
|
111
112
|
border-bottom: 1px solid #cccccc;
|
|
@@ -2,8 +2,11 @@ type __VLS_Props = {
|
|
|
2
2
|
noGap?: boolean;
|
|
3
3
|
flexContent?: boolean;
|
|
4
4
|
scrollable?: boolean;
|
|
5
|
+
type?: 'default' | 'primary' | 'danger' | 'success' | 'warning' | 'info';
|
|
6
|
+
title?: string;
|
|
5
7
|
};
|
|
6
8
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
9
|
+
type: "default" | "primary" | "danger" | "success" | "warning" | "info";
|
|
7
10
|
noGap: boolean;
|
|
8
11
|
flexContent: boolean;
|
|
9
12
|
scrollable: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
|
-
.KPanel
|
|
2
|
+
.KPanel(:class="[`type-${type}`]")
|
|
3
3
|
KGrid(direction="column" align="strech" :no-gap="noGap" wrap="nowrap").full-height
|
|
4
|
-
.KPanel--header(v-if="$slots.header")
|
|
5
|
-
slot(name="header")
|
|
4
|
+
.KPanel--header(v-if="$slots.header || title")
|
|
5
|
+
slot(name="header") {{ title }}
|
|
6
6
|
.KPanel--content(:class="{'flex-content': flexContent, 'scrollable': scrollable}")
|
|
7
7
|
slot
|
|
8
8
|
.KPanel--footer(v-if="$slots.footer")
|
|
@@ -14,42 +14,95 @@ const props = withDefaults(defineProps<{
|
|
|
14
14
|
noGap?: boolean
|
|
15
15
|
flexContent?: boolean
|
|
16
16
|
scrollable?: boolean
|
|
17
|
+
type?: 'default' | 'primary' | 'danger' | 'success' | 'warning' | 'info'
|
|
18
|
+
title?: string
|
|
17
19
|
}>(), {
|
|
18
20
|
scrollable: false,
|
|
19
|
-
noGap:
|
|
20
|
-
flexContent: false
|
|
21
|
+
noGap: true,
|
|
22
|
+
flexContent: false,
|
|
23
|
+
type: 'default'
|
|
21
24
|
})
|
|
22
25
|
</script>
|
|
23
26
|
|
|
24
27
|
<style lang="scss" scoped>
|
|
25
28
|
.KPanel {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
--current-panel-bg: var(--panel-bg-default);
|
|
30
|
+
--current-panel-header-bg: var(--panel-header-bg-default);
|
|
31
|
+
--current-panel-footer-bg: var(--panel-footer-bg-default);
|
|
32
|
+
|
|
33
|
+
border-radius: var(--border-radius-lg);
|
|
34
|
+
border: 1px solid var(--neutral-200);
|
|
35
|
+
box-shadow: var(--shadow-md);
|
|
36
|
+
background-color: color-mix(in srgb, var(--current-panel-bg), transparent 99%);
|
|
37
|
+
backdrop-filter: blur(8px);
|
|
30
38
|
width: 100%;
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
overflow: hidden;
|
|
42
|
+
transition: transform var(--transition-normal), box-shadow var(--transition-normal);
|
|
43
|
+
|
|
44
|
+
&.type-primary {
|
|
45
|
+
--current-panel-bg: var(--panel-bg-primary);
|
|
46
|
+
--current-panel-header-bg: var(--panel-header-bg-primary);
|
|
47
|
+
--current-panel-footer-bg: var(--panel-footer-bg-primary);
|
|
48
|
+
}
|
|
49
|
+
&.type-success {
|
|
50
|
+
--current-panel-bg: var(--panel-bg-success);
|
|
51
|
+
--current-panel-header-bg: var(--panel-header-bg-success);
|
|
52
|
+
--current-panel-footer-bg: var(--panel-footer-bg-success);
|
|
53
|
+
}
|
|
54
|
+
&.type-warning {
|
|
55
|
+
--current-panel-bg: var(--panel-bg-warning);
|
|
56
|
+
--current-panel-header-bg: var(--panel-header-bg-warning);
|
|
57
|
+
--current-panel-footer-bg: var(--panel-footer-bg-warning);
|
|
58
|
+
}
|
|
59
|
+
&.type-danger {
|
|
60
|
+
--current-panel-bg: var(--panel-bg-danger);
|
|
61
|
+
--current-panel-header-bg: var(--panel-header-bg-danger);
|
|
62
|
+
--current-panel-footer-bg: var(--panel-footer-bg-danger);
|
|
63
|
+
}
|
|
64
|
+
&.type-info {
|
|
65
|
+
--current-panel-bg: var(--panel-bg-info);
|
|
66
|
+
--current-panel-header-bg: var(--panel-header-bg-info);
|
|
67
|
+
--current-panel-footer-bg: var(--panel-footer-bg-info);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&:hover {
|
|
71
|
+
transform: translateY(-2px);
|
|
72
|
+
box-shadow: var(--shadow-lg);
|
|
73
|
+
}
|
|
31
74
|
|
|
32
75
|
.full-height {
|
|
33
76
|
height: 100%;
|
|
34
77
|
}
|
|
78
|
+
|
|
35
79
|
&--header {
|
|
36
|
-
padding: var(--
|
|
37
|
-
background-color: var(--
|
|
80
|
+
padding: var(--gap-md);
|
|
81
|
+
background-color: color-mix(in srgb, var(--current-panel-header-bg), transparent 92%);
|
|
82
|
+
border-bottom: 1px solid var(--neutral-200);
|
|
83
|
+
font-weight: var(--font-weight-semibold);
|
|
84
|
+
color: var(--font-color-heading);
|
|
85
|
+
font-size: var(--font-size-lg);
|
|
38
86
|
}
|
|
87
|
+
|
|
39
88
|
&--content {
|
|
40
|
-
padding: var(--
|
|
41
|
-
|
|
89
|
+
padding: var(--gap-md);
|
|
90
|
+
flex: 1;
|
|
42
91
|
|
|
43
92
|
&.scrollable {
|
|
44
93
|
overflow-y: auto;
|
|
45
94
|
}
|
|
46
95
|
|
|
47
96
|
&.flex-content {
|
|
48
|
-
|
|
97
|
+
display: flex;
|
|
98
|
+
flex-direction: column;
|
|
49
99
|
}
|
|
50
100
|
}
|
|
101
|
+
|
|
51
102
|
&--footer {
|
|
52
|
-
padding: var(--
|
|
103
|
+
padding: var(--gap-md);
|
|
104
|
+
background-color: color-mix(in srgb, var(--current-panel-footer-bg), transparent 92%);
|
|
105
|
+
border-top: 1px solid var(--neutral-200);
|
|
53
106
|
}
|
|
54
107
|
}
|
|
55
108
|
</style>
|
|
@@ -2,8 +2,11 @@ type __VLS_Props = {
|
|
|
2
2
|
noGap?: boolean;
|
|
3
3
|
flexContent?: boolean;
|
|
4
4
|
scrollable?: boolean;
|
|
5
|
+
type?: 'default' | 'primary' | 'danger' | 'success' | 'warning' | 'info';
|
|
6
|
+
title?: string;
|
|
5
7
|
};
|
|
6
8
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
9
|
+
type: "default" | "primary" | "danger" | "success" | "warning" | "info";
|
|
7
10
|
noGap: boolean;
|
|
8
11
|
flexContent: boolean;
|
|
9
12
|
scrollable: boolean;
|
|
@@ -3,6 +3,7 @@ type __VLS_Props = {
|
|
|
3
3
|
showClearIcon: boolean;
|
|
4
4
|
clear: () => void;
|
|
5
5
|
placeholder: string;
|
|
6
|
+
type: string;
|
|
6
7
|
};
|
|
7
8
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
8
9
|
"update:text": (value: string) => any;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
2
|
KGrid(align="center" noGap).KTextbox
|
|
3
|
-
input(type="
|
|
3
|
+
input(:type="props.type" v-model="text" :placeholder="placeholder")
|
|
4
4
|
KIcon(v-if="showClearIcon" @click="clear" iconname="close" width="12" height="12").closeIcon
|
|
5
5
|
</template>
|
|
6
6
|
|
|
@@ -12,6 +12,7 @@ const props = defineProps<{
|
|
|
12
12
|
showClearIcon: boolean
|
|
13
13
|
clear: () => void
|
|
14
14
|
placeholder: string
|
|
15
|
+
type: string
|
|
15
16
|
}>()
|
|
16
17
|
|
|
17
18
|
const emit = defineEmits<{
|
|
@@ -3,6 +3,7 @@ type __VLS_Props = {
|
|
|
3
3
|
showClearIcon: boolean;
|
|
4
4
|
clear: () => void;
|
|
5
5
|
placeholder: string;
|
|
6
|
+
type: string;
|
|
6
7
|
};
|
|
7
8
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
8
9
|
"update:text": (value: string) => any;
|