@katlux/toolkit 0.1.0-beta.4 → 0.1.0-beta.41

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 (83) 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/KCombobox/KCombobox.global.d.vue.ts +1 -1
  6. package/dist/runtime/components/KCombobox/KCombobox.global.vue.d.ts +1 -1
  7. package/dist/runtime/components/KGrid/KGrid.global.d.vue.ts +7 -56
  8. package/dist/runtime/components/KGrid/KGrid.global.vue +9 -2
  9. package/dist/runtime/components/KGrid/KGrid.global.vue.d.ts +7 -56
  10. package/dist/runtime/components/KHourPicker/KHourPicker.global.d.vue.ts +1 -1
  11. package/dist/runtime/components/KHourPicker/KHourPicker.global.vue.d.ts +1 -1
  12. package/dist/runtime/components/KIcon/KIcon.logic.d.ts +1 -1
  13. package/dist/runtime/components/KIcon/KIcon.logic.js +2 -2
  14. package/dist/runtime/components/KLoader/KLoader.global.d.vue.ts +3 -3
  15. package/dist/runtime/components/KLoader/KLoader.global.vue.d.ts +3 -3
  16. package/dist/runtime/components/KLoader/KLoader.logic.d.ts +8 -1
  17. package/dist/runtime/components/KLoader/KLoader.logic.js +1 -0
  18. package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.d.vue.ts +1 -1
  19. package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.vue.d.ts +1 -1
  20. package/dist/runtime/components/KPanel/KPanel.global.d.vue.ts +5 -28
  21. package/dist/runtime/components/KPanel/KPanel.global.vue +12 -4
  22. package/dist/runtime/components/KPanel/KPanel.global.vue.d.ts +5 -28
  23. package/dist/runtime/components/KPanel/KPanel.logic.d.ts +10 -0
  24. package/dist/runtime/components/KPanel/KPanel.logic.js +8 -0
  25. package/dist/runtime/components/KTextbox/KTextbox.global.d.vue.ts +12 -0
  26. package/dist/runtime/components/KTextbox/KTextbox.global.vue.d.ts +12 -0
  27. package/dist/runtime/components/KTextbox/KTextbox.logic.d.ts +6 -0
  28. package/dist/runtime/components/KTextbox/KTextbox.logic.js +7 -0
  29. package/dist/runtime/components/KTreePicker/KTreePicker.global.d.vue.ts +1 -1
  30. package/dist/runtime/components/KTreePicker/KTreePicker.global.vue.d.ts +1 -1
  31. package/dist/runtime/composables/usePresetComponent.d.ts +16 -0
  32. package/dist/runtime/composables/usePresetComponent.js +21 -16
  33. package/dist/runtime/presets/default/assets/scss/css-variables.css +61 -13
  34. package/dist/runtime/presets/default/assets/scss/css-variables.scss +283 -0
  35. package/dist/runtime/presets/default/assets/scss/docs.scss +52 -0
  36. package/dist/runtime/presets/default/assets/scss/index.css +69 -13
  37. package/dist/runtime/presets/default/assets/scss/index.scss +12 -0
  38. package/dist/runtime/presets/default/assets/scss/mixins.scss +94 -0
  39. package/dist/runtime/presets/default/assets/scss/reset.scss +16 -0
  40. package/dist/runtime/presets/default/components/KAccordion/KAccordion.vue +5 -2
  41. package/dist/runtime/presets/default/components/KAccordion/KAccordionItem.vue +40 -37
  42. package/dist/runtime/presets/default/components/KBulkActions/KBulkActions.vue +29 -22
  43. package/dist/runtime/presets/default/components/KButton/KButton.vue +147 -428
  44. package/dist/runtime/presets/default/components/KCalendar/KCalendar.vue +57 -53
  45. package/dist/runtime/presets/default/components/KCalendar/KCalendarMonth.vue +189 -161
  46. package/dist/runtime/presets/default/components/KCheckbox/KCheckbox.vue +46 -36
  47. package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue +76 -66
  48. package/dist/runtime/presets/default/components/KCombobox/KComboboxList.vue +77 -59
  49. package/dist/runtime/presets/default/components/KDataIterator/KDataIterator.vue +40 -31
  50. package/dist/runtime/presets/default/components/KDatatable/KDatatable.vue +110 -92
  51. package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue +38 -22
  52. package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.vue +66 -48
  53. package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue +27 -22
  54. package/dist/runtime/presets/default/components/KGantt/KGantt.vue +336 -240
  55. package/dist/runtime/presets/default/components/KGantt/KGanttRuler.vue +40 -35
  56. package/dist/runtime/presets/default/components/KGantt/KGanttTimeline.vue +170 -140
  57. package/dist/runtime/presets/default/components/KGrid/KGrid.vue +62 -60
  58. package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.vue +23 -19
  59. package/dist/runtime/presets/default/components/KHourSelect/KHourSelect.vue +34 -28
  60. package/dist/runtime/presets/default/components/KIcon/KIcon.d.vue.ts +1 -1
  61. package/dist/runtime/presets/default/components/KIcon/KIcon.vue +31 -22
  62. package/dist/runtime/presets/default/components/KIcon/KIcon.vue.d.ts +1 -1
  63. package/dist/runtime/presets/default/components/KLoader/KLoader.vue +53 -47
  64. package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.vue +108 -84
  65. package/dist/runtime/presets/default/components/KModal/KModal.vue +30 -27
  66. package/dist/runtime/presets/default/components/KPagination/KPagination.vue +42 -40
  67. package/dist/runtime/presets/default/components/KPanel/KPanel.d.vue.ts +3 -0
  68. package/dist/runtime/presets/default/components/KPanel/KPanel.vue +95 -34
  69. package/dist/runtime/presets/default/components/KPanel/KPanel.vue.d.ts +3 -0
  70. package/dist/runtime/presets/default/components/KRadiobox/KRadiobox.vue +30 -29
  71. package/dist/runtime/presets/default/components/KRangeSlider/KRangeSlider.vue +158 -125
  72. package/dist/runtime/presets/default/components/KSlider/KSlider.vue +123 -100
  73. package/dist/runtime/presets/default/components/KTabs/KTabItem.vue +40 -37
  74. package/dist/runtime/presets/default/components/KTabs/KTabs.vue +9 -6
  75. package/dist/runtime/presets/default/components/KTextarea/KTextarea.vue +23 -20
  76. package/dist/runtime/presets/default/components/KTextbox/KTextbox.d.vue.ts +1 -0
  77. package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue +44 -34
  78. package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue.d.ts +1 -0
  79. package/dist/runtime/presets/default/components/KTree/KTree.vue +102 -80
  80. package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.vue +54 -34
  81. package/dist/runtime/presets/default/components/KTreeView/KTreeCell.vue +31 -30
  82. package/dist/runtime/presets/default/components/KTreeView/KTreeView.vue +34 -27
  83. package/package.json +5 -5
