@katlux/toolkit 0.1.0-beta.6 → 0.1.0-beta.66

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 (184) 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/KBulkActions/KBulkActions.logic.d.ts +9 -2
  6. package/dist/runtime/components/KCalendar/KCalendar.global.d.vue.ts +11 -12
  7. package/dist/runtime/components/KCalendar/KCalendar.global.vue.d.ts +11 -12
  8. package/dist/runtime/components/KCalendar/KCalendar.logic.d.ts +1 -0
  9. package/dist/runtime/components/KCalendar/KCalendar.logic.js +25 -10
  10. package/dist/runtime/components/KCheckbox/KCheckbox.global.d.vue.ts +30 -0
  11. package/dist/runtime/components/KCheckbox/KCheckbox.global.vue +4 -1
  12. package/dist/runtime/components/KCheckbox/KCheckbox.global.vue.d.ts +30 -0
  13. package/dist/runtime/components/KCheckbox/KCheckbox.logic.d.ts +17 -0
  14. package/dist/runtime/components/KCheckbox/KCheckbox.logic.js +16 -1
  15. package/dist/runtime/components/KCombobox/KCombobox.global.d.vue.ts +75 -8
  16. package/dist/runtime/components/KCombobox/KCombobox.global.vue +18 -4
  17. package/dist/runtime/components/KCombobox/KCombobox.global.vue.d.ts +75 -8
  18. package/dist/runtime/components/KCombobox/KCombobox.logic.d.ts +46 -8
  19. package/dist/runtime/components/KCombobox/KCombobox.logic.js +77 -9
  20. package/dist/runtime/components/KCompositeInput/KCompositeInput.global.d.vue.ts +169 -0
  21. package/dist/runtime/components/KCompositeInput/KCompositeInput.global.vue +46 -0
  22. package/dist/runtime/components/KCompositeInput/KCompositeInput.global.vue.d.ts +169 -0
  23. package/dist/runtime/components/KCompositeInput/KCompositeInput.logic.d.ts +127 -0
  24. package/dist/runtime/components/KCompositeInput/KCompositeInput.logic.js +160 -0
  25. package/dist/runtime/components/KDatatable/KDataIterator.global.vue +1 -1
  26. package/dist/runtime/components/KDatatable/KDataIterator.logic.d.ts +2 -2
  27. package/dist/runtime/components/KDatatable/KDatatable.global.vue +1 -1
  28. package/dist/runtime/components/KDatatable/KDatatable.logic.d.ts +2 -2
  29. package/dist/runtime/components/KDatePicker/KDatePicker.global.d.vue.ts +95 -8
  30. package/dist/runtime/components/KDatePicker/KDatePicker.global.vue +27 -3
  31. package/dist/runtime/components/KDatePicker/KDatePicker.global.vue.d.ts +95 -8
  32. package/dist/runtime/components/KDatePicker/KDatePicker.logic.d.ts +43 -1
  33. package/dist/runtime/components/KDatePicker/KDatePicker.logic.js +106 -7
  34. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.d.vue.ts +84 -8
  35. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue +26 -3
  36. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue.d.ts +84 -8
  37. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.logic.d.ts +38 -1
  38. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.logic.js +161 -7
  39. package/dist/runtime/components/KDropdown/KDropdown.global.d.vue.ts +27 -0
  40. package/dist/runtime/components/KDropdown/KDropdown.global.vue +14 -4
  41. package/dist/runtime/components/KDropdown/KDropdown.global.vue.d.ts +27 -0
  42. package/dist/runtime/components/KDropdown/KDropdown.logic.d.ts +36 -1
  43. package/dist/runtime/components/KDropdown/KDropdown.logic.js +92 -4
  44. package/dist/runtime/components/KGrid/KGrid.global.d.vue.ts +7 -56
  45. package/dist/runtime/components/KGrid/KGrid.global.vue +9 -2
  46. package/dist/runtime/components/KGrid/KGrid.global.vue.d.ts +7 -56
  47. package/dist/runtime/components/KHourPicker/KHourPicker.global.d.vue.ts +41 -0
  48. package/dist/runtime/components/KHourPicker/KHourPicker.global.vue +27 -12
  49. package/dist/runtime/components/KHourPicker/KHourPicker.global.vue.d.ts +41 -0
  50. package/dist/runtime/components/KHourPicker/KHourPicker.logic.d.ts +26 -3
  51. package/dist/runtime/components/KHourPicker/KHourPicker.logic.js +34 -10
  52. package/dist/runtime/components/KHourSelect/KHourSelect.logic.js +4 -1
  53. package/dist/runtime/components/KIcon/KIcon.global.d.vue.ts +1 -1
  54. package/dist/runtime/components/KIcon/KIcon.global.vue.d.ts +1 -1
  55. package/dist/runtime/components/KIcon/KIcon.logic.d.ts +1 -1
  56. package/dist/runtime/components/KIcon/KIcon.logic.js +13 -8
  57. package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.d.vue.ts +21 -0
  58. package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.vue +4 -2
  59. package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.vue.d.ts +21 -0
  60. package/dist/runtime/components/KMaskTextbox/KMaskTextbox.logic.d.ts +11 -0
  61. package/dist/runtime/components/KMaskTextbox/KMaskTextbox.logic.js +9 -0
  62. package/dist/runtime/components/KModal/KModal.global.d.vue.ts +14 -2
  63. package/dist/runtime/components/KModal/KModal.global.vue +5 -1
  64. package/dist/runtime/components/KModal/KModal.global.vue.d.ts +14 -2
  65. package/dist/runtime/components/KModal/KModal.logic.d.ts +10 -2
  66. package/dist/runtime/components/KModal/KModal.logic.js +12 -3
  67. package/dist/runtime/components/KPagination/KPagination.global.vue +1 -1
  68. package/dist/runtime/components/KPanel/KPanel.global.d.vue.ts +5 -28
  69. package/dist/runtime/components/KPanel/KPanel.global.vue +12 -4
  70. package/dist/runtime/components/KPanel/KPanel.global.vue.d.ts +5 -28
  71. package/dist/runtime/components/KPanel/KPanel.logic.d.ts +10 -0
  72. package/dist/runtime/components/KPanel/KPanel.logic.js +8 -0
  73. package/dist/runtime/components/KRadiobox/KRadiobox.global.d.vue.ts +21 -0
  74. package/dist/runtime/components/KRadiobox/KRadiobox.global.vue +3 -1
  75. package/dist/runtime/components/KRadiobox/KRadiobox.global.vue.d.ts +21 -0
  76. package/dist/runtime/components/KRadiobox/KRadiobox.logic.d.ts +11 -0
  77. package/dist/runtime/components/KRadiobox/KRadiobox.logic.js +9 -0
  78. package/dist/runtime/components/KTextarea/KTextarea.global.d.vue.ts +21 -0
  79. package/dist/runtime/components/KTextarea/KTextarea.global.vue +3 -1
  80. package/dist/runtime/components/KTextarea/KTextarea.global.vue.d.ts +21 -0
  81. package/dist/runtime/components/KTextarea/KTextarea.logic.d.ts +11 -0
  82. package/dist/runtime/components/KTextarea/KTextarea.logic.js +9 -0
  83. package/dist/runtime/components/KTextbox/KTextbox.global.d.vue.ts +35 -2
  84. package/dist/runtime/components/KTextbox/KTextbox.global.vue +7 -4
  85. package/dist/runtime/components/KTextbox/KTextbox.global.vue.d.ts +35 -2
  86. package/dist/runtime/components/KTextbox/KTextbox.logic.d.ts +21 -4
  87. package/dist/runtime/components/KTextbox/KTextbox.logic.js +21 -5
  88. package/dist/runtime/components/KToast/KToast.global.d.vue.ts +57 -0
  89. package/dist/runtime/components/KToast/KToast.global.vue +32 -0
  90. package/dist/runtime/components/KToast/KToast.global.vue.d.ts +57 -0
  91. package/dist/runtime/components/KToast/KToast.logic.d.ts +34 -0
  92. package/dist/runtime/components/KToast/KToast.logic.js +47 -0
  93. package/dist/runtime/components/KTree/KTree.logic.d.ts +1 -1
  94. package/dist/runtime/components/KTreePicker/KTreePicker.global.d.vue.ts +63 -5
  95. package/dist/runtime/components/KTreePicker/KTreePicker.global.vue +15 -3
  96. package/dist/runtime/components/KTreePicker/KTreePicker.global.vue.d.ts +63 -5
  97. package/dist/runtime/components/KTreePicker/KTreePicker.logic.d.ts +37 -5
  98. package/dist/runtime/components/KTreePicker/KTreePicker.logic.js +32 -1
  99. package/dist/runtime/components/KTreeView/KTreeView.global.d.vue.ts +5 -5
  100. package/dist/runtime/components/KTreeView/KTreeView.global.vue.d.ts +5 -5
  101. package/dist/runtime/components/KTreeView/KTreeView.logic.d.ts +1 -1
  102. package/dist/runtime/composables/usePresetComponent.d.ts +16 -0
  103. package/dist/runtime/composables/usePresetComponent.js +21 -16
  104. package/dist/runtime/presets/default/assets/scss/css-variables.css +64 -13
  105. package/dist/runtime/presets/default/assets/scss/css-variables.scss +286 -0
  106. package/dist/runtime/presets/default/assets/scss/docs.scss +52 -0
  107. package/dist/runtime/presets/default/assets/scss/index.css +99 -13
  108. package/dist/runtime/presets/default/assets/scss/index.scss +42 -0
  109. package/dist/runtime/presets/default/assets/scss/mixins.scss +94 -0
  110. package/dist/runtime/presets/default/assets/scss/reset.scss +16 -0
  111. package/dist/runtime/presets/default/components/KAccordion/KAccordion.vue +5 -2
  112. package/dist/runtime/presets/default/components/KAccordion/KAccordionItem.vue +40 -37
  113. package/dist/runtime/presets/default/components/KBulkActions/KBulkActions.vue +29 -22
  114. package/dist/runtime/presets/default/components/KButton/KButton.vue +147 -428
  115. package/dist/runtime/presets/default/components/KCalendar/KCalendar.vue +57 -53
  116. package/dist/runtime/presets/default/components/KCalendar/KCalendarMonth.vue +189 -161
  117. package/dist/runtime/presets/default/components/KCheckbox/KCheckbox.d.vue.ts +3 -0
  118. package/dist/runtime/presets/default/components/KCheckbox/KCheckbox.vue +59 -42
  119. package/dist/runtime/presets/default/components/KCheckbox/KCheckbox.vue.d.ts +3 -0
  120. package/dist/runtime/presets/default/components/KCombobox/KCombobox.d.vue.ts +7 -0
  121. package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue +108 -79
  122. package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue.d.ts +7 -0
  123. package/dist/runtime/presets/default/components/KCombobox/KComboboxList.d.vue.ts +1 -0
  124. package/dist/runtime/presets/default/components/KCombobox/KComboboxList.vue +79 -61
  125. package/dist/runtime/presets/default/components/KCombobox/KComboboxList.vue.d.ts +1 -0
  126. package/dist/runtime/presets/default/components/KCompositeInput/KCompositeInput.d.vue.ts +29 -0
  127. package/dist/runtime/presets/default/components/KCompositeInput/KCompositeInput.vue +202 -0
  128. package/dist/runtime/presets/default/components/KCompositeInput/KCompositeInput.vue.d.ts +29 -0
  129. package/dist/runtime/presets/default/components/KDataIterator/KDataIterator.vue +40 -31
  130. package/dist/runtime/presets/default/components/KDatatable/KDatatable.vue +110 -92
  131. package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.d.vue.ts +7 -0
  132. package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue +58 -25
  133. package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue.d.ts +7 -0
  134. package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.d.vue.ts +6 -0
  135. package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.vue +81 -52
  136. package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.vue.d.ts +6 -0
  137. package/dist/runtime/presets/default/components/KDropdown/KDropdown.d.vue.ts +10 -0
  138. package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue +57 -25
  139. package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue.d.ts +10 -0
  140. package/dist/runtime/presets/default/components/KGantt/KGantt.vue +337 -241
  141. package/dist/runtime/presets/default/components/KGantt/KGanttRuler.vue +40 -35
  142. package/dist/runtime/presets/default/components/KGantt/KGanttTimeline.vue +170 -140
  143. package/dist/runtime/presets/default/components/KGrid/KGrid.vue +62 -60
  144. package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.d.vue.ts +8 -2
  145. package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.vue +48 -28
  146. package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.vue.d.ts +8 -2
  147. package/dist/runtime/presets/default/components/KHourSelect/KHourSelect.vue +34 -28
  148. package/dist/runtime/presets/default/components/KIcon/KIcon.d.vue.ts +1 -1
  149. package/dist/runtime/presets/default/components/KIcon/KIcon.vue +31 -22
  150. package/dist/runtime/presets/default/components/KIcon/KIcon.vue.d.ts +1 -1
  151. package/dist/runtime/presets/default/components/KLoader/KLoader.vue +65 -48
  152. package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.d.vue.ts +2 -0
  153. package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.vue +117 -84
  154. package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.vue.d.ts +2 -0
  155. package/dist/runtime/presets/default/components/KModal/KModal.d.vue.ts +2 -0
  156. package/dist/runtime/presets/default/components/KModal/KModal.vue +85 -35
  157. package/dist/runtime/presets/default/components/KModal/KModal.vue.d.ts +2 -0
  158. package/dist/runtime/presets/default/components/KPagination/KPagination.vue +42 -40
  159. package/dist/runtime/presets/default/components/KPanel/KPanel.d.vue.ts +3 -0
  160. package/dist/runtime/presets/default/components/KPanel/KPanel.vue +97 -34
  161. package/dist/runtime/presets/default/components/KPanel/KPanel.vue.d.ts +3 -0
  162. package/dist/runtime/presets/default/components/KRadiobox/KRadiobox.d.vue.ts +2 -0
  163. package/dist/runtime/presets/default/components/KRadiobox/KRadiobox.vue +40 -35
  164. package/dist/runtime/presets/default/components/KRadiobox/KRadiobox.vue.d.ts +2 -0
  165. package/dist/runtime/presets/default/components/KRangeSlider/KRangeSlider.vue +158 -125
  166. package/dist/runtime/presets/default/components/KSlider/KSlider.vue +123 -100
  167. package/dist/runtime/presets/default/components/KTabs/KTabItem.vue +40 -37
  168. package/dist/runtime/presets/default/components/KTabs/KTabs.vue +9 -6
  169. package/dist/runtime/presets/default/components/KTextarea/KTextarea.d.vue.ts +2 -0
  170. package/dist/runtime/presets/default/components/KTextarea/KTextarea.vue +40 -21
  171. package/dist/runtime/presets/default/components/KTextarea/KTextarea.vue.d.ts +2 -0
  172. package/dist/runtime/presets/default/components/KTextbox/KTextbox.d.vue.ts +4 -1
  173. package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue +76 -37
  174. package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue.d.ts +4 -1
  175. package/dist/runtime/presets/default/components/KToast/KToast.d.vue.ts +17 -0
  176. package/dist/runtime/presets/default/components/KToast/KToast.vue +118 -0
  177. package/dist/runtime/presets/default/components/KToast/KToast.vue.d.ts +17 -0
  178. package/dist/runtime/presets/default/components/KTree/KTree.vue +103 -80
  179. package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.d.vue.ts +6 -0
  180. package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.vue +88 -55
  181. package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.vue.d.ts +6 -0
  182. package/dist/runtime/presets/default/components/KTreeView/KTreeCell.vue +31 -30
  183. package/dist/runtime/presets/default/components/KTreeView/KTreeView.vue +34 -27
  184. package/package.json +5 -5
