@katlux/toolkit 0.1.0-beta.50 → 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 (100) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/KButton/KButton.logic.d.ts +1 -1
  3. package/dist/runtime/components/KCheckbox/KCheckbox.global.d.vue.ts +21 -0
  4. package/dist/runtime/components/KCheckbox/KCheckbox.global.vue +3 -1
  5. package/dist/runtime/components/KCheckbox/KCheckbox.global.vue.d.ts +21 -0
  6. package/dist/runtime/components/KCheckbox/KCheckbox.logic.d.ts +11 -0
  7. package/dist/runtime/components/KCheckbox/KCheckbox.logic.js +9 -0
  8. package/dist/runtime/components/KCombobox/KCombobox.global.d.vue.ts +36 -6
  9. package/dist/runtime/components/KCombobox/KCombobox.global.vue +4 -1
  10. package/dist/runtime/components/KCombobox/KCombobox.global.vue.d.ts +36 -6
  11. package/dist/runtime/components/KCombobox/KCombobox.logic.d.ts +19 -3
  12. package/dist/runtime/components/KCombobox/KCombobox.logic.js +52 -6
  13. package/dist/runtime/components/KCompositeInput/KCompositeInput.global.d.vue.ts +29 -9
  14. package/dist/runtime/components/KCompositeInput/KCompositeInput.global.vue +2 -21
  15. package/dist/runtime/components/KCompositeInput/KCompositeInput.global.vue.d.ts +29 -9
  16. package/dist/runtime/components/KCompositeInput/KCompositeInput.logic.d.ts +15 -4
  17. package/dist/runtime/components/KCompositeInput/KCompositeInput.logic.js +16 -5
  18. package/dist/runtime/components/KDatatable/KDataIterator.logic.d.ts +20 -0
  19. package/dist/runtime/components/KDatatable/KDatatable.logic.d.ts +12 -0
  20. package/dist/runtime/components/KDatePicker/KDatePicker.global.d.vue.ts +24 -3
  21. package/dist/runtime/components/KDatePicker/KDatePicker.global.vue +3 -1
  22. package/dist/runtime/components/KDatePicker/KDatePicker.global.vue.d.ts +24 -3
  23. package/dist/runtime/components/KDatePicker/KDatePicker.logic.d.ts +11 -0
  24. package/dist/runtime/components/KDatePicker/KDatePicker.logic.js +9 -0
  25. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.d.vue.ts +24 -3
  26. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue +3 -1
  27. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue.d.ts +24 -3
  28. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.logic.d.ts +11 -0
  29. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.logic.js +9 -0
  30. package/dist/runtime/components/KHourPicker/KHourPicker.global.d.vue.ts +21 -0
  31. package/dist/runtime/components/KHourPicker/KHourPicker.global.vue +3 -1
  32. package/dist/runtime/components/KHourPicker/KHourPicker.global.vue.d.ts +21 -0
  33. package/dist/runtime/components/KHourPicker/KHourPicker.logic.d.ts +12 -0
  34. package/dist/runtime/components/KHourPicker/KHourPicker.logic.js +9 -0
  35. package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.d.vue.ts +21 -0
  36. package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.vue +3 -1
  37. package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.vue.d.ts +21 -0
  38. package/dist/runtime/components/KMaskTextbox/KMaskTextbox.logic.d.ts +11 -0
  39. package/dist/runtime/components/KMaskTextbox/KMaskTextbox.logic.js +9 -0
  40. package/dist/runtime/components/KRadiobox/KRadiobox.global.d.vue.ts +21 -0
  41. package/dist/runtime/components/KRadiobox/KRadiobox.global.vue +3 -1
  42. package/dist/runtime/components/KRadiobox/KRadiobox.global.vue.d.ts +21 -0
  43. package/dist/runtime/components/KRadiobox/KRadiobox.logic.d.ts +11 -0
  44. package/dist/runtime/components/KRadiobox/KRadiobox.logic.js +9 -0
  45. package/dist/runtime/components/KTextarea/KTextarea.global.d.vue.ts +21 -0
  46. package/dist/runtime/components/KTextarea/KTextarea.global.vue +3 -1
  47. package/dist/runtime/components/KTextarea/KTextarea.global.vue.d.ts +21 -0
  48. package/dist/runtime/components/KTextarea/KTextarea.logic.d.ts +11 -0
  49. package/dist/runtime/components/KTextarea/KTextarea.logic.js +9 -0
  50. package/dist/runtime/components/KTextbox/KTextbox.global.d.vue.ts +20 -0
  51. package/dist/runtime/components/KTextbox/KTextbox.global.vue +3 -1
  52. package/dist/runtime/components/KTextbox/KTextbox.global.vue.d.ts +20 -0
  53. package/dist/runtime/components/KTextbox/KTextbox.logic.d.ts +11 -0
  54. package/dist/runtime/components/KTextbox/KTextbox.logic.js +9 -0
  55. package/dist/runtime/components/KTree/KTree.global.d.vue.ts +1 -1
  56. package/dist/runtime/components/KTree/KTree.global.vue.d.ts +1 -1
  57. package/dist/runtime/components/KTreePicker/KTreePicker.global.d.vue.ts +37 -8
  58. package/dist/runtime/components/KTreePicker/KTreePicker.global.vue +4 -1
  59. package/dist/runtime/components/KTreePicker/KTreePicker.global.vue.d.ts +37 -8
  60. package/dist/runtime/components/KTreePicker/KTreePicker.logic.d.ts +17 -0
  61. package/dist/runtime/components/KTreePicker/KTreePicker.logic.js +18 -1
  62. package/dist/runtime/components/KTreeView/KTreeView.global.d.vue.ts +3 -3
  63. package/dist/runtime/components/KTreeView/KTreeView.global.vue.d.ts +3 -3
  64. package/dist/runtime/presets/default/assets/scss/index.css +27 -0
  65. package/dist/runtime/presets/default/assets/scss/index.scss +30 -0
  66. package/dist/runtime/presets/default/components/KCheckbox/KCheckbox.d.vue.ts +2 -0
  67. package/dist/runtime/presets/default/components/KCheckbox/KCheckbox.vue +10 -6
  68. package/dist/runtime/presets/default/components/KCheckbox/KCheckbox.vue.d.ts +2 -0
  69. package/dist/runtime/presets/default/components/KCombobox/KCombobox.d.vue.ts +2 -0
  70. package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue +25 -21
  71. package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue.d.ts +2 -0
  72. package/dist/runtime/presets/default/components/KCompositeInput/KCompositeInput.d.vue.ts +2 -0
  73. package/dist/runtime/presets/default/components/KCompositeInput/KCompositeInput.vue +91 -79
  74. package/dist/runtime/presets/default/components/KCompositeInput/KCompositeInput.vue.d.ts +2 -0
  75. package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.d.vue.ts +2 -0
  76. package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue +13 -1
  77. package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue.d.ts +2 -0
  78. package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.d.vue.ts +2 -0
  79. package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.vue +12 -1
  80. package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.vue.d.ts +2 -0
  81. package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.d.vue.ts +2 -0
  82. package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.vue +4 -0
  83. package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.vue.d.ts +2 -0
  84. package/dist/runtime/presets/default/components/KLoader/KLoader.vue +13 -2
  85. package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.d.vue.ts +2 -0
  86. package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.vue +4 -0
  87. package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.vue.d.ts +2 -0
  88. package/dist/runtime/presets/default/components/KRadiobox/KRadiobox.d.vue.ts +2 -0
  89. package/dist/runtime/presets/default/components/KRadiobox/KRadiobox.vue +10 -6
  90. package/dist/runtime/presets/default/components/KRadiobox/KRadiobox.vue.d.ts +2 -0
  91. package/dist/runtime/presets/default/components/KTextarea/KTextarea.d.vue.ts +2 -0
  92. package/dist/runtime/presets/default/components/KTextarea/KTextarea.vue +5 -1
  93. package/dist/runtime/presets/default/components/KTextarea/KTextarea.vue.d.ts +2 -0
  94. package/dist/runtime/presets/default/components/KTextbox/KTextbox.d.vue.ts +2 -0
  95. package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue +7 -3
  96. package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue.d.ts +2 -0
  97. package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.d.vue.ts +2 -0
  98. package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.vue +4 -0
  99. package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.vue.d.ts +2 -0
  100. package/package.json +1 -1
