inertia-bootstrap-forms 2.1.21 → 3.0.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 (59) hide show
  1. package/README.fa.md +468 -0
  2. package/README.md +322 -714
  3. package/dist/inertia-bootstrap-forms.cjs.js +1 -0
  4. package/dist/inertia-bootstrap-forms.es.js +3524 -30
  5. package/index.d.ts +143 -507
  6. package/package.json +89 -70
  7. package/src/AmountInput.vue +81 -76
  8. package/src/CaptchaInput.vue +87 -88
  9. package/src/CheckboxButtonInput.vue +56 -69
  10. package/src/CheckboxInput.vue +60 -79
  11. package/src/CheckboxToggle.vue +53 -136
  12. package/src/ChipsInput.vue +157 -0
  13. package/src/ComboboxInput.vue +556 -0
  14. package/src/DropzoneInput.vue +125 -103
  15. package/src/EditorInput.vue +47 -106
  16. package/src/EmailInput.vue +16 -15
  17. package/src/FileInput.vue +189 -179
  18. package/src/FormAdornInput.vue +75 -0
  19. package/src/FormContainer.vue +288 -251
  20. package/src/FormField.vue +59 -0
  21. package/src/FormLabel.vue +27 -27
  22. package/src/GroupControl.vue +55 -53
  23. package/src/LocationInput.vue +79 -72
  24. package/src/MobileInput.vue +21 -13
  25. package/src/MultiQuantityInput.vue +109 -181
  26. package/src/OTPInput.vue +144 -76
  27. package/src/PasswordInput.vue +151 -17
  28. package/src/PersianDatePickerInput.vue +63 -166
  29. package/src/QuantityInput.vue +100 -119
  30. package/src/RangeInput.vue +96 -0
  31. package/src/SimpleUploader.vue +8 -143
  32. package/src/StarRatingInput.vue +114 -138
  33. package/src/SubmitButton.vue +39 -24
  34. package/src/SwitchInput.vue +58 -83
  35. package/src/TelInput.vue +86 -120
  36. package/src/TextAreaInput.vue +29 -33
  37. package/src/TextInput.vue +42 -51
  38. package/src/UppyInput.vue +237 -324
  39. package/src/composables/useBsInstance.js +66 -0
  40. package/src/composables/useChoice.js +34 -0
  41. package/src/composables/useDisposables.js +59 -0
  42. package/src/composables/useField.js +121 -0
  43. package/src/composables/useFormApi.js +12 -0
  44. package/src/i18n.js +120 -0
  45. package/src/index.js +123 -42
  46. package/src/utils/bootstrap.js +48 -0
  47. package/src/utils/digits.js +21 -0
  48. package/src/utils/http.js +15 -0
  49. package/dist/choices-KiM-I_0P.js +0 -2955
  50. package/dist/dropdown-yh2aQrbw-XuCU1v1F.js +0 -1543
  51. package/dist/index-BRtKc2RA.js +0 -604
  52. package/dist/index-_x4UqcXz.js +0 -4938
  53. package/dist/inertia-bootstrap-forms.umd.js +0 -19
  54. package/dist/range-slider-pips-DTDOg3Q9.js +0 -3506
  55. package/dist/style.css +0 -1
  56. package/src/css/from-select.scss +0 -384
  57. package/src/css/loader.gif +0 -0
  58. package/src/css/location.scss +0 -44
  59. package/src/css/simple-upload.scss +0 -54
