@katlux/toolkit 0.1.0-beta.5 → 0.1.0-beta.51

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 (171) 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/KButton/KButton.logic.d.ts +1 -1
  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 +21 -0
  11. package/dist/runtime/components/KCheckbox/KCheckbox.global.vue +3 -1
  12. package/dist/runtime/components/KCheckbox/KCheckbox.global.vue.d.ts +21 -0
  13. package/dist/runtime/components/KCheckbox/KCheckbox.logic.d.ts +11 -0
  14. package/dist/runtime/components/KCheckbox/KCheckbox.logic.js +9 -0
  15. package/dist/runtime/components/KCombobox/KCombobox.global.d.vue.ts +48 -10
  16. package/dist/runtime/components/KCombobox/KCombobox.global.vue +9 -2
  17. package/dist/runtime/components/KCombobox/KCombobox.global.vue.d.ts +48 -10
  18. package/dist/runtime/components/KCombobox/KCombobox.logic.d.ts +94 -0
  19. package/dist/runtime/components/KCombobox/KCombobox.logic.js +60 -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.logic.d.ts +20 -0
  26. package/dist/runtime/components/KDatatable/KDatatable.logic.d.ts +12 -0
  27. package/dist/runtime/components/KDatePicker/KDatePicker.global.d.vue.ts +77 -8
  28. package/dist/runtime/components/KDatePicker/KDatePicker.global.vue +25 -3
  29. package/dist/runtime/components/KDatePicker/KDatePicker.global.vue.d.ts +77 -8
  30. package/dist/runtime/components/KDatePicker/KDatePicker.logic.d.ts +33 -1
  31. package/dist/runtime/components/KDatePicker/KDatePicker.logic.js +98 -7
  32. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.d.vue.ts +75 -8
  33. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue +25 -3
  34. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue.d.ts +75 -8
  35. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.logic.d.ts +33 -1
  36. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.logic.js +157 -7
  37. package/dist/runtime/components/KDropdown/KDropdown.global.d.vue.ts +18 -0
  38. package/dist/runtime/components/KDropdown/KDropdown.global.vue +13 -4
  39. package/dist/runtime/components/KDropdown/KDropdown.global.vue.d.ts +18 -0
  40. package/dist/runtime/components/KDropdown/KDropdown.logic.d.ts +28 -1
  41. package/dist/runtime/components/KDropdown/KDropdown.logic.js +85 -4
  42. package/dist/runtime/components/KGrid/KGrid.global.d.vue.ts +7 -56
  43. package/dist/runtime/components/KGrid/KGrid.global.vue +9 -2
  44. package/dist/runtime/components/KGrid/KGrid.global.vue.d.ts +7 -56
  45. package/dist/runtime/components/KHourPicker/KHourPicker.global.d.vue.ts +41 -0
  46. package/dist/runtime/components/KHourPicker/KHourPicker.global.vue +27 -12
  47. package/dist/runtime/components/KHourPicker/KHourPicker.global.vue.d.ts +41 -0
  48. package/dist/runtime/components/KHourPicker/KHourPicker.logic.d.ts +26 -3
  49. package/dist/runtime/components/KHourPicker/KHourPicker.logic.js +34 -10
  50. package/dist/runtime/components/KHourSelect/KHourSelect.logic.js +4 -1
  51. package/dist/runtime/components/KIcon/KIcon.global.d.vue.ts +1 -1
  52. package/dist/runtime/components/KIcon/KIcon.global.vue.d.ts +1 -1
  53. package/dist/runtime/components/KIcon/KIcon.logic.d.ts +1 -1
  54. package/dist/runtime/components/KIcon/KIcon.logic.js +13 -8
  55. package/dist/runtime/components/KLoader/KLoader.global.d.vue.ts +3 -3
  56. package/dist/runtime/components/KLoader/KLoader.global.vue.d.ts +3 -3
  57. package/dist/runtime/components/KLoader/KLoader.logic.d.ts +8 -1
  58. package/dist/runtime/components/KLoader/KLoader.logic.js +1 -0
  59. package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.d.vue.ts +21 -0
  60. package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.vue +4 -2
  61. package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.vue.d.ts +21 -0
  62. package/dist/runtime/components/KMaskTextbox/KMaskTextbox.logic.d.ts +11 -0
  63. package/dist/runtime/components/KMaskTextbox/KMaskTextbox.logic.js +9 -0
  64. package/dist/runtime/components/KModal/KModal.global.vue +4 -1
  65. package/dist/runtime/components/KModal/KModal.logic.d.ts +3 -1
  66. package/dist/runtime/components/KModal/KModal.logic.js +6 -2
  67. package/dist/runtime/components/KPanel/KPanel.global.d.vue.ts +5 -28
  68. package/dist/runtime/components/KPanel/KPanel.global.vue +12 -4
  69. package/dist/runtime/components/KPanel/KPanel.global.vue.d.ts +5 -28
  70. package/dist/runtime/components/KPanel/KPanel.logic.d.ts +10 -0
  71. package/dist/runtime/components/KPanel/KPanel.logic.js +8 -0
  72. package/dist/runtime/components/KRadiobox/KRadiobox.global.d.vue.ts +21 -0
  73. package/dist/runtime/components/KRadiobox/KRadiobox.global.vue +3 -1
  74. package/dist/runtime/components/KRadiobox/KRadiobox.global.vue.d.ts +21 -0
  75. package/dist/runtime/components/KRadiobox/KRadiobox.logic.d.ts +11 -0
  76. package/dist/runtime/components/KRadiobox/KRadiobox.logic.js +9 -0
  77. package/dist/runtime/components/KTextarea/KTextarea.global.d.vue.ts +21 -0
  78. package/dist/runtime/components/KTextarea/KTextarea.global.vue +3 -1
  79. package/dist/runtime/components/KTextarea/KTextarea.global.vue.d.ts +21 -0
  80. package/dist/runtime/components/KTextarea/KTextarea.logic.d.ts +11 -0
  81. package/dist/runtime/components/KTextarea/KTextarea.logic.js +9 -0
  82. package/dist/runtime/components/KTextbox/KTextbox.global.d.vue.ts +35 -2
  83. package/dist/runtime/components/KTextbox/KTextbox.global.vue +7 -4
  84. package/dist/runtime/components/KTextbox/KTextbox.global.vue.d.ts +35 -2
  85. package/dist/runtime/components/KTextbox/KTextbox.logic.d.ts +21 -4
  86. package/dist/runtime/components/KTextbox/KTextbox.logic.js +21 -5
  87. package/dist/runtime/components/KTreePicker/KTreePicker.global.d.vue.ts +36 -7
  88. package/dist/runtime/components/KTreePicker/KTreePicker.global.vue +4 -1
  89. package/dist/runtime/components/KTreePicker/KTreePicker.global.vue.d.ts +36 -7
  90. package/dist/runtime/components/KTreePicker/KTreePicker.logic.d.ts +94 -0
  91. package/dist/runtime/components/KTreePicker/KTreePicker.logic.js +18 -1
  92. package/dist/runtime/components/KTreeView/KTreeView.global.d.vue.ts +3 -3
  93. package/dist/runtime/components/KTreeView/KTreeView.global.vue.d.ts +3 -3
  94. package/dist/runtime/composables/usePresetComponent.d.ts +16 -0
  95. package/dist/runtime/composables/usePresetComponent.js +21 -16
  96. package/dist/runtime/presets/default/assets/scss/css-variables.css +64 -13
  97. package/dist/runtime/presets/default/assets/scss/css-variables.scss +286 -0
  98. package/dist/runtime/presets/default/assets/scss/docs.scss +52 -0
  99. package/dist/runtime/presets/default/assets/scss/index.css +99 -13
  100. package/dist/runtime/presets/default/assets/scss/index.scss +42 -0
  101. package/dist/runtime/presets/default/assets/scss/mixins.scss +94 -0
  102. package/dist/runtime/presets/default/assets/scss/reset.scss +16 -0
  103. package/dist/runtime/presets/default/components/KAccordion/KAccordion.vue +5 -2
  104. package/dist/runtime/presets/default/components/KAccordion/KAccordionItem.vue +40 -37
  105. package/dist/runtime/presets/default/components/KBulkActions/KBulkActions.vue +29 -22
  106. package/dist/runtime/presets/default/components/KButton/KButton.vue +147 -428
  107. package/dist/runtime/presets/default/components/KCalendar/KCalendar.vue +57 -53
  108. package/dist/runtime/presets/default/components/KCalendar/KCalendarMonth.vue +189 -161
  109. package/dist/runtime/presets/default/components/KCheckbox/KCheckbox.d.vue.ts +2 -0
  110. package/dist/runtime/presets/default/components/KCheckbox/KCheckbox.vue +56 -42
  111. package/dist/runtime/presets/default/components/KCheckbox/KCheckbox.vue.d.ts +2 -0
  112. package/dist/runtime/presets/default/components/KCombobox/KCombobox.d.vue.ts +5 -0
  113. package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue +111 -87
  114. package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue.d.ts +5 -0
  115. package/dist/runtime/presets/default/components/KCombobox/KComboboxList.vue +78 -60
  116. package/dist/runtime/presets/default/components/KCompositeInput/KCompositeInput.d.vue.ts +29 -0
  117. package/dist/runtime/presets/default/components/KCompositeInput/KCompositeInput.vue +202 -0
  118. package/dist/runtime/presets/default/components/KCompositeInput/KCompositeInput.vue.d.ts +29 -0
  119. package/dist/runtime/presets/default/components/KDataIterator/KDataIterator.vue +40 -31
  120. package/dist/runtime/presets/default/components/KDatatable/KDatatable.vue +110 -92
  121. package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.d.vue.ts +5 -0
  122. package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue +56 -25
  123. package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue.d.ts +5 -0
  124. package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.d.vue.ts +5 -0
  125. package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.vue +79 -52
  126. package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.vue.d.ts +5 -0
  127. package/dist/runtime/presets/default/components/KDropdown/KDropdown.d.vue.ts +8 -0
  128. package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue +46 -25
  129. package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue.d.ts +8 -0
  130. package/dist/runtime/presets/default/components/KGantt/KGantt.vue +337 -241
  131. package/dist/runtime/presets/default/components/KGantt/KGanttRuler.vue +40 -35
  132. package/dist/runtime/presets/default/components/KGantt/KGanttTimeline.vue +170 -140
  133. package/dist/runtime/presets/default/components/KGrid/KGrid.vue +62 -60
  134. package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.d.vue.ts +8 -2
  135. package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.vue +48 -28
  136. package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.vue.d.ts +8 -2
  137. package/dist/runtime/presets/default/components/KHourSelect/KHourSelect.vue +34 -28
  138. package/dist/runtime/presets/default/components/KIcon/KIcon.d.vue.ts +1 -1
  139. package/dist/runtime/presets/default/components/KIcon/KIcon.vue +31 -22
  140. package/dist/runtime/presets/default/components/KIcon/KIcon.vue.d.ts +1 -1
  141. package/dist/runtime/presets/default/components/KLoader/KLoader.vue +65 -48
  142. package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.d.vue.ts +2 -0
  143. package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.vue +117 -84
  144. package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.vue.d.ts +2 -0
  145. package/dist/runtime/presets/default/components/KModal/KModal.d.vue.ts +1 -0
  146. package/dist/runtime/presets/default/components/KModal/KModal.vue +64 -35
  147. package/dist/runtime/presets/default/components/KModal/KModal.vue.d.ts +1 -0
  148. package/dist/runtime/presets/default/components/KPagination/KPagination.vue +42 -40
  149. package/dist/runtime/presets/default/components/KPanel/KPanel.d.vue.ts +3 -0
  150. package/dist/runtime/presets/default/components/KPanel/KPanel.vue +95 -34
  151. package/dist/runtime/presets/default/components/KPanel/KPanel.vue.d.ts +3 -0
  152. package/dist/runtime/presets/default/components/KRadiobox/KRadiobox.d.vue.ts +2 -0
  153. package/dist/runtime/presets/default/components/KRadiobox/KRadiobox.vue +40 -35
  154. package/dist/runtime/presets/default/components/KRadiobox/KRadiobox.vue.d.ts +2 -0
  155. package/dist/runtime/presets/default/components/KRangeSlider/KRangeSlider.vue +158 -125
  156. package/dist/runtime/presets/default/components/KSlider/KSlider.vue +123 -100
  157. package/dist/runtime/presets/default/components/KTabs/KTabItem.vue +40 -37
  158. package/dist/runtime/presets/default/components/KTabs/KTabs.vue +9 -6
  159. package/dist/runtime/presets/default/components/KTextarea/KTextarea.d.vue.ts +2 -0
  160. package/dist/runtime/presets/default/components/KTextarea/KTextarea.vue +28 -21
  161. package/dist/runtime/presets/default/components/KTextarea/KTextarea.vue.d.ts +2 -0
  162. package/dist/runtime/presets/default/components/KTextbox/KTextbox.d.vue.ts +4 -1
  163. package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue +53 -36
  164. package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue.d.ts +4 -1
  165. package/dist/runtime/presets/default/components/KTree/KTree.vue +102 -80
  166. package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.d.vue.ts +2 -0
  167. package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.vue +59 -34
  168. package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.vue.d.ts +2 -0
  169. package/dist/runtime/presets/default/components/KTreeView/KTreeCell.vue +31 -30
  170. package/dist/runtime/presets/default/components/KTreeView/KTreeView.vue +34 -27
  171. package/package.json +5 -5
