pukaad-ui-lib 1.39.0 → 1.41.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.
Files changed (47) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/assets/json/address/Amphur.json +7346 -0
  3. package/dist/runtime/assets/json/address/Province.json +762 -0
  4. package/dist/runtime/assets/json/address/Tambon.json +64775 -0
  5. package/dist/runtime/assets/json/address/Zipcode.json +17208 -0
  6. package/dist/runtime/components/button.vue +1 -1
  7. package/dist/runtime/components/collapse/collapse.vue +1 -1
  8. package/dist/runtime/components/drawer/drawer.d.vue.ts +1 -1
  9. package/dist/runtime/components/drawer/drawer.vue +2 -2
  10. package/dist/runtime/components/drawer/drawer.vue.d.ts +1 -1
  11. package/dist/runtime/components/input/input-address.d.vue.ts +14 -32
  12. package/dist/runtime/components/input/input-address.vue +174 -360
  13. package/dist/runtime/components/input/input-address.vue.d.ts +14 -32
  14. package/dist/runtime/components/input/input-autocomplete.vue +2 -2
  15. package/dist/runtime/components/input/input-combobox.d.vue.ts +12 -5
  16. package/dist/runtime/components/input/input-combobox.vue +143 -121
  17. package/dist/runtime/components/input/input-combobox.vue.d.ts +12 -5
  18. package/dist/runtime/components/input/input-file.d.vue.ts +1 -1
  19. package/dist/runtime/components/input/input-file.vue.d.ts +1 -1
  20. package/dist/runtime/components/input/input-password.d.vue.ts +1 -1
  21. package/dist/runtime/components/input/input-password.vue.d.ts +1 -1
  22. package/dist/runtime/components/input/input-slider.d.vue.ts +1 -1
  23. package/dist/runtime/components/input/input-slider.vue.d.ts +1 -1
  24. package/dist/runtime/components/input/input-text-field.d.vue.ts +3 -1
  25. package/dist/runtime/components/input/input-text-field.vue +8 -2
  26. package/dist/runtime/components/input/input-text-field.vue.d.ts +3 -1
  27. package/dist/runtime/components/input/input-textarea.d.vue.ts +1 -1
  28. package/dist/runtime/components/input/input-textarea.vue.d.ts +1 -1
  29. package/dist/runtime/components/loading.d.vue.ts +2 -4
  30. package/dist/runtime/components/loading.vue +4 -8
  31. package/dist/runtime/components/loading.vue.d.ts +2 -4
  32. package/dist/runtime/components/modal/modal-share.vue +1 -1
  33. package/dist/runtime/components/modal/modal.d.vue.ts +2 -1
  34. package/dist/runtime/components/modal/modal.vue +2 -2
  35. package/dist/runtime/components/modal/modal.vue.d.ts +2 -1
  36. package/dist/runtime/components/ui/input-group/InputGroupButton.d.vue.ts +1 -1
  37. package/dist/runtime/components/ui/input-group/InputGroupButton.vue.d.ts +1 -1
  38. package/dist/runtime/components/ui/input-group/index.d.ts +1 -1
  39. package/dist/runtime/components/ui/native-select/NativeSelectOptGroup.d.vue.ts +2 -2
  40. package/dist/runtime/components/ui/native-select/NativeSelectOptGroup.vue.d.ts +2 -2
  41. package/dist/runtime/components/ui/native-select/NativeSelectOption.d.vue.ts +2 -2
  42. package/dist/runtime/components/ui/native-select/NativeSelectOption.vue.d.ts +2 -2
  43. package/dist/runtime/components/ui/tabs/TabsList.vue +6 -4
  44. package/dist/runtime/components/ui/tabs/TabsTrigger.vue +6 -4
  45. package/dist/runtime/composables/useThaiAddress.d.ts +45 -0
  46. package/dist/runtime/composables/useThaiAddress.js +81 -0
  47. package/package.json +1 -1
@@ -1,28 +1,11 @@
1
- interface Province {
2
- code: number;
3
- name_th: string;
4
- name_en: string;
5
- }
6
- interface District {
7
- code: number;
8
- name_th: string;
9
- name_en: string;
10
- province_code: number;
11
- }
12
- interface SubDistrict {
13
- code: number;
14
- name_th: string;
15
- name_en: string;
16
- district_code: number;
17
- zip_code: number;
18
- }
1
+ import { type Province, type Amphur, type Tambon } from "@/runtime/composables/useThaiAddress";
19
2
  export interface InputAddressValue {
20
- province?: Province;
21
- district?: District;
22
- subDistrict?: SubDistrict;
23
- zipCode?: number;
24
- detail?: string;
25
- fullAddress?: string;
3
+ province_id?: number;
4
+ amphur_id?: number;
5
+ tambon_id?: number;
6
+ zipcode?: number;
7
+ detail_address?: string;
8
+ full_address?: string;
26
9
  }