@@ -1,69 +1,79 @@
1
1
  <template lang="pug">
2
- .KCompositeInput(:class="{'selection-right': selectionSide === 'right'}")
3
- KGrid(gap="0" align="stretch")
4
- //- Selection Combobox
5
- .KCompositeInput-selection(:style="selectionStyle")
6
- KCombobox(
7
- v-model="selectionValue"
8
- :dataProvider="dataProvider"
9
- :labelField="labelField"
10
- :valueField="valueField"
11
- :placeholder="placeholder"
12
- :searchbox="searchbox"
13
- closeOnSelect
14
- :teleportTo="teleportTo"
15
- )
16
-
17
- //- Secondary Input
18
- .KCompositeInput-main
19
- template(v-if="type === 'textbox'")
20
- KTextbox(
21
- v-model="inputValue"
22
- :type="inputType"
23
- :placeholder="inputPlaceholder"
24
- :showClear="showClear"
25
- )
26
- template(v-else-if="type === 'textarea'")
27
- KTextarea(
28
- v-model="inputValue"
29
- :placeholder="inputPlaceholder"
30
- )
31
- template(v-else-if="type === 'maskedtextbox'")
32
- KMaskTextbox(
33
- v-model="inputValue"
34
- :mask="mask"
35
- :placeholder="inputPlaceholder"
36
- :showClear="showClear"
37
- )
38
- template(v-else-if="type === 'combobox'")
39
- //- For internal combobox, we assume same items for now or specific logic could be added
2
+ .KCompositeInput-wrapper
3
+ .KCompositeInput(:class="{'selection-right': selectionSide === 'right'}")
4
+ KGrid(gap="0" align="stretch" :class="validation ? `is-${validation}` : ''")
5
+ //- Selection Combobox
6
+ .KCompositeInput-selection(:style="selectionStyle")
40
7
  KCombobox(
41
- v-model="inputValue"
8
+ v-model="selectionValue"
42
9
  :dataProvider="dataProvider"
43
10
  :labelField="labelField"
44
11
  :valueField="valueField"
45
- :placeholder="inputPlaceholder"
12
+ :placeholder="placeholder"
46
13
  :searchbox="searchbox"
14
+ closeOnSelect
47
15
  :teleportTo="teleportTo"
16
+ :validation="validation"
48
17
  )