@@ -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;
@@ -2,6 +2,8 @@ export interface KTextareaProps {
2
2
  modelValue: string;
3
3
  placeholder?: string;
4
4
  rows?: number;
5
+ validation?: 'success' | 'warning' | 'error' | null;
6
+ validationText?: string;
5
7
  }
6
8
  export interface KTextareaEmits {
7
9
  (e: 'update:modelValue', value: string): void;
@@ -28,4 +30,13 @@ export declare const KTextareaDefaultProps: {
28
30
  type: NumberConstructor;
29
31
  default: number;
30
32
  };
33
+ validation: {
34
+ type: import("vue").PropType<KTextareaProps["validation"]>;
35
+ default: null;
36
+ validator: (value: string) => boolean;
37
+ };
38
+ validationText: {
39
+ type: StringConstructor;
40
+ default: string;
41
+ };
31
42
  };
@@ -20,5 +20,14 @@ export const KTextareaDefaultProps = {
20
20
  rows: {
21
21
  type: Number,
22
22
  default: 4
23
+ },
24
+ validation: {
25
+ type: String,
26
+ default: null,
27
+ validator: (value) => [null, "success", "warning", "error"].includes(value)
28
+ },
29
+ validationText: {
30
+ type: String,
31
+ default: ""
23
32
  }
24
33
  };