27
10
  export interface InputAddressProps {
28
11
  name?: string;
@@ -33,9 +16,7 @@ export interface InputAddressProps {
33
16
  required?: boolean;
34
17
  requiredDetail?: boolean;
35
18
  rules?: object | string | Function;
36
- provinces?: Province[];
37
- districts?: District[];
38
- subDistricts?: SubDistrict[];
19
+ gap?: string;
39
20
  }
40
21
  type __VLS_Props = InputAddressProps;
41
22
  type __VLS_ModelProps = {
@@ -46,28 +27,29 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
46
27
  validate: () => Promise<boolean>;
47
28
  setErrors: (errMsg: string[]) => void;
48
29
  reset: () => void;
49
- addressFieldRef: import("vue").Ref<any, any>;
30
+ comboboxRef: import("vue").Ref<any, any>;
50
31
  detailFieldRef: import("vue").Ref<any, any>;
51
32
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
52
33
  "update:modelValue": (value: InputAddressValue) => any;
53
34
  } & {
54
35
  change: (value: InputAddressValue) => any;
55
36
  selectProvince: (province: Province) => any;
56
- selectDistrict: (district: District) => any;
57
- selectSubDistrict: (subDistrict: SubDistrict) => any;
37
+ selectDistrict: (district: Amphur) => any;
38
+ selectSubDistrict: (subDistrict: Tambon) => any;
58
39
  selectZipCode: (zipCode: number) => any;
59
40
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
60
41
  onChange?: ((value: InputAddressValue) => any) | undefined;
61
42
  "onUpdate:modelValue"?: ((value: InputAddressValue) => any) | undefined;
62
43
  onSelectProvince?: ((province: Province) => any) | undefined;
63
- onSelectDistrict?: ((district: District) => any) | undefined;
64
- onSelectSubDistrict?: ((subDistrict: SubDistrict) => any) | undefined;
44
+ onSelectDistrict?: ((district: Amphur) => any) | undefined;
45
+ onSelectSubDistrict?: ((subDistrict: Tambon) => any) | undefined;
65
46
  onSelectZipCode?: ((zipCode: number) => any) | undefined;
66
47
  }>, {
67
48
  label: string;
68
49
  required: boolean;
69
50
  name: string;
70
51
  placeholder: string;
52
+ gap: string;
71
53
  labelDetail: string;
72
54
  placeholderDetail: string;
73
55
  requiredDetail: boolean;
@@ -14,7 +14,7 @@
14
14
  :disabled-error-message="props.disabledErrorMessage"
15
15
  autocomplete="off"
16
16
  @focus="open = true"
17
- @click="console.log('click')"
17
+ @click="open = true"
18
18
  @blur="handleBlur"
19
19
  :show-counter="props.showCounter"
20
20
  :limit="props.limit"
@@ -24,7 +24,7 @@
24
24
  @mousedown.stop.prevent="handleIconMouseDown"
25
25
  :name="modelValue ? 'lucide:x' : 'lucide:search'"
26
26
  size="16"
27
- class="cursor-pointer"
27
+ class="cursor-pointer text-black"
28
28
  />
29
29
  </template>
30
30
  </InputTextField>
@@ -19,19 +19,26 @@ type __VLS_ModelProps = {
19
19
  modelValue?: string | string[];
20
20
  };
21
21
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
22
- declare var __VLS_21: {}, __VLS_81: {};
22
+ declare var __VLS_25: {}, __VLS_44: {
23
+ close: () => boolean;
24
+ }, __VLS_69: {};
23
25
  type __VLS_Slots = {} & {
24
- label?: (props: typeof __VLS_21) => any;
26
+ label?: (props: typeof __VLS_25) => any;
25
27
  } & {
26
- options?: (props: typeof __VLS_81) => any;
28
+ 'popover-content'?: (props: typeof __VLS_44) => any;
29
+ } & {
30
+ options?: (props: typeof __VLS_69) => any;
27
31
  };
28
32
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
29
- validate: () => Promise<any>;
30
33
  setErrors: (errMsg: string[]) => void;
31
- fieldRef: import("vue").Ref<any, any>;
34
+ validate: () => Promise<any>;
35
+ inputTextFieldRef: import("vue").Ref<any, any>;
32
36
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
33
37
  "update:modelValue": (value: string | string[]) => any;
38
+ } & {
39
+ clear: () => any;
34
40
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
41
+ onClear?: (() => any) | undefined;
35
42
  "onUpdate:modelValue"?: ((value: string | string[]) => any) | undefined;
36
43
  }>, {
37
44
  name: string;
@@ -1,101 +1,90 @@
1
1
  <template>
2
- <ShadFormField
3
- ref="fieldRef"
4
- :name="props.name"
5
- :rules="props.rules || defaultRules"
6
- v-slot="{ componentField }"
7
- v-model="modelValue"
8
- >
9
- <ShadFormItem>
10
- <ShadFormLabel v-if="$slots.label || props.label" class="w-full">
11
- <slot name="label">
12
- <div
13
- :class="[
2
+ <ShadPopover v-model:open="popoverOpen">
3
+ <ShadPopoverAnchor as-child>
4
+ <InputTextField
5
+ ref="inputTextFieldRef"
6
+ v-model="displayText"
7
+ :name="props.name"
8
+ :label="props.label"
9
+ :rules="computedRules"
10
+ :required="props.required"
11
+ :disabled-border="props.disabledBorder"
12
+ :placeholder="props.placeholder"
13
+ readonly
14
+ class="cursor-pointer"
15
+ @click="handleInputClick"
16
+ >
17
+ <template #label>
18
+ <slot name="label">
19
+ <div
20
+ :class="[
14
21
  'flex-1',
15
22
  props.disabledBorder && 'font-body-small-prominent'
16
23
  ]"
17
- >
18
- {{ props.label }}
19
- <span v-if="props.required" class="text-destructive">*</span>
20
- </div>
21
- </slot>
22
- <div
23
- v-if="props.showCounter"
24
- :class="[props.disabledBorder && 'font-body-small']"
25
- >
24
+ >
25
+ {{ props.label }}
26
+ <span v-if="props.required" class="text-destructive">*</span>
27
+ </div>
28
+ </slot>
26
29
  <div
27
- v-if="props.limit > 0"
28
- :class="[
29
- (props.multiple ? modelValue.length : modelValue.length) > props.limit && 'text-destructive'
30
- ]"
30
+ v-if="props.showCounter && props.limit > 0"
31
+ :class="[props.disabledBorder && 'font-body-small']"
31
32
  >