@@ -0,0 +1,52 @@
1
+ // Documentation Styles using Existing Template Variables
2
+ .content {
3
+ h2 {
4
+ margin-top: 2rem;
5
+ border-bottom: 1px solid var(--border-color-light);
6
+ padding-bottom: 0.5rem;
7
+ color: var(--font-color-heading);
8
+ }
9
+
10
+ pre {
11
+ background: var(--neutral-100);
12
+ color: var(--font-color-primary);
13
+ padding: 1rem;
14
+ border-radius: var(--border-radius-md);
15
+ overflow-x: auto;
16
+ margin: 0;
17
+ font-family: var(--font-family-mono, monospace);
18
+
19
+ code {
20
+ background: transparent;
21
+ padding: 0;
22
+ color: inherit;
23
+ }
24
+ }
25
+
26
+ .note {
27
+ background: var(--info-color-light);
28
+ border-left: 4px solid var(--info-color);
29
+ padding: 1rem;
30
+ margin-top: 2rem;
31
+ border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
32
+ color: var(--font-color-primary);
33
+
34
+ p {
35
+ margin: 0;
36
+ }
37
+ }
38
+
39
+ .important {
40
+ background: var(--warning-color-light);
41
+ border-left: 4px solid var(--warning-color);
42
+ padding: 1rem;
43
+ margin: 1rem 0;
44
+ border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
45
+ color: var(--font-color-primary);
46
+
47
+ p {
48
+ margin: 0;
49
+ }
50
+ }
51
+
52
+ }
@@ -37,14 +37,44 @@ li {
37
37
  --neutral-700: #616161;
38
38
  --neutral-800: #424242;
39
39
  --neutral-900: #212121;
40
+ --yellow-100: #fef9c3;
41
+ --yellow-300: #fde047;
42
+ --yellow-500: #eab308;
43
+ --yellow-700: #a16207;
44
+ --yellow-900: #713f12;
45
+ --red-100: #fee2e2;
46
+ --red-300: #fca5a5;
47
+ --red-500: #ef4444;
48
+ --red-700: #b91c1c;
49
+ --red-900: #7f1d1d;
50
+ --blue-100: #dbeafe;
51
+ --blue-300: #93c5fd;
52
+ --blue-500: #3b82f6;
53
+ --blue-700: #1d4ed8;
54
+ --blue-900: #1e3a8a;
55
+ --pink-100: #fce7f3;
56
+ --pink-300: #f9a8d4;
57
+ --pink-500: #ec4899;
58
+ --pink-700: #be185d;
59
+ --pink-900: #831843;
60
+ --cyan-100: #cffafe;
61
+ --cyan-300: #67e8f9;
62
+ --cyan-500: #06b6d4;
63
+ --cyan-700: #0e7490;
64
+ --cyan-900: #164e63;
65
+ --green-100: #dcfce7;
66
+ --green-300: #86efac;
67
+ --green-500: #22c55e;
68
+ --green-700: #15803d;
69
+ --green-900: #14532d;
40
70
  --success-color: var(--accent-500);
41
71
  --success-color-light: var(--accent-100);
42
- --warning-color: #ffc107;
43
- --warning-color-light: #fff3e0;
44
- --error-color: #f44336;
45
- --error-color-light: #fbe9e7;
46
- --info-color: var(--primary-500);
47
- --info-color-light: var(--primary-100);
72
+ --warning-color: var(--yellow-500);
73
+ --warning-color-light: var(--yellow-100);
74
+ --error-color: var(--red-500);
75
+ --error-color-light: var(--red-100);
76
+ --info-color: var(--cyan-500);
77
+ --info-color-light: var(--cyan-100);
48
78
  --font-color-primary: var(--neutral-800);
49
79
  --font-color-secondary: var(--neutral-600);
50
80
  --font-color-heading: var(--neutral-900);
@@ -98,19 +128,37 @@ li {
98
128
  --button-hover-bg-success: var(--accent-700);
99
129
  --button-bg-warning: var(--warning-color);
100
130
  --button-text-warning: var(--neutral-900);
101
- --button-hover-bg-warning: #e6ac00;
131
+ --button-hover-bg-warning: var(--yellow-700);
102
132
  --button-bg-danger: var(--error-color);
103
133
  --button-text-danger: var(--font-color-light);
104
- --button-hover-bg-danger: #d32f2f;
134
+ --button-hover-bg-danger: var(--red-700);
105
135
  --button-bg-info: var(--info-color);
106
136
  --button-text-info: var(--font-color-light);
107
- --button-hover-bg-info: var(--primary-300);
137
+ --button-hover-bg-info: var(--cyan-700);
108
138
  --button-bg-light: var(--neutral-50);
109
139
  --button-text-light: var(--neutral-900);
110
140
  --button-hover-bg-light: var(--neutral-200);
111
141
  --button-bg-dark: var(--neutral-900);
112
142
  --button-text-dark: var(--font-color-light);
113
143
  --button-hover-bg-dark: var(--neutral-700);
144
+ --panel-bg-default: var(--yellow-300);
145
+ --panel-header-bg-default: var(--yellow-500);
146
+ --panel-footer-bg-default: var(--blue-100);
147
+ --panel-bg-primary: var(--blue-300);
148
+ --panel-header-bg-primary: var(--blue-500);
149
+ --panel-footer-bg-primary: var(--blue-100);
150
+ --panel-bg-success: var(--green-300);
151
+ --panel-header-bg-success: var(--green-500);
152
+ --panel-footer-bg-success: var(--green-100);
153
+ --panel-bg-warning: var(--yellow-300);
154
+ --panel-header-bg-warning: var(--yellow-500);
155
+ --panel-footer-bg-warning: var(--yellow-100);
156
+ --panel-bg-danger: var(--red-300);
157
+ --panel-header-bg-danger: var(--red-500);
158
+ --panel-footer-bg-danger: var(--red-100);
159
+ --panel-bg-info: var(--cyan-300);
160
+ --panel-header-bg-info: var(--cyan-500);
161
+ --panel-footer-bg-info: var(--cyan-100);
114
162
  --input-border-radius: var(--border-radius-sm);
115
163
  --input-border-color: var(--border-color-medium);
116
164
  --input-focus-border-color: var(--primary-500);
@@ -119,7 +167,7 @@ li {
119
167
  --table-header-color: var(--neutral-700);
120
168
  --table-border-color: var(--neutral-300);
121
169
  --table-row-hover: var(--neutral-100);
122
- --table-row-selected: #e3f2fd;
170
+ --table-row-selected: var(--blue-100);
123
171
  --checkbox-bg: var(--neutral-50);
124
172
  --checkbox-checked-bg: var(--primary-500);
125
173
  --checkbox-border-color: var(--border-color-medium);
@@ -144,12 +192,12 @@ li {
144
192
  --input-button-hover-bg: var(--neutral-400);
145
193
  --input-button-font-color: var(--font-color-primary);
146
194
  --input-focus-border-color: var(--primary-500);
147
- --button-hover-bg-danger: #d32f2f;
148
- --button-hover-bg-info: var(--primary-300);
195
+ --button-hover-bg-danger: var(--red-700);
196
+ --button-hover-bg-info: var(--cyan-700);
149
197
  --button-hover-bg-light: var(--neutral-200);
150
198
  --button-hover-bg-primary: var(--primary-700);
151
199
  --button-hover-bg-success: var(--accent-700);
152
- --button-hover-bg-warning: #e6ac00;
200
+ --button-hover-bg-warning: var(--yellow-700);
153
201
  --button-hover-bg-dark: var(--neutral-700);
154
202
  --button-text-danger: var(--font-color-light);
155
203
  --button-text-primary: var(--font-color-light);
@@ -208,4 +256,12 @@ li {
208
256
  }
209
257
  .content .important p {
210
258
  margin: 0;
259
+ }
260
+
261
+ body {
262
+ margin: 0;
263
+ padding: 0;
264
+ background-color: var(--layout-content-bg);
265
+ font-family: var(--font-family);
266
+ color: var(--font-color-primary);
211
267
  }
@@ -0,0 +1,12 @@
1
+ @use "reset";
2
+ @use "css-variables";
3
+ @use "docs";
4
+ @forward "mixins";
5
+
6
+ body {
7
+ margin: 0;
8
+ padding: 0;
9
+ background-color: var(--layout-content-bg);
10
+ font-family: var(--font-family);
11
+ color: var(--font-color-primary);
12
+ }
@@ -0,0 +1,94 @@
1
+ //mixins
2
+
3
+ //shadow
4
+ //border
5
+ //flex
6
+
7
+ // Shadow Mixin
8
+ @mixin shadow($elevation: 1, $shadow-color: rgba(0, 0, 0, 0.12)) {
9
+ @if $elevation ==1 {
10
+ box-shadow: 0 1px 3px $shadow-color, 0 1px 2px rgba(0, 0, 0, 0.24);
11
+ }
12
+
13
+ @else if $elevation ==2 {
14
+ box-shadow: 0 3px 6px $shadow-color, 0 3px 6px rgba(0, 0, 0, 0.23);
15
+ }
16
+
17
+ @else if $elevation ==3 {
18
+ box-shadow: 0 10px 20px $shadow-color, 0 6px 6px rgba(0, 0, 0, 0.23);
19
+ }
20
+
21
+ @else {
22
+ box-shadow: 0 1px 3px $shadow-color, 0 1px 2px rgba(0, 0, 0, 0.24);
23
+ }
24
+ }
25
+
26
+ // Border Mixin
27
+ @mixin border($width: 1px, $style: solid, $color: var(--border-color-medium), $radius: 0) {
28
+ border: $width $style $color;
29
+ border-radius: $radius;
30
+ }
31
+
32
+ // Flex Mixin
33
+ @mixin flex($direction: row, $justify: flex-start, $align: stretch, $wrap: nowrap) {
34
+ display: flex;
35
+ flex-direction: $direction;
36
+ justify-content: $justify;
37
+ align-items: $align;
38
+ flex-wrap: $wrap;
39
+ }
40
+
41
+ @mixin loading-animation($size: 50px, $color: dark) {
42
+ display: inline-block;
43
+ width: $size;
44
+ height: $size;
45
+ border-radius: 50%;
46
+ position: relative;
47
+ animation: rotate 1s linear infinite;
48
+
49
+ &::before {
50
+ content: "";
51
+ box-sizing: border-box;
52
+ position: absolute;
53
+ inset: 0px;
54
+ border-radius: 50%;
55
+
56
+ @if $color ==dark {
57
+ border: 1px solid var(--neutral-800);
58
+ }
59
+
60
+ @if $color ==light {
61
+ border: 1px solid var(--neutral-50);
62
+ }
63
+
64
+ animation: prixClipFix 2s linear infinite;
65
+ }
66
+
67
+ @keyframes rotate {
68
+ 100% {
69
+ transform: rotate(360deg)
70
+ }
71
+ }
72
+
73
+ @keyframes prixClipFix {
74
+ 0% {
75
+ clip-path: polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0)
76
+ }
77
+
78
+ 25% {
79
+ clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0)
80
+ }
81
+
82
+ 50% {
83
+ clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%)
84
+ }
85
+
86
+ 75% {
87
+ clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%)
88
+ }
89
+
90
+ 100% {
91
+ clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0)
92
+ }
93
+ }
94
+ }
@@ -0,0 +1,16 @@
1
+ h1,
2
+ h2,
3
+ h3,
4
+ h4,
5
+ h5,
6
+ h6 {
7
+ margin: 0;
8
+ padding: 0;
9
+ }
10
+
11
+ ul,
12
+ li {
13
+ margin: 0;
14
+ padding: 0;
15
+ list-style: none;
16
+ }
@@ -4,6 +4,9 @@
4
4
  slot
