@katlux/toolkit 0.1.0-beta.6 → 0.1.0-beta.60

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 (185) 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/KBulkActions/KBulkActions.logic.d.ts +9 -2
  6. package/dist/runtime/components/KButton/KButton.logic.d.ts +1 -1
  7. package/dist/runtime/components/KCalendar/KCalendar.global.d.vue.ts +11 -12
  8. package/dist/runtime/components/KCalendar/KCalendar.global.vue.d.ts +11 -12
  9. package/dist/runtime/components/KCalendar/KCalendar.logic.d.ts +1 -0
  10. package/dist/runtime/components/KCalendar/KCalendar.logic.js +25 -10
  11. package/dist/runtime/components/KCheckbox/KCheckbox.global.d.vue.ts +30 -0
  12. package/dist/runtime/components/KCheckbox/KCheckbox.global.vue +4 -1
  13. package/dist/runtime/components/KCheckbox/KCheckbox.global.vue.d.ts +30 -0
  14. package/dist/runtime/components/KCheckbox/KCheckbox.logic.d.ts +17 -0
  15. package/dist/runtime/components/KCheckbox/KCheckbox.logic.js +16 -1
  16. package/dist/runtime/components/KCombobox/KCombobox.global.d.vue.ts +75 -8
  17. package/dist/runtime/components/KCombobox/KCombobox.global.vue +18 -4
  18. package/dist/runtime/components/KCombobox/KCombobox.global.vue.d.ts +75 -8
  19. package/dist/runtime/components/KCombobox/KCombobox.logic.d.ts +46 -8
  20. package/dist/runtime/components/KCombobox/KCombobox.logic.js +77 -9
  21. package/dist/runtime/components/KCompositeInput/KCompositeInput.global.d.vue.ts +169 -0
  22. package/dist/runtime/components/KCompositeInput/KCompositeInput.global.vue +46 -0
  23. package/dist/runtime/components/KCompositeInput/KCompositeInput.global.vue.d.ts +169 -0
  24. package/dist/runtime/components/KCompositeInput/KCompositeInput.logic.d.ts +127 -0
  25. package/dist/runtime/components/KCompositeInput/KCompositeInput.logic.js +160 -0
  26. package/dist/runtime/components/KDatatable/KDataIterator.global.vue +1 -1
  27. package/dist/runtime/components/KDatatable/KDataIterator.logic.d.ts +2 -2
  28. package/dist/runtime/components/KDatatable/KDatatable.global.vue +1 -1
  29. package/dist/runtime/components/KDatatable/KDatatable.logic.d.ts +2 -2
  30. package/dist/runtime/components/KDatePicker/KDatePicker.global.d.vue.ts +95 -8
  31. package/dist/runtime/components/KDatePicker/KDatePicker.global.vue +27 -3
  32. package/dist/runtime/components/KDatePicker/KDatePicker.global.vue.d.ts +95 -8
  33. package/dist/runtime/components/KDatePicker/KDatePicker.logic.d.ts +43 -1
  34. package/dist/runtime/components/KDatePicker/KDatePicker.logic.js +106 -7
  35. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.d.vue.ts +84 -8
  36. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue +26 -3
  37. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue.d.ts +84 -8
  38. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.logic.d.ts +38 -1
  39. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.logic.js +161 -7
  40. package/dist/runtime/components/KDropdown/KDropdown.global.d.vue.ts +27 -0
  41. package/dist/runtime/components/KDropdown/KDropdown.global.vue +14 -4
  42. package/dist/runtime/components/KDropdown/KDropdown.global.vue.d.ts +27 -0
  43. package/dist/runtime/components/KDropdown/KDropdown.logic.d.ts +36 -1
  44. package/dist/runtime/components/KDropdown/KDropdown.logic.js +92 -4
  45. package/dist/runtime/components/KGrid/KGrid.global.d.vue.ts +7 -56
  46. package/dist/runtime/components/KGrid/KGrid.global.vue +9 -2
  47. package/dist/runtime/components/KGrid/KGrid.global.vue.d.ts +7 -56
  48. package/dist/runtime/components/KHourPicker/KHourPicker.global.d.vue.ts +41 -0
  49. package/dist/runtime/components/KHourPicker/KHourPicker.global.vue +27 -12
  50. package/dist/runtime/components/KHourPicker/KHourPicker.global.vue.d.ts +41 -0
  51. package/dist/runtime/components/KHourPicker/KHourPicker.logic.d.ts +26 -3
  52. package/dist/runtime/components/KHourPicker/KHourPicker.logic.js +34 -10
  53. package/dist/runtime/components/KHourSelect/KHourSelect.logic.js +4 -1
  54. package/dist/runtime/components/KIcon/KIcon.global.d.vue.ts +1 -1
  55. package/dist/runtime/components/KIcon/KIcon.global.vue.d.ts +1 -1
  56. package/dist/runtime/components/KIcon/KIcon.logic.d.ts +1 -1
  57. package/dist/runtime/components/KIcon/KIcon.logic.js +13 -8
  58. package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.d.vue.ts +21 -0
  59. package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.vue +4 -2
  60. package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.vue.d.ts +21 -0
  61. package/dist/runtime/components/KMaskTextbox/KMaskTextbox.logic.d.ts +11 -0
  62. package/dist/runtime/components/KMaskTextbox/KMaskTextbox.logic.js +9 -0
  63. package/dist/runtime/components/KModal/KModal.global.d.vue.ts +14 -2
  64. package/dist/runtime/components/KModal/KModal.global.vue +5 -1
  65. package/dist/runtime/components/KModal/KModal.global.vue.d.ts +14 -2
  66. package/dist/runtime/components/KModal/KModal.logic.d.ts +10 -2
  67. package/dist/runtime/components/KModal/KModal.logic.js +12 -3
  68. package/dist/runtime/components/KPagination/KPagination.global.vue +1 -1
  69. package/dist/runtime/components/KPanel/KPanel.global.d.vue.ts +5 -28
  70. package/dist/runtime/components/KPanel/KPanel.global.vue +12 -4
  71. package/dist/runtime/components/KPanel/KPanel.global.vue.d.ts +5 -28
  72. package/dist/runtime/components/KPanel/KPanel.logic.d.ts +10 -0
  73. package/dist/runtime/components/KPanel/KPanel.logic.js +8 -0
  74. package/dist/runtime/components/KRadiobox/KRadiobox.global.d.vue.ts +21 -0
  75. package/dist/runtime/components/KRadiobox/KRadiobox.global.vue +3 -1
  76. package/dist/runtime/components/KRadiobox/KRadiobox.global.vue.d.ts +21 -0
  77. package/dist/runtime/components/KRadiobox/KRadiobox.logic.d.ts +11 -0
  78. package/dist/runtime/components/KRadiobox/KRadiobox.logic.js +9 -0
  79. package/dist/runtime/components/KTextarea/KTextarea.global.d.vue.ts +21 -0
  80. package/dist/runtime/components/KTextarea/KTextarea.global.vue +3 -1
  81. package/dist/runtime/components/KTextarea/KTextarea.global.vue.d.ts +21 -0
  82. package/dist/runtime/components/KTextarea/KTextarea.logic.d.ts +11 -0
  83. package/dist/runtime/components/KTextarea/KTextarea.logic.js +9 -0
  84. package/dist/runtime/components/KTextbox/KTextbox.global.d.vue.ts +35 -2
  85. package/dist/runtime/components/KTextbox/KTextbox.global.vue +7 -4
  86. package/dist/runtime/components/KTextbox/KTextbox.global.vue.d.ts +35 -2
  87. package/dist/runtime/components/KTextbox/KTextbox.logic.d.ts +21 -4
  88. package/dist/runtime/components/KTextbox/KTextbox.logic.js +21 -5
  89. package/dist/runtime/components/KToast/KToast.global.d.vue.ts +57 -0
  90. package/dist/runtime/components/KToast/KToast.global.vue +32 -0
  91. package/dist/runtime/components/KToast/KToast.global.vue.d.ts +57 -0
  92. package/dist/runtime/components/KToast/KToast.logic.d.ts +34 -0
  93. package/dist/runtime/components/KToast/KToast.logic.js +47 -0
  94. package/dist/runtime/components/KTree/KTree.logic.d.ts +1 -1
  95. package/dist/runtime/components/KTreePicker/KTreePicker.global.d.vue.ts +65 -7
  96. package/dist/runtime/components/KTreePicker/KTreePicker.global.vue +15 -3
  97. package/dist/runtime/components/KTreePicker/KTreePicker.global.vue.d.ts +65 -7
  98. package/dist/runtime/components/KTreePicker/KTreePicker.logic.d.ts +37 -5
  99. package/dist/runtime/components/KTreePicker/KTreePicker.logic.js +32 -1
  100. package/dist/runtime/components/KTreeView/KTreeView.global.d.vue.ts +8 -8
  101. package/dist/runtime/components/KTreeView/KTreeView.global.vue.d.ts +8 -8
  102. package/dist/runtime/components/KTreeView/KTreeView.logic.d.ts +1 -1
  103. package/dist/runtime/composables/usePresetComponent.d.ts +16 -0
  104. package/dist/runtime/composables/usePresetComponent.js +21 -16
  105. package/dist/runtime/presets/default/assets/scss/css-variables.css +64 -13
  106. package/dist/runtime/presets/default/assets/scss/css-variables.scss +286 -0
  107. package/dist/runtime/presets/default/assets/scss/docs.scss +52 -0
  108. package/dist/runtime/presets/default/assets/scss/index.css +99 -13
  109. package/dist/runtime/presets/default/assets/scss/index.scss +42 -0
  110. package/dist/runtime/presets/default/assets/scss/mixins.scss +94 -0
  111. package/dist/runtime/presets/default/assets/scss/reset.scss +16 -0
  112. package/dist/runtime/presets/default/components/KAccordion/KAccordion.vue +5 -2
  113. package/dist/runtime/presets/default/components/KAccordion/KAccordionItem.vue +40 -37
  114. package/dist/runtime/presets/default/components/KBulkActions/KBulkActions.vue +29 -22
  115. package/dist/runtime/presets/default/components/KButton/KButton.vue +147 -428
  116. package/dist/runtime/presets/default/components/KCalendar/KCalendar.vue +57 -53
  117. package/dist/runtime/presets/default/components/KCalendar/KCalendarMonth.vue +189 -161
  118. package/dist/runtime/presets/default/components/KCheckbox/KCheckbox.d.vue.ts +3 -0
  119. package/dist/runtime/presets/default/components/KCheckbox/KCheckbox.vue +59 -42
  120. package/dist/runtime/presets/default/components/KCheckbox/KCheckbox.vue.d.ts +3 -0
  121. package/dist/runtime/presets/default/components/KCombobox/KCombobox.d.vue.ts +7 -0
  122. package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue +108 -79
  123. package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue.d.ts +7 -0
  124. package/dist/runtime/presets/default/components/KCombobox/KComboboxList.d.vue.ts +1 -0
  125. package/dist/runtime/presets/default/components/KCombobox/KComboboxList.vue +79 -61
  126. package/dist/runtime/presets/default/components/KCombobox/KComboboxList.vue.d.ts +1 -0
  127. package/dist/runtime/presets/default/components/KCompositeInput/KCompositeInput.d.vue.ts +29 -0
  128. package/dist/runtime/presets/default/components/KCompositeInput/KCompositeInput.vue +202 -0
  129. package/dist/runtime/presets/default/components/KCompositeInput/KCompositeInput.vue.d.ts +29 -0
  130. package/dist/runtime/presets/default/components/KDataIterator/KDataIterator.vue +40 -31
  131. package/dist/runtime/presets/default/components/KDatatable/KDatatable.vue +110 -92
  132. package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.d.vue.ts +7 -0
  133. package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue +58 -25
  134. package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue.d.ts +7 -0
  135. package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.d.vue.ts +6 -0
  136. package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.vue +81 -52
  137. package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.vue.d.ts +6 -0
  138. package/dist/runtime/presets/default/components/KDropdown/KDropdown.d.vue.ts +10 -0
  139. package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue +57 -25
  140. package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue.d.ts +10 -0
  141. package/dist/runtime/presets/default/components/KGantt/KGantt.vue +337 -241
  142. package/dist/runtime/presets/default/components/KGantt/KGanttRuler.vue +40 -35
  143. package/dist/runtime/presets/default/components/KGantt/KGanttTimeline.vue +170 -140
  144. package/dist/runtime/presets/default/components/KGrid/KGrid.vue +62 -60
  145. package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.d.vue.ts +8 -2
  146. package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.vue +48 -28
  147. package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.vue.d.ts +8 -2
  148. package/dist/runtime/presets/default/components/KHourSelect/KHourSelect.vue +34 -28
  149. package/dist/runtime/presets/default/components/KIcon/KIcon.d.vue.ts +1 -1
  150. package/dist/runtime/presets/default/components/KIcon/KIcon.vue +31 -22
  151. package/dist/runtime/presets/default/components/KIcon/KIcon.vue.d.ts +1 -1
  152. package/dist/runtime/presets/default/components/KLoader/KLoader.vue +65 -48
  153. package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.d.vue.ts +2 -0
  154. package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.vue +117 -84
  155. package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.vue.d.ts +2 -0
  156. package/dist/runtime/presets/default/components/KModal/KModal.d.vue.ts +2 -0
  157. package/dist/runtime/presets/default/components/KModal/KModal.vue +85 -35
  158. package/dist/runtime/presets/default/components/KModal/KModal.vue.d.ts +2 -0
  159. package/dist/runtime/presets/default/components/KPagination/KPagination.vue +42 -40
  160. package/dist/runtime/presets/default/components/KPanel/KPanel.d.vue.ts +3 -0
  161. package/dist/runtime/presets/default/components/KPanel/KPanel.vue +97 -34
  162. package/dist/runtime/presets/default/components/KPanel/KPanel.vue.d.ts +3 -0
  163. package/dist/runtime/presets/default/components/KRadiobox/KRadiobox.d.vue.ts +2 -0
  164. package/dist/runtime/presets/default/components/KRadiobox/KRadiobox.vue +40 -35
  165. package/dist/runtime/presets/default/components/KRadiobox/KRadiobox.vue.d.ts +2 -0
  166. package/dist/runtime/presets/default/components/KRangeSlider/KRangeSlider.vue +158 -125
  167. package/dist/runtime/presets/default/components/KSlider/KSlider.vue +123 -100
  168. package/dist/runtime/presets/default/components/KTabs/KTabItem.vue +40 -37
  169. package/dist/runtime/presets/default/components/KTabs/KTabs.vue +9 -6
  170. package/dist/runtime/presets/default/components/KTextarea/KTextarea.d.vue.ts +2 -0
  171. package/dist/runtime/presets/default/components/KTextarea/KTextarea.vue +40 -21
  172. package/dist/runtime/presets/default/components/KTextarea/KTextarea.vue.d.ts +2 -0
  173. package/dist/runtime/presets/default/components/KTextbox/KTextbox.d.vue.ts +4 -1
  174. package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue +76 -37
  175. package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue.d.ts +4 -1
  176. package/dist/runtime/presets/default/components/KToast/KToast.d.vue.ts +17 -0
  177. package/dist/runtime/presets/default/components/KToast/KToast.vue +118 -0
  178. package/dist/runtime/presets/default/components/KToast/KToast.vue.d.ts +17 -0
  179. package/dist/runtime/presets/default/components/KTree/KTree.vue +103 -80
  180. package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.d.vue.ts +6 -0
  181. package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.vue +88 -55
  182. package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.vue.d.ts +6 -0
  183. package/dist/runtime/presets/default/components/KTreeView/KTreeCell.vue +31 -30
  184. package/dist/runtime/presets/default/components/KTreeView/KTreeView.vue +34 -27
  185. package/package.json +5 -5