32
- {{
33
- props.multiple ? modelValue.length : modelValue.length
34
- }}/{{ props.limit }}
33
+ <div :class="[selectedCount > props.limit && 'text-destructive']">
34
+ {{ selectedCount }}/{{ props.limit }}
35
+ </div>
35
36
  </div>
36
- </div>
37
- </ShadFormLabel>
38
- <ShadPopover v-bind="componentField">
39
- <ShadPopoverTrigger as-child>
40
- <ShadFormControl>
41
- <ShadButton
42
- variant="outline"
43
- role="combobox"
44
- class="w-full justify-between text-start"
45
- >
46
- <span
47
- :class="{
48
- 'text-cloud': props.placeholder && isShowingPlaceholder
49
- }"
50
- >
51
- {{ displayValue }}
52
- </span>
53
- <Icon name="lucide:chevron-down" class="h-4 w-4" />
54
- </ShadButton>
55
- </ShadFormControl>
56
- </ShadPopoverTrigger>
57
- <ShadPopoverContent>
58
- <ShadCommand>
59
- <ShadCommandInput />
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="[
37
+ </template>
38
+ <template #append>
39
+ <Icon
40
+ @mousedown.stop.prevent="handleIconClick"
41
+ @click.stop.prevent
42
+ :name="hasSelection ? 'lucide:x' : 'lucide:chevron-down'"
43
+ size="16"
44
+ class="cursor-pointer text-black"
45
+ />
46
+ </template>
47
+ </InputTextField>
48
+ </ShadPopoverAnchor>
49
+ <ShadPopoverContent @openAutoFocus.prevent>
50
+ <slot name="popover-content" :close="() => popoverOpen = false">
51
+ <ShadCommand>
52
+ <ShadCommandInput />
53
+ <ShadCommandList>
54
+ <ShadCommandGroup v-if="options && options.length > 0">
55
+ <slot name="options">
56
+ <ShadCommandItem
57
+ v-for="option in options"
58
+ :key="option.value"
59
+ :value="option.value"
60
+ :disabled="isOptionDisabled(option.value)"
61
+ :class="[
69
62
  isOptionDisabled(option.value) && 'cursor-not-allowed'