5
5
  </template>
6
6
 
7
- <script setup>
8
-
7
+ <script lang="ts" setup>
8
+ // Default template for KAccordion
9
9
  </script>
10
+
11
+ <style lang="scss" scoped>
12
+ </style>
@@ -7,44 +7,47 @@
7
7
  slot
8
8
  </template>
9
9
 
10
- <script setup>
11
- const props = defineProps({
12
- title: { type: String, required: true },
13
- isOpen: { type: Boolean, required: true },
14
- toggleAccordion: { type: Function, required: true }
15
- });
10
+ <script lang="ts" setup>
11
+ const props = defineProps<{
12
+ title: string
13
+ isOpen: boolean
14
+ toggleAccordion: () => void
15
+ }>()
16
16
  </script>
17
17
 
18
- <style scoped>
19
- .accordion-item__header {
20
- padding: var(--component-gap);
21
- background-color: var(--background-color-medium);
22
- cursor: pointer;
23
- border-radius: var(--box-border-radius);
24
- }
25
- .isOpen .accordion-item__header {
26
- border-bottom-left-radius: 0;
27
- border-bottom-right-radius: 0;
28
- }
29
- .accordion-item__title {
30
- flex-grow: 1;
31
- }
32
- .accordion-item__chevron {
33
- transform: rotate(90deg);
34
- transition: transform 0.3s ease-in-out;
35
- }
36
- .accordion-item__chevron.open {
37
- transform: rotate(270deg);
38
- }
39
- .accordion-item__content {
40
- display: none;
41
- padding-top: var(--box-padding);
42
- padding-bottom: var(--box-padding);
43
- }
44
- .accordion-item__content.open {
45
- border-bottom: var(--box-border);
46
- }
47
- .isOpen .accordion-item__content {
48
- display: block;
18
+ <style lang="scss" scoped>
19
+ .accordion-item {
20
+ &__header {
21
+ padding: var(--component-gap);
22
+ background-color: var(--background-color-medium);
23
+ cursor: pointer;
24
+ border-radius: var(--box-border-radius);
25
+
26
+ .isOpen & {
27
+ border-bottom-left-radius: 0;
28
+ border-bottom-right-radius: 0;
29
+ }
30
+ }
31
+ &__title {
32
+ flex-grow: 1;
33
+ }
34
+ &__chevron {
35
+ transform: rotate(90deg);
36
+ transition: transform 0.3s ease-in-out;
37
+ &.open {
38
+ transform: rotate(270deg);
39
+ }
40
+ }
41
+ &__content {
42
+ display: none;
43
+ padding-top: var(--box-padding);
44
+ padding-bottom: var(--box-padding);
45
+ &.open {
46
+ border-bottom: var(--box-border);
47
+ }
48
+ .isOpen & {
49
+ display: block;
50
+ }
51
+ }
49
52
  }
50
53
  </style>
@@ -8,31 +8,38 @@
8
8
  .info Selected {{props.selectedRows.length}} items
9
9
  </template>
10
10
 
11
- <script setup>
12
- import { computed } from "vue";
13
- import { CFlatClientDataProvider } from "@katlux/providers";
14
- const props = defineProps({
15
- bulkActions: { type: Array, required: true },
16
- selectedRows: { type: Array, required: true },
17
- selectAll: { type: Boolean, required: true },
18
- selected: { type: null, required: true },
19
- dp: { type: Object, required: true },
20
- doAction: { type: Function, required: true }
21
- });
22
- const emit = defineEmits(["update:selected"]);
11
+ <script setup lang="ts">
12
+ import { computed } from 'vue'
13
+ import { CFlatClientDataProvider } from '@katlux/providers'
14
+ import type { IKDatatableAction } from '@katlux/providers'
15
+
16
+ const props = defineProps<{
17
+ bulkActions: IKDatatableAction[]
18
+ selectedRows: any[]
19
+ selectAll: boolean
20
+ selected: any
21
+ dp: CFlatClientDataProvider
22
+ doAction: (action: any) => void
23
+ }>()
24
+
25
+ const emit = defineEmits<{
26
+ (e: 'update:selected', value: any): void
27
+ }>()
28
+
23
29
  const internalSelected = computed({
24
- get: () => props.selected,
25
- set: (val) => emit("update:selected", val)
26
- });
30
+ get: () => props.selected,
31
+ set: (val) => emit('update:selected', val)
32
+ })
33
+
27
34
  </script>
28
35
 
29
- <style scoped>
36
+ <style lang="scss" scoped>
30
37
  .k-bulk-actions {
31
- display: flex;
32
- gap: 10px;
33
- }
34
- .k-bulk-actions .info {
35
- display: flex;
36
- align-items: center;
38
+ display: flex;
39
+ gap: 10px;
40
+ .info {
41
+ display: flex;
42
+ align-items: center;
43
+ }
37
44
  }
38
45
  </style>