@@ -20,61 +20,65 @@
20
20
  )
21
21
  </template>
22
22
 
23
- <script setup>
24
- const props = defineProps({
25
- view: { type: String, required: true },
26
- viewCount: { type: Number, required: true },
27
- actualYear: { type: null, required: true },
28
- monthSelectedDay: { type: null, required: true },
29
- goToPrev: { type: Function, required: true },
30
- goToNext: { type: Function, required: true },
31
- getMonthName: { type: Function, required: true },
32
- showingMonth: { type: Function, required: true },
33
- showingYear: { type: Function, required: true },
34
- getExpandedDefinedDays: { type: Function, required: true },
35
- getExpandedMarkedDays: { type: Function, required: true },
36
- dayClicked: { type: Function, required: true }
37
- });
23
+ <script lang="ts" setup>
24
+ import type { IMarkedDay, IDefinedDay } from '../../../../components/KCalendar/types'
25
+
26
+ const props = defineProps<{
27
+ view: string
28
+ viewCount: number
29
+ actualYear: any
30
+ monthSelectedDay: any
31
+ goToPrev: () => void
32
+ goToNext: () => void
33
+ getMonthName: (i: number) => string
34
+ showingMonth: (i: number) => number
35
+ showingYear: (i: number) => number
36
+ getExpandedDefinedDays: (i: number) => IDefinedDay[]
37
+ getExpandedMarkedDays: (i: number) => IMarkedDay[]
38
+ dayClicked: (date: Date) => void
39
+ }>()
38
40
  </script>
