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

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 (24) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/KDatePicker/KDatePicker.global.d.vue.ts +9 -0
  3. package/dist/runtime/components/KDatePicker/KDatePicker.global.vue +2 -1
  4. package/dist/runtime/components/KDatePicker/KDatePicker.global.vue.d.ts +9 -0
  5. package/dist/runtime/components/KDatePicker/KDatePicker.logic.d.ts +5 -0
  6. package/dist/runtime/components/KDatePicker/KDatePicker.logic.js +4 -0
  7. package/dist/runtime/components/KDropdown/KDropdown.global.d.vue.ts +9 -0
  8. package/dist/runtime/components/KDropdown/KDropdown.global.vue.d.ts +9 -0
  9. package/dist/runtime/components/KDropdown/KDropdown.logic.d.ts +8 -0
  10. package/dist/runtime/components/KDropdown/KDropdown.logic.js +8 -1
  11. package/dist/runtime/components/KGrid/KGrid.global.d.vue.ts +1 -1
  12. package/dist/runtime/components/KGrid/KGrid.global.vue.d.ts +1 -1
  13. package/dist/runtime/components/KTreePicker/KTreePicker.global.d.vue.ts +11 -0
  14. package/dist/runtime/components/KTreePicker/KTreePicker.global.vue +5 -2
  15. package/dist/runtime/components/KTreePicker/KTreePicker.global.vue.d.ts +11 -0
  16. package/dist/runtime/components/KTreePicker/KTreePicker.logic.d.ts +5 -0
  17. package/dist/runtime/components/KTreePicker/KTreePicker.logic.js +4 -0
  18. package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.d.vue.ts +1 -0
  19. package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue +2 -1
  20. package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue.d.ts +1 -0
  21. package/dist/runtime/presets/default/components/KDropdown/KDropdown.d.vue.ts +2 -0
  22. package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue +18 -8
  23. package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue.d.ts +2 -0
  24. 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.54",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -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;
@@ -103,6 +111,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
103
111
  modelValue: string | Date;
104
112
  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;
@@ -103,6 +111,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
103
111
  modelValue: string | Date;
104
112
  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) {
@@ -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>;
@@ -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>;
@@ -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,9 +131,14 @@ 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
143
  parentKey: string;
134
144
  idKey: string;
@@ -138,6 +148,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
138
148
  validationText: string;
139
149
  modelValue: any;
140
150
  searchbox: boolean;
151
+ isOptionsOpen: boolean;
141
152
  placeholder: string;
142
153
  closeOnSelect: boolean;
143
154
  multiSelect: boolean;
@@ -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,9 +131,14 @@ 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
143
  parentKey: string;
134
144
  idKey: string;
@@ -138,6 +148,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
138
148
  validationText: string;
139
149
  modelValue: any;
140
150
  searchbox: boolean;
151
+ isOptionsOpen: boolean;
141
152
  placeholder: string;
142
153
  closeOnSelect: boolean;
143
154
  multiSelect: boolean;
@@ -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";
@@ -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.54",
4
4
  "description": "Core UI toolkit and utilities for the Katlux ecosystem",
5
5
  "author": "Katlux",
6
6
  "license": "MIT",