sprintify-ui 0.0.112 → 0.0.113
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.
- package/dist/sprintify-ui.es.js +7143 -7134
- package/dist/types/src/components/BaseDropdown.vue.d.ts +2 -1
- package/dist/types/src/components/BaseDropdownAutocomplete.vue.d.ts +2 -1
- package/package.json +1 -1
- package/src/components/BaseDropdown.vue +12 -3
- package/src/components/BaseDropdownAutocomplete.vue +6 -1
|
@@ -16,7 +16,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
16
16
|
default: boolean;
|
|
17
17
|
type: BooleanConstructor;
|
|
18
18
|
};
|
|
19
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "open")[], "close" | "open", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "open" | "mounted")[], "close" | "open" | "mounted", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20
20
|
placement: {
|
|
21
21
|
type: PropType<"bottom-start" | "bottom-end" | "top-start" | "top-end">;
|
|
22
22
|
default(): string;
|
|
@@ -34,6 +34,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
34
34
|
type: BooleanConstructor;
|
|
35
35
|
};
|
|
36
36
|
}>> & {
|
|
37
|
+
onMounted?: ((...args: any[]) => any) | undefined;
|
|
37
38
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
38
39
|
onOpen?: ((...args: any[]) => any) | undefined;
|
|
39
40
|
}, {
|
|
@@ -49,7 +49,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
49
49
|
default: undefined;
|
|
50
50
|
type: PropType<SelectConfiguration | undefined>;
|
|
51
51
|
};
|
|
52
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "update:model-value")[], "close" | "update:model-value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
52
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "update:model-value" | "dropdown:mounted")[], "close" | "update:model-value" | "dropdown:mounted", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
53
53
|
modelValue: {
|
|
54
54
|
type: PropType<Option | Option[] | null | undefined>;
|
|
55
55
|
default: undefined;
|
|
@@ -101,6 +101,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
101
101
|
}>> & {
|
|
102
102
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
103
103
|
"onUpdate:model-value"?: ((...args: any[]) => any) | undefined;
|
|
104
|
+
"onDropdown:mounted"?: ((...args: any[]) => any) | undefined;
|
|
104
105
|
}, {
|
|
105
106
|
required: boolean;
|
|
106
107
|
select: SelectConfiguration | undefined;
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
leave-to-class="transform scale-95 opacity-0"
|
|
17
17
|
>
|
|
18
18
|
<template v-if="showDropdown || keepAlive">
|
|
19
|
-
<div v-show="showDropdown" class="inline-block">
|
|
19
|
+
<div v-show="showDropdown" :id="id" class="inline-block">
|
|
20
20
|
<slot
|
|
21
21
|
name="dropdown"
|
|
22
22
|
:show-dropdown="showDropdown"
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
<script lang="ts" setup>
|
|
36
36
|
import { useClickOutside } from '@/composables/clickOutside';
|
|
37
37
|
import { useResizeObserver } from '@vueuse/core';
|
|
38
|
-
import { throttle } from 'lodash';
|
|
38
|
+
import { throttle, uniqueId } from 'lodash';
|
|
39
39
|
import { PropType, StyleValue } from 'vue';
|
|
40
40
|
import { disableScroll, enableScroll } from '../utils';
|
|
41
41
|
|
|
@@ -44,6 +44,9 @@ const dropdown = ref<HTMLElement | null>(null);
|
|
|
44
44
|
|
|
45
45
|
const showDropdown = ref(false);
|
|
46
46
|
|
|
47
|
+
// This is id is used to configure onClickOutside includes
|
|
48
|
+
const id = 'base-dropdown-drawer-' + uniqueId();
|
|
49
|
+
|
|
47
50
|
const props = defineProps({
|
|
48
51
|
placement: {
|
|
49
52
|
type: String as PropType<
|
|
@@ -67,7 +70,7 @@ const props = defineProps({
|
|
|
67
70
|
},
|
|
68
71
|
});
|
|
69
72
|
|
|
70
|
-
const emit = defineEmits(['close', 'open']);
|
|
73
|
+
const emit = defineEmits(['close', 'open', 'mounted']);
|
|
71
74
|
|
|
72
75
|
const buttonX = ref(0);
|
|
73
76
|
const buttonY = ref(0);
|
|
@@ -251,6 +254,12 @@ const dropdownStyles = computed((): StyleValue => {
|
|
|
251
254
|
return styles as StyleValue;
|
|
252
255
|
});
|
|
253
256
|
|
|
257
|
+
onMounted(() => {
|
|
258
|
+
emit('mounted', {
|
|
259
|
+
id: id,
|
|
260
|
+
});
|
|
261
|
+
});
|
|
262
|
+
|
|
254
263
|
onBeforeUnmount(() => {
|
|
255
264
|
close();
|
|
256
265
|
deactivate();
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
:padding="padding"
|
|
7
7
|
@open="onOpen"
|
|
8
8
|
@close="onClose"
|
|
9
|
+
@mounted="onDropdownMounted"
|
|
9
10
|
>
|
|
10
11
|
<template #button="buttonProps">
|
|
11
12
|
<slot name="button" v-bind="buttonProps" :new-value="newValue"></slot>
|
|
@@ -124,7 +125,7 @@ const props = defineProps({
|
|
|
124
125
|
},
|
|
125
126
|
});
|
|
126
127
|
|
|
127
|
-
const emit = defineEmits(['update:model-value', 'close']);
|
|
128
|
+
const emit = defineEmits(['update:model-value', 'close', 'dropdown:mounted']);
|
|
128
129
|
|
|
129
130
|
const componentName = computed(() => {
|
|
130
131
|
if (props.multiple) {
|
|
@@ -227,4 +228,8 @@ function getNewValue(value: Option | Option[] | null | undefined) {
|
|
|
227
228
|
function update() {
|
|
228
229
|
emit('update:model-value', newValue.value);
|
|
229
230
|
}
|
|
231
|
+
|
|
232
|
+
function onDropdownMounted(payload: any) {
|
|
233
|
+
emit('dropdown:mounted', payload);
|
|
234
|
+
}
|
|
230
235
|
</script>
|