@katlux/toolkit 0.1.0-beta.50 → 0.1.0-beta.52
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.global.d.vue.ts +1 -1
- package/dist/runtime/components/KButton/KButton.global.vue.d.ts +1 -1
- package/dist/runtime/components/KButton/KButton.logic.d.ts +1 -1
- package/dist/runtime/components/KCheckbox/KCheckbox.global.d.vue.ts +21 -0
- package/dist/runtime/components/KCheckbox/KCheckbox.global.vue +3 -1
- package/dist/runtime/components/KCheckbox/KCheckbox.global.vue.d.ts +21 -0
- package/dist/runtime/components/KCheckbox/KCheckbox.logic.d.ts +11 -0
- package/dist/runtime/components/KCheckbox/KCheckbox.logic.js +9 -0
- package/dist/runtime/components/KCombobox/KCombobox.global.d.vue.ts +47 -6
- package/dist/runtime/components/KCombobox/KCombobox.global.vue +9 -3
- package/dist/runtime/components/KCombobox/KCombobox.global.vue.d.ts +47 -6
- package/dist/runtime/components/KCombobox/KCombobox.logic.d.ts +25 -3
- package/dist/runtime/components/KCombobox/KCombobox.logic.js +61 -6
- package/dist/runtime/components/KCompositeInput/KCompositeInput.global.d.vue.ts +29 -9
- package/dist/runtime/components/KCompositeInput/KCompositeInput.global.vue +2 -21
- package/dist/runtime/components/KCompositeInput/KCompositeInput.global.vue.d.ts +29 -9
- package/dist/runtime/components/KCompositeInput/KCompositeInput.logic.d.ts +15 -4
- package/dist/runtime/components/KCompositeInput/KCompositeInput.logic.js +16 -5
- 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 +22 -1
- package/dist/runtime/components/KDatePicker/KDatePicker.global.vue +3 -1
- package/dist/runtime/components/KDatePicker/KDatePicker.global.vue.d.ts +22 -1
- package/dist/runtime/components/KDatePicker/KDatePicker.logic.d.ts +11 -0
- package/dist/runtime/components/KDatePicker/KDatePicker.logic.js +9 -0
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.d.vue.ts +22 -1
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue +3 -1
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue.d.ts +22 -1
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.logic.d.ts +11 -0
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.logic.js +9 -0
- package/dist/runtime/components/KHourPicker/KHourPicker.global.d.vue.ts +21 -0
- package/dist/runtime/components/KHourPicker/KHourPicker.global.vue +3 -1
- package/dist/runtime/components/KHourPicker/KHourPicker.global.vue.d.ts +21 -0
- package/dist/runtime/components/KHourPicker/KHourPicker.logic.d.ts +12 -0
- package/dist/runtime/components/KHourPicker/KHourPicker.logic.js +9 -0
- package/dist/runtime/components/KLoader/KLoader.global.d.vue.ts +1 -1
- package/dist/runtime/components/KLoader/KLoader.global.vue.d.ts +1 -1
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.d.vue.ts +21 -0
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.vue +3 -1
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.vue.d.ts +21 -0
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.logic.d.ts +11 -0
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.logic.js +9 -0
- package/dist/runtime/components/KRadiobox/KRadiobox.global.d.vue.ts +21 -0
- package/dist/runtime/components/KRadiobox/KRadiobox.global.vue +3 -1
- package/dist/runtime/components/KRadiobox/KRadiobox.global.vue.d.ts +21 -0
- package/dist/runtime/components/KRadiobox/KRadiobox.logic.d.ts +11 -0
- package/dist/runtime/components/KRadiobox/KRadiobox.logic.js +9 -0
- package/dist/runtime/components/KTextarea/KTextarea.global.d.vue.ts +21 -0
- package/dist/runtime/components/KTextarea/KTextarea.global.vue +3 -1
- package/dist/runtime/components/KTextarea/KTextarea.global.vue.d.ts +21 -0
- package/dist/runtime/components/KTextarea/KTextarea.logic.d.ts +11 -0
- package/dist/runtime/components/KTextarea/KTextarea.logic.js +9 -0
- package/dist/runtime/components/KTextbox/KTextbox.global.d.vue.ts +20 -0
- package/dist/runtime/components/KTextbox/KTextbox.global.vue +3 -1
- package/dist/runtime/components/KTextbox/KTextbox.global.vue.d.ts +20 -0
- package/dist/runtime/components/KTextbox/KTextbox.logic.d.ts +11 -0
- package/dist/runtime/components/KTextbox/KTextbox.logic.js +9 -0
- package/dist/runtime/components/KToast/KToast.global.d.vue.ts +57 -0
- package/dist/runtime/components/KToast/KToast.global.vue +32 -0
- package/dist/runtime/components/KToast/KToast.global.vue.d.ts +57 -0
- package/dist/runtime/components/KToast/KToast.logic.d.ts +34 -0
- package/dist/runtime/components/KToast/KToast.logic.js +47 -0
- package/dist/runtime/components/KTree/KTree.global.d.vue.ts +1 -1
- package/dist/runtime/components/KTree/KTree.global.vue.d.ts +1 -1
- package/dist/runtime/components/KTreePicker/KTreePicker.global.d.vue.ts +35 -6
- package/dist/runtime/components/KTreePicker/KTreePicker.global.vue +8 -1
- package/dist/runtime/components/KTreePicker/KTreePicker.global.vue.d.ts +35 -6
- package/dist/runtime/components/KTreePicker/KTreePicker.logic.d.ts +17 -0
- package/dist/runtime/components/KTreePicker/KTreePicker.logic.js +18 -1
- package/dist/runtime/presets/default/assets/scss/index.css +27 -0
- package/dist/runtime/presets/default/assets/scss/index.scss +30 -0
- package/dist/runtime/presets/default/components/KCheckbox/KCheckbox.d.vue.ts +2 -0
- package/dist/runtime/presets/default/components/KCheckbox/KCheckbox.vue +10 -6
- package/dist/runtime/presets/default/components/KCheckbox/KCheckbox.vue.d.ts +2 -0
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.d.vue.ts +4 -2
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue +25 -21
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue.d.ts +4 -2
- package/dist/runtime/presets/default/components/KCompositeInput/KCompositeInput.d.vue.ts +2 -0
- package/dist/runtime/presets/default/components/KCompositeInput/KCompositeInput.vue +91 -79
- package/dist/runtime/presets/default/components/KCompositeInput/KCompositeInput.vue.d.ts +2 -0
- package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.d.vue.ts +2 -0
- package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue +13 -1
- package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue.d.ts +2 -0
- package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.d.vue.ts +2 -0
- package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.vue +12 -1
- package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.vue.d.ts +2 -0
- package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.d.vue.ts +2 -0
- package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.vue +4 -0
- package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.vue.d.ts +2 -0
- package/dist/runtime/presets/default/components/KLoader/KLoader.vue +13 -2
- package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.d.vue.ts +2 -0
- package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.vue +4 -0
- package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.vue.d.ts +2 -0
- package/dist/runtime/presets/default/components/KRadiobox/KRadiobox.d.vue.ts +2 -0
- package/dist/runtime/presets/default/components/KRadiobox/KRadiobox.vue +10 -6
- package/dist/runtime/presets/default/components/KRadiobox/KRadiobox.vue.d.ts +2 -0
- package/dist/runtime/presets/default/components/KTextarea/KTextarea.d.vue.ts +2 -0
- package/dist/runtime/presets/default/components/KTextarea/KTextarea.vue +5 -1
- package/dist/runtime/presets/default/components/KTextarea/KTextarea.vue.d.ts +2 -0
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.d.vue.ts +2 -0
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue +7 -3
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue.d.ts +2 -0
- package/dist/runtime/presets/default/components/KToast/KToast.d.vue.ts +17 -0
- package/dist/runtime/presets/default/components/KToast/KToast.vue +118 -0
- package/dist/runtime/presets/default/components/KToast/KToast.vue.d.ts +17 -0
- package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.d.vue.ts +4 -0
- package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.vue +11 -1
- package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.vue.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
|
-
.KCombobox
|
|
3
|
-
|
|
4
|
-
KGrid(align="center"
|
|
5
|
-
.KCombobox__selected-content
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
2
|
+
.KCombobox-wrapper
|
|
3
|
+
.KCombobox(ref="activatorRef" :class="{ disabled: disabled, open: isOptionsOpen, ... (validation ? { [`is-${validation}`]: true } : {}) }")
|
|
4
|
+
KGrid(@click.stop="toggleDropdown" align="center" justify="space-between").KCombobox__selected-content-container
|
|
5
|
+
KGrid(align="center" wrap="no-wrap").KCombobox__selected-content
|
|
6
|
+
.KCombobox__selected-content-item(
|
|
7
|
+
v-if="getSelectedContent().length>0"
|
|
8
|
+
v-for="(item, index) in getSelectedContent()"
|
|
9
|
+
:key="item.value || item.id || index"
|
|
10
|
+
) {{ item[labelField] }}
|
|
11
|
+
.KCombobox__selected-content-placeholder(v-else) {{placeholder}}
|
|
12
|
+
KIcon(iconname="chevron" width="20" height="20").chevron
|
|
13
|
+
KDropdown(v-model:isOpen="isOptionsOpenModel" :anchorEl="activatorRef" fullWidth :teleportTo="teleportTo").KCombobox__options
|
|
14
|
+
slot
|
|
15
|
+
KComboboxList(
|
|
16
|
+
:searchbox="searchbox"
|
|
17
|
+
v-model:searchtext="searchtextModel"
|
|
18
|
+
:loading="loading"
|
|
19
|
+
:filteredOptions="filteredOptions"
|
|
20
|
+
:labelField="labelField"
|
|
21
|
+
:selectItem="selectItem"
|
|
22
|
+
:isSelected="isSelected"
|
|
23
|
+
)
|
|
24
|
+
span.validation-text(v-if="validation && ['success', 'warning', 'error'].includes(validation) && validationText" :class="`is-${validation}`") {{ validationText }}
|
|
23
25
|
</template>
|
|
24
26
|
|
|
25
27
|
<script lang="ts" setup>
|
|
@@ -43,6 +45,8 @@ const props = defineProps<{
|
|
|
43
45
|
isSelected: (option: ComboboxItem) => boolean
|
|
44
46
|
loading: boolean
|
|
45
47
|
teleportTo?: string
|
|
48
|
+
validation?: 'success' | 'warning' | 'error' | null
|
|
49
|
+
validationText?: string
|
|
46
50
|
}>()
|
|
47
51
|
|
|
48
52
|
const emit = defineEmits<{
|
|
@@ -14,13 +14,15 @@ type __VLS_Props = {
|
|
|
14
14
|
isSelected: (option: ComboboxItem) => boolean;
|
|
15
15
|
loading: boolean;
|
|
16
16
|
teleportTo?: string;
|
|
17
|
+
validation?: 'success' | 'warning' | 'error' | null;
|
|
18
|
+
validationText?: string;
|
|
17
19
|
};
|
|
18
20
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
19
|
-
"update:searchtext": (value: string) => any;
|
|
20
21
|
"update:isOptionsOpen": (value: boolean) => any;
|
|
22
|
+
"update:searchtext": (value: string) => any;
|
|
21
23
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
22
|
-
"onUpdate:searchtext"?: ((value: string) => any) | undefined;
|
|
23
24
|
"onUpdate:isOptionsOpen"?: ((value: boolean) => any) | undefined;
|
|
25
|
+
"onUpdate:searchtext"?: ((value: string) => any) | undefined;
|
|
24
26
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
27
|
declare const _default: typeof __VLS_export;
|
|
26
28
|
export default _default;
|
|
@@ -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;
|
|
@@ -1,69 +1,79 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
|
-
.KCompositeInput
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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="
|
|
8
|
+
v-model="selectionValue"
|
|
42
9
|
:dataProvider="dataProvider"
|
|
43
10
|
:labelField="labelField"
|
|
44
11
|
:valueField="valueField"
|
|
45
|
-
:placeholder="
|
|
12
|
+
:placeholder="placeholder"
|
|
46
13
|
:searchbox="searchbox"
|
|
14
|
+
closeOnSelect
|
|
47
15
|
:teleportTo="teleportTo"
|
|
16
|
+
:validation="validation"
|
|
48
17
|
)
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
)
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
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
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
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
|
-
//
|
|
155
|
-
|
|
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
|
-
|
|
161
|
-
padding: 0 12px !important;
|
|
174
|
+
padding: 0 !important;
|
|
162
175
|
}
|
|
163
|
-
|
|
164
|
-
|
|
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
|
-
|
|
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(
|
|
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(
|
|
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="
|
|
2
|
+
.KLoader(:class="computedClasses")
|
|
3
3
|
.KLoader__spinner
|
|
4
|
+
slot
|
|
4
5
|
</template>
|
|
5
6
|
|
|
6
7
|
<script lang="ts" setup>
|
|
7
|
-
|
|
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;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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()
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
|
-
|
|
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
|
|
|
@@ -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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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;
|