@@ -1,7 +1,8 @@
1
+ import { type KTextboxProps } from './KTextbox.logic.js';
1
2
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
3
  modelValue: {
3
4
  type: StringConstructor;
4
- required: boolean;
5
+ default: string;
5
6
  };
6
7
  placeholder: {
7
8
  type: StringConstructor;
@@ -11,12 +12,26 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
11
12
  type: BooleanConstructor;
12
13
  default: boolean;
13
14
  };
15
+ type: {
16
+ type: import("vue").PropType<KTextboxProps["type"]>;
17
+ default: string;
18
+ validator: (value: string) => boolean;
19
+ };
20
+ validation: {
21
+ type: import("vue").PropType<KTextboxProps["validation"]>;
22
+ default: null;
23
+ validator: (value: string) => boolean;
24
+ };
25
+ validationText: {
26
+ type: StringConstructor;
27
+ default: string;
28
+ };
14
29
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
15
30
  "update:modelValue": (value: string) => any;
16
31
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
17
32
  modelValue: {
18
33
  type: StringConstructor;
19
- required: boolean;
34
+ default: string;
20
35
  };
21
36
  placeholder: {
22
37
  type: StringConstructor;
@@ -26,9 +41,27 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
26
41
  type: BooleanConstructor;
27
42
  default: boolean;
28
43
  };
