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

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 (137) hide show
  1. package/dist/compiled/composables/usePresetComponent.mjs +21 -16
  2. package/dist/module.cjs +52 -0
  3. package/dist/module.json +1 -1
  4. package/dist/module.mjs +52 -0
  5. package/dist/runtime/components/KCalendar/KCalendar.global.d.vue.ts +11 -12
  6. package/dist/runtime/components/KCalendar/KCalendar.global.vue.d.ts +11 -12
  7. package/dist/runtime/components/KCalendar/KCalendar.logic.d.ts +1 -0
  8. package/dist/runtime/components/KCalendar/KCalendar.logic.js +25 -10
  9. package/dist/runtime/components/KCombobox/KCombobox.global.d.vue.ts +18 -10
  10. package/dist/runtime/components/KCombobox/KCombobox.global.vue +6 -2
  11. package/dist/runtime/components/KCombobox/KCombobox.global.vue.d.ts +18 -10
  12. package/dist/runtime/components/KCombobox/KCombobox.logic.d.ts +78 -0
  13. package/dist/runtime/components/KCombobox/KCombobox.logic.js +8 -3
  14. package/dist/runtime/components/KCompositeInput/KCompositeInput.global.d.vue.ts +149 -0
  15. package/dist/runtime/components/KCompositeInput/KCompositeInput.global.vue +65 -0
  16. package/dist/runtime/components/KCompositeInput/KCompositeInput.global.vue.d.ts +149 -0
  17. package/dist/runtime/components/KCompositeInput/KCompositeInput.logic.d.ts +116 -0
  18. package/dist/runtime/components/KCompositeInput/KCompositeInput.logic.js +149 -0
  19. package/dist/runtime/components/KDatePicker/KDatePicker.global.d.vue.ts +56 -8
  20. package/dist/runtime/components/KDatePicker/KDatePicker.global.vue +23 -3
  21. package/dist/runtime/components/KDatePicker/KDatePicker.global.vue.d.ts +56 -8
  22. package/dist/runtime/components/KDatePicker/KDatePicker.logic.d.ts +22 -1
  23. package/dist/runtime/components/KDatePicker/KDatePicker.logic.js +89 -7
  24. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.d.vue.ts +54 -8
  25. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue +23 -3
  26. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue.d.ts +54 -8
  27. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.logic.d.ts +22 -1
  28. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.logic.js +148 -7
  29. package/dist/runtime/components/KDropdown/KDropdown.global.d.vue.ts +18 -0
  30. package/dist/runtime/components/KDropdown/KDropdown.global.vue +13 -4
  31. package/dist/runtime/components/KDropdown/KDropdown.global.vue.d.ts +18 -0
  32. package/dist/runtime/components/KDropdown/KDropdown.logic.d.ts +28 -1
  33. package/dist/runtime/components/KDropdown/KDropdown.logic.js +85 -4
  34. package/dist/runtime/components/KGrid/KGrid.global.d.vue.ts +7 -56
  35. package/dist/runtime/components/KGrid/KGrid.global.vue +9 -2
  36. package/dist/runtime/components/KGrid/KGrid.global.vue.d.ts +7 -56
  37. package/dist/runtime/components/KHourPicker/KHourPicker.global.d.vue.ts +20 -0
  38. package/dist/runtime/components/KHourPicker/KHourPicker.global.vue +25 -12
  39. package/dist/runtime/components/KHourPicker/KHourPicker.global.vue.d.ts +20 -0
  40. package/dist/runtime/components/KHourPicker/KHourPicker.logic.d.ts +14 -3
  41. package/dist/runtime/components/KHourPicker/KHourPicker.logic.js +25 -10
  42. package/dist/runtime/components/KHourSelect/KHourSelect.logic.js +4 -1
  43. package/dist/runtime/components/KIcon/KIcon.global.d.vue.ts +1 -1
  44. package/dist/runtime/components/KIcon/KIcon.global.vue.d.ts +1 -1
  45. package/dist/runtime/components/KIcon/KIcon.logic.d.ts +1 -1
  46. package/dist/runtime/components/KIcon/KIcon.logic.js +13 -8
  47. package/dist/runtime/components/KLoader/KLoader.global.d.vue.ts +3 -3
  48. package/dist/runtime/components/KLoader/KLoader.global.vue.d.ts +3 -3
  49. package/dist/runtime/components/KLoader/KLoader.logic.d.ts +8 -1
  50. package/dist/runtime/components/KLoader/KLoader.logic.js +1 -0
  51. package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.vue +1 -1
  52. package/dist/runtime/components/KModal/KModal.global.vue +4 -1
  53. package/dist/runtime/components/KModal/KModal.logic.d.ts +3 -1
  54. package/dist/runtime/components/KModal/KModal.logic.js +6 -2
  55. package/dist/runtime/components/KPanel/KPanel.global.d.vue.ts +5 -28
  56. package/dist/runtime/components/KPanel/KPanel.global.vue +12 -4
  57. package/dist/runtime/components/KPanel/KPanel.global.vue.d.ts +5 -28
  58. package/dist/runtime/components/KPanel/KPanel.logic.d.ts +10 -0
  59. package/dist/runtime/components/KPanel/KPanel.logic.js +8 -0
  60. package/dist/runtime/components/KTextbox/KTextbox.global.d.vue.ts +15 -2
  61. package/dist/runtime/components/KTextbox/KTextbox.global.vue +5 -4
  62. package/dist/runtime/components/KTextbox/KTextbox.global.vue.d.ts +15 -2
  63. package/dist/runtime/components/KTextbox/KTextbox.logic.d.ts +10 -4
  64. package/dist/runtime/components/KTextbox/KTextbox.logic.js +12 -5
  65. package/dist/runtime/components/KTree/KTree.global.d.vue.ts +1 -1
  66. package/dist/runtime/components/KTree/KTree.global.vue.d.ts +1 -1
  67. package/dist/runtime/components/KTreePicker/KTreePicker.global.d.vue.ts +2 -2
  68. package/dist/runtime/components/KTreePicker/KTreePicker.global.vue.d.ts +2 -2
  69. package/dist/runtime/components/KTreePicker/KTreePicker.logic.d.ts +77 -0
  70. package/dist/runtime/composables/usePresetComponent.d.ts +16 -0
  71. package/dist/runtime/composables/usePresetComponent.js +21 -16
  72. package/dist/runtime/presets/default/assets/scss/css-variables.css +64 -13
  73. package/dist/runtime/presets/default/assets/scss/css-variables.scss +286 -0
  74. package/dist/runtime/presets/default/assets/scss/docs.scss +52 -0
  75. package/dist/runtime/presets/default/assets/scss/index.css +72 -13
  76. package/dist/runtime/presets/default/assets/scss/index.scss +12 -0
  77. package/dist/runtime/presets/default/assets/scss/mixins.scss +94 -0
  78. package/dist/runtime/presets/default/assets/scss/reset.scss +16 -0
  79. package/dist/runtime/presets/default/components/KAccordion/KAccordion.vue +5 -2
  80. package/dist/runtime/presets/default/components/KAccordion/KAccordionItem.vue +40 -37
  81. package/dist/runtime/presets/default/components/KBulkActions/KBulkActions.vue +29 -22
  82. package/dist/runtime/presets/default/components/KButton/KButton.vue +147 -428
  83. package/dist/runtime/presets/default/components/KCalendar/KCalendar.vue +57 -53
  84. package/dist/runtime/presets/default/components/KCalendar/KCalendarMonth.vue +189 -161
  85. package/dist/runtime/presets/default/components/KCheckbox/KCheckbox.vue +46 -36
  86. package/dist/runtime/presets/default/components/KCombobox/KCombobox.d.vue.ts +3 -0
  87. package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue +90 -70
  88. package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue.d.ts +3 -0
  89. package/dist/runtime/presets/default/components/KCombobox/KComboboxList.vue +78 -60
  90. package/dist/runtime/presets/default/components/KCompositeInput/KCompositeInput.d.vue.ts +27 -0
  91. package/dist/runtime/presets/default/components/KCompositeInput/KCompositeInput.vue +190 -0
  92. package/dist/runtime/presets/default/components/KCompositeInput/KCompositeInput.vue.d.ts +27 -0
  93. package/dist/runtime/presets/default/components/KDataIterator/KDataIterator.vue +40 -31
  94. package/dist/runtime/presets/default/components/KDatatable/KDatatable.vue +110 -92
  95. package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.d.vue.ts +3 -0
  96. package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue +44 -25
  97. package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue.d.ts +3 -0
  98. package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.d.vue.ts +3 -0
  99. package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.vue +68 -52
  100. package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.vue.d.ts +3 -0
  101. package/dist/runtime/presets/default/components/KDropdown/KDropdown.d.vue.ts +8 -0
  102. package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue +46 -25
  103. package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue.d.ts +8 -0
  104. package/dist/runtime/presets/default/components/KGantt/KGantt.vue +337 -241
  105. package/dist/runtime/presets/default/components/KGantt/KGanttRuler.vue +40 -35
  106. package/dist/runtime/presets/default/components/KGantt/KGanttTimeline.vue +170 -140
  107. package/dist/runtime/presets/default/components/KGrid/KGrid.vue +62 -60
  108. package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.d.vue.ts +6 -2
  109. package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.vue +44 -28
  110. package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.vue.d.ts +6 -2
  111. package/dist/runtime/presets/default/components/KHourSelect/KHourSelect.vue +34 -28
  112. package/dist/runtime/presets/default/components/KIcon/KIcon.d.vue.ts +1 -1
  113. package/dist/runtime/presets/default/components/KIcon/KIcon.vue +31 -22
  114. package/dist/runtime/presets/default/components/KIcon/KIcon.vue.d.ts +1 -1
  115. package/dist/runtime/presets/default/components/KLoader/KLoader.vue +53 -47
  116. package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.vue +113 -84
  117. package/dist/runtime/presets/default/components/KModal/KModal.d.vue.ts +1 -0
  118. package/dist/runtime/presets/default/components/KModal/KModal.vue +64 -35
  119. package/dist/runtime/presets/default/components/KModal/KModal.vue.d.ts +1 -0
  120. package/dist/runtime/presets/default/components/KPagination/KPagination.vue +42 -40
  121. package/dist/runtime/presets/default/components/KPanel/KPanel.d.vue.ts +3 -0
  122. package/dist/runtime/presets/default/components/KPanel/KPanel.vue +95 -34
  123. package/dist/runtime/presets/default/components/KPanel/KPanel.vue.d.ts +3 -0
  124. package/dist/runtime/presets/default/components/KRadiobox/KRadiobox.vue +30 -29
  125. package/dist/runtime/presets/default/components/KRangeSlider/KRangeSlider.vue +158 -125
  126. package/dist/runtime/presets/default/components/KSlider/KSlider.vue +123 -100
  127. package/dist/runtime/presets/default/components/KTabs/KTabItem.vue +40 -37
  128. package/dist/runtime/presets/default/components/KTabs/KTabs.vue +9 -6
  129. package/dist/runtime/presets/default/components/KTextarea/KTextarea.vue +23 -20
  130. package/dist/runtime/presets/default/components/KTextbox/KTextbox.d.vue.ts +2 -1
  131. package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue +49 -36
  132. package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue.d.ts +2 -1
  133. package/dist/runtime/presets/default/components/KTree/KTree.vue +102 -80
  134. package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.vue +55 -34
  135. package/dist/runtime/presets/default/components/KTreeView/KTreeCell.vue +31 -30
  136. package/dist/runtime/presets/default/components/KTreeView/KTreeView.vue +34 -27
  137. package/package.json +5 -5
