[{"data":1,"prerenderedAt":371},["ShallowReactive",2],{"docs:\u002Fdocs\u002Fcomponents\u002Ffile-upload":3,"component-meta:UiFileUpload":165},{"id":4,"title":5,"body":6,"component":148,"dependsOn":149,"description":151,"emitDescriptions":152,"extension":156,"meta":157,"navigation":158,"order":159,"path":160,"seo":161,"status":162,"stem":163,"__hash__":164},"docs\u002Fdocs\u002Fcomponents\u002Ffile-upload.md","FileUpload",{"type":7,"value":8,"toc":138},"minimark",[9,30,35,40,44,47,51,57,61,64,67,71,94,115,119],[10,11,12,13,17,18,21,22,25,26,29],"p",{},"Зона завантаження без магії: компонент валідує (тип, розмір), прев'юїть\nодиночний файл і віддає ",[14,15,16],"code",{},"File[]"," у ",[14,19,20],{},"select",". САМ upload не робить — бібліотека\nне знає вашого бекенду. Фетч, ",[14,23,24],{},"loading"," і ",[14,27,28],{},"progress"," керує споживач.",[31,32,34],"h2",{"id":33},"приклад","Приклад",[36,37],"component-preview",{"name":38,"stage":39},"file-upload-basic","min-h-56",[31,41,43],{"id":42},"api","API",[45,46],"component-api",{},[31,48,50],{"id":49},"коли-використовувати","Коли використовувати",[10,52,53,54,56],{},"Аватарки, вкладки до сторінок, імпорт файлів. Прогрес-смуга з'являється,\nколи споживач передає ",[14,55,28],{}," під час запиту.",[31,58,60],{"id":59},"коли-не-використовувати","Коли НЕ використовувати",[10,62,63],{},"Не чекайте від компонента мережевих запитів — їх немає і не буде.",[10,65,66],{},"Для одного текстового поля «URL зображення» зона надлишкова — потрібен\nInput з підказкою.",[31,68,70],{"id":69},"доступність","Доступність",[10,72,73,74,77,78,81,82,85,86,89,90,93],{},"Зона — ",[14,75,76],{},"role=\"button\""," з ",[14,79,80],{},"tabindex=0",": Enter і Space відкривають діалог,\nяк і клік. Невалідний файл не зникає мовчки — ",[14,83,84],{},"error"," з назвою файлу\nчитається через ",[14,87,88],{},"role=\"alert\"",". Зона пов'язана з активною помилкою або\nпідказкою через ",[14,91,92],{},"aria-describedby",".",[10,95,96,97,100,101,100,104,106,107,110,111,114],{},"Власна зона через default slot отримує ",[14,98,99],{},"open",", ",[14,102,103],{},"dragActive",[14,105,24],{}," і\n",[14,108,109],{},"disabled","; викликайте ",[14,112,113],{},"open()"," зі своєї кнопки. Той самий метод доступний\nчерез template ref компонента.",[31,116,118],{"id":117},"деталі-реалізації","Деталі реалізації",[10,120,121,122,125,126,129,130,133,134,137],{},"Локальне прев'ю — ",[14,123,124],{},"URL.createObjectURL"," без читання файлу в пам'ять;\nпопередній URL відкликається при новому файлі й у ",[14,127,128],{},"onBeforeUnmount"," —\nбез цього витік пам'яті. Видалення очищає нативний input, відкликає URL і\nемітить ",[14,131,132],{},"remove(file)","; для ",[14,135,136],{},"multiple=true"," список і далі контролює споживач.",{"title":139,"searchDepth":140,"depth":140,"links":141},"",2,[142,143,144,145,146,147],{"id":33,"depth":140,"text":34},{"id":42,"depth":140,"text":43},{"id":49,"depth":140,"text":50},{"id":59,"depth":140,"text":60},{"id":69,"depth":140,"text":70},{"id":117,"depth":140,"text":118},"UiFileUpload",[150],"app\u002Futils\u002FuiFieldStyles.ts","Зона drag&drop з валідацією й прев'ю — без власної upload-логіки.",{"select":153,"error":154,"remove":155},"Валідні файли після перевірки accept і maxSizeMb.","Файл не пройшов валідацію (тип або розмір).","Одиночний файл видалено з локального прев'ю.","md",{},true,40,"\u002Fdocs\u002Fcomponents\u002Ffile-upload",{"title":5,"description":151},"stable","docs\u002Fcomponents\u002Ffile-upload","27dWoqo7kbGDN-F32oqjtPwxfvB_oy5koU6BIHMhyXk",{"mode":166,"prefetch":167,"preload":167,"filePath":168,"declarationPath":169,"pascalName":148,"kebabName":170,"chunkName":171,"priority":172,"_scanned":158,"meta":173},"all",false,"app\u002Fcomponents\u002Fui\u002FUiFileUpload.vue","C:\u002Fproject-DS\u002FtatetUI\u002Fapp\u002Fcomponents\u002Fui\u002FUiFileUpload.vue","ui-file-upload","components\u002Fui-file-upload",1,{"type":172,"props":174,"slots":222,"events":258,"exposed":365,"hash":370},[175,181,187,192,196,200,203,213,217],{"name":176,"global":167,"default":177,"description":178,"tags":179,"required":167,"type":180,"schema":180},"accept","undefined","Фільтр типів: `image\u002F*,.pdf`. Валідація по MIME або розширенню.",[],"string",{"name":182,"global":167,"default":183,"description":184,"tags":185,"required":167,"type":186,"schema":186},"maxSizeMb","10","Ліміт розміру файлу в МБ.",[],"number",{"name":188,"global":167,"default":189,"description":190,"tags":191,"required":167,"type":180,"schema":180},"label","\"Перетягніть файли сюди\"","Заголовок зони.",[],{"name":193,"global":167,"default":177,"description":194,"tags":195,"required":167,"type":180,"schema":180},"hint","Підказка під зоною.",[],{"name":28,"global":167,"default":197,"description":198,"tags":199,"required":167,"type":186,"schema":186},"null","Прогрес споживача 0–100 — показує смугу.",[],{"name":84,"global":167,"default":177,"description":201,"tags":202,"required":167,"type":180,"schema":180},"Текст помилки валідації споживача.",[],{"name":204,"global":167,"default":205,"description":206,"tags":207,"required":167,"type":208,"schema":209},"multiple","false","Дозволити кілька файлів.",[],"boolean",{"kind":210,"type":208,"schema":211},"enum",{"0":205,"1":212},"true",{"name":109,"global":167,"default":205,"description":139,"tags":214,"required":167,"type":208,"schema":215},[],{"kind":210,"type":208,"schema":216},{"0":205,"1":212},{"name":24,"global":167,"default":205,"description":218,"tags":219,"required":167,"type":208,"schema":220},"Стан завантаження споживача: зона показує спінер.",[],{"kind":210,"type":208,"schema":221},{"0":205,"1":212},[223,245],{"name":224,"type":225,"description":226,"tags":227,"schema":228},"default","{ open: () => void; dragActive: boolean; loading: boolean; disabled: boolean; }","Замінює зону цілком; `open` відкриває системний file picker.",[],{"kind":229,"type":225,"schema":230},"object",{"open":231,"dragActive":237,"loading":241,"disabled":243},{"name":99,"global":167,"description":139,"tags":232,"required":158,"type":233,"schema":234},[],"() => void",{"kind":235,"type":236},"event","(): void",{"name":103,"global":167,"description":139,"tags":238,"required":158,"type":208,"schema":239},[],{"kind":210,"type":208,"schema":240},{"0":205,"1":212},{"name":24,"global":167,"description":139,"tags":242,"required":158,"type":208,"schema":208},[],{"name":109,"global":167,"description":139,"tags":244,"required":158,"type":208,"schema":208},[],{"name":246,"type":247,"description":248,"tags":249,"schema":250},"preview","{ fileUrl: string; fileName: string; }","Власне прев'ю замість зображення.",[],{"kind":229,"type":247,"schema":251},{"fileUrl":252,"fileName":255},{"name":253,"global":167,"description":139,"tags":254,"required":158,"type":180,"schema":180},"fileUrl",[],{"name":256,"global":167,"description":139,"tags":257,"required":158,"type":180,"schema":180},"fileName",[],[259,264,331],{"name":84,"description":139,"tags":260,"type":261,"signature":262,"schema":263},[],"[message: string]","(event: \"error\", message: string): void",[180],{"name":20,"description":139,"tags":265,"type":266,"signature":267,"schema":268},[],"[files: File[]]","(event: \"select\", files: File[]): void",[269],{"kind":270,"type":16,"schema":271},"array",[272],{"kind":229,"type":273,"schema":274},"File",{"lastModified":275,"name":279,"webkitRelativePath":283,"size":287,"type":291,"arrayBuffer":295,"bytes":302,"slice":309,"stream":317,"text":324},{"name":276,"global":167,"description":277,"tags":278,"required":158,"type":186,"schema":186},"lastModified","The **`lastModified`** read-only property of the File interface provides the last modified date of the file as the number of milliseconds since the Unix epoch (January 1, 1970 at midnight).\n\n[MDN Reference](https:\u002F\u002Fdeveloper.mozilla.org\u002Fdocs\u002FWeb\u002FAPI\u002FFile\u002FlastModified)",[],{"name":280,"global":167,"description":281,"tags":282,"required":158,"type":180,"schema":180},"name","The **`name`** read-only property of the File interface returns the name of the file represented by a File object.\n\n[MDN Reference](https:\u002F\u002Fdeveloper.mozilla.org\u002Fdocs\u002FWeb\u002FAPI\u002FFile\u002Fname)",[],{"name":284,"global":167,"description":285,"tags":286,"required":158,"type":180,"schema":180},"webkitRelativePath","The **`webkitRelativePath`** read-only property of the File interface contains a string which specifies the file's path relative to the directory selected by the user in an input element with its `webkitdirectory` attribute set.\n\n[MDN Reference](https:\u002F\u002Fdeveloper.mozilla.org\u002Fdocs\u002FWeb\u002FAPI\u002FFile\u002FwebkitRelativePath)",[],{"name":288,"global":167,"description":289,"tags":290,"required":158,"type":186,"schema":186},"size","The **`size`** read-only property of the Blob interface returns the size of the Blob or File in bytes.\n\n[MDN Reference](https:\u002F\u002Fdeveloper.mozilla.org\u002Fdocs\u002FWeb\u002FAPI\u002FBlob\u002Fsize)",[],{"name":292,"global":167,"description":293,"tags":294,"required":158,"type":180,"schema":180},"type","The **`type`** read-only property of the Blob interface returns the MIME type of the file.\n\n[MDN Reference](https:\u002F\u002Fdeveloper.mozilla.org\u002Fdocs\u002FWeb\u002FAPI\u002FBlob\u002Ftype)",[],{"name":296,"global":167,"description":297,"tags":298,"required":158,"type":299,"schema":300},"arrayBuffer","The **`arrayBuffer()`** method of the Blob interface returns a Promise that resolves with the contents of the blob as binary data contained in an ArrayBuffer.\n\n[MDN Reference](https:\u002F\u002Fdeveloper.mozilla.org\u002Fdocs\u002FWeb\u002FAPI\u002FBlob\u002FarrayBuffer)",[],"() => Promise\u003CArrayBuffer>",{"kind":235,"type":301},"(): Promise\u003CArrayBuffer>",{"name":303,"global":167,"description":304,"tags":305,"required":158,"type":306,"schema":307},"bytes","The **`bytes()`** method of the Blob interface returns a Promise that resolves with a Uint8Array containing the contents of the blob as an array of bytes.\n\n[MDN Reference](https:\u002F\u002Fdeveloper.mozilla.org\u002Fdocs\u002FWeb\u002FAPI\u002FBlob\u002Fbytes)",[],"() => Promise\u003CUint8Array\u003CArrayBuffer>>",{"kind":235,"type":308},"(): Promise\u003CUint8Array\u003CArrayBuffer>>",{"name":310,"global":167,"description":311,"tags":312,"required":158,"type":313,"schema":314},"slice","The **`slice()`** method of the Blob interface creates and returns a new `Blob` object which contains data from a subset of the blob on which it's called.\n\n[MDN Reference](https:\u002F\u002Fdeveloper.mozilla.org\u002Fdocs\u002FWeb\u002FAPI\u002FBlob\u002Fslice)",[],"(start?: number, end?: number, contentType?: string) => Blob",{"kind":235,"type":315,"schema":316},"(start?: number, end?: number, contentType?: string): Blob",{},{"name":318,"global":167,"description":319,"tags":320,"required":158,"type":321,"schema":322},"stream","The **`stream()`** method of the Blob interface returns a ReadableStream which upon reading returns the data contained within the `Blob`.\n\n[MDN Reference](https:\u002F\u002Fdeveloper.mozilla.org\u002Fdocs\u002FWeb\u002FAPI\u002FBlob\u002Fstream)",[],"() => ReadableStream\u003CUint8Array\u003CArrayBuffer>>",{"kind":235,"type":323},"(): ReadableStream\u003CUint8Array\u003CArrayBuffer>>",{"name":325,"global":167,"description":326,"tags":327,"required":158,"type":328,"schema":329},"text","The **`text()`** method of the string containing the contents of the blob, interpreted as UTF-8.\n\n[MDN Reference](https:\u002F\u002Fdeveloper.mozilla.org\u002Fdocs\u002FWeb\u002FAPI\u002FBlob\u002Ftext)",[],"() => Promise\u003Cstring>",{"kind":235,"type":330},"(): Promise\u003Cstring>",{"name":332,"description":139,"tags":333,"type":334,"signature":335,"schema":336},"remove",[],"[file: File]","(event: \"remove\", file: File): void",[337],{"kind":229,"type":273,"schema":338},{"lastModified":339,"name":341,"webkitRelativePath":343,"size":345,"type":347,"arrayBuffer":349,"bytes":352,"slice":355,"stream":359,"text":362},{"name":276,"global":167,"description":277,"tags":340,"required":158,"type":186,"schema":186},[],{"name":280,"global":167,"description":281,"tags":342,"required":158,"type":180,"schema":180},[],{"name":284,"global":167,"description":285,"tags":344,"required":158,"type":180,"schema":180},[],{"name":288,"global":167,"description":289,"tags":346,"required":158,"type":186,"schema":186},[],{"name":292,"global":167,"description":293,"tags":348,"required":158,"type":180,"schema":180},[],{"name":296,"global":167,"description":297,"tags":350,"required":158,"type":299,"schema":351},[],{"kind":235,"type":301},{"name":303,"global":167,"description":304,"tags":353,"required":158,"type":306,"schema":354},[],{"kind":235,"type":308},{"name":310,"global":167,"description":311,"tags":356,"required":158,"type":313,"schema":357},[],{"kind":235,"type":315,"schema":358},{},{"name":318,"global":167,"description":319,"tags":360,"required":158,"type":321,"schema":361},[],{"kind":235,"type":323},{"name":325,"global":167,"description":326,"tags":363,"required":158,"type":328,"schema":364},[],{"kind":235,"type":330},[366],{"name":99,"type":233,"description":367,"tags":368,"schema":369},"Відкрити системний вибір файлу.",[],{"kind":235,"type":236},"5AHAXRyVvYCDRF-9j61lWwz3Rz3fnZYoZi0BFY28cjQ",1788072639721]