39
41
 
40
- <style scoped>
42
+ <style lang="scss" scoped>
41
43
  .KCalendar {
42
- width: fit-content;
43
- }
44
- .KCalendar .view-header {
45
- display: flex;
46
- flex-direction: row;
47
- flex-wrap: nowrap;
48
- justify-content: space-between;
49
- }
50
- .KCalendar .view-header .prev,
51
- .KCalendar .view-header .next {
52
- cursor: pointer;
53
- transition: all 0.2s ease;
54
- width: 28px;
55
- height: 28px;
56
- display: flex;
57
- justify-content: center;
58
- align-items: center;
59
- border-radius: 4px;
60
- }
61
- .KCalendar .view-header .prev:hover,
62
- .KCalendar .view-header .next:hover {
63
- background-color: rgba(0, 0, 0, 0.05);
64
- }
65
- .KCalendar .months {
66
- display: flex;
67
- flex-direction: row;
68
- flex-wrap: wrap;
69
- gap: var(--grid-gap);
70
- max-width: 790px;
71
- width: fit-content;
72
- }
73
- .KCalendar .months .month {
74
- max-width: 250px;
75
- min-width: 250px;
76
- }
77
- .KCalendar .months .month .month-name {
78
- text-align: center;
44
+ width: fit-content;
45
+ .view-header {
46
+ display: flex;
47
+ flex-direction: row;
48
+ flex-wrap: nowrap;
49
+ justify-content: space-between;
50
+ .prev,
51
+ .next {
52
+ cursor: pointer;
53
+ transition: all 0.2s ease;
54
+ width: 28px;
55
+ height: 28px;
56
+ display: flex;
57
+ justify-content: center;
58
+ align-items: center;
59
+ border-radius: 4px;
60
+ &:hover {
61
+ background-color: rgba(0, 0, 0, 0.05);
62
+ }
63
+ }
64
+ }
65
+ .months {
66
+ display: flex;
67
+ flex-direction: row;
68
+ flex-wrap: wrap;
69
+ gap: var(--grid-gap);
70
+ max-width: 790px;
71
+ width: fit-content;
72
+ .month {
73
+ //flex: 0 0 calc(33.333% - (2 * var(--grid-gap)) / 3);
74
+ max-width: 250px;
75
+ min-width: 250px;
76
+ //max-width: calc(33% - var(--grid-gap));
77
+
78
+ .month-name {
79
+ text-align: center;
80
+ }
81
+ }
82
+ }
79
83
  }