@@ -1,6 +1,6 @@
1
1
  <template lang="pug">
2
- .KCombobox(v-click-outside="closeDropdown" :class="{ disabled: disabled, open: isOptionsOpen }")
3
- KGrid(@click.stop="toggleDropdown" align="center" justify="space-between").KCombobox__selected-content-container
2
+ .KCombobox(ref="activatorRef" :class="{ disabled: disabled, open: isOptionsOpen }")
3
+ KGrid(@click.stop="toggleDropdown" align="center" justify="space-between").KCombobox__selected-content-container
4
4
  KGrid(align="center" wrap="no-wrap").KCombobox__selected-content
5
5
  .KCombobox__selected-content-item(
6
6
  v-if="getSelectedContent().length>0"
@@ -8,8 +8,8 @@
8
8
  :key="item.value || item.id || index"
9
9
  ) {{ item[labelField] }}
10
10
  .KCombobox__selected-content-placeholder(v-else) {{placeholder}}
11
- KIcon(iconname="chevron" width="12" height="12").chevron
12
- KDropdown(:isOpen="isOptionsOpen" fullWidth).KCombobox__options
11
+ KIcon(iconname="chevron" width="20" height="20").chevron
12
+ KDropdown(v-model:isOpen="isOptionsOpenModel" :anchorEl="activatorRef" fullWidth :teleportTo="teleportTo").KCombobox__options
13
13
  slot
