@katlux/toolkit 0.1.0-beta.4 → 0.1.0-beta.41

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.
Files changed (83) hide show
  1. package/dist/compiled/composables/usePresetComponent.mjs +21 -16
  2. package/dist/module.cjs +52 -0
  3. package/dist/module.json +1 -1
  4. package/dist/module.mjs +52 -0
  5. package/dist/runtime/components/KCombobox/KCombobox.global.d.vue.ts +1 -1
  6. package/dist/runtime/components/KCombobox/KCombobox.global.vue.d.ts +1 -1
  7. package/dist/runtime/components/KGrid/KGrid.global.d.vue.ts +7 -56
  8. package/dist/runtime/components/KGrid/KGrid.global.vue +9 -2
  9. package/dist/runtime/components/KGrid/KGrid.global.vue.d.ts +7 -56
  10. package/dist/runtime/components/KHourPicker/KHourPicker.global.d.vue.ts +1 -1
  11. package/dist/runtime/components/KHourPicker/KHourPicker.global.vue.d.ts +1 -1
  12. package/dist/runtime/components/KIcon/KIcon.logic.d.ts +1 -1
  13. package/dist/runtime/components/KIcon/KIcon.logic.js +2 -2
  14. package/dist/runtime/components/KLoader/KLoader.global.d.vue.ts +3 -3
  15. package/dist/runtime/components/KLoader/KLoader.global.vue.d.ts +3 -3
  16. package/dist/runtime/components/KLoader/KLoader.logic.d.ts +8 -1
  17. package/dist/runtime/components/KLoader/KLoader.logic.js +1 -0
  18. package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.d.vue.ts +1 -1
  19. package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.vue.d.ts +1 -1
  20. package/dist/runtime/components/KPanel/KPanel.global.d.vue.ts +5 -28
  21. package/dist/runtime/components/KPanel/KPanel.global.vue +12 -4
  22. package/dist/runtime/components/KPanel/KPanel.global.vue.d.ts +5 -28
  23. package/dist/runtime/components/KPanel/KPanel.logic.d.ts +10 -0
  24. package/dist/runtime/components/KPanel/KPanel.logic.js +8 -0
  25. package/dist/runtime/components/KTextbox/KTextbox.global.d.vue.ts +12 -0
  26. package/dist/runtime/components/KTextbox/KTextbox.global.vue.d.ts +12 -0
  27. package/dist/runtime/components/KTextbox/KTextbox.logic.d.ts +6 -0
  28. package/dist/runtime/components/KTextbox/KTextbox.logic.js +7 -0
  29. package/dist/runtime/components/KTreePicker/KTreePicker.global.d.vue.ts +1 -1
  30. package/dist/runtime/components/KTreePicker/KTreePicker.global.vue.d.ts +1 -1
  31. package/dist/runtime/composables/usePresetComponent.d.ts +16 -0
  32. package/dist/runtime/composables/usePresetComponent.js +21 -16
  33. package/dist/runtime/presets/default/assets/scss/css-variables.css +61 -13
  34. package/dist/runtime/presets/default/assets/scss/css-variables.scss +283 -0
  35. package/dist/runtime/presets/default/assets/scss/docs.scss +52 -0
  36. package/dist/runtime/presets/default/assets/scss/index.css +69 -13
  37. package/dist/runtime/presets/default/assets/scss/index.scss +12 -0
  38. package/dist/runtime/presets/default/assets/scss/mixins.scss +94 -0
  39. package/dist/runtime/presets/default/assets/scss/reset.scss +16 -0
  40. package/dist/runtime/presets/default/components/KAccordion/KAccordion.vue +5 -2
  41. package/dist/runtime/presets/default/components/KAccordion/KAccordionItem.vue +40 -37
  42. package/dist/runtime/presets/default/components/KBulkActions/KBulkActions.vue +29 -22
  43. package/dist/runtime/presets/default/components/KButton/KButton.vue +147 -428
  44. package/dist/runtime/presets/default/components/KCalendar/KCalendar.vue +57 -53
  45. package/dist/runtime/presets/default/components/KCalendar/KCalendarMonth.vue +189 -161
  46. package/dist/runtime/presets/default/components/KCheckbox/KCheckbox.vue +46 -36
  47. package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue +76 -66
  48. package/dist/runtime/presets/default/components/KCombobox/KComboboxList.vue +77 -59
  49. package/dist/runtime/presets/default/components/KDataIterator/KDataIterator.vue +40 -31
  50. package/dist/runtime/presets/default/components/KDatatable/KDatatable.vue +110 -92
  51. package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue +38 -22
  52. package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.vue +66 -48
  53. package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue +27 -22
  54. package/dist/runtime/presets/default/components/KGantt/KGantt.vue +336 -240
  55. package/dist/runtime/presets/default/components/KGantt/KGanttRuler.vue +40 -35
  56. package/dist/runtime/presets/default/components/KGantt/KGanttTimeline.vue +170 -140
  57. package/dist/runtime/presets/default/components/KGrid/KGrid.vue +62 -60
  58. package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.vue +23 -19
  59. package/dist/runtime/presets/default/components/KHourSelect/KHourSelect.vue +34 -28
  60. package/dist/runtime/presets/default/components/KIcon/KIcon.d.vue.ts +1 -1
  61. package/dist/runtime/presets/default/components/KIcon/KIcon.vue +31 -22
  62. package/dist/runtime/presets/default/components/KIcon/KIcon.vue.d.ts +1 -1
  63. package/dist/runtime/presets/default/components/KLoader/KLoader.vue +53 -47
  64. package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.vue +108 -84
  65. package/dist/runtime/presets/default/components/KModal/KModal.vue +30 -27
  66. package/dist/runtime/presets/default/components/KPagination/KPagination.vue +42 -40
  67. package/dist/runtime/presets/default/components/KPanel/KPanel.d.vue.ts +3 -0
  68. package/dist/runtime/presets/default/components/KPanel/KPanel.vue +95 -34
  69. package/dist/runtime/presets/default/components/KPanel/KPanel.vue.d.ts +3 -0
  70. package/dist/runtime/presets/default/components/KRadiobox/KRadiobox.vue +30 -29
  71. package/dist/runtime/presets/default/components/KRangeSlider/KRangeSlider.vue +158 -125
  72. package/dist/runtime/presets/default/components/KSlider/KSlider.vue +123 -100
  73. package/dist/runtime/presets/default/components/KTabs/KTabItem.vue +40 -37
  74. package/dist/runtime/presets/default/components/KTabs/KTabs.vue +9 -6
  75. package/dist/runtime/presets/default/components/KTextarea/KTextarea.vue +23 -20
  76. package/dist/runtime/presets/default/components/KTextbox/KTextbox.d.vue.ts +1 -0
  77. package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue +44 -34
  78. package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue.d.ts +1 -0
  79. package/dist/runtime/presets/default/components/KTree/KTree.vue +102 -80
  80. package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.vue +54 -34
  81. package/dist/runtime/presets/default/components/KTreeView/KTreeCell.vue +31 -30
  82. package/dist/runtime/presets/default/components/KTreeView/KTreeView.vue +34 -27
  83. package/package.json +5 -5