80
84
  </style>
@@ -21,169 +21,197 @@
21
21
  )
22
22
  </template>
23
23
 
24
- <script setup>
25
- const props = defineProps({
26
- year: { type: Number, required: true },
27
- month: { type: Number, required: true },
28
- weekdays: { type: Array, required: true },
29
- calendarDays: { type: Array, required: true },
30
- isMarked: { type: Function, required: true },
31
- isSelectedDay: { type: Function, required: true },
32
- getMarkedDayClass: { type: Function, required: true },
33
- selectDay: { type: Function, required: true },
34
- getCalendarDaysData: { type: Function, required: true }
35
- });
24
+ <script lang="ts" setup>
25
+ import type { IMarkedDay } from '../../../../components/KCalendar/types'
26
+
27
+ const props = defineProps<{
28
+ year: number
29
+ month: number
30
+ weekdays: string[]
31
+ calendarDays: (number|string)[]
32
+ isMarked: (day: number | string) => boolean
33
+ isSelectedDay: (day: number) => boolean
34
+ getMarkedDayClass: (day: number) => string
35
+ selectDay: (day: number) => void
36
+ getCalendarDaysData: (day: number) => IMarkedDay[]
37
+ }>()
36
38
  </script>
37
39
 
38
- <style scoped>
40
+ <style lang="scss" scoped>
41
+ @use 'sass:color';
42
+
39
43
  .KCalendarMonth {
40
- width: 100%;
41
- }
42
- .KCalendarMonth .calendar-header {
43
- width: 100%;
44
- display: grid;
45
- grid-template-columns: repeat(7, 1fr);
46
- align-items: center;
47
- }
48
- .KCalendarMonth .calendar-header .weekday {
49
- text-align: center;
50
- }
51
- .KCalendarMonth .calendar-days {
52
- display: grid;
53
- grid-template-columns: repeat(7, 1fr);
54
- }
55
- .KCalendarMonth .calendar-days .day {
56
- text-align: center;
57
- position: relative;
58
- padding: 4px;
59
- border-radius: 4px;
60
- cursor: pointer;
61
- transition: all 0.2s ease;
62
- width: 28px;
63
- height: 28px;
64
- display: flex;
65
- flex-direction: row;
66
- align-items: center;
67
- justify-content: center;
68
- }
69
- .KCalendarMonth .calendar-days .day:hover {
70
- background-color: rgba(0, 0, 0, 0.05);
71
- }
72
- .KCalendarMonth .calendar-days .day.marked:hover {
73
- opacity: 0.8;
74
- }
75
- .KCalendarMonth .calendar-days .day.empty {
76
- cursor: default;
77
- }
78
- .KCalendarMonth .calendar-days .day.empty:hover {
79
- background-color: transparent;
80
- }
81
- .KCalendarMonth .calendar-days .day.success {
82
- color: var(--accent-700);
83
- background-color: var(--accent-100);
84
- }
85
- .KCalendarMonth .calendar-days .day.success:hover {
86
- background-color: var(--accent-300);
87
- }
88
- .KCalendarMonth .calendar-days .day.error {
89
- color: var(--error-color);
90
- background-color: var(--error-color-light);
91
- }
92
- .KCalendarMonth .calendar-days .day.warning {
93
- color: var(--warning-color);
94
- background-color: var(--warning-color-light);
95
- }
96
- .KCalendarMonth .calendar-days .day.warning:hover {
97
- background-color: var(--warning-color-light);
98
- }
99
- .KCalendarMonth .calendar-days .day.primary {
100
- color: var(--primary-700);
101
- background-color: var(--primary-100);
102
- }
103
- .KCalendarMonth .calendar-days .day.primary:hover {
104
- background-color: var(--primary-300);
105
- }
106
- .KCalendarMonth .calendar-days .day.secondary {
107
- color: var(--font-color-primary);
108
- background-color: var(--neutral-100);
109
- }
110
- .KCalendarMonth .calendar-days .day.secondary:hover {
111
- background-color: var(--neutral-200);
112
- }
113
- .KCalendarMonth .calendar-days .day.dark {
114
- color: var(--font-color-light);
115
- background-color: var(--neutral-700);
116
- }
117
- .KCalendarMonth .calendar-days .day.dark:hover {
118
- background-color: var(--neutral-500);
119
- }
120
- .KCalendarMonth .calendar-days .day.offday {
121
- font-style: italic;
122
- color: var(--neutral-500);
123
- }
124
- .KCalendarMonth .calendar-days .day.bold {
125
- font-weight: bold;
126
- }
127
- .KCalendarMonth .calendar-days .day.underlined {
128
- text-decoration: underline;
129
- }
130
- .KCalendarMonth .calendar-days .day.disabled {
131
- color: var(--neutral-400);
132
- pointer-events: none;
133
- background: var(--neutral-100);
134
- opacity: 0.6;
135
- }
136
- .KCalendarMonth .calendar-days .day.circled .day-number {
137
- display: inline-block;
138
- border: 2px solid var(--primary-500);
139
- border-radius: 50%;
140
- box-sizing: border-box;
141
- background: var(--background-color-light);
142
- }
143
- .KCalendarMonth .calendar-days .day.selected {
144
- background-color: var(--primary-100);
145
- color: var(--primary-700);
146
- }
147
- .KCalendarMonth .calendar-days .day.selected .day-number {
148
- display: inline-block;
149
- border: 2px solid var(--primary-900);
150
- border-radius: 50%;
151
- box-sizing: border-box;
152
- background: var(--background-color-light);
153
- width: 23px;
154
- }
155
- .KCalendarMonth .calendar-days .day .marked-indicators-row {
156
- position: absolute;
157
- top: 2px;
158
- right: 2px;
159
- display: flex;
160
- gap: 2px;
161
- z-index: 2;
162
- flex-direction: column;
163
- }
164
- .KCalendarMonth .calendar-days .day .marked-indicators-row .marked-indicator {
165
- width: 6px;
166
- height: 6px;
167
- border-radius: 50%;
168
- opacity: 0.7;
169
- display: inline-block;
170
- }
171
- .KCalendarMonth .calendar-days .day .marked-indicators-row .marked-indicator.primary {
172
- background-color: var(--primary-500);
173
- }
174
- .KCalendarMonth .calendar-days .day .marked-indicators-row .marked-indicator.success {
175
- background-color: var(--success-color);
176
- }
177
- .KCalendarMonth .calendar-days .day .marked-indicators-row .marked-indicator.warning {
178
- background-color: var(--warning-color);
179
- }
180
- .KCalendarMonth .calendar-days .day .marked-indicators-row .marked-indicator.error {
181
- background-color: var(--error-color);
182
- }
183
- .KCalendarMonth .calendar-days .day .marked-indicators-row .marked-indicator.secondary {
184
- background-color: var(--neutral-500);
185
- }
186
- .KCalendarMonth .calendar-days .day .marked-indicators-row .marked-indicator.dark {
187
- background-color: var(--neutral-100);
44
+ width: 100%;
45
+ .calendar-header {
46
+ width: 100%;
47
+ display: grid;
48
+ grid-template-columns: repeat(7, 1fr);
49
+ align-items: center;
50
+
51
+ .weekday {
52
+ text-align: center;
53
+ }
54
+ }
55
+ .calendar-days {
56
+ display: grid;
57
+ grid-template-columns: repeat(7, 1fr);
58
+ .day {
59
+ text-align: center;
60
+ position: relative;
61
+ padding: 4px;
62
+ border-radius: 4px;
63
+ cursor: pointer;
64
+ transition: all 0.2s ease;
65
+ width: 28px;
66
+ height: 28px;
67
+
68
+ display: flex;
69
+ flex-direction: row;
70
+ align-items: center;
71
+ justify-content: center;
72
+
73
+ &:hover {
74
+ background-color: rgba(0, 0, 0, 0.05);
75
+ }
76
+
77
+ &.marked {
78
+ &:hover {
79
+ opacity: 0.8;
80
+ }
81
+ }
82
+
83
+ &.empty {
84
+ cursor: default;
85
+
86
+ &:hover {
87
+ background-color: transparent;
88
+ }
89
+ }
90
+
91
+ // Type-based styling
92
+ &.success {
93
+ color: var(--accent-700);
94
+ background-color: var(--accent-100);
95
+
96
+ &:hover {
97
+ background-color: var(--accent-300);
98
+ }
99
+ }
100
+
101
+ &.error {
102
+ color: var(--error-color);
103
+ background-color: var(--error-color-light);
104
+ }
105
+
106
+ &.warning {
107
+ color: var(--warning-color);
108
+ background-color: var(--warning-color-light);
109
+
110
+ &:hover {
111
+ background-color: var(--warning-color-light);
112
+ }
113
+ }
114
+
115
+ &.primary {
116
+ color: var(--primary-700);
117
+ background-color: var(--primary-100);
118
+
119
+ &:hover {
120
+ background-color: var(--primary-300);
121
+ }
122
+ }
123
+
124
+ &.secondary {
125
+ color: var(--font-color-primary);
126
+ background-color: var(--neutral-100);
127
+
128
+ &:hover {
129
+ background-color: var(--neutral-200);
130
+ }
131
+ }
132
+
133
+ &.dark {
134
+ color: var(--font-color-light);
135
+ background-color: var(--neutral-700);
136
+
137
+ &:hover {
138
+ background-color: var(--neutral-500);
139
+ }
140
+ }
141
+
142
+ &.offday {
143
+ font-style: italic;
144
+ color: var(--neutral-500);
145
+ }
146
+ &.bold {
147
+ font-weight: bold;
148
+ }
149
+ &.underlined {
150
+ text-decoration: underline;
151
+ }
152
+ &.disabled {
153
+ color: var(--neutral-400);
154
+ pointer-events: none;
155
+ background: var(--neutral-100);
156
+ opacity: 0.6;
157
+ }
158
+ &.circled {
159
+ .day-number {
160
+ display: inline-block;
161
+ border: 2px solid var(--primary-500);
162
+ border-radius: 50%;
163
+ box-sizing: border-box;
164
+ background: var(--background-color-light);
165
+ }
166
+ }
167
+ &.selected {
168
+ background-color: var(--primary-100);
169
+ color: var(--primary-700);
170
+ .day-number {
171
+ display: inline-block;
172
+ border: 2px solid var(--primary-900);
173
+ border-radius: 50%;
174
+ box-sizing: border-box;
175
+ background: var(--background-color-light);
176
+ width: 23px;
177
+ }
178
+ }
179
+ .marked-indicators-row {
180
+ position: absolute;
181
+ top: 2px;
182
+ right: 2px;
183
+ display: flex;
184
+ gap: 2px;
185
+ z-index: 2;
186
+ flex-direction: column;
187
+ .marked-indicator {
188
+ width: 6px;
189
+ height: 6px;
190
+ border-radius: 50%;
191
+ opacity: 0.7;
192
+ display: inline-block;
193
+
194
+ &.primary {
195
+ background-color: var(--primary-500);
196
+ }
197
+ &.success {
198
+ background-color: var(--success-color);
199
+ }
200
+ &.warning {
201
+ background-color: var(--warning-color);
202
+ }
203
+ &.error {
204
+ background-color: var(--error-color);
205
+ }
206
+ &.secondary {
207
+ background-color: var(--neutral-500);
208
+ }
209
+ &.dark {
210
+ background-color: var(--neutral-100);
211
+ }
212
+ }
213
+ }
214
+ }
215
+ }
188
216
  }
