@katlux/toolkit 0.1.0-beta.4 → 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.cjs +52 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +52 -0
- 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/KGrid/KGrid.global.d.vue.ts +7 -56
- package/dist/runtime/components/KGrid/KGrid.global.vue +9 -2
- package/dist/runtime/components/KGrid/KGrid.global.vue.d.ts +7 -56
- package/dist/runtime/components/KIcon/KIcon.logic.d.ts +1 -1
- package/dist/runtime/components/KIcon/KIcon.logic.js +2 -2
- package/dist/runtime/components/KLoader/KLoader.global.d.vue.ts +3 -3
- package/dist/runtime/components/KLoader/KLoader.global.vue.d.ts +3 -3
- package/dist/runtime/components/KLoader/KLoader.logic.d.ts +8 -1
- package/dist/runtime/components/KLoader/KLoader.logic.js +1 -0
- package/dist/runtime/components/KPanel/KPanel.global.d.vue.ts +5 -28
- package/dist/runtime/components/KPanel/KPanel.global.vue +12 -4
- package/dist/runtime/components/KPanel/KPanel.global.vue.d.ts +5 -28
- 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 +283 -0
- package/dist/runtime/presets/default/assets/scss/docs.scss +52 -0
- package/dist/runtime/presets/default/assets/scss/index.css +69 -13
- package/dist/runtime/presets/default/assets/scss/index.scss +12 -0
- package/dist/runtime/presets/default/assets/scss/mixins.scss +94 -0
- package/dist/runtime/presets/default/assets/scss/reset.scss +16 -0
- package/dist/runtime/presets/default/components/KAccordion/KAccordion.vue +5 -2
- package/dist/runtime/presets/default/components/KAccordion/KAccordionItem.vue +40 -37
- package/dist/runtime/presets/default/components/KBulkActions/KBulkActions.vue +29 -22
- package/dist/runtime/presets/default/components/KButton/KButton.vue +147 -428
- package/dist/runtime/presets/default/components/KCalendar/KCalendar.vue +57 -53
- package/dist/runtime/presets/default/components/KCalendar/KCalendarMonth.vue +189 -161
- package/dist/runtime/presets/default/components/KCheckbox/KCheckbox.vue +46 -36
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue +76 -66
- package/dist/runtime/presets/default/components/KCombobox/KComboboxList.vue +77 -59
- package/dist/runtime/presets/default/components/KDataIterator/KDataIterator.vue +40 -31
- package/dist/runtime/presets/default/components/KDatatable/KDatatable.vue +110 -92
- package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue +38 -22
- package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.vue +66 -48
- package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue +27 -22
- package/dist/runtime/presets/default/components/KGantt/KGantt.vue +336 -240
- package/dist/runtime/presets/default/components/KGantt/KGanttRuler.vue +40 -35
- package/dist/runtime/presets/default/components/KGantt/KGanttTimeline.vue +170 -140
- package/dist/runtime/presets/default/components/KGrid/KGrid.vue +62 -60
- package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.vue +23 -19
- package/dist/runtime/presets/default/components/KHourSelect/KHourSelect.vue +34 -28
- package/dist/runtime/presets/default/components/KIcon/KIcon.d.vue.ts +1 -1
- package/dist/runtime/presets/default/components/KIcon/KIcon.vue +31 -22
- package/dist/runtime/presets/default/components/KIcon/KIcon.vue.d.ts +1 -1
- package/dist/runtime/presets/default/components/KLoader/KLoader.vue +53 -47
- package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.vue +108 -84
- package/dist/runtime/presets/default/components/KModal/KModal.vue +30 -27
- package/dist/runtime/presets/default/components/KPagination/KPagination.vue +42 -40
- package/dist/runtime/presets/default/components/KPanel/KPanel.d.vue.ts +3 -0
- package/dist/runtime/presets/default/components/KPanel/KPanel.vue +95 -34
- package/dist/runtime/presets/default/components/KPanel/KPanel.vue.d.ts +3 -0
- package/dist/runtime/presets/default/components/KRadiobox/KRadiobox.vue +30 -29
- package/dist/runtime/presets/default/components/KRangeSlider/KRangeSlider.vue +158 -125
- package/dist/runtime/presets/default/components/KSlider/KSlider.vue +123 -100
- package/dist/runtime/presets/default/components/KTabs/KTabItem.vue +40 -37
- package/dist/runtime/presets/default/components/KTabs/KTabs.vue +9 -6
- package/dist/runtime/presets/default/components/KTextarea/KTextarea.vue +23 -20
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.d.vue.ts +1 -0
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue +44 -34
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue.d.ts +1 -0
- package/dist/runtime/presets/default/components/KTree/KTree.vue +102 -80
- package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.vue +54 -34
- package/dist/runtime/presets/default/components/KTreeView/KTreeCell.vue +31 -30
- package/dist/runtime/presets/default/components/KTreeView/KTreeView.vue +34 -27
- package/package.json +5 -5
|
@@ -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.cjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const kit = require('@nuxt/kit');
|
|
4
|
+
const node_fs = require('node:fs');
|
|
4
5
|
|
|
5
6
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
6
7
|
const module$1 = kit.defineNuxtModule({
|
|
@@ -10,6 +11,57 @@ const module$1 = kit.defineNuxtModule({
|
|
|
10
11
|
},
|
|
11
12
|
setup(options, nuxt) {
|
|
12
13
|
const { resolve } = kit.createResolver((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('module.cjs', document.baseURI).href)));
|
|
14
|
+
const runtimePath = resolve("./runtime");
|
|
15
|
+
nuxt.options.build.transpile.push(runtimePath);
|
|
16
|
+
nuxt.options.build.transpile.push("@katlux/toolkit");
|
|
17
|
+
const scssPath = resolve("./runtime/presets/default/assets/scss/index.scss");
|
|
18
|
+
const cssPath = resolve("./runtime/presets/default/assets/scss/index.css");
|
|
19
|
+
const finalCssPath = node_fs.existsSync(scssPath) ? scssPath : cssPath;
|
|
20
|
+
nuxt.options.css.push(finalCssPath);
|
|
21
|
+
const sharedIgnored = [
|
|
22
|
+
"**/node_modules/**",
|
|
23
|
+
"**/.nuxt/**",
|
|
24
|
+
"**/.output/**",
|
|
25
|
+
"**/dist/**",
|
|
26
|
+
"**/.git/**",
|
|
27
|
+
"**/tmp/**",
|
|
28
|
+
"**/.firebase/**"
|
|
29
|
+
];
|
|
30
|
+
nuxt.options.watchers = nuxt.options.watchers || {};
|
|
31
|
+
const chokidar = nuxt.options.watchers.chokidar = nuxt.options.watchers.chokidar || {};
|
|
32
|
+
const existingIgnored = chokidar.ignored ? Array.isArray(chokidar.ignored) ? chokidar.ignored : [chokidar.ignored] : [];
|
|
33
|
+
chokidar.ignored = [.../* @__PURE__ */ new Set([...existingIgnored, ...sharedIgnored])];
|
|
34
|
+
chokidar.usePolling = true;
|
|
35
|
+
chokidar.interval = 1e3;
|
|
36
|
+
nuxt.options.nitro = nuxt.options.nitro || {};
|
|
37
|
+
const watchOptions = nuxt.options.nitro.watchOptions = nuxt.options.nitro.watchOptions || {};
|
|
38
|
+
watchOptions.usePolling = true;
|
|
39
|
+
watchOptions.interval = 1e3;
|
|
40
|
+
watchOptions.ignored = sharedIgnored;
|
|
41
|
+
nuxt.hook("vite:extendConfig", (config) => {
|
|
42
|
+
const server = config.server || (config.server = {});
|
|
43
|
+
const watch = server.watch || (server.watch = {});
|
|
44
|
+
const currentIgnored = watch.ignored || [];
|
|
45
|
+
if (Array.isArray(currentIgnored)) {
|
|
46
|
+
watch.ignored = [.../* @__PURE__ */ new Set([...currentIgnored, ...sharedIgnored])];
|
|
47
|
+
} else if (currentIgnored) {
|
|
48
|
+
watch.ignored = [currentIgnored, ...sharedIgnored];
|
|
49
|
+
} else {
|
|
50
|
+
watch.ignored = sharedIgnored;
|
|
51
|
+
}
|
|
52
|
+
watch.usePolling = true;
|
|
53
|
+
watch.interval = 1e3;
|
|
54
|
+
const fs = server.fs || (server.fs = {});
|
|
55
|
+
const allow = fs.allow || (fs.allow = []);
|
|
56
|
+
if (!allow.includes(runtimePath)) {
|
|
57
|
+
allow.push(runtimePath);
|
|
58
|
+
}
|
|
59
|
+
const ssr = config.ssr || (config.ssr = {});
|
|
60
|
+
const noExternal = ssr.noExternal || (ssr.noExternal = []);
|
|
61
|
+
if (Array.isArray(noExternal) && !noExternal.includes("@katlux/toolkit")) {
|
|
62
|
+
noExternal.push("@katlux/toolkit");
|
|
63
|
+
}
|
|
64
|
+
});
|
|
13
65
|
kit.addComponentsDir({
|
|
14
66
|
path: resolve("./runtime/components"),
|
|
15
67
|
pathPrefix: false,
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { defineNuxtModule, createResolver, addComponentsDir, addImportsDir, addPlugin } from '@nuxt/kit';
|
|
2
|
+
import { existsSync } from 'node:fs';
|
|
2
3
|
|
|
3
4
|
const module$1 = defineNuxtModule({
|
|
4
5
|
meta: {
|
|
@@ -7,6 +8,57 @@ const module$1 = defineNuxtModule({
|
|
|
7
8
|
},
|
|
8
9
|
setup(options, nuxt) {
|
|
9
10
|
const { resolve } = createResolver(import.meta.url);
|
|
11
|
+
const runtimePath = resolve("./runtime");
|
|
12
|
+
nuxt.options.build.transpile.push(runtimePath);
|
|
13
|
+
nuxt.options.build.transpile.push("@katlux/toolkit");
|
|
14
|
+
const scssPath = resolve("./runtime/presets/default/assets/scss/index.scss");
|
|
15
|
+
const cssPath = resolve("./runtime/presets/default/assets/scss/index.css");
|
|
16
|
+
const finalCssPath = existsSync(scssPath) ? scssPath : cssPath;
|
|
17
|
+
nuxt.options.css.push(finalCssPath);
|
|
18
|
+
const sharedIgnored = [
|
|
19
|
+
"**/node_modules/**",
|
|
20
|
+
"**/.nuxt/**",
|
|
21
|
+
"**/.output/**",
|
|
22
|
+
"**/dist/**",
|
|
23
|
+
"**/.git/**",
|
|
24
|
+
"**/tmp/**",
|
|
25
|
+
"**/.firebase/**"
|
|
26
|
+
];
|
|
27
|
+
nuxt.options.watchers = nuxt.options.watchers || {};
|
|
28
|
+
const chokidar = nuxt.options.watchers.chokidar = nuxt.options.watchers.chokidar || {};
|
|
29
|
+
const existingIgnored = chokidar.ignored ? Array.isArray(chokidar.ignored) ? chokidar.ignored : [chokidar.ignored] : [];
|
|
30
|
+
chokidar.ignored = [.../* @__PURE__ */ new Set([...existingIgnored, ...sharedIgnored])];
|
|
31
|
+
chokidar.usePolling = true;
|
|
32
|
+
chokidar.interval = 1e3;
|
|
33
|
+
nuxt.options.nitro = nuxt.options.nitro || {};
|
|
34
|
+
const watchOptions = nuxt.options.nitro.watchOptions = nuxt.options.nitro.watchOptions || {};
|
|
35
|
+
watchOptions.usePolling = true;
|
|
36
|
+
watchOptions.interval = 1e3;
|
|
37
|
+
watchOptions.ignored = sharedIgnored;
|
|
38
|
+
nuxt.hook("vite:extendConfig", (config) => {
|
|
39
|
+
const server = config.server || (config.server = {});
|
|
40
|
+
const watch = server.watch || (server.watch = {});
|
|
41
|
+
const currentIgnored = watch.ignored || [];
|
|
42
|
+
if (Array.isArray(currentIgnored)) {
|
|
43
|
+
watch.ignored = [.../* @__PURE__ */ new Set([...currentIgnored, ...sharedIgnored])];
|
|
44
|
+
} else if (currentIgnored) {
|
|
45
|
+
watch.ignored = [currentIgnored, ...sharedIgnored];
|
|
46
|
+
} else {
|
|
47
|
+
watch.ignored = sharedIgnored;
|
|
48
|
+
}
|
|
49
|
+
watch.usePolling = true;
|
|
50
|
+
watch.interval = 1e3;
|
|
51
|
+
const fs = server.fs || (server.fs = {});
|
|
52
|
+
const allow = fs.allow || (fs.allow = []);
|
|
53
|
+
if (!allow.includes(runtimePath)) {
|
|
54
|
+
allow.push(runtimePath);
|
|
55
|
+
}
|
|
56
|
+
const ssr = config.ssr || (config.ssr = {});
|
|
57
|
+
const noExternal = ssr.noExternal || (ssr.noExternal = []);
|
|
58
|
+
if (Array.isArray(noExternal) && !noExternal.includes("@katlux/toolkit")) {
|
|
59
|
+
noExternal.push("@katlux/toolkit");
|
|
60
|
+
}
|
|
61
|
+
});
|
|
10
62
|
addComponentsDir({
|
|
11
63
|
path: resolve("./runtime/components"),
|
|
12
64
|
pathPrefix: false,
|
|
@@ -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,60 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
};
|
|
6
|
-
wrap: {
|
|
7
|
-
type: PropType<"wrap" | "nowrap">;
|
|
8
|
-
default: string;
|
|
9
|
-
};
|
|
10
|
-
flexChild: {
|
|
11
|
-
type: BooleanConstructor;
|
|
12
|
-
default: boolean;
|
|
13
|
-
};
|
|
14
|
-
align: {
|
|
15
|
-
type: PropType<"start" | "center" | "end" | "stretch" | "baseline">;
|
|
16
|
-
default: string;
|
|
17
|
-
};
|
|
18
|
-
justify: {
|
|
19
|
-
type: PropType<"start" | "center" | "end" | "space-between" | "around" | "evenly">;
|
|
20
|
-
default: string;
|
|
21
|
-
};
|
|
22
|
-
noGap: {
|
|
23
|
-
type: BooleanConstructor;
|
|
24
|
-
default: boolean;
|
|
25
|
-
};
|
|
26
|
-
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
27
|
-
direction: {
|
|
28
|
-
type: PropType<"row" | "column">;
|
|
29
|
-
default: string;
|
|
30
|
-
};
|
|
31
|
-
wrap: {
|
|
32
|
-
type: PropType<"wrap" | "nowrap">;
|
|
33
|
-
default: string;
|
|
34
|
-
};
|
|
35
|
-
flexChild: {
|
|
36
|
-
type: BooleanConstructor;
|
|
37
|
-
default: boolean;
|
|
38
|
-
};
|
|
39
|
-
align: {
|
|
40
|
-
type: PropType<"start" | "center" | "end" | "stretch" | "baseline">;
|
|
41
|
-
default: string;
|
|
42
|
-
};
|
|
43
|
-
justify: {
|
|
44
|
-
type: PropType<"start" | "center" | "end" | "space-between" | "around" | "evenly">;
|
|
45
|
-
default: string;
|
|
46
|
-
};
|
|
47
|
-
noGap: {
|
|
48
|
-
type: BooleanConstructor;
|
|
49
|
-
default: boolean;
|
|
50
|
-
};
|
|
51
|
-
}>> & Readonly<{}>, {
|
|
52
|
-
wrap: any;
|
|
53
|
-
direction: any;
|
|
1
|
+
import { type KGridProps } from './KGrid.logic.js';
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<KGridProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<KGridProps> & Readonly<{}>, {
|
|
3
|
+
wrap: "wrap" | "nowrap";
|
|
4
|
+
direction: "row" | "column";
|
|
54
5
|
flexChild: boolean;
|
|
55
|
-
align:
|
|
56
|
-
justify:
|
|
6
|
+
align: "start" | "center" | "end" | "stretch" | "baseline";
|
|
7
|
+
justify: "start" | "center" | "end" | "space-between" | "around" | "evenly";
|
|
57
8
|
noGap: boolean;
|
|
58
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions,
|
|
9
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
59
10
|
declare const _default: typeof __VLS_export;
|
|
60
11
|
export default _default;
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { useKGridLogic
|
|
2
|
+
import { useKGridLogic } from "./KGrid.logic";
|
|
3
3
|
import { usePresetComponent } from "../../composables/usePresetComponent";
|
|
4
4
|
import { computed } from "vue";
|
|
5
5
|
import KGridDefault from "../../presets/default/components/KGrid/KGrid.vue";
|
|
6
|
-
const props = defineProps(
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
direction: { type: String, required: false, default: "row" },
|
|
8
|
+
wrap: { type: String, required: false, default: "wrap" },
|
|
9
|
+
flexChild: { type: Boolean, required: false, default: false },
|
|
10
|
+
align: { type: String, required: false, default: "start" },
|
|
11
|
+
justify: { type: String, required: false, default: "start" },
|
|
12
|
+
noGap: { type: Boolean, required: false, default: false }
|
|
13
|
+
});
|
|
7
14
|
const { classes } = useKGridLogic(props);
|
|
8
15
|
const presetComponent = usePresetComponent("KGrid", KGridDefault);
|
|
9
16
|
const templateProps = computed(() => ({
|
|
@@ -1,60 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
};
|
|
6
|
-
wrap: {
|
|
7
|
-
type: PropType<"wrap" | "nowrap">;
|
|
8
|
-
default: string;
|
|
9
|
-
};
|
|
10
|
-
flexChild: {
|
|
11
|
-
type: BooleanConstructor;
|
|
12
|
-
default: boolean;
|
|
13
|
-
};
|
|
14
|
-
align: {
|
|
15
|
-
type: PropType<"start" | "center" | "end" | "stretch" | "baseline">;
|
|
16
|
-
default: string;
|
|
17
|
-
};
|
|
18
|
-
justify: {
|
|
19
|
-
type: PropType<"start" | "center" | "end" | "space-between" | "around" | "evenly">;
|
|
20
|
-
default: string;
|
|
21
|
-
};
|
|
22
|
-
noGap: {
|
|
23
|
-
type: BooleanConstructor;
|
|
24
|
-
default: boolean;
|
|
25
|
-
};
|
|
26
|
-
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
27
|
-
direction: {
|
|
28
|
-
type: PropType<"row" | "column">;
|
|
29
|
-
default: string;
|
|
30
|
-
};
|
|
31
|
-
wrap: {
|
|
32
|
-
type: PropType<"wrap" | "nowrap">;
|
|
33
|
-
default: string;
|
|
34
|
-
};
|
|
35
|
-
flexChild: {
|
|
36
|
-
type: BooleanConstructor;
|
|
37
|
-
default: boolean;
|
|
38
|
-
};
|
|
39
|
-
align: {
|
|
40
|
-
type: PropType<"start" | "center" | "end" | "stretch" | "baseline">;
|
|
41
|
-
default: string;
|
|
42
|
-
};
|
|
43
|
-
justify: {
|
|
44
|
-
type: PropType<"start" | "center" | "end" | "space-between" | "around" | "evenly">;
|
|
45
|
-
default: string;
|
|
46
|
-
};
|
|
47
|
-
noGap: {
|
|
48
|
-
type: BooleanConstructor;
|
|
49
|
-
default: boolean;
|
|
50
|
-
};
|
|
51
|
-
}>> & Readonly<{}>, {
|
|
52
|
-
wrap: any;
|
|
53
|
-
direction: any;
|
|
1
|
+
import { type KGridProps } from './KGrid.logic.js';
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<KGridProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<KGridProps> & Readonly<{}>, {
|
|
3
|
+
wrap: "wrap" | "nowrap";
|
|
4
|
+
direction: "row" | "column";
|
|
54
5
|
flexChild: boolean;
|
|
55
|
-
align:
|
|
56
|
-
justify:
|
|
6
|
+
align: "start" | "center" | "end" | "stretch" | "baseline";
|
|
7
|
+
justify: "start" | "center" | "end" | "space-between" | "around" | "evenly";
|
|
57
8
|
noGap: boolean;
|
|
58
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions,
|
|
9
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
59
10
|
declare const _default: typeof __VLS_export;
|
|
60
11
|
export default _default;
|
|
@@ -25,5 +25,5 @@ export declare const KIconDefaultProps: {
|
|
|
25
25
|
export declare function useKIconLogic(props: KIconProps): {
|
|
26
26
|
widthPx: import("vue").ComputedRef<string | undefined>;
|
|
27
27
|
heightPx: import("vue").ComputedRef<string>;
|
|
28
|
-
iconComponent: import("vue").ComputedRef<
|
|
28
|
+
iconComponent: import("vue").ComputedRef<string | null>;
|
|
29
29
|
};
|
|
@@ -18,12 +18,12 @@ export const KIconDefaultProps = {
|
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
export function useKIconLogic(props) {
|
|
21
|
-
const modules = import.meta.glob("../../presets/default/assets/svg/*.svg", { eager: true });
|
|
21
|
+
const modules = import.meta.glob("../../presets/default/assets/svg/*.svg", { eager: true, as: "raw" });
|
|
22
22
|
const iconMap = {};
|
|
23
23
|
for (const path in modules) {
|
|
24
24
|
const match = path.match(/([^/]+)\.svg$/);
|
|
25
25
|
if (match) {
|
|
26
|
-
iconMap[match[1]] = modules[path]
|
|
26
|
+
iconMap[match[1]] = modules[path];
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
const widthPx = computed(
|
|
@@ -8,7 +8,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
8
8
|
default: boolean;
|
|
9
9
|
};
|
|
10
10
|
size: {
|
|
11
|
-
type: PropType<"small" | "medium" | "large">;
|
|
11
|
+
type: import("vue").PropType<"small" | "medium" | "large">;
|
|
12
12
|
default: string;
|
|
13
13
|
};
|
|
14
14
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -21,11 +21,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
21
21
|
default: boolean;
|
|
22
22
|
};
|
|
23
23
|
size: {
|
|
24
|
-
type: PropType<"small" | "medium" | "large">;
|
|
24
|
+
type: import("vue").PropType<"small" | "medium" | "large">;
|
|
25
25
|
default: string;
|
|
26
26
|
};
|
|
27
27
|
}>> & Readonly<{}>, {
|
|
28
|
-
size:
|
|
28
|
+
size: "small" | "large" | "medium";
|
|
29
29
|
overlay: boolean;
|
|
30
30
|
loading: boolean;
|
|
31
31
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -8,7 +8,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
8
8
|
default: boolean;
|
|
9
9
|
};
|
|
10
10
|
size: {
|
|
11
|
-
type: PropType<"small" | "medium" | "large">;
|
|
11
|
+
type: import("vue").PropType<"small" | "medium" | "large">;
|
|
12
12
|
default: string;
|
|
13
13
|
};
|
|
14
14
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -21,11 +21,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
21
21
|
default: boolean;
|
|
22
22
|
};
|
|
23
23
|
size: {
|
|
24
|
-
type: PropType<"small" | "medium" | "large">;
|
|
24
|
+
type: import("vue").PropType<"small" | "medium" | "large">;
|
|
25
25
|
default: string;
|
|
26
26
|
};
|
|
27
27
|
}>> & Readonly<{}>, {
|
|
28
|
-
size:
|
|
28
|
+
size: "small" | "large" | "medium";
|
|
29
29
|
overlay: boolean;
|
|
30
30
|
loading: boolean;
|
|
31
31
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
1
2
|
export interface KLoaderProps {
|
|
2
3
|
loading?: boolean;
|
|
3
4
|
overlay?: boolean;
|
|
@@ -18,5 +19,11 @@ export declare const KLoaderDefaultProps: {
|
|
|
18
19
|
};
|
|
19
20
|
};
|
|
20
21
|
export declare function useKLoaderLogic(props: KLoaderProps): {
|
|
21
|
-
loaderClasses:
|
|
22
|
+
loaderClasses: import("vue").ComputedRef<(string | {
|
|
23
|
+
'is-overlay': boolean | undefined;
|
|
24
|
+
'is-loading'?: undefined;
|
|
25
|
+
} | {
|
|
26
|
+
'is-loading': boolean | undefined;
|
|
27
|
+
'is-overlay'?: undefined;
|
|
28
|
+
})[]>;
|
|
22
29
|
};
|
|
@@ -1,33 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
default: string;
|
|
5
|
-
};
|
|
6
|
-
noGap: {
|
|
7
|
-
type: BooleanConstructor;
|
|
8
|
-
default: boolean;
|
|
9
|
-
};
|
|
10
|
-
flexContent: {
|
|
11
|
-
type: BooleanConstructor;
|
|
12
|
-
default: boolean;
|
|
13
|
-
};
|
|
14
|
-
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
15
|
-
title: {
|
|
16
|
-
type: StringConstructor;
|
|
17
|
-
default: string;
|
|
18
|
-
};
|
|
19
|
-
noGap: {
|
|
20
|
-
type: BooleanConstructor;
|
|
21
|
-
default: boolean;
|
|
22
|
-
};
|
|
23
|
-
flexContent: {
|
|
24
|
-
type: BooleanConstructor;
|
|
25
|
-
default: boolean;
|
|
26
|
-
};
|
|
27
|
-
}>> & Readonly<{}>, {
|
|
1
|
+
import { type KPanelProps } from './KPanel.logic.js';
|
|
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";
|
|
28
4
|
title: string;
|
|
29
5
|
noGap: boolean;
|
|
30
6
|
flexContent: boolean;
|
|
31
|
-
|
|
7
|
+
scrollable: boolean;
|
|
8
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
32
9
|
declare const _default: typeof __VLS_export;
|
|
33
10
|
export default _default;
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { useKPanelLogic
|
|
2
|
+
import { useKPanelLogic } from "./KPanel.logic";
|
|
3
3
|
import { usePresetComponent } from "../../composables/usePresetComponent";
|
|
4
4
|
import { computed } from "vue";
|
|
5
5
|
import KPanelDefault from "../../presets/default/components/KPanel/KPanel.vue";
|
|
6
|
-
const props = defineProps(
|
|
7
|
-
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
title: { type: String, required: false, default: "" },
|
|
8
|
+
noGap: { type: Boolean, required: false, default: true },
|
|
9
|
+
flexContent: { type: Boolean, required: false, default: false },
|
|
10
|
+
scrollable: { type: Boolean, required: false, default: false },
|
|
11
|
+
type: { type: String, required: false, default: "default" }
|
|
12
|
+
});
|
|
8
13
|
const presetComponent = usePresetComponent("KPanel", KPanelDefault);
|
|
9
14
|
const templateProps = computed(() => ({
|
|
15
|
+
title: props.title,
|
|
10
16
|
noGap: props.noGap,
|
|
11
|
-
flexContent: props.flexContent
|
|
17
|
+
flexContent: props.flexContent,
|
|
18
|
+
scrollable: props.scrollable,
|
|
19
|
+
type: props.type
|
|
12
20
|
}));
|
|
13
21
|
</script>
|
|
14
22
|
|