@katlux/toolkit 0.1.0-beta.53 → 0.1.0-beta.55

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 (44) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/KButton/KButton.logic.d.ts +1 -1
  3. package/dist/runtime/components/KCombobox/KCombobox.global.d.vue.ts +2 -2
  4. package/dist/runtime/components/KCombobox/KCombobox.global.vue.d.ts +2 -2
  5. package/dist/runtime/components/KCompositeInput/KCompositeInput.global.d.vue.ts +2 -2
  6. package/dist/runtime/components/KCompositeInput/KCompositeInput.global.vue.d.ts +2 -2
  7. package/dist/runtime/components/KDatatable/KDataIterator.logic.d.ts +0 -20
  8. package/dist/runtime/components/KDatatable/KDatatable.logic.d.ts +0 -12
  9. package/dist/runtime/components/KDatePicker/KDatePicker.global.d.vue.ts +10 -1
  10. package/dist/runtime/components/KDatePicker/KDatePicker.global.vue +2 -1
  11. package/dist/runtime/components/KDatePicker/KDatePicker.global.vue.d.ts +10 -1
  12. package/dist/runtime/components/KDatePicker/KDatePicker.logic.d.ts +5 -0
  13. package/dist/runtime/components/KDatePicker/KDatePicker.logic.js +4 -0
  14. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.d.vue.ts +1 -1
  15. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue.d.ts +1 -1
  16. package/dist/runtime/components/KDropdown/KDropdown.global.d.vue.ts +9 -0
  17. package/dist/runtime/components/KDropdown/KDropdown.global.vue +2 -1
  18. package/dist/runtime/components/KDropdown/KDropdown.global.vue.d.ts +9 -0
  19. package/dist/runtime/components/KDropdown/KDropdown.logic.d.ts +8 -0
  20. package/dist/runtime/components/KDropdown/KDropdown.logic.js +8 -1
  21. package/dist/runtime/components/KGrid/KGrid.global.d.vue.ts +1 -1
  22. package/dist/runtime/components/KGrid/KGrid.global.vue.d.ts +1 -1
  23. package/dist/runtime/components/KHourPicker/KHourPicker.global.d.vue.ts +1 -1
  24. package/dist/runtime/components/KHourPicker/KHourPicker.global.vue.d.ts +1 -1
  25. package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.d.vue.ts +1 -1
  26. package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.vue.d.ts +1 -1
  27. package/dist/runtime/components/KTextarea/KTextarea.global.d.vue.ts +1 -1
  28. package/dist/runtime/components/KTextarea/KTextarea.global.vue.d.ts +1 -1
  29. package/dist/runtime/components/KTextbox/KTextbox.global.d.vue.ts +1 -1
  30. package/dist/runtime/components/KTextbox/KTextbox.global.vue.d.ts +1 -1
  31. package/dist/runtime/components/KTreePicker/KTreePicker.global.d.vue.ts +15 -4
  32. package/dist/runtime/components/KTreePicker/KTreePicker.global.vue +5 -2
  33. package/dist/runtime/components/KTreePicker/KTreePicker.global.vue.d.ts +15 -4
  34. package/dist/runtime/components/KTreePicker/KTreePicker.logic.d.ts +5 -0
  35. package/dist/runtime/components/KTreePicker/KTreePicker.logic.js +4 -0
  36. package/dist/runtime/components/KTreeView/KTreeView.global.d.vue.ts +3 -3
  37. package/dist/runtime/components/KTreeView/KTreeView.global.vue.d.ts +3 -3
  38. package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.d.vue.ts +1 -0
  39. package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue +2 -1
  40. package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue.d.ts +1 -0
  41. package/dist/runtime/presets/default/components/KDropdown/KDropdown.d.vue.ts +2 -0
  42. package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue +18 -8
  43. package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue.d.ts +2 -0
  44. package/package.json +1 -1
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@katlux/toolkit",
3
3
  "configKey": "katluxToolkit",