189
217
  </style>
@@ -2,6 +2,9 @@ type __VLS_Props = {
2
2
  model: any;
3
3
  checkboxValue: any;
4
4
  isDisabled: boolean;
5
+ label?: string;
6
+ validation?: 'success' | 'warning' | 'error' | null;
7
+ validationText?: string;
5
8
  };
6
9
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
7
10
  "update:model": (value: any) => any;
@@ -1,51 +1,68 @@
1
1
  <template lang="pug">
2
- label.KCheckbox
3
- input(type="checkbox" v-model="internalModel" :value="checkboxValue" :disabled="isDisabled")
4
- .icon-container
5
- KIcon.icon(iconname="check")
6
- span
7
- slot
2
+ .KCheckbox-wrapper
3
+ label.KCheckbox
4
+ input(type="checkbox" v-model="internalModel" :value="checkboxValue" :disabled="isDisabled")
5
+ .icon-container(:class="validation ? `is-${validation}` : ''")
6
+ KIcon.icon(iconname="check")
7
+ span
8
+ slot(name="label")
9
+ slot
10
+ | {{ label }}
11
+ span.validation-text(v-if="validation && ['success', 'warning', 'error'].includes(validation) && validationText" :class="`is-${validation}`") {{ validationText }}
8
12
  </template>
