pukaad-ui-lib 1.9.0 → 1.11.0
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/module.json +1 -1
- package/dist/runtime/components/input/input-autocomplete.d.vue.ts +2 -2
- package/dist/runtime/components/input/input-autocomplete.vue.d.ts +2 -2
- package/dist/runtime/components/input/input-select-province.vue +6 -1
- package/dist/runtime/components/list/list-tree.d.vue.ts +30 -0
- package/dist/runtime/components/list/list-tree.vue +45 -0
- package/dist/runtime/components/list/list-tree.vue.d.ts +30 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -36,9 +36,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
36
36
|
id: string;
|
|
37
37
|
name: string;
|
|
38
38
|
description: string;
|
|
39
|
-
limit: number;
|
|
40
|
-
placeholder: string;
|
|
41
39
|
options: AutocompleteOption[] | string[] | number[];
|
|
40
|
+
placeholder: string;
|
|
41
|
+
limit: number;
|
|
42
42
|
disabledErrorMessage: boolean;
|
|
43
43
|
disabledBorder: boolean;
|
|
44
44
|
showCounter: boolean;
|
|
@@ -36,9 +36,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
36
36
|
id: string;
|
|
37
37
|
name: string;
|
|
38
38
|
description: string;
|
|
39
|
-
limit: number;
|
|
40
|
-
placeholder: string;
|
|
41
39
|
options: AutocompleteOption[] | string[] | number[];
|
|
40
|
+
placeholder: string;
|
|
41
|
+
limit: number;
|
|
42
42
|
disabledErrorMessage: boolean;
|
|
43
43
|
disabledBorder: boolean;
|
|
44
44
|
showCounter: boolean;
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
</div>
|
|
70
70
|
<ShadCommandGroup>
|
|
71
71
|
<ShadCommandItem
|
|
72
|
-
v-for="province in
|
|
72
|
+
v-for="province in filteredProvinces"
|
|
73
73
|
:key="province.value"
|
|
74
74
|
:value="province.label"
|
|
75
75
|
@select="selectProvince(province.value)"
|
|
@@ -125,6 +125,11 @@ const selectedLabel = computed(() => {
|
|
|
125
125
|
const found = provinces.value.find((p) => p.value === modelValue.value);
|
|
126
126
|
return found?.label || "";
|
|
127
127
|
});
|
|
128
|
+
const filteredProvinces = computed(() => {
|
|
129
|
+
if (!search.value) return provinces.value;
|
|
130
|
+
const query = search.value.toLowerCase();
|
|
131
|
+
return provinces.value.filter((p) => p.label.toLowerCase().includes(query));
|
|
132
|
+
});
|
|
128
133
|
const selectProvince = (value) => {
|
|
129
134
|
modelValue.value = value;
|
|
130
135
|
open.value = false;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
type __VLS_ModelProps = {
|
|
2
|
+
modelValue?: boolean;
|
|
3
|
+
};
|
|
4
|
+
declare var __VLS_6: {
|
|
5
|
+
open: boolean;
|
|
6
|
+
}, __VLS_8: {
|
|
7
|
+
open: boolean;
|
|
8
|
+
}, __VLS_10: {
|
|
9
|
+
open: true;
|
|
10
|
+
};
|
|
11
|
+
type __VLS_Slots = {} & {
|
|
12
|
+
header?: (props: typeof __VLS_6) => any;
|
|
13
|
+
} & {
|
|
14
|
+
'header-actions'?: (props: typeof __VLS_8) => any;
|
|
15
|
+
} & {
|
|
16
|
+
default?: (props: typeof __VLS_10) => any;
|
|
17
|
+
};
|
|
18
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
|
+
"update:modelValue": (value: boolean) => any;
|
|
20
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
21
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
22
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
26
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
27
|
+
new (): {
|
|
28
|
+
$slots: S;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex items-start">
|
|
3
|
+
<!-- Tree Line Indicator -->
|
|
4
|
+
<div class="relative w-6 shrink-0 mr-4 self-stretch">
|
|
5
|
+
<!-- Dashed line (full height) -->
|
|
6
|
+
<div
|
|
7
|
+
class="absolute left-[11px] top-0 bottom-0 w-0 h-full border-l-2 border-dashed border-gray-300"
|
|
8
|
+
/>
|
|
9
|
+
|
|
10
|
+
<!-- Toggle Button (at top, aligned with header) -->
|
|
11
|
+
<button
|
|
12
|
+
class="relative z-10 flex items-center justify-center w-5 h-5 mt-0.5 rounded border-2 border-primary text-primary bg-white shrink-0 transition-colors"
|
|
13
|
+
@click.stop="isOpen = !isOpen"
|
|
14
|
+
>
|
|
15
|
+
<Icon
|
|
16
|
+
:name="isOpen ? 'lucide:chevron-down' : 'lucide:chevron-right'"
|
|
17
|
+
:size="12"
|
|
18
|
+
/>
|
|
19
|
+
</button>
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<!-- Content Area -->
|
|
23
|
+
<div class="flex-1 min-w-0">
|
|
24
|
+
<!-- Parent/Header Row -->
|
|
25
|
+
<div
|
|
26
|
+
class="flex items-center gap-3 cursor-pointer select-none"
|
|
27
|
+
@click="isOpen = !isOpen"
|
|
28
|
+
>
|
|
29
|
+
<div class="flex-1 min-w-0">
|
|
30
|
+
<slot name="header" :open="isOpen" />
|
|
31
|
+
</div>
|
|
32
|
+
<slot name="header-actions" :open="isOpen" />
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<!-- Children (shown when open) -->
|
|
36
|
+
<div v-if="isOpen" class="mt-4 ml-8 flex flex-col gap-4 pb-2">
|
|
37
|
+
<slot :open="isOpen" />
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<script setup>
|
|
44
|
+
const isOpen = defineModel({ type: Boolean, ...{ default: false } });
|
|
45
|
+
</script>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
type __VLS_ModelProps = {
|
|
2
|
+
modelValue?: boolean;
|
|
3
|
+
};
|
|
4
|
+
declare var __VLS_6: {
|
|
5
|
+
open: boolean;
|
|
6
|
+
}, __VLS_8: {
|
|
7
|
+
open: boolean;
|
|
8
|
+
}, __VLS_10: {
|
|
9
|
+
open: true;
|
|
10
|
+
};
|
|
11
|
+
type __VLS_Slots = {} & {
|
|
12
|
+
header?: (props: typeof __VLS_6) => any;
|
|
13
|
+
} & {
|
|
14
|
+
'header-actions'?: (props: typeof __VLS_8) => any;
|
|
15
|
+
} & {
|
|
16
|
+
default?: (props: typeof __VLS_10) => any;
|
|
17
|
+
};
|
|
18
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
|
+
"update:modelValue": (value: boolean) => any;
|
|
20
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
21
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
22
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
26
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
27
|
+
new (): {
|
|
28
|
+
$slots: S;
|
|
29
|
+
};
|
|
30
|
+
};
|