14
14
  KComboboxList(
15
15
  :searchbox="searchbox"
@@ -22,75 +22,95 @@
22
22
  )
23
23
  </template>
24
24
 
25
- <script setup>
26
- import KComboboxList from "./KComboboxList.vue";
27
- const props = defineProps({
28
- disabled: { type: Boolean, required: true },
29
- isOptionsOpen: { type: Boolean, required: true },
30
- labelField: { type: String, required: true },
31
- placeholder: { type: String, required: true },
32
- searchbox: { type: Boolean, required: true },
33
- searchtext: { type: String, required: true },
34
- filteredOptions: { type: Array, required: true },
35
- getSelectedContent: { type: Function, required: true },
36
- toggleDropdown: { type: Function, required: true },
37
- closeDropdown: { type: Function, required: true },
38
- selectItem: { type: Function, required: true },
39
- isSelected: { type: Function, required: true },
40
- loading: { type: Boolean, required: true }
41
- });
42
- const emit = defineEmits(["update:searchtext"]);
25
+ <script lang="ts" setup>
26
+ import { computed, ref } from 'vue'
27
+ const activatorRef = ref<HTMLElement | null>(null)
28
+ import KComboboxList from './KComboboxList.vue'
29
+ import type { ComboboxItem } from '../../../../components/KCombobox/KCombobox.logic'
30
+
31
+ const props = defineProps<{
32
+ disabled: boolean
33
+ isOptionsOpen: boolean
34
+ labelField: string
35
+ placeholder: string
36
+ searchbox: boolean
37
+ searchtext: string
38
+ filteredOptions: any[]
39
+ getSelectedContent: () => any[]
40
+ toggleDropdown: () => void
41
+ closeDropdown: () => void
42
+ selectItem: (option: ComboboxItem) => void
43
+ isSelected: (option: ComboboxItem) => boolean
44
+ loading: boolean
45
+ teleportTo?: string
46
+ }>()
47
+
48
+ const emit = defineEmits<{
49
+ (e: 'update:searchtext', value: string): void
50
+ (e: 'update:isOptionsOpen', value: boolean): void
51
+ }>()
52
+
43
53
  const searchtextModel = computed({
44
- get: () => props.searchtext,
45
- set: (value) => emit("update:searchtext", value)
46
- });
54
+ get: () => props.searchtext,
55
+ set: (value) => emit('update:searchtext', value)
56
+ })
57
+
58
+ const isOptionsOpenModel = computed({
59
+ get: () => props.isOptionsOpen,
60
+ set: (value) => emit('update:isOptionsOpen', value)
61
+ })
47
62
  </script>
