plugin-ui-for-kzt 0.0.64 → 0.0.65
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/components/BaseBadge/BaseBadge.vue.d.ts +2 -2
- package/dist/components/BaseButton/BaseButton.vue.d.ts +1 -1
- package/dist/components/BaseCalendar/BaseCalendar.vue.d.ts +1 -1
- package/dist/components/BaseCheckbox/BaseCheckbox.vue.d.ts +1 -1
- package/dist/components/BaseInput/BaseInput.vue.d.ts +3 -3
- package/dist/components/BaseInputCalendar/BaseInputCalendar.vue.d.ts +4 -4
- package/dist/components/BaseInputCurrency/BaseInputCurrency.vue.d.ts +4 -4
- package/dist/components/BaseInputEmail/BaseInputEmail.vue.d.ts +2 -2
- package/dist/components/BaseInputPhone/BaseInputPhone.vue.d.ts +2 -2
- package/dist/components/BaseInputWithSelector/BaseInputWithSelector.vue.d.ts +1 -1
- package/dist/components/BasePagination/BasePagination.vue.d.ts +2 -2
- package/dist/components/BaseRadio/BaseRadio.vue.d.ts +1 -1
- package/dist/components/BaseSelect/BaseSelect.vue.d.ts +1 -1
- package/dist/components/BaseSiteInput/BaseSiteInput.vue.d.ts +1 -1
- package/dist/components/BaseTag/BaseTag.vue.d.ts +1 -1
- package/dist/components/BaseTextarea/BaseTextarea.vue.d.ts +2 -2
- package/dist/components/BaseToast/BaseToast.vue.d.ts +1 -1
- package/dist/components/BaseToggle/BaseToggle.vue.d.ts +1 -1
- package/dist/components/BaseTooltip/BaseTooltip.vue.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/BaseUpload/README.md +38 -16
|
@@ -40,10 +40,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
40
40
|
};
|
|
41
41
|
}>> & Readonly<{}>, {
|
|
42
42
|
size: string;
|
|
43
|
-
color: string;
|
|
44
43
|
closable: boolean;
|
|
45
|
-
|
|
44
|
+
color: string;
|
|
46
45
|
hasDot: boolean;
|
|
47
46
|
arrowUpIcon: boolean;
|
|
47
|
+
arrowRightIcon: boolean;
|
|
48
48
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
49
49
|
export default _default;
|
|
@@ -92,10 +92,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
92
92
|
disabled: boolean;
|
|
93
93
|
required: boolean;
|
|
94
94
|
loading: boolean;
|
|
95
|
-
readonly: boolean;
|
|
96
95
|
range: boolean | Record<string, any>;
|
|
97
96
|
minDate: null;
|
|
98
97
|
maxDate: null;
|
|
98
|
+
readonly: boolean;
|
|
99
99
|
inline: boolean;
|
|
100
100
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
101
101
|
export default _default;
|
|
@@ -71,7 +71,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
71
71
|
disabled: boolean;
|
|
72
72
|
required: boolean;
|
|
73
73
|
loading: boolean;
|
|
74
|
-
readonly: boolean;
|
|
75
74
|
modelValue: boolean;
|
|
75
|
+
readonly: boolean;
|
|
76
76
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
77
77
|
export default _default;
|
|
@@ -102,17 +102,17 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
102
102
|
};
|
|
103
103
|
}>> & Readonly<{}>, {
|
|
104
104
|
size: string;
|
|
105
|
-
type: string;
|
|
106
105
|
id: string;
|
|
107
106
|
mask: string;
|
|
107
|
+
type: string;
|
|
108
108
|
selected: boolean;
|
|
109
109
|
active: boolean;
|
|
110
110
|
disabled: boolean;
|
|
111
111
|
required: boolean;
|
|
112
112
|
loading: boolean;
|
|
113
|
-
placeholder: string;
|
|
114
|
-
readonly: boolean;
|
|
115
113
|
modelValue: string;
|
|
114
|
+
readonly: boolean;
|
|
115
|
+
placeholder: string;
|
|
116
116
|
clearable: boolean;
|
|
117
117
|
focusable: boolean;
|
|
118
118
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -127,14 +127,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
127
127
|
disabled: boolean;
|
|
128
128
|
required: boolean;
|
|
129
129
|
loading: boolean;
|
|
130
|
-
placeholder: string;
|
|
131
|
-
readonly: boolean;
|
|
132
130
|
modelValue: string;
|
|
133
|
-
clearable: boolean;
|
|
134
|
-
focusable: boolean;
|
|
135
131
|
range: boolean | Record<string, any>;
|
|
136
132
|
minDate: null;
|
|
137
133
|
maxDate: null;
|
|
134
|
+
readonly: boolean;
|
|
138
135
|
inline: boolean;
|
|
136
|
+
placeholder: string;
|
|
137
|
+
clearable: boolean;
|
|
138
|
+
focusable: boolean;
|
|
139
139
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
140
140
|
export default _default;
|
|
@@ -98,18 +98,18 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
98
98
|
};
|
|
99
99
|
}>> & Readonly<{}>, {
|
|
100
100
|
size: string;
|
|
101
|
-
type: string;
|
|
102
101
|
error: string | boolean;
|
|
102
|
+
type: string;
|
|
103
103
|
selected: boolean;
|
|
104
104
|
active: boolean;
|
|
105
105
|
disabled: boolean;
|
|
106
106
|
required: boolean;
|
|
107
107
|
loading: boolean;
|
|
108
|
-
placeholder: string;
|
|
109
|
-
readonly: boolean;
|
|
110
108
|
modelValue: string;
|
|
109
|
+
readonly: boolean;
|
|
110
|
+
placeholder: string;
|
|
111
111
|
clearable: boolean;
|
|
112
|
-
focusable: boolean;
|
|
113
112
|
options: undefined;
|
|
113
|
+
focusable: boolean;
|
|
114
114
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
115
115
|
export default _default;
|
|
@@ -98,9 +98,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
98
98
|
disabled: boolean;
|
|
99
99
|
required: boolean;
|
|
100
100
|
loading: boolean;
|
|
101
|
-
placeholder: string;
|
|
102
|
-
readonly: boolean;
|
|
103
101
|
modelValue: string;
|
|
102
|
+
readonly: boolean;
|
|
103
|
+
placeholder: string;
|
|
104
104
|
clearable: boolean;
|
|
105
105
|
focusable: boolean;
|
|
106
106
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -96,9 +96,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
96
96
|
disabled: boolean;
|
|
97
97
|
required: boolean;
|
|
98
98
|
loading: boolean;
|
|
99
|
-
placeholder: string;
|
|
100
|
-
readonly: boolean;
|
|
101
99
|
modelValue: string;
|
|
100
|
+
readonly: boolean;
|
|
101
|
+
placeholder: string;
|
|
102
102
|
clearable: boolean;
|
|
103
103
|
focusable: boolean;
|
|
104
104
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -46,8 +46,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
46
46
|
"onUpdate:selectedOptionId"?: ((...args: any[]) => any) | undefined;
|
|
47
47
|
}>, {
|
|
48
48
|
size: string;
|
|
49
|
-
placeholder: string;
|
|
50
49
|
modelValue: string;
|
|
50
|
+
placeholder: string;
|
|
51
51
|
clearable: boolean;
|
|
52
52
|
selectedOptionId: string;
|
|
53
53
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -42,10 +42,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
42
42
|
"onUpdate:currentPage"?: ((...args: any[]) => any) | undefined;
|
|
43
43
|
}>, {
|
|
44
44
|
size: string;
|
|
45
|
-
color: string;
|
|
46
45
|
type: string;
|
|
47
|
-
|
|
46
|
+
color: string;
|
|
48
47
|
currentPage: number;
|
|
48
|
+
totalPages: number;
|
|
49
49
|
maxDisplayedPages: number;
|
|
50
50
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
51
51
|
export default _default;
|
|
@@ -71,7 +71,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
71
71
|
disabled: boolean;
|
|
72
72
|
required: boolean;
|
|
73
73
|
loading: boolean;
|
|
74
|
-
readonly: boolean;
|
|
75
74
|
modelValue: boolean;
|
|
75
|
+
readonly: boolean;
|
|
76
76
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
77
77
|
export default _default;
|
|
@@ -123,8 +123,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
123
123
|
}>> & Readonly<{
|
|
124
124
|
onError?: ((...args: any[]) => any) | undefined;
|
|
125
125
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
126
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
127
126
|
onOpen?: ((...args: any[]) => any) | undefined;
|
|
127
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
128
128
|
onClear?: ((...args: any[]) => any) | undefined;
|
|
129
129
|
onSearch?: ((...args: any[]) => any) | undefined;
|
|
130
130
|
onGetSearchApi?: ((...args: any[]) => any) | undefined;
|
|
@@ -56,8 +56,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
56
56
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
57
57
|
}>, {
|
|
58
58
|
size: string;
|
|
59
|
-
readonly: boolean;
|
|
60
59
|
modelValue: string;
|
|
60
|
+
readonly: boolean;
|
|
61
61
|
clearable: boolean;
|
|
62
62
|
focusable: boolean;
|
|
63
63
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -52,9 +52,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
52
52
|
onAddTag?: ((...args: any[]) => any) | undefined;
|
|
53
53
|
}>, {
|
|
54
54
|
size: string;
|
|
55
|
-
color: string;
|
|
56
55
|
closable: boolean;
|
|
57
56
|
text: string;
|
|
57
|
+
color: string;
|
|
58
58
|
isHasAddTag: boolean;
|
|
59
59
|
addingTag: boolean;
|
|
60
60
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -91,9 +91,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
91
91
|
disabled: boolean;
|
|
92
92
|
required: boolean;
|
|
93
93
|
loading: boolean;
|
|
94
|
-
placeholder: string;
|
|
95
|
-
readonly: boolean;
|
|
96
94
|
modelValue: string;
|
|
95
|
+
readonly: boolean;
|
|
96
|
+
placeholder: string;
|
|
97
97
|
clearable: boolean;
|
|
98
98
|
focusable: boolean;
|
|
99
99
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -59,9 +59,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
59
59
|
onPrimaryAction?: ((...args: any[]) => any) | undefined;
|
|
60
60
|
onSecondaryAction?: ((...args: any[]) => any) | undefined;
|
|
61
61
|
}>, {
|
|
62
|
-
type: string;
|
|
63
62
|
isOpen: boolean;
|
|
64
63
|
closable: boolean;
|
|
64
|
+
type: string;
|
|
65
65
|
withBackground: boolean;
|
|
66
66
|
showIcon: boolean;
|
|
67
67
|
duration: undefined;
|
|
@@ -69,7 +69,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
69
69
|
disabled: boolean;
|
|
70
70
|
required: boolean;
|
|
71
71
|
loading: boolean;
|
|
72
|
-
readonly: boolean;
|
|
73
72
|
modelValue: boolean;
|
|
73
|
+
readonly: boolean;
|
|
74
74
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
75
75
|
export default _default;
|
|
@@ -34,8 +34,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
34
34
|
};
|
|
35
35
|
}>> & Readonly<{}>, {
|
|
36
36
|
position: string;
|
|
37
|
+
arrow: boolean;
|
|
37
38
|
theme: string;
|
|
38
39
|
trigger: string;
|
|
39
|
-
arrow: boolean;
|
|
40
40
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
41
41
|
export default _default;
|
package/package.json
CHANGED
|
@@ -10,8 +10,10 @@
|
|
|
10
10
|
:accepted-formats="['.pdf', '.docx', '.jpg', '.png']"
|
|
11
11
|
:multiple="true"
|
|
12
12
|
:max-file-size="25 * 1024 * 1024"
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
:texts="{
|
|
14
|
+
instructions: 'Перетащите или кликните для загрузки',
|
|
15
|
+
allowableFormats: 'Допустимый формат файлов: pdf, docx, jpeg до 25 MB',
|
|
16
|
+
}"
|
|
15
17
|
@update:files="onFilesUpdate"
|
|
16
18
|
@download-file="onDownload"
|
|
17
19
|
@remove-file="onRemove"
|
|
@@ -24,14 +26,28 @@
|
|
|
24
26
|
| Пропс | Тип | По умолчанию | Обязательный | Описание |
|
|
25
27
|
|------------------|------------------|--------------------|:------------:|--------------------------------------------------------------------------|
|
|
26
28
|
| `acceptedFormats`| `string[]` | — | Да | Список допустимых расширений файлов, например `['.pdf', '.jpg', '.png']` |
|
|
27
|
-
| `
|
|
28
|
-
| `subtitle` | `string` | — | Да | Подзаголовок / описание зоны загрузки |
|
|
29
|
+
| `texts` | `IpropsUpload['texts']` | — | Нет | Тексты для отображения в зоне загрузки и сообщениях об ошибках |
|
|
29
30
|
| `multiple` | `boolean` | `true` | Нет | Разрешить загрузку нескольких файлов одновременно |
|
|
30
31
|
| `maxFileSize` | `number` | `26214400` (25 MB) | Нет | Максимальный допустимый размер файла в байтах |
|
|
31
32
|
| `enableCrop` | `boolean` | `false` | Нет | Включить обрезку изображений перед загрузкой |
|
|
32
33
|
| `cropTexts` | `CropTexts` | — | Нет | Тексты кнопок модального окна обрезки (`cancel`, `confirm`) |
|
|
33
34
|
| `files` | `UploadedFile[]` | — | Нет | Начальный список файлов (для внешнего управления состоянием) |
|
|
34
35
|
|
|
36
|
+
### Тип `texts`
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
texts?: {
|
|
40
|
+
instructions: string; // Текст заголовка зоны загрузки, например: 'Перетащите или кликните для загрузки'
|
|
41
|
+
allowableFormats: string; // Описание допустимых форматов, например: 'Допустимый формат файлов: {formats}'
|
|
42
|
+
upload?: string; // Текст кнопки/подсказки загрузки в плейсхолдере медиафайлов
|
|
43
|
+
photo?: string; // Подпись под кнопкой загрузки в плейсхолдере медиафайлов
|
|
44
|
+
documents?: string; // Заголовок секции документов
|
|
45
|
+
loadMore?: string; // Текст кнопки «Загрузить ещё» (мобильный режим)
|
|
46
|
+
errorFormat?: string; // Текст ошибки при недопустимом формате файла
|
|
47
|
+
errorSize?: string; // Текст ошибки при превышении размера файла
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
35
51
|
### Тип `CropTexts`
|
|
36
52
|
|
|
37
53
|
```ts
|
|
@@ -61,13 +77,13 @@ interface UploadedFile {
|
|
|
61
77
|
|
|
62
78
|
## Слоты
|
|
63
79
|
|
|
64
|
-
| Слот | Описание
|
|
65
|
-
|
|
66
|
-
| `title` | Переопределяет заголовок зоны загрузки |
|
|
67
|
-
| `description` | Переопределяет описание зоны загрузки
|
|
80
|
+
| Слот | Описание |
|
|
81
|
+
|---------------|-------------------------------------------------------------------------------|
|
|
82
|
+
| `title` | Переопределяет заголовок зоны загрузки (по умолчанию: `texts.instructions`) |
|
|
83
|
+
| `description` | Переопределяет описание зоны загрузки (по умолчанию: `texts.allowableFormats`) |
|
|
68
84
|
|
|
69
85
|
```vue
|
|
70
|
-
<BaseUpload :accepted-formats="['.png']"
|
|
86
|
+
<BaseUpload :accepted-formats="['.png']">
|
|
71
87
|
<template #title>Загрузите аватар</template>
|
|
72
88
|
<template #description>PNG, до 5 MB</template>
|
|
73
89
|
</BaseUpload>
|
|
@@ -76,7 +92,7 @@ interface UploadedFile {
|
|
|
76
92
|
## Поведение
|
|
77
93
|
|
|
78
94
|
- **Drag & Drop** — файлы можно перетаскивать в зону загрузки. При наведении зона подсвечивается синим.
|
|
79
|
-
- **Медиафайлы** (`.jpg`, `.jpeg`, `.png
|
|
95
|
+
- **Медиафайлы** (`.jpg`, `.jpeg`, `.png`) — отображаются в виде сетки миниатюр с кнопками предпросмотра (zoom) и удаления.
|
|
80
96
|
- **Остальные файлы** — отображаются в виде списка с именем, размером и кнопками скачивания и удаления.
|
|
81
97
|
- **Одиночный режим** (`multiple: false`) — при загрузке нового файла предыдущий заменяется автоматически.
|
|
82
98
|
- **Обрезка** (`enableCrop: true`) — перед добавлением изображения открывается модальное окно `CropModal`.
|
|
@@ -92,8 +108,10 @@ interface UploadedFile {
|
|
|
92
108
|
:accepted-formats="['.jpg', '.jpeg', '.png']"
|
|
93
109
|
:enable-crop="true"
|
|
94
110
|
:crop-texts="{ cancel: 'Отмена', confirm: 'Обрезать' }"
|
|
95
|
-
|
|
96
|
-
|
|
111
|
+
:texts="{
|
|
112
|
+
instructions: 'Загрузите фото',
|
|
113
|
+
allowableFormats: 'JPG, PNG до 5 MB',
|
|
114
|
+
}"
|
|
97
115
|
@update:files="files = $event"
|
|
98
116
|
/>
|
|
99
117
|
```
|
|
@@ -105,8 +123,10 @@ interface UploadedFile {
|
|
|
105
123
|
:accepted-formats="['.pdf', '.docx']"
|
|
106
124
|
:multiple="false"
|
|
107
125
|
:max-file-size="10 * 1024 * 1024"
|
|
108
|
-
|
|
109
|
-
|
|
126
|
+
:texts="{
|
|
127
|
+
instructions: 'Прикрепите документ',
|
|
128
|
+
allowableFormats: 'PDF или DOCX до 10 MB',
|
|
129
|
+
}"
|
|
110
130
|
@update:files="files = $event"
|
|
111
131
|
/>
|
|
112
132
|
```
|
|
@@ -117,8 +137,10 @@ interface UploadedFile {
|
|
|
117
137
|
<BaseUpload
|
|
118
138
|
:accepted-formats="['.pdf']"
|
|
119
139
|
:files="initialFiles"
|
|
120
|
-
|
|
121
|
-
|
|
140
|
+
:texts="{
|
|
141
|
+
instructions: 'Загрузите файлы',
|
|
142
|
+
allowableFormats: 'PDF до 25 MB',
|
|
143
|
+
}"
|
|
122
144
|
@update:files="onUpdate"
|
|
123
145
|
@download-file="onDownload"
|
|
124
146
|
@remove-file="onRemove"
|