package/index.d.ts CHANGED
@@ -1,507 +1,143 @@
1
- import { defineComponent } from 'vue';
2
-
3
- // Import کامپوننت‌ها
4
- import AmountInput from './src/AmountInput.vue';
5
- import CaptchaInput from './src/CaptchaInput.vue';
6
- import CheckboxButtonInput from './src/CheckboxButtonInput.vue';
7
- import CheckboxInput from './src/CheckboxInput.vue';
8
- import CheckboxToggle from './src/CheckboxToggle.vue';
9
- import SwitchInput from './src/SwitchInput.vue';
10
- import EditorInput from './src/EditorInput.vue';
11
- import EmailInput from './src/EmailInput.vue';
12
- import FileInput from './src/FileInput.vue';
13
- import SimpleUploader from './src/SimpleUploader.vue';
14
- import UppyInput from './src/UppyInput.vue';
15
- import FormContainer from './src/FormContainer.vue';
16
- import FormLabel from './src/FormLabel.vue';
17
- import GroupControl from './src/GroupControl.vue';
18
- import LocationInput from './src/LocationInput.vue';
19
- import MobileInput from './src/MobileInput.vue';
20
- import MultiQuantityInput from './src/MultiQuantityInput.vue';
21
- import PasswordInput from './src/PasswordInput.vue';
22
- import PersianDatePickerInput from './src/PersianDatePickerInput.vue';
23
- import QuantityInput from './src/QuantityInput.vue';
24
- import Select2Input from './src/Select2Input.vue';
25
- import StarRatingInput from './src/StarRatingInput.vue';
26
- import SubmitButton from './src/SubmitButton.vue';
27
- import TelInput from './src/TelInput.vue';
28
- import TextAreaInput from './src/TextAreaInput.vue';
29
- import TextInput from './src/TextInput.vue';
30
- import OTPInput from './src/OTPInput.vue';
31
- import DropzoneInput from './src/DropzoneInput.vue';
32
- import { countryCodes } from './src/countryCodes';
33
-
34
- // Export تکی
35
- export {
36
- AmountInput,
37
- CaptchaInput,
38
- CheckboxButtonInput,
39
- CheckboxInput,
40
- CheckboxToggle,
41
- SwitchInput,
42
- countryCodes,
43
- EditorInput,
44
- EmailInput,
45
- DropzoneInput,
46
- UppyInput,
47
- FileInput,
48
- SimpleUploader,
49
- FormContainer,
50
- FormLabel,
51
- GroupControl,
52
- LocationInput,
53
- MobileInput,
54
- MultiQuantityInput,
55
- PasswordInput,
56
- PersianDatePickerInput,
57
- QuantityInput,
58
- Select2Input,
59
- StarRatingInput,
60
- SubmitButton,
61
- TelInput,
62
- TextAreaInput,
63
- TextInput,
64
- OTPInput,
65
- Quantity,
66
- File,
67
- };
68
-
69
- // Export پیش‌فرض برای import * as
70
- const Vue3FormComponents = {
71
- AmountInput,
72
- CaptchaInput,
73
- CheckboxButtonInput,
74
- CheckboxInput,
75
- CheckboxToggle,
76
- countryCodes,
77
- EditorInput,
78
- DropzoneInput,
79
- UppyInput,
80
- EmailInput,
81
- FileInput,
82
- SimpleUploader,
83
- FormContainer,
84
- FormLabel,
85
- GroupControl,
86
- LocationInput,
87
- MobileInput,
88
- MultiQuantityInput,
89
- PasswordInput,
90
- PersianDatePickerInput,
91
- QuantityInput,
92
- Select2Input,
93
- StarRatingInput,
94
- SubmitButton,
95
- TelInput,
96
- TextAreaInput,
97
- TextInput,
98
- OTPInput,
99
- };
100
-
101
- export default Vue3FormComponents;
102
-
103
- import { DefineComponent } from 'vue';
104
-
105
- export const AmountInput: DefineComponent<{}, {}, any>;
106
- export const CaptchaInput: DefineComponent<{}, {}, any>;
107
- export const CheckboxButtonInput: DefineComponent<{
108
- name: {
109
- type: String,
110
- required: true,
111
- },
112
- id: {
113
- type: String,
114
- default: '',
115
- required: false,
116
- },
117
- value: {
118
- type: String,
119
- default: 'yes',
120
- required: false,
121
- },
122
- type: {
123
- type: String,
124
- default: 'radio',
125
- required: false,
126
- },
127
- }, {}, any>;
128
- export const CheckboxInput: DefineComponent<{}, {}, any>;
129
- export const CheckboxToggle: DefineComponent<{
130
- name: {
131
- type: String,
132
- required: true,
133
- },
134
- id: {
135
- type: String,
136
- default: '',
137
- required: false,
138
- },
139
- value: {
140
- type: [String, Number],
141
- default: 'yes',
142
- required: false,
143
- },
144
- type: {
145
- type: String,
146
- default: 'checkbox',
147
- required: false,
148
- },
149
- disabled: {
150
- type: Boolean,
151
- default: false,
152
- },
153
- readonly: {
154
- type: Boolean,
155
- default: false,
156
- },
157
- hideInput: {
158
- type: Boolean,
159
- default: false,
160
- }
161
- }, {}, any>;
162
- export const SwitchInput: DefineComponent<{}, {}, any>;
163
- export const countryCodes: any;
164
- export const EditorInput: DefineComponent<{
165
- name: {
166
- type: String,
167
- required: true,
168
- },
169
- modelValue: String,
170
- placeholder: {
171
- type: String,
172
- default: 'اینجا بنویسید...',
173
- },
174
- invalid: Boolean,
175
- allowLink: Boolean,
176
- height: Number,
177
- minHeight: Number,
178
- useStyle: {
179
- type: Boolean,
180
- default: false,
181
- },
182
- modules: {
183
- default: [],
184
- required: false,
185
- },
186
- options: {
187
- type: Object,
188
- default: {},
189
- required: false,
190
- },
191
- }, {}, any>;
192
- export const EmailInput: DefineComponent<{}, {}, any>;
193
- export const DropzoneInput: DefineComponent<{}, {}, any>;
194
- export const UppyInput: DefineComponent<{
195
- name: {
196
- type: String,
197
- required: true,
198
- },
199
- multiple: {
200
- type: Boolean,
201
- default: false,
202
- },
203
- showRestrictionCaption: {
204
- type: Boolean,
205
- default: true,
206
- },
207
- errorHandler: {type: Function, default: null},
208
- config: {type: Object, default: () => ({})},
209
- modelValue: String,
210
- XHRConfig: {type: Object, default: {}},
211
- useXHR: {type: Boolean, default: true},
212
- url: { type: String, default: "/upload" },
213
- }, {},
214
- any,
215
- {},
216
- {},
217
- {},
218
- {},
219
- {
220
- 'update:modelValue': (value: string) => void,
221
- 'file-added': (file) => void,
222
- 'file-removed': (file) => void,
223
- 'beforeUpload': (files) => void,
224
- 'progress': (progress) => void,
225
- 'upload': (uploadID, file) => void,
226
- 'upload-progress': (file, progress) => void,
227
- 'upload-error': (file, error, response) => void,
228
- 'upload-success': (file, response) => void,
229
- 'upload-pause': (file, isPaused) => void,
230
- 'complete': (result) => void,
231
- 'error': (error) => void,
232
- 'upload-retry': (file) => void,
233
- 'upload-stalled': (error, files) => void,
234
- 'retry-all': (files) => void,
235
- 'cancel-all': () => void,
236
- 'restriction-failed': (file, error) => void,
237
- }
238
- >;
239
- export const FileInput: DefineComponent<{}, {}, any>;
240
- export const SimpleUploader: DefineComponent<{}, {}, any>;
241
- export const FormContainer: DefineComponent<{
242
- url: {
243
- type: String,
244
- default: '',
245
- required: false,
246
- },
247
- method: {
248
- default: 'post'
249
- },
250
- autoTab: {
251
- type: Boolean,
252
- default: true,
253
- },
254
- only: {
255
- type: Array,
256
- default: [],
257
- required: false,
258
- },
259
- modelValue: {
260
- type: Object,
261
- default: {},
262
- required: false,
263
- },
264
- options: {
265
- type: Object,
266
- default: {},
267
- required: false,
268
- },
269
- resetOnSuccess: {
270
- type: Boolean,
271
- default: false,
272
- },
273
- submitHandler: {
274
- type: Function,
275
- default: null,
276
- required: false,
277
- },
278
- }, {}, any,
279
- {},
280
- {},
281
- {},
282
- {},
283
- {
284
- 'update:modelValue': (data) => void,
285
- 'submit': (event) => void,
286
- 'reset': (file) => void,
287
- 'onStart': () => void,
288
- 'onFinish': (data) => void,
289
- 'onSuccess': (data) => void,
290
- 'onError': (errors) => void,
291
- 'change': (data) => void,
292
- }
293
- >;
294
- export const FormLabel: DefineComponent<{}, {}, any>;
295
- export const GroupControl: DefineComponent<{}, {}, any>;
296
- export const LocationInput: DefineComponent<{
297
- name: {
298
- type: String,
299
- default: 'location',
300
- required: false,
301
- },
302
- disabled: {
303
- type: [Boolean, String],
304
- default: false,
305
- },
306
- readonly: {
307
- type: [Boolean, String],
308
- default: false,
309
- },
310
- }, {}, any>;
311
- export const MobileInput: DefineComponent<{}, {}, any>;
312
- export const MultiQuantityInput: DefineComponent<{}, {}, any>;
313
- export const PasswordInput: DefineComponent<{}, {}, any>;
314
- export const PersianDatePickerInput: DefineComponent<{
315
- name: {
316
- type: String,
317
- required: true,
318
- },
319
- calendar: {
320
- type: String,
321
- default: 'date',
322
- },
323
- view: {
324
- type: String,
325
- default: 'date',
326
- },
327
- min: String,
328
- max: String,
329
- range: Boolean,
330
- locale: {
331
- default: 'fa',
332
- },
333
- format: {
334
- type: String,
335
- default: 'jYYYY-jMM-jDD',
336
- },
337
- inputFormat: {
338
- type: String,
339
- default: null,
340
- },
341
- placeholder: String,
342
- }, {}, any>;
343
- export const QuantityInput: DefineComponent<{}, {}, any>;
344
- export const Select2Input: DefineComponent<{
345
- name: {
346
- type: String,
347
- required: true,
348
- },
349
- modelValue: '',
350
- label: {
351
- type: String,
352
- default: null,
353
- },
354
- key: {
355
- type: String,
356
- default: null,
357
- },
358
- placeholder: {
359
- type: String,
360
- default: 'Click to choice',
361
- },
362
- searchPlaceholder: {
363
- type: String,
364
- default: 'Type for search...',
365
- },
366
- multiple: {
367
- type: Boolean,
368
- default: false,
369
- },
370
- required: {
371
- type: Boolean,
372
- default: false,
373
- },
374
- config: {
375
- type: Object,
376
- default: {},
377
- },
378
- locale: {
379
- type: String,
380
- default: 'en',
381
- },
382
- options: Array,
383
- searchEnabled: {
384
- type: Boolean,
385
- default: false
386
- },
387
- hideDropdown: {
388
- type: Boolean,
389
- default: false
390
- },
391
- search: {
392
- type: Object,
393
- default: {
394
- url: null,
395
- }
396
- },
397
- }, {}, any,
398
- {},
399
- {},
400
- {},
401
- {},
402
- {
403
- 'update:modelValue': (data) => void,
404
- 'search': (event) => void,
405
- 'searching': (query) => void,
406
- 'change': (file) => void,
407
- 'selected': () => void,
408
- }
409
- >;
410
- export const StarRatingInput: DefineComponent<{}, {}, any>;
411
- export const SubmitButton: DefineComponent<{
412
- disabled: {
413
- type: Boolean,
414
- default: false
415
- }
416
- }, {}, any>;
417
- export const TelInput: DefineComponent<{}, {}, any>;
418
- export const TextAreaInput: DefineComponent<{}, {}, any>;
419
- export const TextInput: DefineComponent<{}, {}, any>;
420
- export const OTPInput: DefineComponent<{
421
- name: {
422
- type: String,
423
- required: true,
424
- },
425
- maxLength: {
426
- type: Number,
427
- default: 5,
428
- },
429
- placeholder: {
430
- type: String,
431
- default: '',
432
- },
433
- }, {}, any>;
434
- export const RangeSliderInput: DefineComponent<{
435
- name: {
436
- type: String,
437
- default: null,
438
- },
439
- modelValue: {
440
- type: Number,
441
- default: 0
442
- },
443
- value: {
444
- type: Number,
445
- default: 0
446
- },
447
- min: {
448
- type: Number,
449
- default: 1
450
- },
451
- max: {
452
- type: Number,
453
- default: 100
454
- },
455
- step: {
456
- type: Number,
457
- default: 1
458
- },
459
- readonly: {
460
- type: Boolean,
461
- default: false
462
- },
463
- range: {
464
- type: Boolean,
465
- default: false
466
- },
467
- options: {
468
- type: Object,
469
- default: {}
470
- }
471
- }, {}, any>;
472
-
473
- // Export پیش‌فرض
474
- declare const Vue3FormComponents: {
475
- AmountInput: typeof AmountInput;
476
- CaptchaInput: typeof CaptchaInput;
477
- CheckboxButtonInput: typeof CheckboxButtonInput;
478
- CheckboxInput: typeof CheckboxInput;
479
- CheckboxToggle: typeof CheckboxToggle;
480
- SwitchInput: typeof SwitchInput;
481
- DropzoneInput: typeof DropzoneInput;
482
- countryCodes: typeof countryCodes;
483
- EditorInput: typeof EditorInput;
484
- EmailInput: typeof EmailInput;
485
- FileInput: typeof FileInput;
486
- SimpleUploader: typeof SimpleUploader;
487
- FormContainer: typeof FormContainer;
488
- FormLabel: typeof FormLabel;
489
- GroupControl: typeof GroupControl;
490
- LocationInput: typeof LocationInput;
491
- MobileInput: typeof MobileInput;
492
- MultiQuantityInput: typeof MultiQuantityInput;
493
- PasswordInput: typeof PasswordInput;
494
- PersianDatePickerInput: typeof PersianDatePickerInput;
495
- QuantityInput: typeof QuantityInput;
496
- Select2Input: typeof Select2Input;
497
- StarRatingInput: typeof StarRatingInput;
498
- SubmitButton: typeof SubmitButton;
499
- TelInput: typeof TelInput;
500
- TextAreaInput: typeof TextAreaInput;
501
- TextInput: typeof TextInput;
502
- OTPInput: typeof OTPInput;
503
- Quantity: typeof QuantityInput;
504
- RangeSliderInput: typeof RangeSliderInput;
505
- };
506
-
507
- export default Vue3FormComponents;
1
+ import type { DefineComponent, Plugin, ComputedRef, Ref, PropType } from 'vue';
2
+
3
+ /** Props shared by every field component. */
4
+ export interface FieldProps {
5
+ /** Key of the field inside the FormContainer's v-model object. */
6
+ name?: string | null;
7
+ /** Only used when the field is rendered outside a FormContainer. */
8
+ modelValue?: any;
9
+ id?: string | null;
10
+ disabled?: boolean;
11
+ readonly?: boolean;
12
+ required?: boolean;
13
+ /** Force the invalid state (defaults to the server-side errors of the form). */
14
+ invalid?: boolean | null;
15
+ }
16
+
17
+ type Comp<P = {}, E = {}> = DefineComponent<FieldProps & P, {}, {}, {}, {}, {}, {}, E>;
18
+
19
+ export type Locale = 'auto' | 'en' | 'fa' | (string & {});
20
+ export type OptionItem = string | number | { [key: string]: any; disabled?: boolean; description?: string };
21
+
22
+ export interface RemoteSearch {
23
+ url: string | null;
24
+ method?: string;
25
+ param?: string;
26
+ debounce?: number;
27
+ minChars?: number;
28
+ headers?: Record<string, string>;
29
+ resultsKey?: string;
30
+ }
31
+
32
+ export declare const FormContainer: DefineComponent<{
33
+ modelValue?: Record<string, any>;
34
+ url?: string;
35
+ method?: 'get' | 'post' | 'put' | 'patch' | 'delete' | string;
36
+ only?: string[];
37
+ options?: Record<string, any>;
38
+ visitOptions?: Record<string, any>;
39
+ autoTab?: boolean;
40
+ resetOnSuccess?: boolean;
41
+ submitHandler?: ((event: Event | undefined, form: any) => any) | null;
42
+ normalizeDigits?: boolean;
43
+ validate?: boolean;
44
+ htmlMessages?: boolean;
45
+ hideAlerts?: boolean;
46
+ }>;
47
+ export declare const FormField: DefineComponent<{ name?: string | null; label?: string | null; help?: string | null; error?: string | null; required?: boolean; id?: string | null }>;
48
+ export declare const FormLabel: DefineComponent<{ for?: string | null; required?: boolean }>;
49
+ export declare const GroupControl: DefineComponent<{ name: string; index?: number | string | null }>;
50
+ export declare const SubmitButton: DefineComponent<{ disabled?: boolean; loading?: boolean | null; variant?: string | null; theme?: string; locale?: Locale | null }>;
51
+
52
+ export declare const TextInput: Comp<{ type?: string; placeholder?: string | null; size?: 'sm' | 'lg' | null }>;
53
+ export declare const TextAreaInput: Comp<{ rows?: number | string; placeholder?: string | null; size?: 'sm' | 'lg' | null }>;
54
+ export declare const EmailInput: Comp<{ placeholder?: string | null; locale?: Locale | null }>;
55
+ export declare const PasswordInput: Comp<{ placeholder?: string | null; toggle?: boolean; locale?: Locale | null }>;
56
+ export declare const MobileInput: Comp<{ placeholder?: string | null; locale?: Locale | null }>;
57
+ export declare const TelInput: Comp<{ placeholder?: string; defaultCountry?: string; preferredCountries?: string[]; mode?: string; validCharactersOnly?: boolean; validate?: boolean; dropdownOptions?: object; inputOptions?: object }>;
58
+ export declare const FormAdornInput: Comp<{ type?: string; placeholder?: string | null; startText?: string | null; endText?: string | null; size?: 'sm' | 'lg' | null }>;
59
+ export declare const FormAdorn: typeof FormAdornInput;
60
+
61
+ export declare const AmountInput: Comp<{ placeholder?: string | null; unit?: string | null; min?: number | null; max?: number | null; size?: 'sm' | 'lg' | null; locale?: Locale | null }>;
62
+ export declare const QuantityInput: Comp<{ min?: number; max?: number | null; step?: number; unit?: string | null; locale?: Locale | null }>;
63
+ export declare const MultiQuantityInput: Comp<{ options?: Array<string | { name: string; min?: number; max?: number; description?: string; html?: boolean }>; min?: number; max?: number | null; totalMin?: number | null; totalMax?: number | null; unit?: string | null; placement?: string; locale?: Locale | null }>;
64
+ export declare const RangeInput: Comp<{ min?: number; max?: number; step?: number; bubble?: boolean; formatter?: ((v: number) => string) | null; ticks?: Array<number | { value: number; label: string }> }>;
65
+ export declare const RangeSliderInput: typeof RangeInput;
66
+ export declare const StarRatingInput: Comp<{ value?: number; maxStars?: number; precision?: number; showValue?: boolean; clearable?: boolean }>;
67
+
68
+ export declare const CheckboxInput: Comp<{ type?: 'checkbox' | 'radio'; value?: any; trueValue?: any; falseValue?: any; checked?: boolean; indeterminate?: boolean; label?: string | null }>;
69
+ export declare const SwitchInput: Comp<{ value?: any; trueValue?: any; falseValue?: any; checked?: boolean; label?: string | null }>;
70
+ export declare const CheckboxButtonInput: Comp<{ type?: 'checkbox' | 'radio'; value?: any; trueValue?: any; falseValue?: any; checked?: boolean; variant?: string; theme?: string }>;
71
+ export declare const CheckboxToggle: Comp<{ type?: 'checkbox' | 'radio'; value?: any; trueValue?: any; falseValue?: any; checked?: boolean; hideInput?: boolean }>;
72
+
73
+ export declare const ComboboxInput: Comp<{
74
+ options?: OptionItem[];
75
+ valueKey?: string | null;
76
+ labelKey?: string | null;
77
+ label?: string | null;
78
+ descriptionKey?: string;
79
+ multiple?: boolean;
80
+ placeholder?: string | null;
81
+ searchEnabled?: boolean;
82
+ searchPlaceholder?: string | null;
83
+ search?: RemoteSearch;
84
+ clearable?: boolean;
85
+ clearText?: string | null;
86
+ noResultsText?: string | null;
87
+ loadingText?: string | null;
88
+ selectedText?: string | null;
89
+ searchNormalize?: boolean;
90
+ placement?: string;
91
+ size?: 'sm' | 'lg' | null;
92
+ hideDropdown?: boolean;
93
+ locale?: Locale | null;
94
+ }>;
95
+ /** @deprecated alias of ComboboxInput */
96
+ export declare const Select2Input: typeof ComboboxInput;
97
+ export declare const ChipsInput: Comp<{ placeholder?: string | null; separator?: string | null; allowDuplicates?: boolean; maxChips?: number | null; dismissible?: boolean; dismissIcon?: string | null; createOnBlur?: boolean; validator?: ((value: string) => boolean) | null; locale?: Locale | null }>;
98
+ export declare const OTPInput: Comp<{ length?: number | null; maxLength?: number | null; type?: 'numeric' | 'alphanumeric' | 'alpha'; mask?: boolean; groups?: number[] | null; separator?: string; autoSubmit?: boolean; autofocus?: boolean }>;
99
+
100
+ export declare const PersianDatePickerInput: Comp<{ calendar?: string; view?: string; min?: string | null; max?: string | null; range?: boolean; locale?: string; format?: string; inputFormat?: string | null; placeholder?: string | null; inputClass?: string; pickerOptions?: object }>;
101
+ export declare const EditorInput: Comp<{ placeholder?: string; options?: object; height?: number | string | null; tinymceScriptSrc?: string | null; apiKey?: string | null }>;
102
+ export declare const LocationInput: Comp<{ center?: { lat: number; lng: number }; zoom?: number; height?: number | string; tileUrl?: string; attribution?: string }>;
103
+ export declare const CaptchaInput: Comp<{ url?: string; placeholder?: string | null; refreshOnSubmit?: boolean; imageWidth?: number | string; imageHeight?: number | string; locale?: Locale | null }>;
104
+
105
+ export declare const FileInput: Comp<{ multiple?: boolean; endpoint?: string; accept?: string | null; headers?: Record<string, string>; fieldName?: string; locale?: Locale | null }>;
106
+ /** @deprecated alias of FileInput */
107
+ export declare const SimpleUploader: typeof FileInput;
108
+ export declare const DropzoneInput: Comp<{ multiple?: boolean; url?: string; options?: object; headers?: Record<string, string>; locale?: Locale | null }>;
109
+ export declare const UppyInput: Comp<{ multiple?: boolean; useXHR?: boolean; XHRConfig?: object; url?: string; config?: object; errorHandler?: ((m: any) => void) | null; showRestrictionCaption?: boolean; locale?: Locale | null }>;
110
+
111
+ export declare const countryCodes: Array<{ country: string; code: string; iso: string }>;
112
+
113
+ export interface BootstrapPlugins { Combobox?: any; Chips?: any; OtpInput?: any; Range?: any; Menu?: any }
114
+ export declare function configureBootstrap(modules: BootstrapPlugins): void;
115
+ export declare function configureI18n(options: { locale?: Locale; messages?: Record<string, Record<string, string>> }): void;
116
+
117
+ export declare const fieldProps: Record<string, any>;
118
+ export declare function useField(props: any, emit: (...args: any[]) => void, options?: { defaultValue?: any; valued?: () => any }): {
119
+ form: ComputedRef<any>;
120
+ group: ComputedRef<any>;
121
+ standalone: ComputedRef<boolean>;
122
+ model: any;
123
+ error: ComputedRef<string | null>;
124
+ isInvalid: ComputedRef<boolean>;
125
+ isDisabled: ComputedRef<boolean>;
126
+ inputId: ComputedRef<string>;
127
+ emitChange: (value: any, event?: Event) => void;
128
+ formApi: { submit: (...args: any[]) => void; reset: () => void } | null;
129
+ };
130
+ export declare function useFormApi(): { form: Ref<any> | null; submit: (...args: any[]) => void; reset: () => void };
131
+ export declare function useDisposables(): {
132
+ add: (fn: () => void) => () => void;
133
+ listen: (target: EventTarget, type: string, handler: any, options?: any) => () => void;
134
+ timeout: (fn: () => void, ms: number) => number;
135
+ abortable: () => AbortController;
136
+ dispose: () => void;
137
+ isDisposed: () => boolean;
138
+ };
139
+ export declare function useBsInstance(name: 'Combobox' | 'Chips' | 'OtpInput' | 'Range' | 'Menu', getElement: () => HTMLElement | null, getConfig: () => object, hooks?: { onCreate?: (instance: any, el: HTMLElement) => void; onDestroy?: (instance: any, el: HTMLElement | null) => void }): { instance: Ref<any>; create: () => Promise<any>; destroy: () => void };
140
+ export declare function toEnglishDigits(input: unknown): string;
141
+
142
+ declare const plugin: Plugin;
143
+ export default plugin;