4
- "version": "0.1.0-beta.53",
4
+ "version": "0.1.0-beta.55",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -22,7 +22,7 @@ export interface KButtonEmits {
22
22
  export declare function useKButtonLogic(props: KButtonProps, emit: KButtonEmits): {
23
23
  isLink: import("vue").ComputedRef<boolean>;
24
24
  isDisabled: import("vue").ComputedRef<boolean | undefined>;
25
- buttonClasses: import("vue").ComputedRef<("info" | "default" | "primary" | "danger" | "success" | "warning" | "light" | "dark" | "small" | "large" | "medium" | {
25
+ buttonClasses: import("vue").ComputedRef<("info" | "default" | "small" | "primary" | "danger" | "success" | "warning" | "light" | "dark" | "large" | "medium" | {
26
26
  disabled: boolean | undefined;
27
27
  })[]>;
28
28
  onClick: () => void;
@@ -132,17 +132,17 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
132
132
  }>, {
133
133
  disabled: boolean;
134
134
  validation: "error" | "success" | "warning" | null | undefined;
135
- validationText: string;
136
- modelValue: any;
137
135
  searchbox: boolean;
138
136
  isOptionsOpen: boolean;
139
137
  placeholder: string;
140
138
  teleportTo: string;
139
+ validationText: string;
141
140
  closeOnSelect: boolean;
142
141
  multiSelect: boolean;
143
142
  maxSelectedDisplay: string | number | boolean;
144
143
  visibleFields: String[];
145
144
  valueField: string;
145
+ modelValue: any;
146
146
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
147
147
  declare const _default: typeof __VLS_export;
148
148
  export default _default;
@@ -132,17 +132,17 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
132
132
  }>, {
133
133
  disabled: boolean;
134
134
  validation: "error" | "success" | "warning" | null | undefined;
135
- validationText: string;
136
- modelValue: any;
137
135
  searchbox: boolean;
138
136
  isOptionsOpen: boolean;
139
137
  placeholder: string;
140
138
  teleportTo: string;
139
+ validationText: string;
141
140
  closeOnSelect: boolean;
142
141
  multiSelect: boolean;
143
142
  maxSelectedDisplay: string | number | boolean;
144
143
  visibleFields: String[];
145
144
  valueField: string;
145
+ modelValue: any;
146
146
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
147
147
  declare const _default: typeof __VLS_export;
148
148
  export default _default;
@@ -150,13 +150,13 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
150
150
  }>, {
151
151
  type: import("./KCompositeInput.logic.js").CompositeInputType;
152
152
  validation: "error" | "success" | "warning" | null | undefined;
153
- validationText: string;
154
- modelValue: import("./KCompositeInput.logic.js").ICompositeItem[];
155
153
  searchbox: boolean;
156
154
  labelField: string;
157
155
  placeholder: string;
158
156
  teleportTo: string;
157
+ validationText: string;
159
158
  valueField: string;
159
+ modelValue: import("./KCompositeInput.logic.js").ICompositeItem[];
160
160
  inputType: "number" | "text" | "url" | "search" | "password" | "email" | "tel" | undefined;
161
161
  selectionValue: string | number | Record<string, any> | unknown[];
162
162
  inputValue: string | number | Record<string, any> | unknown[];
@@ -150,13 +150,13 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
150
150
  }>, {
151
151
  type: import("./KCompositeInput.logic.js").CompositeInputType;
152
152
  validation: "error" | "success" | "warning" | null | undefined;
153
- validationText: string;
154
- modelValue: import("./KCompositeInput.logic.js").ICompositeItem[];
155
153
  searchbox: boolean;
156
154
  labelField: string;
157
155
  placeholder: string;
158
156
  teleportTo: string;
157
+ validationText: string;
159
158
  valueField: string;
159
+ modelValue: import("./KCompositeInput.logic.js").ICompositeItem[];
160
160
  inputType: "number" | "text" | "url" | "search" | "password" | "email" | "tel" | undefined;
161
161
  selectionValue: string | number | Record<string, any> | unknown[];
162
162
  inputValue: string | number | Record<string, any> | unknown[];
@@ -1,20 +0,0 @@
1
- import { ADataProvider } from '@katlux/providers';
2
- export interface KDataIteratorProps {
3
- dataProvider: ADataProvider;
4
- visibleFields?: Array<string> | null;
5
- loading?: boolean;
6
- search?: string;
7
- itemsPerPage?: number;
8
- page?: number;
9
- }
10
- export declare const KDataIteratorDefaultProps: {
11
- visibleFields: null;
12
- loading: boolean;
13
- search: string;
14
- itemsPerPage: number;
15
- page: number;
16
- };
17
- export declare function useKDataIteratorLogic(props: KDataIteratorProps): {
18
- selectedRows: import("vue").Ref<any[], any[]>;
19
- selectAll: import("vue").Ref<boolean, boolean>;
20
- };
@@ -1,12 +0,0 @@
1
- import { ADataProvider } from '@katlux/providers';
2
- export interface KDatatableProps {
3
- dataProvider: ADataProvider;
4
- visibleFields?: Array<string> | null;
5
- }
6
- export declare const KDatatableDefaultProps: {
7
- visibleFields: null;
8
- };
9
- export declare function useKDatatableLogic(props: KDatatableProps): {
10
- selectedRows: import("vue").Ref<any[], any[]>;
11
- selectAll: import("vue").Ref<boolean, boolean>;
12
- };
@@ -41,6 +41,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
41
41
  type: StringConstructor;
42
42
  default: string;
43
43
  };
44
+ align: {
45
+ type: import("vue").PropType<KDatePickerProps["align"]>;
46
+ default: string;
47
+ };
44
48
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
45
49
  "update:modelValue": (value: string | Date) => any;
46
50
  "update:maskedModel": (value: string) => any;
@@ -89,6 +93,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
89
93
  type: StringConstructor;
90
94
  default: string;
91
95
  };
96
+ align: {
97
+ type: import("vue").PropType<KDatePickerProps["align"]>;
98
+ default: string;
99
+ };
92
100
  }>> & Readonly<{
93
101
  "onUpdate:modelValue"?: ((value: string | Date) => any) | undefined;
94
102
  "onUpdate:maskedModel"?: ((value: string) => any) | undefined;
@@ -99,10 +107,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
99
107
  isOpen: boolean;
100
108
  day: string | Date;
101
109
  validation: "error" | "success" | "warning" | null | undefined;
110
+ teleportTo: string;
102
111
  validationText: string;
103
112
  modelValue: string | Date;
104
- teleportTo: string;
105
113
  showClear: boolean;
114
+ align: "left" | "right" | undefined;
106
115
  format: string;
107
116
  calendarDefinedDays: import("../KCalendar/types.js").IDefinedDay[];
108
117
  calendarMarkedDays: import("../KCalendar/types.js").IMarkedDay[];
@@ -28,7 +28,8 @@ const templateProps = computed(() => ({
28
28
  dateSelected: handleDateSelected,
29
29
  teleportTo: props.teleportTo,
30
30
  validation: props.validation,
31
- validationText: props.validationText
31
+ validationText: props.validationText,
32
+ align: props.align
32
33
  }));
33
34
  const handleClear = () => {
34
35
  _date.value = "";
@@ -41,6 +41,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
41
41
  type: StringConstructor;
42
42
  default: string;
43
43
  };
44
+ align: {
45
+ type: import("vue").PropType<KDatePickerProps["align"]>;
46
+ default: string;
47
+ };
44
48
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
45
49
  "update:modelValue": (value: string | Date) => any;
46
50
  "update:maskedModel": (value: string) => any;
@@ -89,6 +93,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
89
93
  type: StringConstructor;
90
94
  default: string;
91
95
  };
96
+ align: {
97
+ type: import("vue").PropType<KDatePickerProps["align"]>;
98
+ default: string;
99
+ };
92
100
  }>> & Readonly<{
93
101
  "onUpdate:modelValue"?: ((value: string | Date) => any) | undefined;
94
102
  "onUpdate:maskedModel"?: ((value: string) => any) | undefined;
@@ -99,10 +107,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
99
107
  isOpen: boolean;
100
108
  day: string | Date;
101
109
  validation: "error" | "success" | "warning" | null | undefined;
110
+ teleportTo: string;
102
111
  validationText: string;
103
112
  modelValue: string | Date;
104
- teleportTo: string;
105
113
  showClear: boolean;
114
+ align: "left" | "right" | undefined;
106
115
  format: string;
107
116
  calendarDefinedDays: import("../KCalendar/types.js").IDefinedDay[];
108
117
  calendarMarkedDays: import("../KCalendar/types.js").IMarkedDay[];
@@ -11,6 +11,7 @@ export interface KDatePickerProps {
11
11
  teleportTo?: string;
12
12
  validation?: 'success' | 'warning' | 'error' | null;
13
13
  validationText?: string;
14
+ align?: 'left' | 'right';
14
15
  }
15
16
  export declare const KDatePickerDefaultProps: {
16
17
  format: {
@@ -54,6 +55,10 @@ export declare const KDatePickerDefaultProps: {
54
55
  type: StringConstructor;
55
56
  default: string;
56
57
  };
58
+ align: {
59
+ type: PropType<KDatePickerProps["align"]>;
60
+ default: string;
61
+ };
57
62
  };
58
63
  export declare function useKDatePickerLogic(props: KDatePickerProps): {
59
64
  _date: import("vue").Ref<string | Date, string | Date>;
@@ -40,6 +40,10 @@ export const KDatePickerDefaultProps = {
40
40
  validationText: {
41
41
  type: String,
42
42
  default: ""
43
+ },
44
+ align: {
45
+ type: String,
46
+ default: "left"
43
47
  }
44
48
  };
45
49
  export function useKDatePickerLogic(props) {
@@ -113,9 +113,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
113
113
  isOpen: boolean;
114
114
  day: string | Date;
115
115
  validation: "error" | "success" | "warning" | null | undefined;
116
+ teleportTo: string;
116
117
  validationText: string;
117
118
  modelValue: string | Date;
118
- teleportTo: string;
119
119
  showClear: boolean;
120
120
  format: string;
121
121
  calendarDefinedDays: import("../KCalendar/types.js").IDefinedDay[];
@@ -113,9 +113,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
113
113
  isOpen: boolean;
114
114
  day: string | Date;
115
115
  validation: "error" | "success" | "warning" | null | undefined;
116
+ teleportTo: string;
116
117
  validationText: string;
117
118
  modelValue: string | Date;
118
- teleportTo: string;
119
119
  showClear: boolean;
120
120
  format: string;
121
121
  calendarDefinedDays: import("../KCalendar/types.js").IDefinedDay[];
@@ -15,6 +15,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
15
15
  type: import("vue").PropType<string>;
16
16
  default: undefined;
17
17
  };
18
+ align: {
19
+ type: import("vue").PropType<"left" | "right">;
20
+ default: string;
21
+ };
18
22
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
19
23
  "update:isOpen": (value: boolean) => any;
20
24
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
@@ -34,11 +38,16 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
34
38
  type: import("vue").PropType<string>;
35
39
  default: undefined;
36
40
  };
41
+ align: {
42
+ type: import("vue").PropType<"left" | "right">;
43
+ default: string;
44
+ };
37
45
  }>> & Readonly<{
38
46
  "onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
39
47
  }>, {
40
48
  isOpen: boolean;
41
49
  teleportTo: string;
50
+ align: "left" | "right";
42
51
  fullWidth: boolean;
43
52
  anchorEl: HTMLElement;
44
53
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -19,7 +19,8 @@ const templateProps = computed(() => ({
19
19
  dropdownRect: dropdownRect.value,
20
20
  clickoutside,
21
21
  teleportTarget: teleportTarget.value,
22
- isInModal: isInModal.value
22
+ isInModal: isInModal.value,
23
+ align: props.align
23
24
  }));
24
25
  </script>
25
26
 
@@ -15,6 +15,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
15
15
  type: import("vue").PropType<string>;
16
16
  default: undefined;
17
17
  };
18
+ align: {
19
+ type: import("vue").PropType<"left" | "right">;
20
+ default: string;
21
+ };
18
22
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
19
23
  "update:isOpen": (value: boolean) => any;
20
24
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
@@ -34,11 +38,16 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
34
38
  type: import("vue").PropType<string>;
35
39
  default: undefined;
36
40
  };