70
63
  ]"
71
- @click="() => handleSelect(option.value)"
72
- >
73
- <ShadCheckbox
74
- v-if="props.multiple"
75
- :model-value="isSelected(option.value)"
76
- :disabled="isOptionDisabled(option.value)"
77
- class="mr-2 pointer-events-none"
78
- />
64
+ @click="() => handleSelect(option.value)"
65
+ >
66
+ <ShadCheckbox
67
+ v-if="props.multiple"
68
+ :model-value="isSelected(option.value)"
69
+ :disabled="isOptionDisabled(option.value)"
70
+ class="mr-2 pointer-events-none"
71
+ />
79
72
 
80
- {{ option.label }}
81
- <Icon
82
- v-if="!props.multiple && isSelected(option.value)"
83
- name="lucide:check"
84
- class="ml-auto h-4 w-4"
85
- />
86
- </ShadCommandItem>
87
- </slot>
88
- </ShadCommandGroup>
89
- <ShadCommandEmpty
90
- :force-show="!options || options.length === 0"
91
- />
92
- </ShadCommandList>
93
- </ShadCommand>
94
- </ShadPopoverContent>
95
- </ShadPopover>
96
- <ShadFormMessage />
97
- </ShadFormItem>
98
- </ShadFormField>
73
+ {{ option.label }}
74
+ <Icon
75
+ v-if="!props.multiple && isSelected(option.value)"
76
+ name="lucide:check"
77
+ class="ml-auto h-4 w-4"
78
+ />
79
+ </ShadCommandItem>
80
+ </slot>
81
+ </ShadCommandGroup>
82
+ <ShadCommandEmpty :force-show="!options || options.length === 0" />
83
+ </ShadCommandList>
84
+ </ShadCommand>
85
+ </slot>
86
+ </ShadPopoverContent>
87
+ </ShadPopover>
99
88
  </template>
100
89
 
101
90
  <script setup>
@@ -112,53 +101,90 @@ const props = defineProps({
112
101
  options: { type: Array, required: false },
113
102
  multiple: { type: Boolean, required: false, default: false }
114
103
  });
104
+ const emits = defineEmits(["clear"]);
115
105
  const modelValue = defineModel({ type: [String, Array], ...{
116
106
  default: () => ""
117
107
  } });
118
108
  const popoverOpen = ref(false);