@@ -1,3 +1,4 @@
1
+ import { type KMaskTextboxProps } from './KMaskTextbox.logic.js';
1
2
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
3
  modelValue: {
3
4
  type: StringConstructor;
@@ -15,6 +16,15 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
15
16
  type: StringConstructor;
16
17
  required: boolean;
17
18
  };
19
+ validation: {
20
+ type: import("vue").PropType<KMaskTextboxProps["validation"]>;
21
+ default: null;
22
+ validator: (value: string) => boolean;
23
+ };
24
+ validationText: {
25
+ type: StringConstructor;
26
+ default: string;
27
+ };
18
28
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
19
29
  "update:modelValue": (value: string) => any;
20
30
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
@@ -34,9 +44,20 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
34
44
  type: StringConstructor;
35
45
  required: boolean;
36
46
  };
47
+ validation: {
48
+ type: import("vue").PropType<KMaskTextboxProps["validation"]>;
49
+ default: null;
50
+ validator: (value: string) => boolean;
51
+ };
52
+ validationText: {
53
+ type: StringConstructor;
54
+ default: string;
55
+ };
37
56
  }>> & Readonly<{
38
57
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
39
58
  }>, {
59
+ validation: "error" | "success" | "warning" | null | undefined;
60
+ validationText: string;
40
61
  modelValue: string;
41
62
  placeholder: string;
42
63
  showClear: boolean;
@@ -11,14 +11,16 @@ const templateProps = computed(() => ({
11
11
  maskedValue: maskedValue.value,
12
12
  placeholder: placeholder.value,
13
13
  showClear: showClear.value,
14
- mask: props.mask
14
+ mask: props.mask,
15
+ validation: props.validation,
16
+ validationText: props.validationText
15
17
  }));
16
18
  </script>
17
19
 
18
20
  <template lang="pug">
19
21
  component(
20
22
  :is="presetComponent"
21
- v-bind="templateProps"
23
+ v-bind="{ ...templateProps, ...$attrs }"
22
24
  @update:maskedValue="maskedValue = $event"
23
25
  @clear="handleClear"
24
26
  )
@@ -1,3 +1,4 @@
1
+ import { type KMaskTextboxProps } from './KMaskTextbox.logic.js';
1
2
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
3
  modelValue: {
3
4
  type: StringConstructor;
@@ -15,6 +16,15 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
15
16
  type: StringConstructor;
16
17
  required: boolean;
17
18
  };
19
+ validation: {
20
+ type: import("vue").PropType<KMaskTextboxProps["validation"]>;
21
+ default: null;
22
+ validator: (value: string) => boolean;
23
+ };
24
+ validationText: {
25
+ type: StringConstructor;
26
+ default: string;
27
+ };
18
28
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
19
29
  "update:modelValue": (value: string) => any;
20
30
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
@@ -34,9 +44,20 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
34
44
  type: StringConstructor;
35
45
  required: boolean;
36
46
  };