49
- template(v-else-if="type === 'datepicker'")
50
- KDatePicker(
51
- v-model="inputValue"
52
- :placeholder="inputPlaceholder"
53
- :showClear="showClear"
54
- )
55
- template(v-else-if="type === 'datetimepicker'")
56
- KDateTimePicker(
57
- v-model="inputValue"
58
- :placeholder="inputPlaceholder"
59
- :showClear="showClear"
60
- )
61
- template(v-else-if="type === 'hourpicker'")
62
- KHourPicker(
63
- v-model="inputValue"
64
- :placeholder="inputPlaceholder"
65
- :showClear="showClear"
66
- )
18
+
19
+ //- Secondary Input
20
+ .KCompositeInput-main
21
+ template(v-if="type === 'textbox'")
22
+ KTextbox(
23
+ v-model="inputValue"
24
+ :type="inputType"
25
+ :placeholder="inputPlaceholder"
26
+ :showClear="showClear"
27
+ :validation="validation"
28
+ )
29
+ template(v-else-if="type === 'textarea'")
30
+ KTextarea(
31
+ v-model="inputValue"
32
+ :placeholder="inputPlaceholder"
33
+ :validation="validation"
34
+ )
35
+ template(v-else-if="type === 'maskedtextbox'")
36
+ KMaskTextbox(
37
+ v-model="inputValue"
38
+ :mask="mask"
39
+ :placeholder="inputPlaceholder"
40
+ :showClear="showClear"
41
+ :validation="validation"
42
+ )
43
+ template(v-else-if="type === 'combobox'")
44
+ //- For internal combobox, we assume same items for now or specific logic could be added
45
+ KCombobox(
46
+ v-model="inputValue"
47
+ :dataProvider="dataProvider"
48
+ :labelField="labelField"
49
+ :valueField="valueField"
50
+ :placeholder="inputPlaceholder"
51
+ :searchbox="searchbox"
52
+ :teleportTo="teleportTo"
53
+ :validation="validation"
54
+ )
55
+ template(v-else-if="type === 'datepicker'")
56
+ KDatePicker(
57
+ v-model="inputValue"
58
+ :placeholder="inputPlaceholder"
59
+ :showClear="showClear"
60
+ :validation="validation"
61
+ )
62
+ template(v-else-if="type === 'datetimepicker'")
63
+ KDateTimePicker(
64
+ v-model="inputValue"
65
+ :placeholder="inputPlaceholder"
66
+ :showClear="showClear"
67
+ :validation="validation"
68
+ )
69
+ template(v-else-if="type === 'hourpicker'")
70
+ KHourPicker(
71
+ v-model="inputValue"
72
+ :placeholder="inputPlaceholder"
73
+ :showClear="showClear"
74
+ :validation="validation"
75
+ )
76
+ span.validation-text(v-if="validation && ['success', 'warning', 'error'].includes(validation) && validationText" :class="`is-${validation}`") {{ validationText }}
67
77
  </template>