@@ -1,8 +1,9 @@
1
1
  import { computed, defineAsyncComponent } from "vue";
2
2
  import { useAppConfig } from "#app";
3
- const componentCache = /* @__PURE__ */ new Map();
4
- const modernComponents = import.meta.glob("../../../../katlux-preset-modern/src/runtime/components/**/*.vue");
5
- const toolkitPresets = import.meta.glob("../presets/**/*.vue");
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
- if (activePreset.value === "modern") {
19
- const path = `../../../../katlux-preset-modern/src/runtime/components/${componentBaseName}/${componentBaseName}.vue`;
20
- loader = modernComponents[path];
21
- } else {
22
- const path = `../presets/${activePreset.value}/components/${componentBaseName}/${componentBaseName}.vue`;
23
- loader = toolkitPresets[path];
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
- const asyncComp = defineAsyncComponent({
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@katlux/toolkit",
3
3
  "configKey": "katluxToolkit",
4
- "version": "0.1.0-beta.4",
4
+ "version": "0.1.0-beta.41",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
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,
@@ -86,7 +86,6 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
86
86
  "onUpdate:modelValue"?: ((value: import("@katlux/providers").TDataRow | import("@katlux/providers").TDataRow[] | null) => any) | undefined;
87
87
  }>, {
88
88
  disabled: boolean;
89
- modelValue: any;
90
89
  searchbox: boolean;
91
90
  placeholder: string;
92
91
  dataProvider: any;
@@ -94,6 +93,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
94
93
  multiSelect: boolean;
95
94
  maxSelectedDisplay: string | number | boolean;
96
95
  visibleFields: any;
96
+ modelValue: any;
97
97
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
98
98
  declare const _default: typeof __VLS_export;
99
99
  export default _default;
@@ -86,7 +86,6 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
86
86
  "onUpdate:modelValue"?: ((value: import("@katlux/providers").TDataRow | import("@katlux/providers").TDataRow[] | null) => any) | undefined;
87
87
  }>, {
88
88
  disabled: boolean;
89
- modelValue: any;
90
89
  searchbox: boolean;
91
90
  placeholder: string;
92
91
  dataProvider: any;
@@ -94,6 +93,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
94
93
  multiSelect: boolean;
95
94
  maxSelectedDisplay: string | number | boolean;
96
95
  visibleFields: any;
96
+ modelValue: any;
97
97
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
98
98
  declare const _default: typeof __VLS_export;
99
99
  export default _default;
@@ -1,60 +1,11 @@
1
- declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
- direction: {
3
- type: PropType<"row" | "column">;
4
- default: string;
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: any;
56
- justify: any;
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, true, {}, any>;
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, KGridDefaultProps } from "./KGrid.logic";
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(KGridDefaultProps);
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
- declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
- direction: {
3
- type: PropType<"row" | "column">;
4
- default: string;
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: any;
56
- justify: any;
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, true, {}, any>;
9
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
59
10
  declare const _default: typeof __VLS_export;
60
11
  export default _default;
@@ -62,8 +62,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
62
62
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
63
63
  }>, {
64
64
  disabled: boolean;
65
- modelValue: string;
66
65
  placeholder: string;
66
+ modelValue: string;
67
67
  format: string;
68
68
  step: number;
69
69
  startHour: string;
@@ -62,8 +62,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
62
62
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
63
63
  }>, {
64
64
  disabled: boolean;
65
- modelValue: string;
66
65
  placeholder: string;
66
+ modelValue: string;
67
67
  format: string;
68
68
  step: number;
69
69
  startHour: string;
@@ -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<any>;
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].default;
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: any;
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: any;
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: any;
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,3 +1,4 @@
1
+ import { computed } from "vue";
1
2
  export const KLoaderDefaultProps = {
2
3
  loading: {
3
4
  type: Boolean,
@@ -37,8 +37,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
37
37
  }>> & Readonly<{
38
38
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
39
39
  }>, {
40
- modelValue: string;
41
40
  placeholder: string;
41
+ modelValue: string;
42
42
  showClear: boolean;
43
43
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
44
44
  declare const _default: typeof __VLS_export;
@@ -37,8 +37,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
37
37
  }>> & Readonly<{
38
38
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
39
39
  }>, {
40
- modelValue: string;
41
40
  placeholder: string;
41
+ modelValue: string;
42
42
  showClear: boolean;
43
43
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
44
44
  declare const _default: typeof __VLS_export;
@@ -1,33 +1,10 @@
1
- declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
- title: {
3
- type: StringConstructor;
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
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
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, KPanelDefaultProps } from "./KPanel.logic";
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(KPanelDefaultProps);
7
- useKPanelLogic(props);
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
 
@@ -1,33 +1,10 @@
1
- declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
- title: {
3
- type: StringConstructor;
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
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
7
+ scrollable: boolean;
8
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
32
9
  declare const _default: typeof __VLS_export;
33
10
  export default _default;