pukaad-ui-lib 1.39.0 → 1.40.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/drawer/drawer.d.vue.ts +1 -1
- package/dist/runtime/components/drawer/drawer.vue +2 -2
- package/dist/runtime/components/drawer/drawer.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-address.d.vue.ts +1 -74
- package/dist/runtime/components/input/input-address.vue +75 -480
- package/dist/runtime/components/input/input-address.vue.d.ts +1 -74
- package/dist/runtime/components/input/input-autocomplete.vue +2 -2
- package/dist/runtime/components/input/input-combobox.d.vue.ts +4 -5
- package/dist/runtime/components/input/input-combobox.vue +131 -122
- package/dist/runtime/components/input/input-combobox.vue.d.ts +4 -5
- package/dist/runtime/components/input/input-text-field.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-text-field.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-textarea.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-textarea.vue.d.ts +1 -1
- package/dist/runtime/components/loading.d.vue.ts +2 -4
- package/dist/runtime/components/loading.vue +4 -8
- package/dist/runtime/components/loading.vue.d.ts +2 -4
- package/dist/runtime/components/modal/modal-share.vue +1 -1
- package/dist/runtime/components/modal/modal.d.vue.ts +2 -1
- package/dist/runtime/components/modal/modal.vue +2 -2
- package/dist/runtime/components/modal/modal.vue.d.ts +2 -1
- package/dist/runtime/components/ui/input-group/InputGroupButton.d.vue.ts +1 -1
- package/dist/runtime/components/ui/input-group/InputGroupButton.vue.d.ts +1 -1
- package/dist/runtime/components/ui/input-group/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -19,16 +19,15 @@ type __VLS_ModelProps = {
|
|
|
19
19
|
modelValue?: string | string[];
|
|
20
20
|
};
|
|
21
21
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
22
|
-
declare var
|
|
22
|
+
declare var __VLS_25: {}, __VLS_67: {};
|
|
23
23
|
type __VLS_Slots = {} & {
|
|
24
|
-
label?: (props: typeof
|
|
24
|
+
label?: (props: typeof __VLS_25) => any;
|
|
25
25
|
} & {
|
|
26
|
-
options?: (props: typeof
|
|
26
|
+
options?: (props: typeof __VLS_67) => any;
|
|
27
27
|
};
|
|
28
28
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
29
|
-
validate: () => Promise<any>;
|
|
30
29
|
setErrors: (errMsg: string[]) => void;
|
|
31
|
-
|
|
30
|
+
inputTextFieldRef: import("vue").Ref<any, any>;
|
|
32
31
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
33
32
|
"update:modelValue": (value: string | string[]) => any;
|
|
34
33
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
@@ -1,101 +1,87 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
<ShadPopover v-model:open="popoverOpen">
|
|
3
|
+
<ShadPopoverAnchor as-child>
|
|
4
|
+
<InputTextField
|
|
5
|
+
ref="inputTextFieldRef"
|
|
6
|
+
v-model="displayText"
|
|
7
|
+
:name="props.name"
|
|
8
|
+
:rules="computedRules"
|
|
9
|
+
:required="props.required"
|
|
10
|
+
:disabled-border="props.disabledBorder"
|
|
11
|
+
:placeholder="props.placeholder"
|
|
12
|
+
readonly
|
|
13
|
+
class="cursor-pointer"
|
|
14
|
+
@click="handleInputClick"
|
|
15
|
+
>
|
|
16
|
+
<template #label>
|
|
17
|
+
<slot name="label">
|
|
18
|
+
<div
|
|
19
|
+
:class="[
|
|
14
20
|
'flex-1',
|
|
15
21
|
props.disabledBorder && 'font-body-small-prominent'
|
|
16
22
|
]"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
<div
|
|
23
|
-
v-if="props.showCounter"
|
|
24
|
-
:class="[props.disabledBorder && 'font-body-small']"
|
|
25
|
-
>
|
|
23
|
+
>
|
|
24
|
+
{{ props.label }}
|
|
25
|
+
<span v-if="props.required" class="text-destructive">*</span>
|
|
26
|
+
</div>
|
|
27
|
+
</slot>
|
|
26
28
|
<div
|
|
27
|
-
v-if="props.limit > 0"
|
|
28
|
-
:class="[
|
|
29
|
-
(props.multiple ? modelValue.length : modelValue.length) > props.limit && 'text-destructive'
|
|
30
|
-
]"
|
|
29
|
+
v-if="props.showCounter && props.limit > 0"
|
|
30
|
+
:class="[props.disabledBorder && 'font-body-small']"
|
|
31
31
|
>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
<div :class="[selectedCount > props.limit && 'text-destructive']">
|
|
33
|
+
{{ selectedCount }}/{{ props.limit }}
|
|
34
|
+
</div>
|
|
35
35
|
</div>
|
|
36
|
-
</
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
<ShadCommandList>
|
|
61
|
-
<ShadCommandGroup v-if="options && options.length > 0">
|
|
62
|
-
<slot name="options">
|
|
63
|
-
<ShadCommandItem
|
|
64
|
-
v-for="option in options"
|
|
65
|
-
:key="option.value"
|
|
66
|
-
:value="option.value"
|
|
67
|
-
:disabled="isOptionDisabled(option.value)"
|
|
68
|
-
:class="[
|
|
36
|
+
</template>
|
|
37
|
+
<template #append>
|
|
38
|
+
<Icon
|
|
39
|
+
@mousedown.stop.prevent="handleIconClick"
|
|
40
|
+
@click.stop.prevent
|
|
41
|
+
:name="hasSelection ? 'lucide:x' : 'lucide:chevron-down'"
|
|
42
|
+
size="16"
|
|
43
|
+
class="cursor-pointer text-black"
|
|
44
|
+
/>
|
|
45
|
+
</template>
|
|
46
|
+
</InputTextField>
|
|
47
|
+
</ShadPopoverAnchor>
|
|
48
|
+
<ShadPopoverContent @openAutoFocus.prevent>
|
|
49
|
+
<ShadCommand>
|
|
50
|
+
<ShadCommandInput />
|
|
51
|
+
<ShadCommandList>
|
|
52
|
+
<ShadCommandGroup v-if="options && options.length > 0">
|
|
53
|
+
<slot name="options">
|
|
54
|
+
<ShadCommandItem
|
|
55
|
+
v-for="option in options"
|
|
56
|
+
:key="option.value"
|
|
57
|
+
:value="option.value"
|
|
58
|
+
:disabled="isOptionDisabled(option.value)"
|
|
59
|
+
:class="[
|
|
69
60
|
isOptionDisabled(option.value) && 'cursor-not-allowed'
|
|
70
61
|
]"
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
62
|
+
@click="() => handleSelect(option.value)"
|
|
63
|
+
>
|
|
64
|
+
<ShadCheckbox
|
|
65
|
+
v-if="props.multiple"
|
|
66
|
+
:model-value="isSelected(option.value)"
|
|
67
|
+
:disabled="isOptionDisabled(option.value)"
|
|
68
|
+
class="mr-2 pointer-events-none"
|
|
69
|
+
/>
|
|
79
70
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
</ShadPopoverContent>
|
|
95
|
-
</ShadPopover>
|
|
96
|
-
<ShadFormMessage />
|
|
97
|
-
</ShadFormItem>
|
|
98
|
-
</ShadFormField>
|
|
71
|
+
{{ option.label }}
|
|
72
|
+
<Icon
|
|
73
|
+
v-if="!props.multiple && isSelected(option.value)"
|
|
74
|
+
name="lucide:check"
|
|
75
|
+
class="ml-auto h-4 w-4"
|
|
76
|
+
/>
|
|
77
|
+
</ShadCommandItem>
|
|
78
|
+
</slot>
|
|
79
|
+
</ShadCommandGroup>
|
|
80
|
+
<ShadCommandEmpty :force-show="!options || options.length === 0" />
|
|
81
|
+
</ShadCommandList>
|
|
82
|
+
</ShadCommand>
|
|
83
|
+
</ShadPopoverContent>
|
|
84
|
+
</ShadPopover>
|
|
99
85
|
</template>
|
|
100
86
|
|
|
101
87
|
<script setup>
|
|
@@ -116,49 +102,80 @@ const modelValue = defineModel({ type: [String, Array], ...{
|
|
|
116
102
|
default: () => ""
|
|
117
103
|
} });
|
|
118
104
|
const popoverOpen = ref(false);
|
|
119
|
-
const
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
};
|
|
123
|
-
onMounted(() => {
|
|
124
|
-
if (props.multiple && modelValue.value === "") {
|
|
125
|
-
modelValue.value = [];
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
const displayValue = computed(() => {
|
|
105
|
+
const inputTextFieldRef = ref();
|
|
106
|
+
const displayText = ref("");
|
|
107
|
+
const updateDisplayText = () => {
|
|
129
108
|
if (props.multiple) {
|
|
130
109
|
const selectedValues = modelValue.value;
|
|
131
110
|
if (!selectedValues || selectedValues.length === 0) {
|
|
132
|
-
|
|
111
|
+
displayText.value = "";
|
|
112
|
+
return;
|
|
133
113
|
}
|
|
134
114
|
const selectedLabels = selectedValues.map((val) => props.options?.find((opt) => opt.value === val)?.label).filter(Boolean);
|
|
135
|
-
|
|
115
|
+
displayText.value = selectedLabels.length > 0 ? selectedLabels.join(", ") : "";
|
|
136
116
|
} else {
|
|
137
117
|
const selectedOption = props.options?.find(
|
|
138
118
|
(opt) => opt.value === modelValue.value
|
|
139
119
|
);
|
|
140
|
-
|
|
120
|
+
displayText.value = selectedOption?.label || "";
|
|
141
121
|
}
|
|
122
|
+
};
|
|
123
|
+
watch([modelValue, () => props.options], updateDisplayText, {
|
|
124
|
+
immediate: true,
|
|
125
|
+
deep: true
|
|
142
126
|
});
|
|
143
|
-
const
|
|
144
|
-
if (props.
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
127
|
+
const computedRules = computed(() => {
|
|
128
|
+
if (props.rules) return props.rules;
|
|
129
|
+
return () => {
|
|
130
|
+
if (props.required) {
|
|
131
|
+
if (props.multiple) {
|
|
132
|
+
const values = modelValue.value;
|
|
133
|
+
return values && values.length > 0 || `\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01 ${props.label || "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`;
|
|
134
|
+
} else {
|
|
135
|
+
return !!modelValue.value || `\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01 ${props.label || "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return true;
|
|
139
|
+
};
|
|
140
|
+
});
|
|
141
|
+
onMounted(() => {
|
|
142
|
+
if (props.multiple && modelValue.value === "") {
|
|
143
|
+
modelValue.value = [];
|
|
152
144
|
}
|
|
153
145
|
});
|
|
154
146
|
const isLimitReached = computed(() => {
|
|
155
147
|
if (!props.multiple || props.limit <= 0) return false;
|
|
156
148
|
return modelValue.value.length >= props.limit;
|
|
157
149
|
});
|
|
150
|
+
const selectedCount = computed(() => {
|
|
151
|
+
if (props.multiple) {
|
|
152
|
+
return modelValue.value.length;
|
|
153
|
+
}
|
|
154
|
+
return modelValue.value ? 1 : 0;
|
|
155
|
+
});
|
|
156
|
+
const hasSelection = computed(() => {
|
|
157
|
+
if (props.multiple) {
|
|
158
|
+
return modelValue.value.length > 0;
|
|
159
|
+
}
|
|
160
|
+
return !!modelValue.value;
|
|
161
|
+
});
|
|
162
|
+
const handleInputClick = () => {
|
|
163
|
+
popoverOpen.value = true;
|
|
164
|
+
};
|
|
165
|
+
const handleIconClick = () => {
|
|
166
|
+
if (hasSelection.value) {
|
|
167
|
+
if (props.multiple) {
|
|
168
|
+
modelValue.value = [];
|
|
169
|
+
} else {
|
|
170
|
+
modelValue.value = "";
|
|
171
|
+
}
|
|
172
|
+
displayText.value = "";
|
|
173
|
+
}
|
|
174
|
+
popoverOpen.value = true;
|
|
175
|
+
};
|
|
158
176
|
const isSelected = (value) => {
|
|
159
177
|
if (props.multiple) {
|
|
160
|
-
|
|
161
|
-
return result;
|
|
178
|
+
return modelValue.value.includes(value);
|
|
162
179
|
} else {
|
|
163
180
|
return modelValue.value === value;
|
|
164
181
|
}
|
|
@@ -189,19 +206,11 @@ const handleSelect = (value) => {
|
|
|
189
206
|
popoverOpen.value = false;
|
|
190
207
|
}
|
|
191
208
|
};
|
|
192
|
-
const validate = async () => {
|
|
193
|
-
if (fieldRef.value) {
|
|
194
|
-
const result = await fieldRef.value.validate();
|
|
195
|
-
return result.valid;
|
|
196
|
-
}
|
|
197
|
-
return true;
|
|
198
|
-
};
|
|
199
209
|
const setErrors = (errMsg) => {
|
|
200
|
-
|
|
210
|
+
inputTextFieldRef.value?.setErrors(errMsg);
|
|
201
211
|
};
|
|
202
212
|
defineExpose({
|
|
203
|
-
validate,
|
|
204
213
|
setErrors,
|
|
205
|
-
|
|
214
|
+
inputTextFieldRef
|
|
206
215
|
});
|
|
207
216
|
</script>
|
|
@@ -19,16 +19,15 @@ type __VLS_ModelProps = {
|
|
|
19
19
|
modelValue?: string | string[];
|
|
20
20
|
};
|
|
21
21
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
22
|
-
declare var
|
|
22
|
+
declare var __VLS_25: {}, __VLS_67: {};
|
|
23
23
|
type __VLS_Slots = {} & {
|
|
24
|
-
label?: (props: typeof
|
|
24
|
+
label?: (props: typeof __VLS_25) => any;
|
|
25
25
|
} & {
|
|
26
|
-
options?: (props: typeof
|
|
26
|
+
options?: (props: typeof __VLS_67) => any;
|
|
27
27
|
};
|
|
28
28
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
29
|
-
validate: () => Promise<any>;
|
|
30
29
|
setErrors: (errMsg: string[]) => void;
|
|
31
|
-
|
|
30
|
+
inputTextFieldRef: import("vue").Ref<any, any>;
|
|
32
31
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
33
32
|
"update:modelValue": (value: string | string[]) => any;
|
|
34
33
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
@@ -55,10 +55,10 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
55
55
|
name: string;
|
|
56
56
|
disabled: boolean;
|
|
57
57
|
limit: number;
|
|
58
|
-
readonly: boolean;
|
|
59
58
|
disabledErrorMessage: boolean;
|
|
60
59
|
disabledBorder: boolean;
|
|
61
60
|
showCounter: boolean;
|
|
61
|
+
readonly: boolean;
|
|
62
62
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
63
63
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
64
64
|
declare const _default: typeof __VLS_export;
|
|
@@ -55,10 +55,10 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
55
55
|
name: string;
|
|
56
56
|
disabled: boolean;
|
|
57
57
|
limit: number;
|
|
58
|
-
readonly: boolean;
|
|
59
58
|
disabledErrorMessage: boolean;
|
|
60
59
|
disabledBorder: boolean;
|
|
61
60
|
showCounter: boolean;
|
|
61
|
+
readonly: boolean;
|
|
62
62
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
63
63
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
64
64
|
declare const _default: typeof __VLS_export;
|
|
@@ -45,10 +45,10 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
45
45
|
name: string;
|
|
46
46
|
disabled: boolean;
|
|
47
47
|
limit: number;
|
|
48
|
-
readonly: boolean;
|
|
49
48
|
disabledErrorMessage: boolean;
|
|
50
49
|
disabledBorder: boolean;
|
|
51
50
|
showCounter: boolean;
|
|
51
|
+
readonly: boolean;
|
|
52
52
|
resize: "none" | "both" | "horizontal" | "vertical";
|
|
53
53
|
rows: number;
|
|
54
54
|
heightScroll: boolean;
|
|
@@ -45,10 +45,10 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
45
45
|
name: string;
|
|
46
46
|
disabled: boolean;
|
|
47
47
|
limit: number;
|
|
48
|
-
readonly: boolean;
|
|
49
48
|
disabledErrorMessage: boolean;
|
|
50
49
|
disabledBorder: boolean;
|
|
51
50
|
showCounter: boolean;
|
|
51
|
+
readonly: boolean;
|
|
52
52
|
resize: "none" | "both" | "horizontal" | "vertical";
|
|
53
53
|
rows: number;
|
|
54
54
|
heightScroll: boolean;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
export interface LoadingProps {
|
|
2
|
-
|
|
3
|
-
text?: string;
|
|
2
|
+
loading?: boolean;
|
|
4
3
|
}
|
|
5
4
|
declare const __VLS_export: import("vue").DefineComponent<LoadingProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LoadingProps> & Readonly<{}>, {
|
|
6
|
-
|
|
7
|
-
isLoading: boolean;
|
|
5
|
+
loading: boolean;
|
|
8
6
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
7
|
declare const _default: typeof __VLS_export;
|
|
10
8
|
export default _default;
|
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<Transition name="loading-fade">
|
|
3
3
|
<div
|
|
4
|
-
v-if="
|
|
5
|
-
class="absolute inset-0
|
|
4
|
+
v-if="loading"
|
|
5
|
+
class="absolute inset-0 bg-white/50 flex items-center justify-center z-50"
|
|
6
6
|
>
|
|
7
|
-
<div class="
|
|
8
|
-
<div class="loading-spinner"></div>
|
|
9
|
-
<span v-if="text" class="text-sm text-cloud">{{ text }}</span>
|
|
10
|
-
</div>
|
|
7
|
+
<div class="loading-spinner"></div>
|
|
11
8
|
</div>
|
|
12
9
|
</Transition>
|
|
13
10
|
</template>
|
|
14
11
|
|
|
15
12
|
<script setup>
|
|
16
13
|
defineProps({
|
|
17
|
-
|
|
18
|
-
text: { type: String, required: false, default: "" }
|
|
14
|
+
loading: { type: Boolean, required: false, default: false }
|
|
19
15
|
});
|
|
20
16
|
</script>
|
|
21
17
|
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
export interface LoadingProps {
|
|
2
|
-
|
|
3
|
-
text?: string;
|
|
2
|
+
loading?: boolean;
|
|
4
3
|
}
|
|
5
4
|
declare const __VLS_export: import("vue").DefineComponent<LoadingProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LoadingProps> & Readonly<{}>, {
|
|
6
|
-
|
|
7
|
-
isLoading: boolean;
|
|
5
|
+
loading: boolean;
|
|
8
6
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
7
|
declare const _default: typeof __VLS_export;
|
|
10
8
|
export default _default;
|
|
@@ -5,7 +5,7 @@ export interface ModalProps {
|
|
|
5
5
|
description?: string;
|
|
6
6
|
footer?: string;
|
|
7
7
|
disabledCloseBtn?: boolean;
|
|
8
|
-
|
|
8
|
+
loading?: boolean;
|
|
9
9
|
loadingText?: string;
|
|
10
10
|
}
|
|
11
11
|
type __VLS_Props = ModalProps;
|
|
@@ -39,6 +39,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
39
39
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
40
40
|
onClose?: (() => any) | undefined;
|
|
41
41
|
}>, {
|
|
42
|
+
loading: boolean;
|
|
42
43
|
disabledCloseBtn: boolean;
|
|
43
44
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
44
45
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
@submit="onSubmit"
|
|
8
8
|
@close="onClose"
|
|
9
9
|
>
|
|
10
|
-
<Loading :
|
|
10
|
+
<Loading :loading="props.loading" :text="props.loadingText" />
|
|
11
11
|
<ShadDialogHeader>
|
|
12
12
|
<slot name="header">
|
|
13
13
|
<ShadDialogTitle>
|
|
@@ -38,7 +38,7 @@ const props = defineProps({
|
|
|
38
38
|
description: { type: String, required: false },
|
|
39
39
|
footer: { type: String, required: false },
|
|
40
40
|
disabledCloseBtn: { type: Boolean, required: false, default: false },
|
|
41
|
-
|
|
41
|
+
loading: { type: Boolean, required: false, default: false },
|
|
42
42
|
loadingText: { type: String, required: false }
|
|
43
43
|
});
|
|
44
44
|
const isOpen = defineModel({ type: Boolean, ...{
|
|
@@ -5,7 +5,7 @@ export interface ModalProps {
|
|
|
5
5
|
description?: string;
|
|
6
6
|
footer?: string;
|
|
7
7
|
disabledCloseBtn?: boolean;
|
|
8
|
-
|
|
8
|
+
loading?: boolean;
|
|
9
9
|
loadingText?: string;
|
|
10
10
|
}
|
|
11
11
|
type __VLS_Props = ModalProps;
|
|
@@ -39,6 +39,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
39
39
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
40
40
|
onClose?: (() => any) | undefined;
|
|
41
41
|
}>, {
|
|
42
|
+
loading: boolean;
|
|
42
43
|
disabledCloseBtn: boolean;
|
|
43
44
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
44
45
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -5,7 +5,7 @@ type __VLS_Slots = {} & {
|
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_base: import("vue").DefineComponent<InputGroupButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<InputGroupButtonProps> & Readonly<{}>, {
|
|
7
7
|
variant: "default" | "outline" | "ghost" | "link" | "text" | "icon" | null;
|
|
8
|
-
size: "
|
|
8
|
+
size: "sm" | "icon-sm" | "icon-xs" | "xs" | null;
|
|
9
9
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
10
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
11
|
declare const _default: typeof __VLS_export;
|
|
@@ -5,7 +5,7 @@ type __VLS_Slots = {} & {
|
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_base: import("vue").DefineComponent<InputGroupButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<InputGroupButtonProps> & Readonly<{}>, {
|
|
7
7
|
variant: "default" | "outline" | "ghost" | "link" | "text" | "icon" | null;
|
|
8
|
-
size: "
|
|
8
|
+
size: "sm" | "icon-sm" | "icon-xs" | "xs" | null;
|
|
9
9
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
10
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
11
|
declare const _default: typeof __VLS_export;
|
|
@@ -12,7 +12,7 @@ export declare const inputGroupAddonVariants: (props?: ({
|
|
|
12
12
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
13
13
|
export type InputGroupVariants = VariantProps<typeof inputGroupAddonVariants>;
|
|
14
14
|
export declare const inputGroupButtonVariants: (props?: ({
|
|
15
|
-
size?: "
|
|
15
|
+
size?: "sm" | "icon-sm" | "icon-xs" | "xs" | null | undefined;
|
|
16
16
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
17
17
|
export type InputGroupButtonVariants = VariantProps<typeof inputGroupButtonVariants>;
|
|
18
18
|
export interface InputGroupButtonProps {
|