47
+ validation: {
48
+ type: import("vue").PropType<KMaskTextboxProps["validation"]>;
49
+ default: null;
50
+ validator: (value: string) => boolean;
51
+ };
52
+ validationText: {
53
+ type: StringConstructor;
54
+ default: string;
55
+ };
37
56
  }>> & Readonly<{
38
57
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
39
58
  }>, {
59
+ validation: "error" | "success" | "warning" | null | undefined;
60
+ validationText: string;
40
61
  modelValue: string;
41
62
  placeholder: string;
42
63
  showClear: boolean;
@@ -3,6 +3,8 @@ export interface KMaskTextboxProps {
3
3
  placeholder?: string;
4
4
  showClear?: boolean;
5
5
  mask: string;
6
+ validation?: 'success' | 'warning' | 'error' | null;
7
+ validationText?: string;
6
8
  }
7
9
  export interface KMaskTextboxEmits {
8
10
  (e: 'update:modelValue', value: string): void;
@@ -24,6 +26,15 @@ export declare const KMaskTextboxDefaultProps: {
24
26
  type: StringConstructor;
25
27
  required: boolean;
26
28
  };
29
+ validation: {
30
+ type: import("vue").PropType<KMaskTextboxProps["validation"]>;
31
+ default: null;
32
+ validator: (value: string) => boolean;
33
+ };
34
+ validationText: {
35
+ type: StringConstructor;
36
+ default: string;
37
+ };
27
38
  };
28
39
  /**
29
40
  * Pattern definition for mask characters
@@ -15,6 +15,15 @@ export const KMaskTextboxDefaultProps = {
15
15
  mask: {
16
16
  type: String,
17
17
  required: true
18
+ },
19
+ validation: {
20
+ type: String,
21
+ default: null,
22
+ validator: (value) => [null, "success", "warning", "error"].includes(value)
23
+ },
24
+ validationText: {
25
+ type: String,
26
+ default: ""
18
27
  }
19
28
  };
20
29
  function getMaskPatternDef(mask, position) {
@@ -1,6 +1,18 @@
1
- declare const __VLS_export: import("vue").DefineComponent<{}, {
1
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ closeOnOutsideClick: {
3
+ type: BooleanConstructor;
4
+ default: boolean;
5
+ };
6
+ }>, {
2
7
  openModal: () => void;
3
8
  closeModal: () => void;
4
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
9
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
10
+ closeOnOutsideClick: {
11
+ type: BooleanConstructor;
12
+ default: boolean;
13
+ };
14
+ }>> & Readonly<{}>, {
15
+ closeOnOutsideClick: boolean;
16
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
5
17
  declare const _default: typeof __VLS_export;
6
18
  export default _default;
@@ -4,14 +4,18 @@ import { usePresetComponent } from "../../composables/usePresetComponent";
4
4
  import { computed } from "vue";
5
5
  import KModalDefault from "../../presets/default/components/KModal/KModal.vue";
6
6
  const props = defineProps(KModalDefaultProps);
7
- const { opened, openModal, closeModal } = useKModalLogic(props);
7
+ const useId = globalThis.useId || (() => `k-modal-${Math.random().toString(36).slice(2, 9)}`);
8
+ const stableId = useId();
9
+ const { modalId, opened, openModal, closeModal } = useKModalLogic(props, stableId);
8
10
  defineExpose({
9
11
  openModal,
10
12
  closeModal
11
13
  });
12
14
  const presetComponent = usePresetComponent("KModal", KModalDefault);
13
15
  const templateProps = computed(() => ({
16
+ modalId: modalId.value,
14
17
  opened: opened.value,
18
+ closeOnOutsideClick: props.closeOnOutsideClick,
15
19
  closeModal
16
20
  }));
17
21
  </script>
@@ -1,6 +1,18 @@
1
- declare const __VLS_export: import("vue").DefineComponent<{}, {
1
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ closeOnOutsideClick: {
3
+ type: BooleanConstructor;
4
+ default: boolean;
5
+ };
6
+ }>, {
2
7
  openModal: () => void;
3
8
  closeModal: () => void;
4
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
9
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
10
+ closeOnOutsideClick: {
11
+ type: BooleanConstructor;
12
+ default: boolean;
13
+ };
14
+ }>> & Readonly<{}>, {
15
+ closeOnOutsideClick: boolean;
16
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
5
17
  declare const _default: typeof __VLS_export;
6
18
  export default _default;
@@ -1,7 +1,15 @@
1
+ export declare const KMODAL_PORTAL_ID_KEY = "KMODAL_PORTAL_ID";
1
2
  export interface KModalProps {
3
+ closeOnOutsideClick?: boolean;
2
4
  }
3
- export declare const KModalDefaultProps: {};
4
- export declare function useKModalLogic(props: KModalProps): {
5
+ export declare const KModalDefaultProps: {
6
+ closeOnOutsideClick: {
7
+ type: BooleanConstructor;
8
+ default: boolean;
9
+ };
10
+ };
11
+ export declare function useKModalLogic(props: KModalProps, stableId: string): {
12
+ modalId: import("vue").ComputedRef<string>;
5
13
  opened: import("vue").Ref<boolean, boolean>;
6
14
  openModal: () => void;
7
15
  closeModal: () => void;
@@ -1,6 +1,14 @@
1
- import { ref } from "vue";
2
- export const KModalDefaultProps = {};
3
- export function useKModalLogic(props) {
1
+ import { ref, provide, computed } from "vue";
2
+ export const KMODAL_PORTAL_ID_KEY = "KMODAL_PORTAL_ID";
3
+ export const KModalDefaultProps = {
4
+ closeOnOutsideClick: {
5
+ type: Boolean,
6
+ default: true
7
+ }
8
+ };
9
+ export function useKModalLogic(props, stableId) {
10
+ const modalId = computed(() => stableId);
11
+ provide(KMODAL_PORTAL_ID_KEY, modalId);
4
12
  const opened = ref(false);
5
13
  function openModal() {
6
14
  opened.value = true;
@@ -9,6 +17,7 @@ export function useKModalLogic(props) {
9
17
  opened.value = false;
10
18
  }
11
19
  return {
20
+ modalId,
12
21
  opened,
13
22
  openModal,
14
23
  closeModal
@@ -5,7 +5,7 @@ import { computed } from "vue";
5
5
  import KPaginationDefault from "../../presets/default/components/KPagination/KPagination.vue";
6
6
  import { ADataProvider } from "@katlux/providers";
7
7
  const props = defineProps({
8
- dataProvider: { type: null, required: true }
8
+ dataProvider: { type: Object, required: true }
9
9
  });
10
10
  const {
11
11
  dp,
@@ -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;
@@ -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 KRadioboxProps } from './KRadiobox.logic.js';
1
2
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
3
  label: {
3
4
  type: StringConstructor;
@@ -9,6 +10,15 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
9
10
  type: BooleanConstructor;
10
11
  default: boolean;
11
12
  };
13
+ validation: {
14
+ type: import("vue").PropType<KRadioboxProps["validation"]>;
15
+ default: null;
16
+ validator: (value: string) => boolean;
17
+ };
18
+ validationText: {
19
+ type: StringConstructor;
20
+ default: string;
21
+ };
12
22
  modelValue: {
13
23
  type: import("vue").PropType<any>;
14
24
  };
@@ -25,6 +35,15 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
25
35
  type: BooleanConstructor;
26
36
  default: boolean;
27
37
  };
38
+ validation: {
39
+ type: import("vue").PropType<KRadioboxProps["validation"]>;
40
+ default: null;
41
+ validator: (value: string) => boolean;
42
+ };
43
+ validationText: {
44
+ type: StringConstructor;
45
+ default: string;
46
+ };
28
47
  modelValue: {
29
48
  type: import("vue").PropType<any>;
30
49
  };
@@ -32,6 +51,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
32
51
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
33
52
  }>, {
34
53
  disabled: boolean;
54
+ validation: "error" | "success" | "warning" | null | undefined;
55
+ validationText: string;
35
56
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
36
57
  declare const _default: typeof __VLS_export;
37
58
  export default _default;
@@ -11,7 +11,9 @@ const templateProps = computed(() => ({
11
11
  model: model.value,
12
12
  label: props.label,
13
13
  value: props.value,
14
- disabled: props.disabled
14
+ disabled: props.disabled,
15
+ validation: props.validation,
16
+ validationText: props.validationText
15
17
  }));
16
18
  </script>
17
19
 
@@ -1,3 +1,4 @@
1
+ import { type KRadioboxProps } from './KRadiobox.logic.js';
1
2
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
3
  label: {
3
4
  type: StringConstructor;
@@ -9,6 +10,15 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
9
10
  type: BooleanConstructor;
10
11
  default: boolean;
11
12
  };
13
+ validation: {
14
+ type: import("vue").PropType<KRadioboxProps["validation"]>;
15
+ default: null;
16
+ validator: (value: string) => boolean;
17
+ };
18
+ validationText: {
19
+ type: StringConstructor;
20
+ default: string;
21
+ };
12
22
  modelValue: {
13
23
  type: import("vue").PropType<any>;
14
24
  };
@@ -25,6 +35,15 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
25
35
  type: BooleanConstructor;
26
36
  default: boolean;
27
37
  };
38
+ validation: {
39
+ type: import("vue").PropType<KRadioboxProps["validation"]>;
40
+ default: null;
41
+ validator: (value: string) => boolean;
42
+ };
43
+ validationText: {
44
+ type: StringConstructor;
45
+ default: string;
46
+ };
28
47
  modelValue: {
29
48
  type: import("vue").PropType<any>;
30
49
  };
@@ -32,6 +51,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
32
51
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
33
52
  }>, {
34
53
  disabled: boolean;
54
+ validation: "error" | "success" | "warning" | null | undefined;
55
+ validationText: string;
35
56
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
36
57
  declare const _default: typeof __VLS_export;
37
58
  export default _default;
@@ -2,6 +2,8 @@ export interface KRadioboxProps {
2
2
  label?: string;
3
3
  value?: string;
4
4
  disabled?: boolean;
5
+ validation?: 'success' | 'warning' | 'error' | null;
6
+ validationText?: string;
5
7
  }
6
8
  export declare const KRadioboxDefaultProps: {
7
9
  label: {
@@ -14,6 +16,15 @@ export declare const KRadioboxDefaultProps: {
14
16
  type: BooleanConstructor;
15
17
  default: boolean;
16
18
  };
19
+ validation: {
20
+ type: import("vue").PropType<KRadioboxProps["validation"]>;
21
+ default: null;
22
+ validator: (value: string) => boolean;
23
+ };
24
+ validationText: {
25
+ type: StringConstructor;
26
+ default: string;
27
+ };
17
28
  };
18
29
  export declare function useKRadioboxLogic(props: KRadioboxProps, model: any): {
19
30
  label: string | undefined;
@@ -8,6 +8,15 @@ export const KRadioboxDefaultProps = {
8
8
  disabled: {
9
9
  type: Boolean,
10
10
  default: false
11
+ },
12
+ validation: {
13
+ type: String,
14
+ default: null,
15
+ validator: (value) => [null, "success", "warning", "error"].includes(value)
16
+ },
17
+ validationText: {
18
+ type: String,
19
+ default: ""
11
20
  }
12
21
  };
13
22
  export function useKRadioboxLogic(props, model) {
@@ -1,3 +1,4 @@
1
+ import { type KTextareaProps } from './KTextarea.logic.js';
1
2
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
3
  modelValue: {
3
4
  type: StringConstructor;
@@ -11,6 +12,15 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
11
12
  type: NumberConstructor;
12
13
  default: number;
13
14
  };
15
+ validation: {
16
+ type: import("vue").PropType<KTextareaProps["validation"]>;
17
+ default: null;
18
+ validator: (value: string) => boolean;
19
+ };
20
+ validationText: {
21
+ type: StringConstructor;
22
+ default: string;
23
+ };
14
24
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
15
25
  "update:modelValue": (value: string) => any;
16
26
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
@@ -26,10 +36,21 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
26
36
  type: NumberConstructor;
27
37
  default: number;
28
38
  };
39
+ validation: {
40
+ type: import("vue").PropType<KTextareaProps["validation"]>;
41
+ default: null;
42
+ validator: (value: string) => boolean;
43
+ };
44
+ validationText: {
45
+ type: StringConstructor;
46
+ default: string;
47
+ };
29
48
  }>> & Readonly<{
30
49
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
31
50
  }>, {
32
51
  rows: number;
52
+ validation: "error" | "success" | "warning" | null | undefined;
53
+ validationText: string;
33
54
  placeholder: string;
34
55
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
35
56
  declare const _default: typeof __VLS_export;
@@ -10,7 +10,9 @@ const presetComponent = usePresetComponent("KTextarea", KTextareaDefault);
10
10
  const templateProps = computed(() => ({
11
11
  text: text.value,
12
12
  placeholder: props.placeholder,
13
- rows: props.rows
13
+ rows: props.rows,
14
+ validation: props.validation,
15
+ validationText: props.validationText
14
16
  }));
15
17
  </script>
16
18
 
@@ -1,3 +1,4 @@
1
+ import { type KTextareaProps } from './KTextarea.logic.js';
1
2
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
3
  modelValue: {
3
4
  type: StringConstructor;
@@ -11,6 +12,15 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
11
12
  type: NumberConstructor;
12
13
  default: number;
13
14
  };
15
+ validation: {
16
+ type: import("vue").PropType<KTextareaProps["validation"]>;
17
+ default: null;
18
+ validator: (value: string) => boolean;
19
+ };
20
+ validationText: {
21
+ type: StringConstructor;
22
+ default: string;
23
+ };
14
24
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
15
25
  "update:modelValue": (value: string) => any;
16
26
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
@@ -26,10 +36,21 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
26
36
  type: NumberConstructor;
27
37
  default: number;
28
38
  };
39
+ validation: {
40
+ type: import("vue").PropType<KTextareaProps["validation"]>;
41
+ default: null;
42
+ validator: (value: string) => boolean;
43
+ };
44
+ validationText: {
45
+ type: StringConstructor;
46
+ default: string;
47
+ };
29
48
  }>> & Readonly<{
30
49
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
31
50
  }>, {
32
51
  rows: number;
52
+ validation: "error" | "success" | "warning" | null | undefined;
53
+ validationText: string;
33
54
  placeholder: string;
34
55
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
35
56
  declare const _default: typeof __VLS_export;