44
+ type: {
45
+ type: import("vue").PropType<KTextboxProps["type"]>;
46
+ default: string;
47
+ validator: (value: string) => boolean;
48
+ };
49
+ validation: {
50
+ type: import("vue").PropType<KTextboxProps["validation"]>;
51
+ default: null;
52
+ validator: (value: string) => boolean;
53
+ };
54
+ validationText: {
55
+ type: StringConstructor;
56
+ default: string;
57
+ };
29
58
  }>> & Readonly<{
30
59
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
31
60
  }>, {
61
+ type: "number" | "text" | "url" | "search" | "password" | "email" | "tel" | undefined;
62
+ validation: "error" | "success" | "warning" | null | undefined;
63
+ validationText: string;
64
+ modelValue: string;
32
65
  placeholder: string;
33
66
  showClear: boolean;
34
67
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -5,16 +5,19 @@ import { computed } from "vue";
5
5
  import KTextboxDefault from "../../presets/default/components/KTextbox/KTextbox.vue";
6
6
  const props = defineProps(KTextboxDefaultProps);
7
7
  const emit = defineEmits(["update:modelValue"]);
8
- const { text, showClearIcon, clear } = useKTextboxLogic(props, emit);
8
+ const { text, showClear, clear } = useKTextboxLogic(props, emit);
9
9
  const presetComponent = usePresetComponent("KTextbox", KTextboxDefault);
10
10
  const templateProps = computed(() => ({
11
11
  text: text.value,
12
- showClearIcon: showClearIcon.value,
12
+ showClear: showClear.value,
13
13
  clear,
14
- placeholder: props.placeholder
14
+ placeholder: props.placeholder,
15
+ type: props.type,
16
+ validation: props.validation,
17
+ validationText: props.validationText
15
18
  }));
16
19
  </script>
17
20
 
18
21
  <template lang="pug">
19
- component(:is="presetComponent" v-bind="templateProps" @update:text="text = $event")
22
+ component(:is="presetComponent" v-bind="{ ...templateProps, ...$attrs }" @update:text="text = $event")
20
23
  </template>
@@ -1,7 +1,8 @@
1
+ import { type KTextboxProps } from './KTextbox.logic.js';
1
2
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
3
  modelValue: {
3
4
  type: StringConstructor;
4
- required: boolean;
5
+ default: string;
5
6
  };
6
7
  placeholder: {
7
8
  type: StringConstructor;
@@ -11,12 +12,26 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
11
12
  type: BooleanConstructor;
12
13
  default: boolean;
13
14
  };
15
+ type: {
16
+ type: import("vue").PropType<KTextboxProps["type"]>;
17
+ default: string;
18
+ validator: (value: string) => boolean;
19
+ };
20
+ validation: {
21
+ type: import("vue").PropType<KTextboxProps["validation"]>;
22
+ default: null;
23
+ validator: (value: string) => boolean;
24
+ };
25
+ validationText: {
26
+ type: StringConstructor;
27
+ default: string;
28
+ };
14
29
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
15
30
  "update:modelValue": (value: string) => any;
16
31
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
17
32
  modelValue: {
18
33
  type: StringConstructor;
19
- required: boolean;
34
+ default: string;
20
35
  };
21
36
  placeholder: {
22
37
  type: StringConstructor;
@@ -26,9 +41,27 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
26
41
  type: BooleanConstructor;
27
42
  default: boolean;
28
43
  };
44
+ type: {
45
+ type: import("vue").PropType<KTextboxProps["type"]>;
46
+ default: string;
47
+ validator: (value: string) => boolean;
48
+ };
49
+ validation: {
50
+ type: import("vue").PropType<KTextboxProps["validation"]>;
51
+ default: null;
52
+ validator: (value: string) => boolean;
53
+ };
54
+ validationText: {
55
+ type: StringConstructor;
56
+ default: string;
57
+ };
29
58
  }>> & Readonly<{
30
59
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
31
60
  }>, {
61
+ type: "number" | "text" | "url" | "search" | "password" | "email" | "tel" | undefined;
62
+ validation: "error" | "success" | "warning" | null | undefined;
63
+ validationText: string;
64
+ modelValue: string;
32
65
  placeholder: string;
33
66
  showClear: boolean;
34
67
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,7 +1,10 @@
1
1
  export interface KTextboxProps {
2
- modelValue: string;
3
- placeholder: string;
2
+ modelValue?: string;
3
+ placeholder?: string;
4
4
  showClear?: boolean;
5
+ type?: 'text' | 'password' | 'email' | 'url' | 'tel' | 'search' | 'number';
6
+ validation?: 'success' | 'warning' | 'error' | null;
7
+ validationText?: string;
5
8
  }
6
9
  export interface KTextboxEmits {
7
10
  (e: 'update:modelValue', value: string): void;
@@ -11,7 +14,7 @@ export interface KTextboxEmits {
11
14
  */
12
15
  export declare function useKTextboxLogic(props: KTextboxProps, emit: KTextboxEmits): {
13
16
  text: import("vue").WritableComputedRef<string, string>;
14
- showClearIcon: import("vue").ComputedRef<boolean | undefined>;
17
+ showClear: import("vue").ComputedRef<boolean>;
15
18
  clear: () => void;
16
19
  };
17
20
  /**
@@ -20,7 +23,7 @@ export declare function useKTextboxLogic(props: KTextboxProps, emit: KTextboxEmi
20
23
  export declare const KTextboxDefaultProps: {
21
24
  modelValue: {
22
25
  type: StringConstructor;
23
- required: boolean;
26
+ default: string;
24
27
  };
25
28
  placeholder: {
26
29
  type: StringConstructor;
@@ -30,4 +33,18 @@ export declare const KTextboxDefaultProps: {
30
33
  type: BooleanConstructor;
31
34
  default: boolean;
32
35
  };
36
+ type: {
37
+ type: import("vue").PropType<KTextboxProps["type"]>;
38
+ default: string;
39
+ validator: (value: string) => boolean;
40
+ };
41
+ validation: {
42
+ type: import("vue").PropType<KTextboxProps["validation"]>;
43
+ default: null;
44
+ validator: (value: string) => boolean;
45
+ };
46
+ validationText: {
47
+ type: StringConstructor;
48
+ default: string;
49
+ };
33
50
  };