119
- const fieldRef = ref();
120
- const defaultRules = (v) => {
121
- return true;
122
- };
123
- onMounted(() => {
124
- if (props.multiple && modelValue.value === "") {
125
- modelValue.value = [];
109
+ const inputTextFieldRef = ref();
110
+ const displayText = ref("");
111
+ const updateDisplayText = () => {
112
+ if (!props.options || props.options.length === 0) {
113
+ displayText.value = props.multiple ? modelValue.value.join(", ") : modelValue.value || "";
114
+ return;
126
115
  }
127
- });
128
- const displayValue = computed(() => {
129
116
  if (props.multiple) {
130
117
  const selectedValues = modelValue.value;
131
118
  if (!selectedValues || selectedValues.length === 0) {
132
- return props.placeholder || "\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23";
119
+ displayText.value = "";
120
+ return;
133
121
  }
134
122
  const selectedLabels = selectedValues.map((val) => props.options?.find((opt) => opt.value === val)?.label).filter(Boolean);
135
- return selectedLabels.length > 0 ? selectedLabels.join(", ") : props.placeholder || "\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23";
123
+ displayText.value = selectedLabels.length > 0 ? selectedLabels.join(", ") : "";
136
124
  } else {
137
125
  const selectedOption = props.options?.find(
138
126
  (opt) => opt.value === modelValue.value
139
127
  );
140
- return selectedOption?.label || props.placeholder || "\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23";
128
+ displayText.value = selectedOption?.label || "";
141
129
  }
130
+ };
131
+ watch([modelValue, () => props.options], updateDisplayText, {
132
+ immediate: true,
133
+ deep: true
142
134
  });
143
- const isShowingPlaceholder = computed(() => {
144
- if (props.multiple) {
145
- const selectedValues = modelValue.value;
146
- return !selectedValues || selectedValues.length === 0;
147
- } else {
148
- const selectedOption = props.options?.find(
149
- (opt) => opt.value === modelValue.value
150
- );
151
- return !selectedOption;
135
+ const computedRules = computed(() => {
136
+ if (props.rules) return props.rules;
137
+ return () => {
138
+ if (props.required) {
139
+ if (props.multiple) {
140
+ const values = modelValue.value;
141
+ return values && values.length > 0 || `\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01 ${props.label || "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`;
142
+ } else {
143
+ return !!modelValue.value || `\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01 ${props.label || "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`;
144
+ }
145
+ }
146
+ return true;
147
+ };
148
+ });
149
+ onMounted(() => {
150
+ if (props.multiple && modelValue.value === "") {
151
+ modelValue.value = [];
152
152
  }
153
153
  });
154
154
  const isLimitReached = computed(() => {
155
155
  if (!props.multiple || props.limit <= 0) return false;
156
156
  return modelValue.value.length >= props.limit;
157
157
  });
158
+ const selectedCount = computed(() => {
159
+ if (props.multiple) {
160
+ return modelValue.value.length;
161
+ }
162
+ return modelValue.value ? 1 : 0;
163
+ });
164
+ const hasSelection = computed(() => {
165
+ if (props.multiple) {
166
+ return modelValue.value.length > 0;
167
+ }
168
+ return !!modelValue.value;
169
+ });
170
+ const handleInputClick = () => {
171
+ popoverOpen.value = true;
172
+ };
173
+ const handleIconClick = () => {
174
+ if (hasSelection.value) {
175
+ if (props.multiple) {
176
+ modelValue.value = [];
177
+ } else {
178
+ modelValue.value = "";
179
+ }
180
+ displayText.value = "";
181
+ emits("clear");
182
+ }
183
+ popoverOpen.value = true;
184
+ };
158
185
  const isSelected = (value) => {
159
186
  if (props.multiple) {
160
- const result = modelValue.value.includes(value);
161
- return result;
187
+ return modelValue.value.includes(value);
162
188
  } else {
163
189
  return modelValue.value === value;
164
190
  }
@@ -189,19 +215,15 @@ const handleSelect = (value) => {
189
215
  popoverOpen.value = false;
190
216
  }
191
217
  };
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
218
  const setErrors = (errMsg) => {
200
- fieldRef.value?.setErrors(errMsg);
219
+ inputTextFieldRef.value?.setErrors(errMsg);
220
+ };
221
+ const validate = async () => {
222
+ return await inputTextFieldRef.value?.validate?.();
201
223
  };
202
224
  defineExpose({
203
- validate,
204
225
  setErrors,
205
- fieldRef
226
+ validate,
227
+ inputTextFieldRef
206
228
  });
207
229
  </script>
@@ -19,19 +19,26 @@ type __VLS_ModelProps = {
19
19
  modelValue?: string | string[];
20
20
  };
21
21
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
22
- declare var __VLS_21: {}, __VLS_81: {};
22
+ declare var __VLS_25: {}, __VLS_44: {
23
+ close: () => boolean;
24
+ }, __VLS_69: {};
23
25
  type __VLS_Slots = {} & {
24
- label?: (props: typeof __VLS_21) => any;
26
+ label?: (props: typeof __VLS_25) => any;
25
27
  } & {
26
- options?: (props: typeof __VLS_81) => any;
28
+ 'popover-content'?: (props: typeof __VLS_44) => any;
29
+ } & {
30
+ options?: (props: typeof __VLS_69) => any;
27
31
  };
28
32
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
29
- validate: () => Promise<any>;
30
33
  setErrors: (errMsg: string[]) => void;
31
- fieldRef: import("vue").Ref<any, any>;
34
+ validate: () => Promise<any>;
35
+ inputTextFieldRef: import("vue").Ref<any, any>;
32
36
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
33
37
  "update:modelValue": (value: string | string[]) => any;
38
+ } & {
39
+ clear: () => any;
34
40
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
41
+ onClear?: (() => any) | undefined;
35
42
  "onUpdate:modelValue"?: ((value: string | string[]) => any) | undefined;
36
43
  }>, {
37
44
  name: string;
@@ -27,8 +27,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
27
27
  label: string;
28
28
  name: string;
29
29
  limit: number;
30
- disabledErrorMessage: boolean;
31
30
  accept: string;
31
+ disabledErrorMessage: boolean;
32
32
  labelIcon: string;
33
33
  disabledDrop: boolean;
34
34
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -27,8 +27,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
27
27
  label: string;
28
28
  name: string;
29
29
  limit: number;
30
- disabledErrorMessage: boolean;
31
30
  accept: string;
31
+ disabledErrorMessage: boolean;
32
32
  labelIcon: string;
33
33
  disabledDrop: boolean;
34
34
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -18,8 +18,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
18
18
  }>, {
19
19
  id: string;
20
20
  name: string;
21
- new: boolean;
22
21
  disabledForgotPassword: boolean;
22
+ new: boolean;
23
23
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
24
  declare const _default: typeof __VLS_export;
25
25
  export default _default;
@@ -18,8 +18,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
18
18
  }>, {
19
19
  id: string;
20
20
  name: string;
21
- new: boolean;
22
21
  disabledForgotPassword: boolean;
22
+ new: boolean;
23
23
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
24
  declare const _default: typeof __VLS_export;
25
25
  export default _default;
@@ -12,9 +12,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
12
12
  color: InputSliderColor;
13
13
  fullWidth: boolean;
14
14
  label: string;
15
+ step: number;
15
16
  max: number;
16
17
  min: number;
17
- step: number;
18
18
  lineHeight: number | string;
19
19
  appearance: boolean;
20
20
  thumbSize: number | string;
@@ -12,9 +12,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
12
12
  color: InputSliderColor;
13
13
  fullWidth: boolean;
14
14
  label: string;
15
+ step: number;
15
16
  max: number;
16
17
  min: number;
17
- step: number;
18
18
  lineHeight: number | string;
19
19
  appearance: boolean;
20
20
  thumbSize: number | string;
@@ -33,6 +33,8 @@ type __VLS_Slots = {} & {
33
33
  };
34
34
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
35
35
  setErrors: (errMsg: string[]) => void;
36
+ validate: () => Promise<any>;
37
+ fieldRef: import("vue").Ref<any, any>;
36
38
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
37
39
  "update:modelValue": (value: string) => any;
38
40
  } & {
@@ -55,10 +57,10 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
55
57
  name: string;
56
58
  disabled: boolean;
57
59
  limit: number;
58
- readonly: boolean;
59
60
  disabledErrorMessage: boolean;
60
61
  disabledBorder: boolean;
61
62
  showCounter: boolean;
63
+ readonly: boolean;
62
64
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
63
65
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
64
66
  declare const _default: typeof __VLS_export;
@@ -34,7 +34,8 @@
34
34
 
35
35
  <ShadInputGroup
36
36
  :class="[
37
- props.disabledBorder && 'border-0 ring-0 focus-within:border-0 focus-within:ring-0'
37
+ 'bg-white',
38
+ props.disabledBorder && 'border-0 ring-0 focus-within:border-0 focus-within:ring-0 '
38
39
  ]"
39
40
  >
40
41
  <ShadFormControl>
@@ -129,7 +130,12 @@ const defaultRules = (v) => {
129
130
  const setErrors = (errMsg) => {
130
131
  fieldRef.value?.setErrors(errMsg);
131
132
  };
133
+ const validate = async () => {
134
+ return await fieldRef.value?.validate?.();
135
+ };
132
136
  defineExpose({
133
- setErrors
137
+ setErrors,
138
+ validate,
139
+ fieldRef
134
140
  });
135
141
  </script>
@@ -33,6 +33,8 @@ type __VLS_Slots = {} & {
33
33
  };
34
34
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
35
35
  setErrors: (errMsg: string[]) => void;
36
+ validate: () => Promise<any>;
37
+ fieldRef: import("vue").Ref<any, any>;
36
38
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
37
39
  "update:modelValue": (value: string) => any;
38
40
  } & {
@@ -55,10 +57,10 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
55
57
  name: string;
56
58
  disabled: boolean;
57
59
  limit: number;
58
- readonly: boolean;
59
60
  disabledErrorMessage: boolean;
60
61
  disabledBorder: boolean;
61
62
  showCounter: boolean;
63
+ readonly: boolean;
62
64
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
63
65
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
64
66
  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
- isLoading?: boolean;
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
- text: string;
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;