48
63
 
49
- <style scoped>
64
+ <style lang="scss" scoped>
50
65
  .KCombobox {
51
- box-sizing: border-box;
52
- width: 200px;
53
- border: var(--input-border);
54
- border-radius: var(--input-border-radius);
55
- padding: 0px var(--component-gap);
56
- background-color: var(--neutral-50);
57
- height: 40px;
58
- position: relative;
59
- }
60
- .KCombobox__selected-content-container {
61
- cursor: pointer;
62
- box-sizing: border-box;
63
- height: 100%;
64
- }
65
- .KCombobox .chevron {
66
- transform: rotate(90deg);
67
- transition: transform 0.3s ease-in-out;
68
- }
69
- .KCombobox.open .chevron {
70
- transform: rotate(270deg);
71
- }
72
- .KCombobox.disabled {
73
- opacity: 0.5;
74
- cursor: not-allowed;
75
- }
76
- .KCombobox__selected-content {
77
- height: 100%;
78
- max-width: calc(100% - 40px);
79
- text-overflow: ellipsis;
80
- overflow: hidden;
81
- white-space: nowrap;
82
- gap: var(--component-gap);
83
- }
84
- .KCombobox__selected-content-item {
85
- padding: calc(var(--component-gap) / 2);
86
- border: var(--input-border);
87
- border-radius: var(--input-border-radius);
88
- background-color: var(--input-button-bg);
89
- }
90
- .KCombobox__selected-content-item:hover {
91
- background-color: var(--input-button-hover-bg);
92
- }
93
- .KCombobox__selected-content-placeholder {
94
- color: var(--neutral-400);
66
+ box-sizing: border-box;
67
+ border: var(--input-border);
68
+ border-radius: var(--input-border-radius);
69
+ padding: 0px var(--component-gap);
70
+
71
+ background-color: var(--neutral-50);
72
+ height: 40px;
73
+ position: relative;
74
+ &__selected-content-container {
75
+ cursor: pointer;
76
+
77
+ box-sizing: border-box;
78
+ height: 100%;
79
+ }
80
+ .chevron {
81
+ transform: rotate(90deg);
82
+ transition: transform 0.3s ease-in-out;
83
+ flex-shrink: 0;
84
+ min-width: 20px;
85
+ }
86
+ &.open {
87
+ .chevron {
88
+ transform: rotate(270deg);
89
+ }
90
+ }
91
+ &.disabled {
92
+ opacity: 0.5;
93
+ cursor: not-allowed;
94
+ }
95
+ &__selected-content {
96
+ height: 100%;
97
+ max-width: calc(100% - 40px);
98
+ text-overflow: ellipsis;
99
+ overflow: hidden;
100
+ white-space: nowrap;
101
+ gap: var(--component-gap);
102
+ &-item {
103
+ padding: calc(var(--component-gap) / 2);
104
+ border: var(--input-border);
105
+ border-radius: var(--input-border-radius);
106
+ background-color: var(--input-button-bg);
107
+ &:hover {
108
+ background-color: var(--input-button-hover-bg);
109
+ }
110
+ }
111
+ }
112
+ &__selected-content-placeholder {
113
+ color: var(--neutral-400);
114
+ }
95
115
  }