9
13
 
10
- <script setup>
11
- import { computed } from "vue";
12
- const props = defineProps({
13
- model: { type: null, required: true },
14
- checkboxValue: { type: null, required: true },
15
- isDisabled: { type: Boolean, required: true }
16
- });
17
- const emit = defineEmits(["update:model"]);
14
+ <script lang="ts" setup>
15
+ import { computed } from 'vue'
16
+
17
+ // Default template for KCheckbox
18
+ const props = defineProps<{
19
+ model: any
20
+ checkboxValue: any
21
+ isDisabled: boolean
22
+ label?: string
23
+ validation?: 'success' | 'warning' | 'error' | null
24
+ validationText?: string
25
+ }>()
26
+
27
+ const emit = defineEmits<{
28
+ (e: 'update:model', value: any): void
29
+ }>()
30
+
18
31
  const internalModel = computed({
19
- get: () => props.model,
20
- set: (value) => emit("update:model", value)
21
- });
32
+ get: () => props.model,
33
+ set: (value) => emit('update:model', value)
34
+ })
22
35
  </script>
23
36
 
24
- <style scoped>
37
+ <style lang="scss" scoped>
25
38
  .KCheckbox {
26
- display: flex;
27
- gap: 5px;
28
- cursor: pointer;
29
- }
30
- .KCheckbox input {
31
- display: none;
32
- }
33
- .KCheckbox .icon-container {
34
- border: var(--input-border);
35
- width: var(--box-padding);
36
- height: var(--box-padding);
37
- text-align: center;
38
- line-height: var(--box-padding);
39
- border-radius: var(--input-border-radius);
40
- background-color: var(--checkbox-bg);
41
- display: flex;
42
- align-items: center;
43
- justify-content: center;
44
- }
45
- .KCheckbox .icon {
46
- display: none;
47
- }
48
- .KCheckbox :checked + .icon-container > .icon {
49
- display: block;
39
+ display: flex;
40
+ gap: 5px;
41
+ cursor: pointer;
42
+
43
+ input {
44
+ display: none;
45
+ }
46
+
47
+ .icon-container {
48
+ border: var(--input-border);
49
+ width: var(--box-padding);
50
+ height: var(--box-padding);
51
+ text-align: center;
52
+ line-height: var(--box-padding);
53
+ border-radius: var(--input-border-radius);
54
+ background-color: var(--checkbox-bg);
55
+ display: flex;
56
+ align-items: center;
57
+ justify-content: center;
58
+ }
59
+
60
+ .icon {
61
+ display: none;
62
+ }
63
+
64
+ :checked + .icon-container > .icon {
65
+ display: block;
66
+ }
50
67
  }
