@katlux/toolkit 0.1.0-beta.43 → 0.1.0-beta.45
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/KCombobox/KCombobox.global.d.vue.ts +1 -1
- package/dist/runtime/components/KCombobox/KCombobox.global.vue.d.ts +1 -1
- package/dist/runtime/components/KDatePicker/KDatePicker.global.d.vue.ts +41 -2
- package/dist/runtime/components/KDatePicker/KDatePicker.global.vue +10 -1
- package/dist/runtime/components/KDatePicker/KDatePicker.global.vue.d.ts +41 -2
- package/dist/runtime/components/KDatePicker/KDatePicker.logic.d.ts +15 -0
- package/dist/runtime/components/KDatePicker/KDatePicker.logic.js +79 -4
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.d.vue.ts +39 -2
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue +9 -1
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue.d.ts +39 -2
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.logic.d.ts +15 -0
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.logic.js +113 -13
- package/dist/runtime/components/KHourPicker/KHourPicker.global.d.vue.ts +21 -1
- package/dist/runtime/components/KHourPicker/KHourPicker.global.vue +24 -11
- package/dist/runtime/components/KHourPicker/KHourPicker.global.vue.d.ts +21 -1
- package/dist/runtime/components/KHourPicker/KHourPicker.logic.d.ts +14 -3
- package/dist/runtime/components/KHourPicker/KHourPicker.logic.js +25 -10
- package/dist/runtime/components/KHourSelect/KHourSelect.logic.js +4 -1
- package/dist/runtime/components/KTextbox/KTextbox.global.d.vue.ts +3 -2
- package/dist/runtime/components/KTextbox/KTextbox.global.vue +2 -2
- package/dist/runtime/components/KTextbox/KTextbox.global.vue.d.ts +3 -2
- package/dist/runtime/components/KTextbox/KTextbox.logic.d.ts +4 -4
- package/dist/runtime/components/KTextbox/KTextbox.logic.js +4 -4
- package/dist/runtime/components/KTreePicker/KTreePicker.global.d.vue.ts +1 -1
- package/dist/runtime/components/KTreePicker/KTreePicker.global.vue.d.ts +1 -1
- package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.d.vue.ts +2 -0
- package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue +3 -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 +3 -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 +6 -2
- package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.vue +23 -13
- package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.vue.d.ts +6 -2
- package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.vue +6 -1
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.d.vue.ts +1 -1
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue +2 -2
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
|
-
|
|
2
|
+
maskedModel: string;
|
|
3
3
|
isOpen: boolean;
|
|
4
4
|
step: number;
|
|
5
5
|
format: string;
|
|
@@ -7,13 +7,17 @@ type __VLS_Props = {
|
|
|
7
7
|
endHour?: string;
|
|
8
8
|
placeholder: string;
|
|
9
9
|
disabled: boolean;
|
|
10
|
-
|
|
10
|
+
showClear: boolean;
|
|
11
|
+
textboxClicked: () => void;
|
|
11
12
|
closeDropdown: () => void;
|
|
12
13
|
onTimeSelect: (time: string) => void;
|
|
14
|
+
clear: () => void;
|
|
13
15
|
};
|
|
14
16
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
17
|
+
"update:maskedModel": (value: string) => any;
|
|
15
18
|
"update:isOpen": (value: boolean) => any;
|
|
16
19
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
20
|
+
"onUpdate:maskedModel"?: ((value: string) => any) | undefined;
|
|
17
21
|
"onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
|
|
18
22
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
23
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
|
-
.KHourPicker(ref="activatorRef"
|
|
3
|
-
|
|
4
|
-
:
|
|
2
|
+
.KHourPicker(ref="activatorRef")
|
|
3
|
+
KMaskTextbox(
|
|
4
|
+
v-model:maskedValue="maskedModel"
|
|
5
|
+
:mask="format"
|
|
5
6
|
:placeholder="placeholder"
|
|
6
|
-
:
|
|
7
|
-
|
|
8
|
-
@
|
|
7
|
+
:showClear="showClear"
|
|
8
|
+
@click.stop="textboxClicked"
|
|
9
|
+
@clear="clear"
|
|
9
10
|
)
|
|
10
11
|
template(#append)
|
|
11
|
-
KIcon(iconname="clock" clickable @click.stop="
|
|
12
|
+
KIcon(iconname="clock" clickable @click.stop="textboxClicked")
|
|
12
13
|
|
|
13
14
|
KDropdown(
|
|
14
15
|
:isOpen="isOpen"
|
|
@@ -16,7 +17,7 @@
|
|
|
16
17
|
:anchorEl="activatorRef"
|
|
17
18
|
)
|
|
18
19
|
KHourSelect(
|
|
19
|
-
:modelValue="
|
|
20
|
+
:modelValue="maskedModel"
|
|
20
21
|
:step="step"
|
|
21
22
|
:format="format"
|
|
22
23
|
:startHour="startHour"
|
|
@@ -26,12 +27,13 @@
|
|
|
26
27
|
</template>
|
|
27
28
|
|
|
28
29
|
<script lang="ts" setup>
|
|
29
|
-
import { ref } from 'vue'
|
|
30
|
+
import { ref, computed } from 'vue'
|
|
30
31
|
const activatorRef = ref<HTMLElement | null>(null)
|
|
31
32
|
import KHourSelect from '../../../../components/KHourSelect/KHourSelect.global.vue'
|
|
33
|
+
import KMaskTextbox from '../../../../components/KMaskTextbox/KMaskTextbox.global.vue'
|
|
32
34
|
|
|
33
|
-
defineProps<{
|
|
34
|
-
|
|
35
|
+
const props = defineProps<{
|
|
36
|
+
maskedModel: string
|
|
35
37
|
isOpen: boolean
|
|
36
38
|
step: number
|
|
37
39
|
format: string
|
|
@@ -39,14 +41,22 @@ defineProps<{
|
|
|
39
41
|
endHour?: string
|
|
40
42
|
placeholder: string
|
|
41
43
|
disabled: boolean
|
|
42
|
-
|
|
44
|
+
showClear: boolean
|
|
45
|
+
textboxClicked: () => void
|
|
43
46
|
closeDropdown: () => void
|
|
44
47
|
onTimeSelect: (time: string) => void
|
|
48
|
+
clear: () => void
|
|
45
49
|
}>()
|
|
46
50
|
|
|
47
|
-
defineEmits<{
|
|
51
|
+
const emit = defineEmits<{
|
|
48
52
|
(e: 'update:isOpen', value: boolean): void
|
|
53
|
+
(e: 'update:maskedModel', value: string): void
|
|
49
54
|
}>()
|
|
55
|
+
|
|
56
|
+
const maskedModel = computed({
|
|
57
|
+
get: () => props.maskedModel,
|
|
58
|
+
set: (value) => emit('update:maskedModel', value)
|
|
59
|
+
})
|
|
50
60
|
</script>
|
|
51
61
|
|
|
52
62
|
<style lang="scss" scoped>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
|
-
|
|
2
|
+
maskedModel: string;
|
|
3
3
|
isOpen: boolean;
|
|
4
4
|
step: number;
|
|
5
5
|
format: string;
|
|
@@ -7,13 +7,17 @@ type __VLS_Props = {
|
|
|
7
7
|
endHour?: string;
|
|
8
8
|
placeholder: string;
|
|
9
9
|
disabled: boolean;
|
|
10
|
-
|
|
10
|
+
showClear: boolean;
|
|
11
|
+
textboxClicked: () => void;
|
|
11
12
|
closeDropdown: () => void;
|
|
12
13
|
onTimeSelect: (time: string) => void;
|
|
14
|
+
clear: () => void;
|
|
13
15
|
};
|
|
14
16
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
17
|
+
"update:maskedModel": (value: string) => any;
|
|
15
18
|
"update:isOpen": (value: boolean) => any;
|
|
16
19
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
20
|
+
"onUpdate:maskedModel"?: ((value: string) => any) | undefined;
|
|
17
21
|
"onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
|
|
18
22
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
23
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
|
-
.KMaskTextbox
|
|
2
|
+
.KMaskTextbox(@click.stop)
|
|
3
3
|
KTextbox(
|
|
4
4
|
:modelValue="maskedValue"
|
|
5
5
|
:placeholder="placeholder"
|
|
6
6
|
:showClear="showClear"
|
|
7
|
+
:clear="handleClear"
|
|
7
8
|
:maxlength="mask.length"
|
|
8
9
|
@update:modelValue="handleUpdate"
|
|
9
10
|
@beforeinput="handleBeforeInput"
|
|
@@ -118,6 +119,10 @@ const handleBeforeInput = (event: InputEvent) => {
|
|
|
118
119
|
const handleUpdate = (value: string) => {
|
|
119
120
|
emit('update:maskedValue', value)
|
|
120
121
|
}
|
|
122
|
+
|
|
123
|
+
const handleClear = () => {
|
|
124
|
+
emit('clear')
|
|
125
|
+
}
|
|
121
126
|
</script>
|
|
122
127
|
|
|
123
128
|
<style lang="scss" scoped>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
2
|
KGrid(align="center" noGap).KTextbox
|
|
3
3
|
input(:type="props.type" v-model="text" :placeholder="placeholder")
|
|
4
|
-
KIcon(v-if="
|
|
4
|
+
KIcon(v-if="showClear" @click.stop="clear" @mousedown.stop iconname="close" width="12" height="12").closeIcon
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script lang="ts" setup>
|
|
@@ -9,7 +9,7 @@ import { computed } from 'vue'
|
|
|
9
9
|
// Default template for KTextbox
|
|
10
10
|
const props = defineProps<{
|
|
11
11
|
text: string
|
|
12
|
-
|
|
12
|
+
showClear: boolean
|
|
13
13
|
clear: () => void
|
|
14
14
|
placeholder: string
|
|
15
15
|
type: string
|