96
116
  </style>
@@ -13,11 +13,14 @@ type __VLS_Props = {
13
13
  selectItem: (option: ComboboxItem) => void;
14
14
  isSelected: (option: ComboboxItem) => boolean;
15
15
  loading: boolean;
16
+ teleportTo?: string;
16
17
  };
17
18
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
18
19
  "update:searchtext": (value: string) => any;
20
+ "update:isOptionsOpen": (value: boolean) => any;
19
21
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
20
22
  "onUpdate:searchtext"?: ((value: string) => any) | undefined;
23
+ "onUpdate:isOptionsOpen"?: ((value: boolean) => any) | undefined;
21
24
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
25
  declare const _default: typeof __VLS_export;
23
26
  export default _default;
@@ -1,6 +1,6 @@
1
1
  <template lang="pug">
2
2
  .KCombobox__options-content
3
- KTextbox(v-if="searchbox" v-model="searchtextModel" placeholder="Search..." showClear)
3
+ KTextbox(v-if="searchbox" v-model="searchtextModel" placeholder="Search..." :showClear="true")
4
4
  .KCombobox__loading(v-if="loading")
5
5
  .KCombobox__loading-spinner
6
6
  ul.KCombobox__options-list(v-else)
@@ -10,73 +10,91 @@
10
10
  @click.stop="selectItem(option)"
