@katlux/toolkit 0.1.0-beta.74 → 0.1.0-beta.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.json +1 -1
- package/dist/runtime/components/KButton/KButton.logic.d.ts +1 -1
- package/dist/runtime/components/KCombobox/KCombobox.global.d.vue.ts +11 -2
- package/dist/runtime/components/KCombobox/KCombobox.global.vue +1 -0
- package/dist/runtime/components/KCombobox/KCombobox.global.vue.d.ts +11 -2
- package/dist/runtime/components/KCombobox/KCombobox.logic.d.ts +5 -0
- package/dist/runtime/components/KCombobox/KCombobox.logic.js +11 -7
- package/dist/runtime/components/KCompositeInput/KCompositeInput.global.d.vue.ts +47 -2
- package/dist/runtime/components/KCompositeInput/KCompositeInput.global.vue +11 -2
- package/dist/runtime/components/KCompositeInput/KCompositeInput.global.vue.d.ts +47 -2
- package/dist/runtime/components/KCompositeInput/KCompositeInput.logic.d.ts +61 -1
- package/dist/runtime/components/KCompositeInput/KCompositeInput.logic.js +112 -9
- package/dist/runtime/components/KDatatable/KDataIterator.global.d.vue.ts +1 -1
- package/dist/runtime/components/KDatatable/KDataIterator.global.vue.d.ts +1 -1
- package/dist/runtime/components/KDatePicker/KDatePicker.global.d.vue.ts +11 -2
- package/dist/runtime/components/KDatePicker/KDatePicker.global.vue +1 -0
- package/dist/runtime/components/KDatePicker/KDatePicker.global.vue.d.ts +11 -2
- package/dist/runtime/components/KDatePicker/KDatePicker.logic.d.ts +5 -0
- package/dist/runtime/components/KDatePicker/KDatePicker.logic.js +12 -0
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.d.vue.ts +11 -2
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue +1 -0
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue.d.ts +11 -2
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.logic.d.ts +5 -0
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.logic.js +7 -0
- package/dist/runtime/components/KHourPicker/KHourPicker.global.d.vue.ts +10 -1
- package/dist/runtime/components/KHourPicker/KHourPicker.global.vue +1 -0
- package/dist/runtime/components/KHourPicker/KHourPicker.global.vue.d.ts +10 -1
- package/dist/runtime/components/KHourPicker/KHourPicker.logic.d.ts +5 -0
- package/dist/runtime/components/KHourPicker/KHourPicker.logic.js +4 -0
- package/dist/runtime/components/KHourSelect/KHourSelect.global.d.vue.ts +9 -0
- package/dist/runtime/components/KHourSelect/KHourSelect.global.vue +1 -0
- package/dist/runtime/components/KHourSelect/KHourSelect.global.vue.d.ts +9 -0
- package/dist/runtime/components/KHourSelect/KHourSelect.logic.d.ts +5 -0
- package/dist/runtime/components/KHourSelect/KHourSelect.logic.js +4 -0
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.d.vue.ts +10 -1
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.vue +1 -0
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.vue.d.ts +10 -1
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.logic.d.ts +5 -0
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.logic.js +14 -5
- package/dist/runtime/components/KRangeSlider/KRangeSlider.global.d.vue.ts +9 -0
- package/dist/runtime/components/KRangeSlider/KRangeSlider.global.vue +1 -0
- package/dist/runtime/components/KRangeSlider/KRangeSlider.global.vue.d.ts +9 -0
- package/dist/runtime/components/KRangeSlider/KRangeSlider.logic.d.ts +5 -0
- package/dist/runtime/components/KRangeSlider/KRangeSlider.logic.js +4 -0
- package/dist/runtime/components/KSearchTree/KSearchTree.logic.d.ts +7 -1
- package/dist/runtime/components/KSearchTree/KSearchTree.logic.js +6 -1
- package/dist/runtime/components/KSearchTreeDropdown/KSearchTreeDropdown.logic.d.ts +7 -1
- package/dist/runtime/components/KSearchTreeDropdown/KSearchTreeDropdown.logic.js +6 -1
- package/dist/runtime/components/KSlider/KSlider.global.d.vue.ts +9 -0
- package/dist/runtime/components/KSlider/KSlider.global.vue +1 -0
- package/dist/runtime/components/KSlider/KSlider.global.vue.d.ts +9 -0
- package/dist/runtime/components/KSlider/KSlider.logic.d.ts +5 -0
- package/dist/runtime/components/KSlider/KSlider.logic.js +4 -0
- package/dist/runtime/components/KTextarea/KTextarea.global.d.vue.ts +10 -1
- package/dist/runtime/components/KTextarea/KTextarea.global.vue +1 -0
- package/dist/runtime/components/KTextarea/KTextarea.global.vue.d.ts +10 -1
- package/dist/runtime/components/KTextarea/KTextarea.logic.d.ts +5 -0
- package/dist/runtime/components/KTextarea/KTextarea.logic.js +4 -0
- package/dist/runtime/components/KTextbox/KTextbox.global.d.vue.ts +10 -1
- package/dist/runtime/components/KTextbox/KTextbox.global.vue +1 -0
- package/dist/runtime/components/KTextbox/KTextbox.global.vue.d.ts +10 -1
- package/dist/runtime/components/KTextbox/KTextbox.logic.d.ts +5 -0
- package/dist/runtime/components/KTextbox/KTextbox.logic.js +4 -0
- package/dist/runtime/components/KTreePicker/KTreePicker.global.d.vue.ts +13 -4
- package/dist/runtime/components/KTreePicker/KTreePicker.global.vue +1 -0
- package/dist/runtime/components/KTreePicker/KTreePicker.global.vue.d.ts +13 -4
- package/dist/runtime/components/KTreePicker/KTreePicker.logic.d.ts +5 -0
- package/dist/runtime/components/KTreePicker/KTreePicker.logic.js +4 -0
- package/dist/runtime/components/KTreeView/KTreeView.global.d.vue.ts +3 -3
- package/dist/runtime/components/KTreeView/KTreeView.global.vue.d.ts +3 -3
- package/dist/runtime/presets/default/assets/scss/css-variables.css +3 -0
- package/dist/runtime/presets/default/assets/scss/css-variables.scss +3 -0
- package/dist/runtime/presets/default/assets/scss/index.css +11 -0
- package/dist/runtime/presets/default/assets/scss/index.scss +8 -1
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.d.vue.ts +1 -0
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue +22 -2
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue.d.ts +1 -0
- package/dist/runtime/presets/default/components/KCompositeInput/KCompositeInput.d.vue.ts +5 -0
- package/dist/runtime/presets/default/components/KCompositeInput/KCompositeInput.vue +79 -47
- package/dist/runtime/presets/default/components/KCompositeInput/KCompositeInput.vue.d.ts +5 -0
- package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.d.vue.ts +1 -0
- package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue +2 -0
- package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue.d.ts +1 -0
- package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.d.vue.ts +1 -0
- package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.vue +2 -0
- package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.vue.d.ts +1 -0
- package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.d.vue.ts +1 -0
- package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.vue +2 -0
- package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.vue.d.ts +1 -0
- package/dist/runtime/presets/default/components/KHourSelect/KHourSelect.d.vue.ts +1 -0
- package/dist/runtime/presets/default/components/KHourSelect/KHourSelect.vue +2 -0
- package/dist/runtime/presets/default/components/KHourSelect/KHourSelect.vue.d.ts +1 -0
- package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.d.vue.ts +1 -0
- package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.vue +2 -0
- package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.vue.d.ts +1 -0
- package/dist/runtime/presets/default/components/KRangeSlider/KRangeSlider.d.vue.ts +1 -0
- package/dist/runtime/presets/default/components/KRangeSlider/KRangeSlider.vue +2 -0
- package/dist/runtime/presets/default/components/KRangeSlider/KRangeSlider.vue.d.ts +1 -0
- package/dist/runtime/presets/default/components/KSearchTree/KSearchTree.d.vue.ts +4 -1
- package/dist/runtime/presets/default/components/KSearchTree/KSearchTree.vue +9 -1
- package/dist/runtime/presets/default/components/KSearchTree/KSearchTree.vue.d.ts +4 -1
- package/dist/runtime/presets/default/components/KSearchTreeDropdown/KSearchTreeDropdown.d.vue.ts +4 -1
- package/dist/runtime/presets/default/components/KSearchTreeDropdown/KSearchTreeDropdown.vue +9 -1
- package/dist/runtime/presets/default/components/KSearchTreeDropdown/KSearchTreeDropdown.vue.d.ts +4 -1
- package/dist/runtime/presets/default/components/KSlider/KSlider.d.vue.ts +1 -0
- package/dist/runtime/presets/default/components/KSlider/KSlider.vue +2 -0
- package/dist/runtime/presets/default/components/KSlider/KSlider.vue.d.ts +1 -0
- package/dist/runtime/presets/default/components/KTextarea/KTextarea.d.vue.ts +1 -0
- package/dist/runtime/presets/default/components/KTextarea/KTextarea.vue +3 -1
- package/dist/runtime/presets/default/components/KTextarea/KTextarea.vue.d.ts +1 -0
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.d.vue.ts +1 -0
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue +36 -8
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue.d.ts +1 -0
- package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.d.vue.ts +1 -0
- package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.vue +2 -0
- package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.vue.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { type KTreePickerProps } from './KTreePicker.logic.js';
|
|
2
2
|
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
|
+
label: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
3
7
|
modelValue: {
|
|
4
8
|
type: import("vue").PropType<any>;
|
|
5
9
|
default: null;
|
|
@@ -78,6 +82,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
78
82
|
"update:modelValue": (value: any) => any;
|
|
79
83
|
"update:isOptionsOpen": (value: boolean) => any;
|
|
80
84
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
85
|
+
label: {
|
|
86
|
+
type: StringConstructor;
|
|
87
|
+
default: string;
|
|
88
|
+
};
|
|
81
89
|
modelValue: {
|
|
82
90
|
type: import("vue").PropType<any>;
|
|
83
91
|
default: null;
|
|
@@ -156,22 +164,23 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
156
164
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
157
165
|
"onUpdate:isOptionsOpen"?: ((value: boolean) => any) | undefined;
|
|
158
166
|
}>, {
|
|
167
|
+
label: string;
|
|
168
|
+
parentKey: string;
|
|
169
|
+
idKey: string;
|
|
159
170
|
disabled: boolean;
|
|
160
171
|
loading: boolean;
|
|
161
172
|
validation: "error" | "success" | "warning" | null | undefined;
|
|
162
|
-
validationText: string;
|
|
163
|
-
modelValue: any;
|
|
164
173
|
searchbox: boolean;
|
|
165
174
|
searchPlaceholder: string;
|
|
166
175
|
isOptionsOpen: boolean;
|
|
167
176
|
placeholder: string;
|
|
168
177
|
fullWidth: boolean;
|
|
178
|
+
validationText: string;
|
|
169
179
|
closeOnSelect: boolean;
|
|
170
180
|
multiSelect: boolean;
|
|
171
181
|
valueField: string;
|
|
182
|
+
modelValue: any;
|
|
172
183
|
iconField: string;
|
|
173
|
-
idKey: string;
|
|
174
|
-
parentKey: string;
|
|
175
184
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
176
185
|
declare const _default: typeof __VLS_export;
|
|
177
186
|
export default _default;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ADataProvider } from '@katlux/providers';
|
|
2
2
|
import { type PropType } from 'vue';
|
|
3
3
|
export interface KTreePickerProps {
|
|
4
|
+
label?: string;
|
|
4
5
|
modelValue?: any;
|
|
5
6
|
dataProvider: ADataProvider;
|
|
6
7
|
labelField: string;
|
|
@@ -21,6 +22,10 @@ export interface KTreePickerProps {
|
|
|
21
22
|
fullWidth?: boolean;
|
|
22
23
|
}
|
|
23
24
|
export declare const KTreePickerDefaultProps: {
|
|
25
|
+
label: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
24
29
|
modelValue: {
|
|
25
30
|
type: PropType<any>;
|
|
26
31
|
default: null;
|
|
@@ -81,14 +81,14 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
81
81
|
default: () => {};
|
|
82
82
|
};
|
|
83
83
|
}>> & Readonly<{}>, {
|
|
84
|
+
parentKey: string;
|
|
85
|
+
idKey: string;
|
|
86
|
+
expandedByDefault: boolean;
|
|
84
87
|
bulkActions: import("@katlux/providers").IKDatatableAction[];
|
|
85
88
|
rowActions: import("./KTreeView.logic.js").IRowAction[];
|
|
86
89
|
cellSlots: Record<string, any>;
|
|
87
90
|
headerSlots: Record<string, any>;
|
|
88
91
|
treeColumnIndex: number;
|
|
89
|
-
idKey: string;
|
|
90
|
-
parentKey: string;
|
|
91
|
-
expandedByDefault: boolean;
|
|
92
92
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
93
93
|
declare const _default: typeof __VLS_export;
|
|
94
94
|
export default _default;
|
|
@@ -81,14 +81,14 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
81
81
|
default: () => {};
|
|
82
82
|
};
|
|
83
83
|
}>> & Readonly<{}>, {
|
|
84
|
+
parentKey: string;
|
|
85
|
+
idKey: string;
|
|
86
|
+
expandedByDefault: boolean;
|
|
84
87
|
bulkActions: import("@katlux/providers").IKDatatableAction[];
|
|
85
88
|
rowActions: import("./KTreeView.logic.js").IRowAction[];
|
|
86
89
|
cellSlots: Record<string, any>;
|
|
87
90
|
headerSlots: Record<string, any>;
|
|
88
91
|
treeColumnIndex: number;
|
|
89
|
-
idKey: string;
|
|
90
|
-
parentKey: string;
|
|
91
|
-
expandedByDefault: boolean;
|
|
92
92
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
93
93
|
declare const _default: typeof __VLS_export;
|
|
94
94
|
export default _default;
|
|
@@ -144,10 +144,13 @@
|
|
|
144
144
|
--panel-bg-info: var(--cyan-300);
|
|
145
145
|
--panel-header-bg-info: var(--cyan-500);
|
|
146
146
|
--panel-footer-bg-info: var(--cyan-100);
|
|
147
|
+
--input-bg: var(--neutral-50);
|
|
147
148
|
--input-border-radius: var(--border-radius-sm);
|
|
148
149
|
--input-border-color: var(--border-color-medium);
|
|
150
|
+
--input-hover-border-color: var(--neutral-400);
|
|
149
151
|
--input-focus-border-color: var(--primary-500);
|
|
150
152
|
--input-focus-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
|
|
153
|
+
--input-height: 40px;
|
|
151
154
|
--table-header-bg: var(--neutral-100);
|
|
152
155
|
--table-header-color: var(--neutral-700);
|
|
153
156
|
--table-border-color: var(--neutral-300);
|
|
@@ -210,10 +210,13 @@
|
|
|
210
210
|
--panel-footer-bg-info: var(--cyan-100);
|
|
211
211
|
|
|
212
212
|
// Input
|
|
213
|
+
--input-bg: var(--neutral-50);
|
|
213
214
|
--input-border-radius: var(--border-radius-sm);
|
|
214
215
|
--input-border-color: var(--border-color-medium);
|
|
216
|
+
--input-hover-border-color: var(--neutral-400);
|
|
215
217
|
--input-focus-border-color: var(--primary-500);
|
|
216
218
|
--input-focus-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
|
|
219
|
+
--input-height: 40px;
|
|
217
220
|
|
|
218
221
|
// Table
|
|
219
222
|
--table-header-bg: var(--neutral-100);
|
|
@@ -161,10 +161,13 @@ li {
|
|
|
161
161
|
--panel-bg-info: var(--cyan-300);
|
|
162
162
|
--panel-header-bg-info: var(--cyan-500);
|
|
163
163
|
--panel-footer-bg-info: var(--cyan-100);
|
|
164
|
+
--input-bg: var(--neutral-50);
|
|
164
165
|
--input-border-radius: var(--border-radius-sm);
|
|
165
166
|
--input-border-color: var(--border-color-medium);
|
|
167
|
+
--input-hover-border-color: var(--neutral-400);
|
|
166
168
|
--input-focus-border-color: var(--primary-500);
|
|
167
169
|
--input-focus-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
|
|
170
|
+
--input-height: 40px;
|
|
168
171
|
--table-header-bg: var(--neutral-100);
|
|
169
172
|
--table-header-color: var(--neutral-700);
|
|
170
173
|
--table-border-color: var(--neutral-300);
|
|
@@ -294,4 +297,12 @@ body {
|
|
|
294
297
|
|
|
295
298
|
.is-error {
|
|
296
299
|
border-color: var(--error-color) !important;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.k-input-label {
|
|
303
|
+
font-size: var(--font-size-xs);
|
|
304
|
+
color: var(--neutral-500);
|
|
305
|
+
margin-bottom: calc(var(--gap-sm) / 2);
|
|
306
|
+
display: block;
|
|
307
|
+
font-weight: 500;
|
|
297
308
|
}
|
|
@@ -39,4 +39,11 @@ body {
|
|
|
39
39
|
|
|
40
40
|
.is-error {
|
|
41
41
|
border-color: var(--error-color) !important;
|
|
42
|
-
}
|
|
42
|
+
}
|
|
43
|
+
.k-input-label {
|
|
44
|
+
font-size: var(--font-size-xs);
|
|
45
|
+
color: var(--neutral-500);
|
|
46
|
+
margin-bottom: calc(var(--gap-sm) / 2);
|
|
47
|
+
display: block;
|
|
48
|
+
font-weight: 500;
|
|
49
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
2
|
.KCombobox-wrapper
|
|
3
|
+
label.k-input-label(v-if="label") {{ label }}
|
|
3
4
|
.KCombobox(ref="activatorRef" :class="{ disabled: disabled, open: isOptionsOpen, ... (validation ? { [`is-${validation}`]: true } : {}) }")
|
|
4
5
|
KGrid(@click.stop="toggleDropdown" align="center" justify="space-between").KCombobox__selected-content-container
|
|
5
6
|
KGrid(align="center" wrap="no-wrap").KCombobox__selected-content
|
|
@@ -35,6 +36,7 @@ import KComboboxList from './KComboboxList.vue'
|
|
|
35
36
|
import type { ComboboxItem } from '../../../../components/KCombobox/KCombobox.logic'
|
|
36
37
|
|
|
37
38
|
const props = defineProps<{
|
|
39
|
+
label?: string
|
|
38
40
|
disabled: boolean
|
|
39
41
|
isOptionsOpen: boolean
|
|
40
42
|
labelField: string
|
|
@@ -72,15 +74,33 @@ const isOptionsOpenModel = computed({
|
|
|
72
74
|
</script>
|
|
73
75
|
|
|
74
76
|
<style lang="scss" scoped>
|
|
77
|
+
.KCombobox-wrapper {
|
|
78
|
+
display: flex;
|
|
79
|
+
flex-direction: column;
|
|
80
|
+
flex: 1;
|
|
81
|
+
min-width: 0;
|
|
82
|
+
}
|
|
83
|
+
|
|
75
84
|
.KCombobox {
|
|
76
85
|
box-sizing: border-box;
|
|
77
86
|
border: var(--input-border);
|
|
78
87
|
border-radius: var(--input-border-radius);
|
|
79
88
|
padding: 0px var(--component-gap);
|
|
80
89
|
|
|
81
|
-
background-color: var(--
|
|
82
|
-
height:
|
|
90
|
+
background-color: var(--input-bg);
|
|
91
|
+
height: var(--input-height);
|
|
83
92
|
position: relative;
|
|
93
|
+
transition: all var(--transition-fast, 0.2s ease);
|
|
94
|
+
|
|
95
|
+
&:focus-within, &.open {
|
|
96
|
+
border-color: var(--input-focus-border-color);
|
|
97
|
+
box-shadow: var(--input-focus-shadow);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&:hover:not(.open) {
|
|
101
|
+
border-color: var(--input-hover-border-color);
|
|
102
|
+
}
|
|
103
|
+
|
|
84
104
|
&__selected-content-container {
|
|
85
105
|
cursor: pointer;
|
|
86
106
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { ADataProvider } from '@katlux/providers';
|
|
2
|
+
import type { ICompositeInputConfig } from '../../../../components/KCompositeInput/KCompositeInput.logic.js';
|
|
2
3
|
type __VLS_Props = {
|
|
4
|
+
label?: string;
|
|
3
5
|
selectionValue: any;
|
|
4
6
|
inputValue: any;
|
|
5
7
|
modelValue: any[];
|
|
@@ -17,6 +19,9 @@ type __VLS_Props = {
|
|
|
17
19
|
teleportTo?: string;
|
|
18
20
|
validation?: 'success' | 'warning' | 'error' | null;
|
|
19
21
|
validationText?: string;
|
|
22
|
+
inputConfigField?: string;
|
|
23
|
+
validateAll?: boolean;
|
|
24
|
+
resolvedInputConfig?: ICompositeInputConfig;
|
|
20
25
|
};
|
|
21
26
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
22
27
|
"update:selectionValue": (value: any) => any;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
2
|
.KCompositeInput-wrapper
|
|
3
|
-
.
|
|
4
|
-
|
|
3
|
+
label.k-input-label(v-if="label") {{ label }}
|
|
4
|
+
.KCompositeInput(:class="{'selection-right': selectionSide === 'right', 'layout-column': activeType === 'textarea'}")
|
|
5
|
+
KGrid(:direction="activeType === 'textarea' ? 'column' : 'row'" gap="0" align="stretch" :class="activeValidation ? `is-${activeValidation}` : ''")
|
|
5
6
|
//- Selection Combobox
|
|
6
7
|
.KCompositeInput-selection(:style="selectionStyle")
|
|
7
8
|
KCombobox(
|
|
@@ -13,74 +14,79 @@
|
|
|
13
14
|
:searchbox="searchbox"
|
|
14
15
|
closeOnSelect
|
|
15
16
|
:teleportTo="teleportTo"
|
|
16
|
-
:validation="
|
|
17
|
+
:validation="activeValidation"
|
|
17
18
|
)
|
|
18
19
|
|
|
19
|
-
//- Secondary Input
|
|
20
|
+
//- Secondary Input (driven by resolvedInputConfig)
|
|
20
21
|
.KCompositeInput-main
|
|
21
|
-
template(v-if="
|
|
22
|
+
template(v-if="activeType === 'textbox'")
|
|
22
23
|
KTextbox(
|
|
23
24
|
v-model="inputValue"
|
|
24
|
-
:type="inputType"
|
|
25
|
-
:placeholder="
|
|
26
|
-
:showClear="showClear"
|
|
27
|
-
:validation="
|
|
25
|
+
:type="activeConfig.inputType"
|
|
26
|
+
:placeholder="activeConfig.placeholder"
|
|
27
|
+
:showClear="activeConfig.showClear"
|
|
28
|
+
:validation="activeValidation"
|
|
28
29
|
)
|
|
29
|
-
template(v-else-if="
|
|
30
|
+
template(v-else-if="activeType === 'textarea'")
|
|
30
31
|
KTextarea(
|
|
31
32
|
v-model="inputValue"
|
|
32
|
-
:placeholder="
|
|
33
|
-
:validation="
|
|
33
|
+
:placeholder="activeConfig.placeholder"
|
|
34
|
+
:validation="activeValidation"
|
|
34
35
|
)
|
|
35
|
-
template(v-else-if="
|
|
36
|
+
template(v-else-if="activeType === 'maskedtextbox'")
|
|
36
37
|
KMaskTextbox(
|
|
37
38
|
v-model="inputValue"
|
|
38
|
-
:mask="mask"
|
|
39
|
-
:placeholder="
|
|
40
|
-
:showClear="showClear"
|
|
41
|
-
:validation="
|
|
39
|
+
:mask="activeConfig.mask"
|
|
40
|
+
:placeholder="activeConfig.placeholder"
|
|
41
|
+
:showClear="activeConfig.showClear"
|
|
42
|
+
:validation="activeValidation"
|
|
42
43
|
)
|
|
43
|
-
template(v-else-if="
|
|
44
|
-
//- For internal combobox, we assume same items for now or specific logic could be added
|
|
44
|
+
template(v-else-if="activeType === 'combobox'")
|
|
45
45
|
KCombobox(
|
|
46
46
|
v-model="inputValue"
|
|
47
|
-
:dataProvider="dataProvider"
|
|
48
|
-
:labelField="labelField"
|
|
49
|
-
:valueField="valueField"
|
|
50
|
-
:placeholder="
|
|
51
|
-
:searchbox="
|
|
47
|
+
:dataProvider="activeConfig.inputDataProvider || dataProvider"
|
|
48
|
+
:labelField="activeConfig.inputLabelField || labelField"
|
|
49
|
+
:valueField="activeConfig.inputValueField || valueField"
|
|
50
|
+
:placeholder="activeConfig.placeholder"
|
|
51
|
+
:searchbox="activeConfig.inputSearchbox || false"
|
|
52
52
|
:teleportTo="teleportTo"
|
|
53
|
-
:validation="
|
|
53
|
+
:validation="activeValidation"
|
|
54
|
+
closeOnSelect
|
|
54
55
|
)
|
|
55
|
-
template(v-else-if="
|
|
56
|
+
template(v-else-if="activeType === 'datepicker'")
|
|
56
57
|
KDatePicker(
|
|
57
58
|
v-model="inputValue"
|
|
58
|
-
:placeholder="
|
|
59
|
-
:showClear="showClear"
|
|
60
|
-
:
|
|
59
|
+
:placeholder="activeConfig.placeholder"
|
|
60
|
+
:showClear="activeConfig.showClear"
|
|
61
|
+
:format="activeConfig.inputFormat"
|
|
62
|
+
:validation="activeValidation"
|
|
61
63
|
)
|
|
62
|
-
template(v-else-if="
|
|
64
|
+
template(v-else-if="activeType === 'datetimepicker'")
|
|
63
65
|
KDateTimePicker(
|
|
64
66
|
v-model="inputValue"
|
|
65
|
-
:placeholder="
|
|
66
|
-
:showClear="showClear"
|
|
67
|
-
:
|
|
67
|
+
:placeholder="activeConfig.placeholder"
|
|
68
|
+
:showClear="activeConfig.showClear"
|
|
69
|
+
:format="activeConfig.inputFormat"
|
|
70
|
+
:validation="activeValidation"
|
|
68
71
|
)
|
|
69
|
-
template(v-else-if="
|
|
72
|
+
template(v-else-if="activeType === 'hourpicker'")
|
|
70
73
|
KHourPicker(
|
|
71
74
|
v-model="inputValue"
|
|
72
|
-
:placeholder="
|
|
73
|
-
:showClear="showClear"
|
|
74
|
-
:
|
|
75
|
+
:placeholder="activeConfig.placeholder"
|
|
76
|
+
:showClear="activeConfig.showClear"
|
|
77
|
+
:format="activeConfig.inputFormat"
|
|
78
|
+
:validation="activeValidation"
|
|
75
79
|
)
|
|
76
|
-
span.validation-text(v-if="
|
|
80
|
+
span.validation-text(v-if="activeValidation && ['success', 'warning', 'error'].includes(activeValidation) && activeValidationText" :class="`is-${activeValidation}`") {{ activeValidationText }}
|
|
77
81
|
</template>
|
|
78
82
|
|
|
79
83
|
<script lang="ts" setup>
|
|
80
84
|
import { computed } from 'vue'
|
|
81
85
|
import type { ADataProvider } from '@katlux/providers'
|
|
86
|
+
import type { ICompositeInputConfig } from '../../../../components/KCompositeInput/KCompositeInput.logic'
|
|
82
87
|
|
|
83
88
|
const props = defineProps<{
|
|
89
|
+
label?: string
|
|
84
90
|
selectionValue: any
|
|
85
91
|
inputValue: any
|
|
86
92
|
modelValue: any[]
|
|
@@ -98,6 +104,9 @@ const props = defineProps<{
|
|
|
98
104
|
teleportTo?: string
|
|
99
105
|
validation?: 'success' | 'warning' | 'error' | null
|
|
100
106
|
validationText?: string
|
|
107
|
+
inputConfigField?: string
|
|
108
|
+
validateAll?: boolean
|
|
109
|
+
resolvedInputConfig?: ICompositeInputConfig
|
|
101
110
|
}>()
|
|
102
111
|
|
|
103
112
|
const emit = defineEmits<{
|
|
@@ -116,9 +125,32 @@ const inputValue = computed({
|
|
|
116
125
|
})
|
|
117
126
|
|
|
118
127
|
const selectionStyle = computed(() => ({
|
|
119
|
-
width: '120px', // Default width for selection, can be made prop if needed
|
|
128
|
+
width: activeType.value === 'textarea' ? '100%' : '120px', // Default width for selection, can be made prop if needed
|
|
120
129
|
flex: '0 0 auto'
|
|
121
130
|
}))
|
|
131
|
+
|
|
132
|
+
// Use resolved config from logic layer, with fallback to component-level props
|
|
133
|
+
const activeConfig = computed<ICompositeInputConfig>(() => {
|
|
134
|
+
if (props.resolvedInputConfig) {
|
|
135
|
+
return props.resolvedInputConfig
|
|
136
|
+
}
|
|
137
|
+
// Fallback to component-level props
|
|
138
|
+
return {
|
|
139
|
+
type: props.type as any,
|
|
140
|
+
inputType: props.inputType,
|
|
141
|
+
mask: props.mask,
|
|
142
|
+
placeholder: props.inputPlaceholder,
|
|
143
|
+
showClear: props.showClear,
|
|
144
|
+
validation: props.validation,
|
|
145
|
+
validationText: props.validationText,
|
|
146
|
+
}
|
|
147
|
+
})
|
|
148
|
+
|
|
149
|
+
const activeType = computed(() => activeConfig.value.type || 'textbox')
|
|
150
|
+
|
|
151
|
+
const activeValidation = computed(() => activeConfig.value.validation || props.validation || null)
|
|
152
|
+
|
|
153
|
+
const activeValidationText = computed(() => activeConfig.value.validationText || props.validationText || '')
|
|
122
154
|
</script>
|
|
123
155
|
|
|
124
156
|
<style lang="scss" scoped>
|
|
@@ -126,7 +158,7 @@ const selectionStyle = computed(() => ({
|
|
|
126
158
|
width: 100%;
|
|
127
159
|
|
|
128
160
|
:deep(.KGrid) {
|
|
129
|
-
border: 1px solid var(--neutral-200);
|
|
161
|
+
/*border: 1px solid var(--neutral-200);
|
|
130
162
|
border-radius: var(--radius-md);
|
|
131
163
|
overflow: hidden;
|
|
132
164
|
background: var(--neutral-50);
|
|
@@ -134,11 +166,11 @@ const selectionStyle = computed(() => ({
|
|
|
134
166
|
&:focus-within {
|
|
135
167
|
border-color: var(--primary-500);
|
|
136
168
|
box-shadow: 0 0 0 2px var(--primary-100);
|
|
137
|
-
}
|
|
169
|
+
}*/
|
|
138
170
|
}
|
|
139
171
|
|
|
140
172
|
&-selection {
|
|
141
|
-
border-right: 1px solid var(--neutral-200);
|
|
173
|
+
/*border-right: 1px solid var(--neutral-200);
|
|
142
174
|
|
|
143
175
|
:deep(.KGrid).is-error & { border-right-color: var(--error-500); }
|
|
144
176
|
:deep(.KGrid).is-warning & { border-right-color: var(--warning-500); }
|
|
@@ -149,7 +181,7 @@ const selectionStyle = computed(() => ({
|
|
|
149
181
|
background: transparent !important;
|
|
150
182
|
box-shadow: none !important;
|
|
151
183
|
padding: 0 !important;
|
|
152
|
-
}
|
|
184
|
+
}*/
|
|
153
185
|
}
|
|
154
186
|
|
|
155
187
|
&-main {
|
|
@@ -160,7 +192,7 @@ const selectionStyle = computed(() => ({
|
|
|
160
192
|
|
|
161
193
|
:deep(.KTextbox), :deep(.KTextarea), :deep(.KMaskTextbox), :deep(.KCombobox),
|
|
162
194
|
:deep(.KDatePicker), :deep(.KDateTimePicker), :deep(.KHourPicker) {
|
|
163
|
-
width: 100%;
|
|
195
|
+
/*width: 100%;
|
|
164
196
|
border: none !important;
|
|
165
197
|
background: transparent !important;
|
|
166
198
|
box-shadow: none !important;
|
|
@@ -181,7 +213,7 @@ const selectionStyle = computed(() => ({
|
|
|
181
213
|
box-shadow: none !important;
|
|
182
214
|
outline: none !important;
|
|
183
215
|
padding: 0 12px !important;
|
|
184
|
-
}
|
|
216
|
+
}*/
|
|
185
217
|
}
|
|
186
218
|
}
|
|
187
219
|
|
|
@@ -190,12 +222,12 @@ const selectionStyle = computed(() => ({
|
|
|
190
222
|
flex-direction: row-reverse;
|
|
191
223
|
}
|
|
192
224
|
.KCompositeInput-selection {
|
|
193
|
-
border-right: none;
|
|
225
|
+
/*border-right: none;
|
|
194
226
|
border-left: 1px solid var(--neutral-200);
|
|
195
227
|
|
|
196
228
|
:deep(.KGrid).is-error & { border-left-color: var(--error-500); }
|
|
197
229
|
:deep(.KGrid).is-warning & { border-left-color: var(--warning-500); }
|
|
198
|
-
:deep(.KGrid).is-success & { border-left-color: var(--success-500); }
|
|
230
|
+
:deep(.KGrid).is-success & { border-left-color: var(--success-500); }*/
|
|
199
231
|
}
|
|
200
232
|
}
|
|
201
233
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { ADataProvider } from '@katlux/providers';
|
|
2
|
+
import type { ICompositeInputConfig } from '../../../../components/KCompositeInput/KCompositeInput.logic.js';
|
|
2
3
|
type __VLS_Props = {
|
|
4
|
+
label?: string;
|
|
3
5
|
selectionValue: any;
|
|
4
6
|
inputValue: any;
|
|
5
7
|
modelValue: any[];
|
|
@@ -17,6 +19,9 @@ type __VLS_Props = {
|
|
|
17
19
|
teleportTo?: string;
|
|
18
20
|
validation?: 'success' | 'warning' | 'error' | null;
|
|
19
21
|
validationText?: string;
|
|
22
|
+
inputConfigField?: string;
|
|
23
|
+
validateAll?: boolean;
|
|
24
|
+
resolvedInputConfig?: ICompositeInputConfig;
|
|
20
25
|
};
|
|
21
26
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
22
27
|
"update:selectionValue": (value: any) => any;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
2
|
.KDatePicker(ref="activatorRef")
|
|
3
|
+
label.k-input-label(v-if="label") {{ label }}
|
|
3
4
|
KMaskTextbox(
|
|
4
5
|
v-model="maskedModel"
|
|
5
6
|
:key="maskedModel"
|
|
@@ -24,6 +25,7 @@ import type {
|
|
|
24
25
|
} from '../../../../components/KCalendar/types'
|
|
25
26
|
|
|
26
27
|
const props = defineProps<{
|
|
28
|
+
label?: string
|
|
27
29
|
maskedModel: string
|
|
28
30
|
calendarShow: boolean
|
|
29
31
|
_date: any
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
2
|
.KDateTimePicker(ref="activatorRef" @click.stop="textboxClicked")
|
|
3
|
+
label.k-input-label(v-if="label") {{ label }}
|
|
3
4
|
KMaskTextbox(
|
|
4
5
|
v-model="maskedModel"
|
|
5
6
|
:key="maskedModel"
|
|
@@ -28,6 +29,7 @@ import type {
|
|
|
28
29
|
} from '../../../../components/KCalendar/types'
|
|
29
30
|
|
|
30
31
|
const props = defineProps<{
|
|
32
|
+
label?: string
|
|
31
33
|
maskedModel: string
|
|
32
34
|
calendarShow: boolean
|
|
33
35
|
_date: any
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
2
|
.KHourPicker(ref="activatorRef")
|
|
3
|
+
label.k-input-label(v-if="label") {{ label }}
|
|
3
4
|
KMaskTextbox(
|
|
4
5
|
v-model:maskedValue="maskedModel"
|
|
5
6
|
:mask="format"
|
|
@@ -35,6 +36,7 @@ import KHourSelect from '../../../../components/KHourSelect/KHourSelect.global.v
|
|
|
35
36
|
import KMaskTextbox from '../../../../components/KMaskTextbox/KMaskTextbox.global.vue'
|
|
36
37
|
|
|
37
38
|
const props = defineProps<{
|
|
39
|
+
label?: string
|
|
38
40
|
maskedModel: string
|
|
39
41
|
isOpen: boolean
|
|
40
42
|
step: number
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
2
|
.KHourSelect
|
|
3
|
+
label.k-input-label(v-if="label") {{ label }}
|
|
3
4
|
.time-list
|
|
4
5
|
.time-item(
|
|
5
6
|
v-for="time in timeSlots"
|
|
@@ -11,6 +12,7 @@
|
|
|
11
12
|
|
|
12
13
|
<script lang="ts" setup>
|
|
13
14
|
const props = defineProps<{
|
|
15
|
+
label?: string
|
|
14
16
|
timeSlots: string[]
|
|
15
17
|
selectedTime: string
|
|
16
18
|
selectTime: (time: string) => void
|