51
68
  </style>
@@ -2,6 +2,9 @@ type __VLS_Props = {
2
2
  model: any;
3
3
  checkboxValue: any;
4
4
  isDisabled: boolean;
5
+ label?: string;
6
+ validation?: 'success' | 'warning' | 'error' | null;
7
+ validationText?: string;
5
8
  };
6
9
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
7
10
  "update:model": (value: any) => any;
@@ -5,6 +5,7 @@ type __VLS_Props = {
5
5
  labelField: string;
6
6
  placeholder: string;
7
7
  searchbox: boolean;
8
+ searchPlaceholder: string;
8
9
  searchtext: string;
9
10
  filteredOptions: any[];
10
11
  getSelectedContent: () => any[];
@@ -13,10 +14,16 @@ type __VLS_Props = {
13
14
  selectItem: (option: ComboboxItem) => void;
14
15
  isSelected: (option: ComboboxItem) => boolean;
15
16
  loading: boolean;
17
+ teleportTo?: string;
18
+ fullWidth: boolean;
19
+ validation?: 'success' | 'warning' | 'error' | null;
20
+ validationText?: string;
16
21
  };
17
22
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
23
+ "update:isOptionsOpen": (value: boolean) => any;
18
24
  "update:searchtext": (value: string) => any;
19
25
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
26
+ "onUpdate:isOptionsOpen"?: ((value: boolean) => any) | undefined;
20
27
  "onUpdate:searchtext"?: ((value: string) => any) | undefined;
21
28
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
29
  declare const _default: typeof __VLS_export;