11
11
  )
12
12
  KGrid(align="center" justify="space-between" wrap="nowrap")
13
- span {{ option[labelField] }}
13
+ span.KCombobox__options-list-item__text {{ option[labelField] }}
14
14
  KIcon(iconname="check" width="12" height="12" :class="{'visible': isSelected(option)}")
15
15
  </template>
16
16
 
17
- <script setup>
18
- const props = defineProps({
19
- searchbox: { type: Boolean, required: true },
20
- searchtext: { type: String, required: true },
21
- loading: { type: Boolean, required: true },
22
- filteredOptions: { type: Array, required: true },
23
- labelField: { type: String, required: true },
24
- selectItem: { type: Function, required: true },
25
- isSelected: { type: Function, required: true }
26
- });
27
- const emit = defineEmits(["update:searchtext"]);
17
+ <script lang="ts" setup>
18
+ import { computed } from 'vue'
19
+ import type { ComboboxItem } from '../../../../components/KCombobox/KCombobox.logic'
20
+
21
+ const props = defineProps<{
22
+ searchbox: boolean
23
+ searchtext: string
24
+ loading: boolean
25
+ filteredOptions: any[]
26
+ labelField: string
27
+ selectItem: (option: ComboboxItem) => void
28
+ isSelected: (option: ComboboxItem) => boolean
29
+ }>()
30
+
31
+ const emit = defineEmits<{
32
+ (e: 'update:searchtext', value: string): void
33
+ }>()
34
+
28
35
  const searchtextModel = computed({
29
- get: () => props.searchtext,
30
- set: (value) => emit("update:searchtext", value)
31
- });
36
+ get: () => props.searchtext,
37
+ set: (value) => emit('update:searchtext', value)
38
+ })
32
39
  </script>
33
40
 