68
78
 
69
79
  <script lang="ts" setup>
@@ -86,6 +96,8 @@ const props = defineProps<{
86
96
  searchbox: boolean
87
97
  showClear: boolean
88
98
  teleportTo?: string
99
+ validation?: 'success' | 'warning' | 'error' | null
100
+ validationText?: string
89
101
  }>()
90
102
 
91
103
  const emit = defineEmits<{
@@ -128,13 +140,15 @@ const selectionStyle = computed(() => ({
128
140
  &-selection {
129
141
  border-right: 1px solid var(--neutral-200);
130
142
 
143
+ :deep(.KGrid).is-error & { border-right-color: var(--error-500); }
144
+ :deep(.KGrid).is-warning & { border-right-color: var(--warning-500); }
145
+ :deep(.KGrid).is-success & { border-right-color: var(--success-500); }
146
+
131
147
  :deep(.KCombobox) {
132
- .KCombobox-trigger {
133
- border: none !important;
134
- border-radius: 0 !important;
135
- background: var(--neutral-100) !important;
136
- height: 100%;
137
- }
148
+ border: none !important;
149
+ background: transparent !important;
150
+ box-shadow: none !important;
151
+ padding: 0 !important;
138
152
  }
139
153
  }
140
154
 
@@ -150,29 +164,23 @@ const selectionStyle = computed(() => ({
150
164
  border: none !important;
151
165
  background: transparent !important;
152
166
  box-shadow: none !important;
167
+ padding: 0 !important;
153
168
 
154
- // Target inputs and triggers
155
- input, textarea, .KCombobox-trigger {
169
+ // Ensure they don't have their own internal grids with borders
170
+ .KTextbox, .KGrid, .KCombobox, .KDatePicker, .KDateTimePicker, .KHourPicker {
156
171
  border: none !important;
157
- border-radius: 0 !important;
158
172
  background: transparent !important;
159
173
  box-shadow: none !important;
160
- outline: none !important;
161
- padding: 0 12px !important;
174
+ padding: 0 !important;
162
175
  }
163
-
164
- // Ensure secondary inputs (like in MaskTextbox) are also borderless
165
- :deep(.KTextbox), :deep(.KMaskTextbox) {
176
+
177
+ input, textarea, .KCombobox-trigger {
166
178
  border: none !important;
179
+ border-radius: 0 !important;
167
180
  background: transparent !important;
168
181
  box-shadow: none !important;
169
- width: 100%;
170
- }
171
-
172
- // Do NOT force height on icons, let flexbox handle it
173
- .closeIcon, .KIcon {
174
- margin: 0 8px !important;
175
- flex-shrink: 0;
182
+ outline: none !important;
183
+ padding: 0 12px !important;
176
184
  }
177
185
  }
178
186
  }
@@ -184,6 +192,10 @@ const selectionStyle = computed(() => ({
184
192
  .KCompositeInput-selection {
185
193
  border-right: none;
186
194
  border-left: 1px solid var(--neutral-200);
195
+
196
+ :deep(.KGrid).is-error & { border-left-color: var(--error-500); }
197
+ :deep(.KGrid).is-warning & { border-left-color: var(--warning-500); }
198
+ :deep(.KGrid).is-success & { border-left-color: var(--success-500); }
187
199
  }
188
200
  }
189
201
  }
@@ -15,6 +15,8 @@ type __VLS_Props = {
15
15
  searchbox: boolean;
16
16
  showClear: boolean;
17
17
  teleportTo?: string;
18
+ validation?: 'success' | 'warning' | 'error' | null;
19
+ validationText?: string;
18
20
  };
19
21
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
20
22
  "update:selectionValue": (value: any) => any;
@@ -12,6 +12,8 @@ type __VLS_Props = {
12
12
  onClear?: () => void;
13
13
  dateSelected: (date: Date) => void;
14
14
  teleportTo?: string;
15
+ validation?: 'success' | 'warning' | 'error' | null;
16
+ validationText?: string;
15
17
  };
16
18
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
17
19
  "update:maskedModel": (value: string) => any;
@@ -1,6 +1,16 @@
1
1
  <template lang="pug">
2
2
  .KDatePicker(ref="activatorRef")
3
- KMaskTextbox(v-model="maskedModel" :key="maskedModel" :mask="format" :placeholder="format" @click.stop="textboxClicked" :showClear="showClear" @clear="onClear")
3
+ KMaskTextbox(
4
+ v-model="maskedModel"
5
+ :key="maskedModel"
6
+ :mask="format"
7
+ :placeholder="format"
8
+ @click.stop="textboxClicked"
9
+ :showClear="showClear"
10
+ @clear="onClear"
11
+ :validation="validation"
12
+ :validationText="validationText"
13
+ )
4
14
  KDropdown(v-model:isOpen="calendarShow" :anchorEl="activatorRef" :teleportTo="teleportTo")
5
15
  KCalendar(view="month" :viewCount="1" :day="calendarDay" :selectedDay="_date" @dayClicked="dateSelected" :definedDays="calendarDefinedDays" :markedDays="calendarMarkedDays")
6
16
  </template>
@@ -26,6 +36,8 @@ const props = defineProps<{
26
36
  onClear?: () => void
27
37
  dateSelected: (date: Date) => void
28
38
  teleportTo?: string
39
+ validation?: 'success' | 'warning' | 'error' | null
40
+ validationText?: string
29
41
  }>()
30
42
 
31
43
  const emit = defineEmits<{
@@ -12,6 +12,8 @@ type __VLS_Props = {
12
12
  onClear?: () => void;
13
13
  dateSelected: (date: Date) => void;
14
14
  teleportTo?: string;
15
+ validation?: 'success' | 'warning' | 'error' | null;
16
+ validationText?: string;
15
17
  };
16
18
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
17
19
  "update:maskedModel": (value: string) => any;
@@ -16,6 +16,8 @@ type __VLS_Props = {
16
16
  dateSelected: (date: Date) => void;
17
17
  timeSelected: (time: string) => void;
18
18
  teleportTo?: string;
19
+ validation?: 'success' | 'warning' | 'error' | null;
20
+ validationText?: string;
19
21
  };
20
22
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
21
23
  "update:maskedModel": (value: string) => any;
@@ -1,6 +1,15 @@
1
1
  <template lang="pug">
2
2
  .KDateTimePicker(ref="activatorRef" @click.stop="textboxClicked")
3
- KMaskTextbox(v-model="maskedModel" :key="maskedModel" :mask="format" :placeholder="format" :showClear="showClear" @clear="onClear")
3
+ KMaskTextbox(
4
+ v-model="maskedModel"
5
+ :key="maskedModel"
6
+ :mask="format"
7
+ :placeholder="format"
8
+ :showClear="showClear"
9
+ @clear="onClear"
10
+ :validation="validation"
11
+ :validationText="validationText"
12
+ )
4
13
  KDropdown(v-model:isOpen="calendarShow" :anchorEl="activatorRef" :teleportTo="teleportTo")
5
14
  KGrid(direction="row" align="start" :noGap="false" wrap="nowrap").datetime-picker-grid
6
15
  .calendar-section
@@ -34,6 +43,8 @@ const props = defineProps<{
34
43
  dateSelected: (date: Date) => void
35
44
  timeSelected: (time: string) => void
36
45
  teleportTo?: string
46
+ validation?: 'success' | 'warning' | 'error' | null
47
+ validationText?: string
37
48
  }>()
38
49
 
39
50
  const emit = defineEmits<{
@@ -16,6 +16,8 @@ type __VLS_Props = {
16
16
  dateSelected: (date: Date) => void;
17
17
  timeSelected: (time: string) => void;
18
18
  teleportTo?: string;
19
+ validation?: 'success' | 'warning' | 'error' | null;
20
+ validationText?: string;
19
21
  };
20
22
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
21
23
  "update:maskedModel": (value: string) => any;
@@ -12,6 +12,8 @@ type __VLS_Props = {
12
12
  closeDropdown: () => void;
13
13
  onTimeSelect: (time: string) => void;
14
14
  clear: () => void;
15
+ validation?: 'success' | 'warning' | 'error' | null;
16
+ validationText?: string;
15
17
  };
16
18
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
17
19
  "update:maskedModel": (value: string) => any;
@@ -7,6 +7,8 @@
7
7
  :showClear="showClear"
8
8
  @click.stop="textboxClicked"
9
9
  @clear="clear"
10
+ :validation="validation"
11
+ :validationText="validationText"
10
12
  )
11
13
  template(#append)
12
14
  KIcon(iconname="clock" clickable @click.stop="textboxClicked")
@@ -46,6 +48,8 @@ const props = defineProps<{
46
48
  closeDropdown: () => void
47
49
  onTimeSelect: (time: string) => void
48
50
  clear: () => void
51
+ validation?: 'success' | 'warning' | 'error' | null
52
+ validationText?: string
49
53
  }>()
50
54
 
51
55
  const emit = defineEmits<{
@@ -12,6 +12,8 @@ type __VLS_Props = {
12
12
  closeDropdown: () => void;
13
13
  onTimeSelect: (time: string) => void;
14
14
  clear: () => void;
15
+ validation?: 'success' | 'warning' | 'error' | null;
16
+ validationText?: string;
15
17
  };
16
18
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
17
19
  "update:maskedModel": (value: string) => any;
@@ -1,15 +1,26 @@
1
1
  <template lang="pug">
2
- .KLoader(:class="loaderClasses")
2
+ .KLoader(:class="computedClasses")
3
3
  .KLoader__spinner
4
+ slot
4
5
  </template>
5
6
 
6
7
  <script lang="ts" setup>
7
- defineProps<{
8
+ import { computed } from 'vue'
9
+ const props = defineProps<{
8
10
  loading: boolean
9
11
  overlay?: boolean
10
12
  size?: 'small' | 'medium' | 'large'
11
13
  loaderClasses?: any
12
14
  }>()
15
+
16
+ const computedClasses = computed(() => {
17
+ return {
18
+ 'is-loading': props.loading,
19
+ 'is-overlay': props.overlay,
20
+ [`is-${props.size || 'medium'}`]: true,
21
+ ...props.loaderClasses
22
+ }
23
+ })
13
24
  </script>
14
25
 
15
26
  <style lang="scss" scoped>
@@ -3,6 +3,8 @@ type __VLS_Props = {
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
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
8
10
  clear: () => any;
@@ -6,6 +6,8 @@
6
6
  :showClear="showClear"
7
7
  :clear="handleClear"
8
8
  :maxlength="mask.length"
9
+ :validation="validation"
10
+ :validationText="validationText"
9
11
  @update:modelValue="handleUpdate"
10
12
  @beforeinput="handleBeforeInput"
11
13
  )
@@ -19,6 +21,8 @@ const props = defineProps<{
19
21
  placeholder: string
20
22
  showClear: boolean
21
23
  mask: string
24
+ validation?: 'success' | 'warning' | 'error' | null
25
+ validationText?: string
22
26
  }>()
23
27
 
24
28
  const emit = defineEmits<{
@@ -3,6 +3,8 @@ type __VLS_Props = {
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
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
8
10
  clear: () => any;
@@ -3,6 +3,8 @@ type __VLS_Props = {
3
3
  label?: string;
4
4
  value?: string;
5
5
  disabled?: boolean;
6
+ validation?: 'success' | 'warning' | 'error' | null;
7
+ validationText?: string;
6
8
  };
7
9
  type __VLS_ModelProps = {
8
10
  modelValue?: any;
@@ -1,10 +1,12 @@
1
1
  <template lang="pug">
2
- label.KRadiobox
3
- input(type="radio" v-model="model" :disabled="disabled" :value="value")
4
- .icon-container
5
- KIcon.icon(iconname="check")
6
- span
7
- slot
2
+ .KRadiobox-wrapper
3
+ label.KRadiobox
4
+ input(type="radio" v-model="model" :disabled="disabled" :value="value")
5
+ .icon-container(:class="validation ? `is-${validation}` : ''")
6
+ KIcon.icon(iconname="check")
7
+ span
8
+ slot
9
+ span.validation-text(v-if="validation && ['success', 'warning', 'error'].includes(validation) && validationText" :class="`is-${validation}`") {{ validationText }}
8
10
  </template>
9
11
 
10
12
  <script lang="ts" setup>
@@ -13,6 +15,8 @@ defineProps<{
13
15
  label?: string
14
16
  value?: string
15
17
  disabled?: boolean
18
+ validation?: 'success' | 'warning' | 'error' | null
19
+ validationText?: string
16
20
  }>()
17
21
 
18
22
  const model = defineModel()
@@ -3,6 +3,8 @@ type __VLS_Props = {
3
3
  label?: string;
4
4
  value?: string;
5
5
  disabled?: boolean;
6
+ validation?: 'success' | 'warning' | 'error' | null;
7
+ validationText?: string;
6
8
  };
7
9
  type __VLS_ModelProps = {
8
10
  modelValue?: any;
@@ -1,6 +1,8 @@
1
1
  type __VLS_Props = {
2
2
  placeholder: string;
3
3
  rows: number;
4
+ validation?: 'success' | 'warning' | 'error' | null;
5
+ validationText?: string;
4
6
  };
5
7
  type __VLS_ModelProps = {
6
8
  'text'?: string;
@@ -1,5 +1,7 @@
1
1
  <template lang="pug">
2
- textarea.KTextarea(v-model="text" :placeholder="placeholder" :rows="rows")
2
+ .KTextarea-wrapper
3
+ textarea.KTextarea(v-model="text" :placeholder="placeholder" :rows="rows" :class="validation ? `is-${validation}` : ''")
4
+ span.validation-text(v-if="validation && ['success', 'warning', 'error'].includes(validation) && validationText" :class="`is-${validation}`") {{ validationText }}
3
5
  </template>
4
6
 
5
7
  <script lang="ts" setup>
@@ -9,6 +11,8 @@ const text = defineModel<string>('text')
9
11
  defineProps<{
10
12
  placeholder: string
11
13
  rows: number
14
+ validation?: 'success' | 'warning' | 'error' | null
15
+ validationText?: string
12
16
  }>()
13
17
  </script>
14
18
 
@@ -1,6 +1,8 @@
1
1
  type __VLS_Props = {
2
2
  placeholder: string;
3
3
  rows: number;
4
+ validation?: 'success' | 'warning' | 'error' | null;
5
+ validationText?: string;
4
6
  };
5
7
  type __VLS_ModelProps = {
6
8
  'text'?: string;
@@ -4,6 +4,8 @@ type __VLS_Props = {
4
4
  clear: () => void;
5
5
  placeholder: string;
6
6
  type: string;
7
+ validation?: 'success' | 'warning' | 'error' | null;
8
+ validationText?: string;
7
9
  };
8
10
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
11
  "update:text": (value: string) => any;
@@ -1,7 +1,9 @@
1
1
  <template lang="pug">
2
- KGrid(align="center" noGap wrap="nowrap").KTextbox
3
- input(:type="props.type" v-model="text" :placeholder="placeholder")
4
- KIcon(v-if="showClear" @click.stop="clear" @mousedown.stop iconname="close" width="10" height="10").closeIcon
2
+ .KTextbox-wrapper
3
+ KGrid(align="center" noGap wrap="nowrap" :class="validation ? `is-${validation}` : ''").KTextbox
4
+ input(:type="props.type" v-model="text" :placeholder="placeholder")
5
+ KIcon(v-if="showClear" @click.stop="clear" @mousedown.stop iconname="close" width="10" height="10").closeIcon
6
+ span.validation-text(v-if="validation && ['success', 'warning', 'error'].includes(validation) && validationText" :class="`is-${validation}`") {{ validationText }}
5
7
  </template>
6
8
 
7
9
  <script lang="ts" setup>
@@ -13,6 +15,8 @@ const props = defineProps<{
13
15
  clear: () => void
14
16
  placeholder: string
15
17
  type: string
18
+ validation?: 'success' | 'warning' | 'error' | null
19
+ validationText?: string
16
20
  }>()
17
21
 
18
22
  const emit = defineEmits<{
@@ -4,6 +4,8 @@ type __VLS_Props = {
4
4
  clear: () => void;
5
5
  placeholder: string;
6
6
  type: string;
7
+ validation?: 'success' | 'warning' | 'error' | null;
8
+ validationText?: string;
7
9
  };
8
10
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
11
  "update:text": (value: string) => any;
@@ -18,6 +18,8 @@ type __VLS_Props = {
18
18
  isSelected: (option: any) => boolean;
19
19
  loading: boolean;
20
20
  closeOnSelect: boolean;
21
+ validation?: 'success' | 'warning' | 'error' | null;
22
+ validationText?: string;
21
23
  };
22
24
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
23
25
  "update:searchtext": (value: string) => any;
@@ -14,6 +14,8 @@ KCombobox(
14
14
  :selectItem="selectItem"
15
15
  :isSelected="isSelected"
16
16
  :loading="loading"
17
+ :validation="validation"
18
+ :validationText="validationText"
17
19
  )
18
20
  template(#default)
19
21
  .KTreePicker__tree-container
@@ -64,6 +66,8 @@ const props = defineProps<{
64
66
  isSelected: (option: any) => boolean
65
67
  loading: boolean
66
68
  closeOnSelect: boolean
69
+ validation?: 'success' | 'warning' | 'error' | null
70
+ validationText?: string
67
71
  }>()
68
72
 
69
73
  const emit = defineEmits<{
@@ -18,6 +18,8 @@ type __VLS_Props = {
18
18
  isSelected: (option: any) => boolean;
19
19
  loading: boolean;
20
20
  closeOnSelect: boolean;
21
+ validation?: 'success' | 'warning' | 'error' | null;
22
+ validationText?: string;
21
23
  };
22
24
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
23
25
  "update:searchtext": (value: string) => any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@katlux/toolkit",
3
- "version": "0.1.0-beta.50",
3
+ "version": "0.1.0-beta.51",
4
4
  "description": "Core UI toolkit and utilities for the Katlux ecosystem",
5
5
  "author": "Katlux",
6
6
  "license": "MIT",