41
+ align: {
42
+ type: import("vue").PropType<"left" | "right">;
43
+ default: string;
44
+ };
37
45
  }>> & Readonly<{
38
46
  "onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
39
47
  }>, {
40
48
  isOpen: boolean;
41
49
  teleportTo: string;
50
+ align: "left" | "right";
42
51
  fullWidth: boolean;
43
52
  anchorEl: HTMLElement;
44
53
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -4,6 +4,7 @@ export interface KDropdownProps {
4
4
  fullWidth: boolean;
5
5
  anchorEl?: HTMLElement;
6
6
  teleportTo?: string;
7
+ align?: 'left' | 'right';
7
8
  }
8
9
  export interface KDropdownEmits {
9
10
  (e: 'update:isOpen', value: boolean): void;
@@ -25,20 +26,27 @@ export declare const KDropdownDefaultProps: {
25
26
  type: PropType<string>;
26
27
  default: undefined;
27
28
  };
29
+ align: {
30
+ type: PropType<"left" | "right">;
31
+ default: string;
32
+ };
28
33
  };
29
34
  export declare function useKDropdownLogic(props: KDropdownProps, emit: KDropdownEmits): {
30
35
  open: Ref<boolean, boolean>;
31
36
  dropdownRect: Ref<{
32
37
  top: number;
33
38
  left: number;
39
+ right: number;
34
40
  width: number;
35
41
  }, {
36
42
  top: number;
37
43
  left: number;
44
+ right: number;
38
45
  width: number;
39
46
  } | {
40
47
  top: number;
41
48
  left: number;
49
+ right: number;
42
50
  width: number;
43
51
  }>;
44
52
  clickoutside: () => void;
@@ -16,6 +16,10 @@ export const KDropdownDefaultProps = {
16
16
  teleportTo: {
17
17
  type: String,
18
18
  default: void 0
19
+ },
20
+ align: {
21
+ type: String,
22
+ default: "left"
19
23
  }
20
24
  };
21
25
  export function useKDropdownLogic(props, emit) {
@@ -34,7 +38,7 @@ export function useKDropdownLogic(props, emit) {
34
38
  return "body";
35
39
  });
36
40
  const open = ref(false);
37
- const dropdownRect = ref({ top: 0, left: 0, width: 0 });
41
+ const dropdownRect = ref({ top: 0, left: 0, right: 0, width: 0 });
38
42
  const clickoutside = () => {
39
43
  open.value = false;
40
44
  emit("update:isOpen", open.value);
@@ -49,14 +53,17 @@ export function useKDropdownLogic(props, emit) {
49
53
  dropdownRect.value = {
50
54
  top: rect.bottom + window.scrollY,
51
55
  left: rect.left + window.scrollX,
56
+ right: document.documentElement.clientWidth - rect.right + window.scrollX,
52
57
  width: rect.width
53
58
  };
54
59
  } else {
55
60
  const portalEl = document.querySelector(teleportTarget.value);
56
61
  const portalRect = portalEl ? portalEl.getBoundingClientRect() : { top: 0, left: 0 };
62
+ const portalWidth = portalEl ? portalEl.clientWidth : document.documentElement.clientWidth;
57
63
  dropdownRect.value = {
58
64
  top: rect.bottom - portalRect.top,
59
65
  left: rect.left - portalRect.left,
66
+ right: portalWidth - (rect.right - portalRect.left),
60
67
  width: rect.width
61
68
  };
62
69
  }
@@ -1,9 +1,9 @@
1
1
  import { type KGridProps } from './KGrid.logic.js';
2
2
  declare const __VLS_export: import("vue").DefineComponent<KGridProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<KGridProps> & Readonly<{}>, {
3
+ align: "start" | "center" | "end" | "stretch" | "baseline";
3
4
  wrap: "wrap" | "nowrap";
4
5
  direction: "row" | "column";
5
6
  flexChild: boolean;
6
- align: "start" | "center" | "end" | "stretch" | "baseline";
7
7
  justify: "start" | "center" | "end" | "space-between" | "around" | "evenly";
8
8
  noGap: boolean;
9
9
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -1,9 +1,9 @@
1
1
  import { type KGridProps } from './KGrid.logic.js';
2
2
  declare const __VLS_export: import("vue").DefineComponent<KGridProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<KGridProps> & Readonly<{}>, {
3
+ align: "start" | "center" | "end" | "stretch" | "baseline";
3
4
  wrap: "wrap" | "nowrap";
4
5
  direction: "row" | "column";
5
6
  flexChild: boolean;
6
- align: "start" | "center" | "end" | "stretch" | "baseline";
7
7
  justify: "start" | "center" | "end" | "space-between" | "around" | "evenly";
8
8
  noGap: boolean;
9
9
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -101,9 +101,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
101
101
  isOpen: boolean;
102
102
  disabled: boolean;
103
103
  validation: "error" | "success" | "warning" | null | undefined;
104
+ placeholder: string;
104
105
  validationText: string;
105
106
  modelValue: string;
106
- placeholder: string;
107
107
  showClear: boolean;
108
108
  format: string;
109
109
  step: number;
@@ -101,9 +101,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
101
101
  isOpen: boolean;
102
102
  disabled: boolean;
103
103
  validation: "error" | "success" | "warning" | null | undefined;
104
+ placeholder: string;
104
105
  validationText: string;
105
106
  modelValue: string;
106
- placeholder: string;
107
107
  showClear: boolean;
108
108
  format: string;
109
109
  step: number;
@@ -57,9 +57,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
57
57
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
58
58
  }>, {
59
59
  validation: "error" | "success" | "warning" | null | undefined;
60
+ placeholder: string;
60
61
  validationText: string;
61
62
  modelValue: string;
62
- placeholder: string;
63
63
  showClear: boolean;
64
64
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
65
65
  declare const _default: typeof __VLS_export;
@@ -57,9 +57,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
57
57
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
58
58
  }>, {
59
59
  validation: "error" | "success" | "warning" | null | undefined;
60
+ placeholder: string;
60
61
  validationText: string;
61
62
  modelValue: string;
62
- placeholder: string;
63
63
  showClear: boolean;
64
64
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
65
65
  declare const _default: typeof __VLS_export;
@@ -50,8 +50,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
50
50
  }>, {
51
51
  rows: number;
52
52
  validation: "error" | "success" | "warning" | null | undefined;
53
- validationText: string;
54
53
  placeholder: string;
54
+ validationText: string;
55
55
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
56
56
  declare const _default: typeof __VLS_export;
57
57
  export default _default;
@@ -50,8 +50,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
50
50
  }>, {
51
51
  rows: number;
52
52
  validation: "error" | "success" | "warning" | null | undefined;
53
- validationText: string;
54
53
  placeholder: string;
54
+ validationText: string;
55
55
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
56
56
  declare const _default: typeof __VLS_export;
57
57
  export default _default;
@@ -60,9 +60,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
60
60
  }>, {
61
61
  type: "number" | "text" | "url" | "search" | "password" | "email" | "tel" | undefined;
62
62
  validation: "error" | "success" | "warning" | null | undefined;
63
+ placeholder: string;
63
64
  validationText: string;
64
65
  modelValue: string;
65
- placeholder: string;
66
66
  showClear: boolean;
67
67
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
68
68
  declare const _default: typeof __VLS_export;
@@ -60,9 +60,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
60
60
  }>, {
61
61
  type: "number" | "text" | "url" | "search" | "password" | "email" | "tel" | undefined;
62
62
  validation: "error" | "success" | "warning" | null | undefined;
63
+ placeholder: string;
63
64
  validationText: string;
64
65
  modelValue: string;
65
- placeholder: string;
66
66
  showClear: boolean;
67
67
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
68
68
  declare const _default: typeof __VLS_export;
@@ -61,9 +61,14 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
61
61
  type: StringConstructor;
62
62
  default: string;
63
63
  };
64
+ isOptionsOpen: {
65
+ type: BooleanConstructor;
66
+ default: undefined;
67
+ };
64
68
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
65
69
  change: (value: any) => any;
66
70
  "update:modelValue": (value: any) => any;
71
+ "update:isOptionsOpen": (value: boolean) => any;
67
72
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
68
73
  modelValue: {
69
74
  type: import("vue").PropType<any>;
@@ -126,23 +131,29 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
126
131
  type: StringConstructor;
127
132
  default: string;
128
133
  };
134
+ isOptionsOpen: {
135
+ type: BooleanConstructor;
136
+ default: undefined;
137
+ };
129
138
  }>> & Readonly<{
130
139
  onChange?: ((value: any) => any) | undefined;
131
140
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
141
+ "onUpdate:isOptionsOpen"?: ((value: boolean) => any) | undefined;
132
142
  }>, {
133
- parentKey: string;
134
- idKey: string;
135
143
  disabled: boolean;
136
144
  loading: boolean;
137
145
  validation: "error" | "success" | "warning" | null | undefined;
138
- validationText: string;
139
- modelValue: any;
140
146
  searchbox: boolean;
147
+ isOptionsOpen: boolean;
141
148
  placeholder: string;
149
+ validationText: string;
142
150
  closeOnSelect: boolean;
143
151
  multiSelect: boolean;
144
152
  valueField: string;
153
+ modelValue: any;
145
154
  iconField: string;
155
+ idKey: string;
156
+ parentKey: string;
146
157
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
147
158
  declare const _default: typeof __VLS_export;
148
159
  export default _default;
@@ -1,10 +1,10 @@
1
1
  <script setup>
2
2
  import { KTreePickerDefaultProps, useKTreePickerLogic } from "./KTreePicker.logic";
3
3
  import { usePresetComponent } from "../../composables/usePresetComponent";
4
- import { computed } from "vue";
4
+ import { computed, watch } from "vue";
5
5
  import KTreePickerDefault from "../../presets/default/components/KTreePicker/KTreePicker.vue";
6
6
  const props = defineProps(KTreePickerDefaultProps);
7
- const emit = defineEmits(["update:modelValue", "change"]);
7
+ const emit = defineEmits(["update:modelValue", "change", "update:isOptionsOpen"]);
8
8
  const {
9
9
  selectedItems,
10
10
  isOptionsOpen,
@@ -17,6 +17,9 @@ const {
17
17
  filteredOptions,
18
18
  loading
19
19
  } = useKTreePickerLogic(props, emit);
20
+ watch(isOptionsOpen, (newVal) => {
21
+ emit("update:isOptionsOpen", newVal);
22
+ });
20
23
  const presetComponent = usePresetComponent("KTreePicker", KTreePickerDefault);
21
24
  const templateProps = computed(() => ({
22
25
  // KTreePicker specific
@@ -61,9 +61,14 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
61
61
  type: StringConstructor;
62
62
  default: string;
63
63
  };
64
+ isOptionsOpen: {
65
+ type: BooleanConstructor;
66
+ default: undefined;
67
+ };
64
68
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
65
69
  change: (value: any) => any;
66
70
  "update:modelValue": (value: any) => any;
71
+ "update:isOptionsOpen": (value: boolean) => any;
67
72
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
68
73
  modelValue: {
69
74
  type: import("vue").PropType<any>;
@@ -126,23 +131,29 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
126
131
  type: StringConstructor;
127
132
  default: string;
128
133
  };
134
+ isOptionsOpen: {
135
+ type: BooleanConstructor;
136
+ default: undefined;
137
+ };
129
138
  }>> & Readonly<{
130
139
  onChange?: ((value: any) => any) | undefined;
131
140
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
141
+ "onUpdate:isOptionsOpen"?: ((value: boolean) => any) | undefined;
132
142
  }>, {
133
- parentKey: string;
134
- idKey: string;
135
143
  disabled: boolean;
136
144
  loading: boolean;
137
145
  validation: "error" | "success" | "warning" | null | undefined;
138
- validationText: string;
139
- modelValue: any;
140
146
  searchbox: boolean;
147
+ isOptionsOpen: boolean;
141
148
  placeholder: string;
149
+ validationText: string;
142
150
  closeOnSelect: boolean;
143
151
  multiSelect: boolean;
144
152
  valueField: string;
153
+ modelValue: any;
145
154
  iconField: string;
155
+ idKey: string;
156
+ parentKey: string;
146
157
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
147
158
  declare const _default: typeof __VLS_export;
148
159
  export default _default;
@@ -16,6 +16,7 @@ export interface KTreePickerProps {
16
16
  searchbox?: boolean;
17
17
  validation?: 'success' | 'warning' | 'error' | null;
18
18
  validationText?: string;
19
+ isOptionsOpen?: boolean;
19
20
  }
20
21
  export declare const KTreePickerDefaultProps: {
21
22
  modelValue: {
@@ -79,6 +80,10 @@ export declare const KTreePickerDefaultProps: {
79
80
  type: StringConstructor;
80
81
  default: string;
81
82
  };
83
+ isOptionsOpen: {
84
+ type: BooleanConstructor;
85
+ default: undefined;
86
+ };
82
87
  };
83
88
  export declare function useKTreePickerLogic(props: KTreePickerProps, emit: any): {
84
89
  selectedItems: import("vue").Ref<import("@katlux/providers").TDataRow[] | null, import("@katlux/providers").TDataRow[] | null>;
@@ -60,6 +60,10 @@ export const KTreePickerDefaultProps = {
60
60
  validationText: {
61
61
  type: String,
62
62
  default: ""
63
+ },
64
+ isOptionsOpen: {
65
+ type: Boolean,
66
+ default: void 0
63
67
  }
64
68
  };
65
69
  import { useKComboboxLogic } from "../KCombobox/KCombobox.logic.js";
@@ -81,14 +81,14 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
81
81
  default: () => {};
82
82
  };
83
83
  }>> & Readonly<{}>, {
84
- parentKey: string;
85
- idKey: string;
86
- expandedByDefault: boolean;
87
84
  bulkActions: import("@katlux/providers").IKDatatableAction[];
88
85
  rowActions: import("./KTreeView.logic.js").IRowAction[];
89
86
  cellSlots: Record<string, any>;
90
87
  headerSlots: Record<string, any>;
91
88
  treeColumnIndex: number;
89
+ idKey: string;
90
+ parentKey: string;
91
+ expandedByDefault: boolean;
92
92
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
93
93
  declare const _default: typeof __VLS_export;
94
94
  export default _default;
@@ -81,14 +81,14 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
81
81
  default: () => {};
82
82
  };
83
83
  }>> & Readonly<{}>, {
84
- parentKey: string;
85
- idKey: string;
86
- expandedByDefault: boolean;
87
84
  bulkActions: import("@katlux/providers").IKDatatableAction[];
88
85
  rowActions: import("./KTreeView.logic.js").IRowAction[];
89
86
  cellSlots: Record<string, any>;
90
87
  headerSlots: Record<string, any>;
91
88
  treeColumnIndex: number;
89
+ idKey: string;
90
+ parentKey: string;
91
+ expandedByDefault: boolean;
92
92
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
93
93
  declare const _default: typeof __VLS_export;
94
94
  export default _default;
@@ -14,6 +14,7 @@ type __VLS_Props = {
14
14
  teleportTo?: string;
15
15
  validation?: 'success' | 'warning' | 'error' | null;
16
16
  validationText?: string;
17
+ align?: 'left' | 'right';
17
18
  };
18
19
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
19
20
  "update:maskedModel": (value: string) => any;
@@ -11,7 +11,7 @@
11
11
  :validation="validation"
12
12
  :validationText="validationText"
13
13
  )
14
- KDropdown(v-model:isOpen="calendarShow" :anchorEl="activatorRef" :teleportTo="teleportTo")
14
+ KDropdown(v-model:isOpen="calendarShow" :anchorEl="activatorRef" :teleportTo="teleportTo" :align="align")
15
15
  KCalendar(view="month" :viewCount="1" :day="calendarDay" :selectedDay="_date" @dayClicked="dateSelected" :definedDays="calendarDefinedDays" :markedDays="calendarMarkedDays")
16
16
  </template>
17
17
 
@@ -38,6 +38,7 @@ const props = defineProps<{
38
38
  teleportTo?: string
39
39
  validation?: 'success' | 'warning' | 'error' | null
40
40
  validationText?: string
41
+ align?: 'left' | 'right'
41
42
  }>()
42
43
 
43
44
  const emit = defineEmits<{
@@ -14,6 +14,7 @@ type __VLS_Props = {
14
14
  teleportTo?: string;
15
15
  validation?: 'success' | 'warning' | 'error' | null;
16
16
  validationText?: string;
17
+ align?: 'left' | 'right';
17
18
  };
18
19
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
19
20
  "update:maskedModel": (value: string) => any;
@@ -5,11 +5,13 @@ type __VLS_Props = {
5
5
  dropdownRect: {
6
6
  top: number;
7
7
  left: number;
8
+ right: number;
8
9
  width: number;
9
10
  };
10
11
  clickoutside: () => void;
11
12
  teleportTarget: string | null;
12
13
  isInModal: boolean;
14
+ align?: 'left' | 'right';
13
15
  };
14
16
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
17
  declare const _default: typeof __VLS_export;
@@ -18,10 +18,11 @@ const props = defineProps<{
18
18
  open: boolean
19
19
  fullWidth: boolean
20
20
  anchorEl?: HTMLElement
21
- dropdownRect: { top: number, left: number, width: number }
21
+ dropdownRect: { top: number, left: number, right: number, width: number }
22
22
  clickoutside: () => void
23
23
  teleportTarget: string | null
24
24
  isInModal: boolean
25
+ align?: 'left' | 'right'
25
26
  }>()
26
27
 
27
28
  const isMounted = ref(false)
@@ -29,13 +30,22 @@ onMounted(() => {
29
30
  isMounted.value = true
30
31
  })
31
32
 
32
- const dialogStyle = computed(() => ({
33
- position: 'absolute',
34
- top: `${props.dropdownRect.top}px`,
35
- left: `${props.dropdownRect.left}px`,
36
- width: props.fullWidth ? `${props.dropdownRect.width}px` : 'fit-content',
37
- zIndex: 2000
38
- }))
33
+ const dialogStyle = computed(() => {
34
+ const style: any = {
35
+ position: 'absolute',
36
+ top: `${props.dropdownRect.top}px`,
37
+ width: props.fullWidth ? `${props.dropdownRect.width}px` : 'fit-content',
38
+ zIndex: 2000
39
+ }
40
+
41
+ if (props.align === 'right') {
42
+ style.right = `${props.dropdownRect.right}px`
43
+ } else {
44
+ style.left = `${props.dropdownRect.left}px`
45
+ }
46
+
47
+ return style
48
+ })
39
49
  </script>
40
50
 
41
51
  <style lang="scss" scoped>
@@ -5,11 +5,13 @@ type __VLS_Props = {
5
5
  dropdownRect: {
6
6
  top: number;
7
7
  left: number;
8
+ right: number;
8
9
  width: number;
9
10
  };
10
11
  clickoutside: () => void;
11
12
  teleportTarget: string | null;
12
13
  isInModal: boolean;
14
+ align?: 'left' | 'right';
13
15
  };
14
16
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
17
  declare const _default: typeof __VLS_export;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@katlux/toolkit",
3
- "version": "0.1.0-beta.53",
3
+ "version": "0.1.0-beta.55",
4
4
  "description": "Core UI toolkit and utilities for the Katlux ecosystem",
5
5
  "author": "Katlux",
6
6
  "license": "MIT",