34
- <style scoped>
35
- .KCombobox__options-content {
36
- margin: -var(--grid-gap);
37
- }
38
- .KCombobox__options-list {
39
- max-height: 500px;
40
- overflow-y: auto;
41
- }
42
- .KCombobox__options-list-item {
43
- cursor: pointer;
44
- height: 40px;
45
- padding: 10px;
46
- box-sizing: border-box;
47
- border-bottom: 1px solid var(--border-color-light);
48
- }
49
- .KCombobox__options-list-item:hover {
50
- background-color: var(--background-color-medium);
51
- }
52
- .KCombobox__options-list-item:last-child {
53
- border-bottom: none;
54
- }
55
- .KCombobox__options-list .KIcon {
56
- visibility: hidden;
57
- }
58
- .KCombobox__options-list .KIcon.visible {
59
- visibility: visible;
60
- width: 12px;
41
+ <style lang="scss" scoped>
42
+ .KCombobox__options {
43
+ &-content {
44
+ margin: -var(--grid-gap);
45
+ }
46
+ &-list {
47
+ max-height: 500px;
48
+ overflow-y: auto;
49
+ &-item {
50
+ cursor: pointer;
51
+ height: 40px;
52
+ padding: 10px;
53
+ box-sizing: border-box;
54
+
55
+ border-bottom: 1px solid var(--border-color-light);
56
+ &:hover {
57
+ background-color: var(--background-color-medium);
58
+ }
59
+ &:last-child {
60
+ border-bottom: none;
61
+ }
62
+ &__text {
63
+ text-overflow: ellipsis;
64
+ overflow: hidden;
65
+ white-space: nowrap;
66
+ }
67
+ }
68
+
69
+ .KIcon {
70
+ visibility: hidden;
71
+ &.visible {
72
+ visibility: visible;
73
+ width: 12px;
74
+ }
75
+ }
76
+ }
61
77
  }
62
78
 
63
79
  .KCombobox__loading {
64
- padding: 10px;
65
- display: flex;
66
- justify-content: center;
67
- align-items: center;
68
- }
69
- .KCombobox__loading-spinner {
70
- width: 20px;
71
- height: 20px;
72
- border: 2px solid var(--border-color-light);
73
- border-top-color: var(--primary-color-500);
74
- border-radius: 50%;
75
- animation: spin 0.8s linear infinite;
76
- }
77
- @keyframes spin {
78
- to {
79
- transform: rotate(360deg);
80
- }
80
+ padding: 10px;
81
+ display: flex;
82
+ justify-content: center;
83
+ align-items: center;
84
+
85
+ &-spinner {
86
+ width: 20px;
87
+ height: 20px;
88
+ border: 2px solid var(--border-color-light);
89
+ border-top-color: var(--primary-color-500);
90
+ border-radius: 50%;
91
+ animation: spin 0.8s linear infinite;
92
+ }
93
+
94
+ @keyframes spin {
95
+ to {
96
+ transform: rotate(360deg);
97
+ }
98
+ }
81
99
  }
82
100
  </style>
@@ -0,0 +1,27 @@
1
+ import type { ADataProvider } from '@katlux/providers';
2
+ type __VLS_Props = {
3
+ selectionValue: any;
4
+ inputValue: any;
5
+ modelValue: any[];
6
+ dataProvider: ADataProvider;
7
+ type: string;
8
+ selectionSide: string;
9
+ inputType: any;
10
+ mask: string;
11
+ labelField: string;
12
+ valueField: string;
13
+ placeholder: string;
14
+ inputPlaceholder: string;
15
+ searchbox: boolean;
16
+ showClear: boolean;
17
+ teleportTo?: string;
18
+ };
19
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
20
+ "update:selectionValue": (value: any) => any;
21
+ "update:inputValue": (value: any) => any;
22
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
23
+ "onUpdate:selectionValue"?: ((value: any) => any) | undefined;
24
+ "onUpdate:inputValue"?: ((value: any) => any) | undefined;
25
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
26
+ declare const _default: typeof __VLS_export;
27
+ export default _default;
@@ -0,0 +1,190 @@
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
40
+ KCombobox(
41
+ v-model="inputValue"
42
+ :dataProvider="dataProvider"
43
+ :labelField="labelField"
44
+ :valueField="valueField"
45
+ :placeholder="inputPlaceholder"
46
+ :searchbox="searchbox"
47
+ :teleportTo="teleportTo"
48
+ )
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
+ )
67
+ </template>
68
+
69
+ <script lang="ts" setup>
70
+ import { computed } from 'vue'
71
+ import type { ADataProvider } from '@katlux/providers'
72
+
73
+ const props = defineProps<{
74
+ selectionValue: any
75
+ inputValue: any
76
+ modelValue: any[]
77
+ dataProvider: ADataProvider
78
+ type: string
79
+ selectionSide: string
80
+ inputType: any
81
+ mask: string
82
+ labelField: string
83
+ valueField: string
84
+ placeholder: string
85
+ inputPlaceholder: string
86
+ searchbox: boolean
87
+ showClear: boolean
88
+ teleportTo?: string
89
+ }>()
90
+
91
+ const emit = defineEmits<{
92
+ (e: 'update:selectionValue', value: any): void
93
+ (e: 'update:inputValue', value: any): void
94
+ }>()
95
+
96
+ const selectionValue = computed({
97
+ get: () => props.selectionValue,
98
+ set: (val) => emit('update:selectionValue', val)
99
+ })
100
+
101
+ const inputValue = computed({
102
+ get: () => props.inputValue,
103
+ set: (val) => emit('update:inputValue', val)
104
+ })
105
+
106
+ const selectionStyle = computed(() => ({
107
+ width: '120px', // Default width for selection, can be made prop if needed
108
+ flex: '0 0 auto'
109
+ }))
110
+ </script>
111
+
112
+ <style lang="scss" scoped>
113
+ .KCompositeInput {
114
+ width: 100%;
115
+
116
+ :deep(.KGrid) {
117
+ border: 1px solid var(--neutral-200);
118
+ border-radius: var(--radius-md);
119
+ overflow: hidden;
120
+ background: var(--neutral-50);
121
+
122
+ &:focus-within {
123
+ border-color: var(--primary-500);
124
+ box-shadow: 0 0 0 2px var(--primary-100);
125
+ }
126
+ }
127
+
128
+ &-selection {
129
+ border-right: 1px solid var(--neutral-200);
130
+
131
+ :deep(.KCombobox) {
132
+ .KCombobox-trigger {
133
+ border: none !important;
134
+ border-radius: 0 !important;
135
+ background: var(--neutral-100) !important;
136
+ height: 100%;
137
+ }
138
+ }
139
+ }
140
+
141
+ &-main {
142
+ flex: 1;
143
+ min-width: 0;
144
+ display: flex;
145
+ align-items: center;
146
+
147
+ :deep(.KTextbox), :deep(.KTextarea), :deep(.KMaskTextbox), :deep(.KCombobox),
148
+ :deep(.KDatePicker), :deep(.KDateTimePicker), :deep(.KHourPicker) {
149
+ width: 100%;
150
+ border: none !important;
151
+ background: transparent !important;
152
+ box-shadow: none !important;
153
+
154
+ // Target inputs and triggers
155
+ input, textarea, .KCombobox-trigger {
156
+ border: none !important;
157
+ border-radius: 0 !important;
158
+ background: transparent !important;
159
+ box-shadow: none !important;
160
+ outline: none !important;
161
+ padding: 0 12px !important;
162
+ }
163
+
164
+ // Ensure secondary inputs (like in MaskTextbox) are also borderless
165
+ :deep(.KTextbox), :deep(.KMaskTextbox) {
166
+ border: none !important;
167
+ background: transparent !important;
168
+ 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;
176
+ }
177
+ }
178
+ }
179
+
180
+ &.selection-right {
181
+ .KGrid {
182
+ flex-direction: row-reverse;
183
+ }
184
+ .KCompositeInput-selection {
185
+ border-right: none;
186
+ border-left: 1px solid var(--neutral-200);
187
+ }
188
+ }
189
+ }
190
+ </style>
@@ -0,0 +1,27 @@
1
+ import type { ADataProvider } from '@katlux/providers';
2
+ type __VLS_Props = {
3
+ selectionValue: any;
4
+ inputValue: any;
5
+ modelValue: any[];
6
+ dataProvider: ADataProvider;
7
+ type: string;
8
+ selectionSide: string;
9
+ inputType: any;
10
+ mask: string;
11
+ labelField: string;
12
+ valueField: string;
13
+ placeholder: string;
14
+ inputPlaceholder: string;
15
+ searchbox: boolean;
16
+ showClear: boolean;
17
+ teleportTo?: string;
18
+ };
19
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
20
+ "update:selectionValue": (value: any) => any;
21
+ "update:inputValue": (value: any) => any;
22
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
23
+ "onUpdate:selectionValue"?: ((value: any) => any) | undefined;
24
+ "onUpdate:inputValue"?: ((value: any) => any) | undefined;
25
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
26
+ declare const _default: typeof __VLS_export;
27
+ export default _default;