ics-ui-kit 0.1.2 → 0.1.4
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/README.md +36 -36
- package/dist/AlertContext-CxjW1LVL.js.map +1 -1
- package/dist/AlertIcon-5B6AgZpe.js.map +1 -1
- package/dist/Button-Dg89xRSi.js.map +1 -1
- package/dist/ButtonBase-e6qyv6mD.js.map +1 -1
- package/dist/CheckboxField-cX09-eBX.js.map +1 -1
- package/dist/Command-BhbfL5wm.js.map +1 -1
- package/dist/ComponentVariantProvider-B0SFUaXB.js.map +1 -1
- package/dist/Description-BTPMlTT-.js.map +1 -1
- package/dist/Dialog-ByiJIDhl.js.map +1 -1
- package/dist/Divider-DPW5ZhZ8.js.map +1 -1
- package/dist/EmptyState-DRKjscH-.js.map +1 -1
- package/dist/ErrorState-B26k67-z.js.map +1 -1
- package/dist/FeatureIcon-BGE0Orkc.js.map +1 -1
- package/dist/{Field-CKl59qUB.js → Field-BiIWtq9o.js} +13 -13
- package/dist/Field-BiIWtq9o.js.map +1 -0
- package/dist/FieldLabel-QJ4rJFOi.js.map +1 -1
- package/dist/FolderSvg-cw0DxNVy.js.map +1 -1
- package/dist/FormFooterTemplate-DPB6Dkxn.js.map +1 -1
- package/dist/FormHeader--F6b2aRk.js.map +1 -1
- package/dist/{FormStack-B4QOuYgO.js → FormStack-DO15vBgd.js} +2 -2
- package/dist/FormStack-DO15vBgd.js.map +1 -0
- package/dist/HintState-BxrCAWqq.js.map +1 -1
- package/dist/Icon-DH3ev9GK.js.map +1 -1
- package/dist/IconButton-DwkpNgn3.js.map +1 -1
- package/dist/IconTooltip-CKJKGHbk.js.map +1 -1
- package/dist/Indicator-AqxHWPA9.js.map +1 -1
- package/dist/InputGroup-BvD9Igmt.js.map +1 -1
- package/dist/InputOTP-B2e1nfSO.js.map +1 -1
- package/dist/Loader-BpHiL6W-.js.map +1 -1
- package/dist/MenuItem-pvsONHlh.js.map +1 -1
- package/dist/MenuItemShortcut-DgPol9Nz.js.map +1 -1
- package/dist/MenuItemText-7uPl9P3z.js.map +1 -1
- package/dist/Overlay-2XMlxApi.js.map +1 -1
- package/dist/Popover-Dvr7y0YY.js.map +1 -1
- package/dist/RichButton-DuPTenmS.js.map +1 -1
- package/dist/ScrollArea-CuuTeDn3.js.map +1 -1
- package/dist/ScrollShadowContainer-DdrnF8qU.js.map +1 -1
- package/dist/SearchSelectTag-DFCX9zT1.js.map +1 -1
- package/dist/Select-DRwv6-eZ.js.map +1 -1
- package/dist/Sheet-rtwmzm2-.js.map +1 -1
- package/dist/Shortcut-D8L15_ed.js.map +1 -1
- package/dist/Skeleton-y6I-i9q5.js.map +1 -1
- package/dist/Tag-DdHXTyKF.js.map +1 -1
- package/dist/Text-DeBE8AKl.js.map +1 -1
- package/dist/TextInput-Cj50ImXi.js.map +1 -1
- package/dist/TextOverflowTooltip-DlUgic5y.js.map +1 -1
- package/dist/Toggle-v_HT3Gm2.js.map +1 -1
- package/dist/Tooltip-C4rVuWr4.js.map +1 -1
- package/dist/TriggerButton-CfDObWP9.js.map +1 -1
- package/dist/blocks/auth/otp-form.js +1 -1
- package/dist/blocks/auth/otp-form.js.map +1 -1
- package/dist/cn-dsXlqdJg.js.map +1 -1
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/alert.js.map +1 -1
- package/dist/components/avatar.js.map +1 -1
- package/dist/components/badge.js.map +1 -1
- package/dist/components/banner.js.map +1 -1
- package/dist/components/breadcrumb.js.map +1 -1
- package/dist/components/button.js.map +1 -1
- package/dist/components/calendar.js.map +1 -1
- package/dist/components/card.js.map +1 -1
- package/dist/components/carousel.js.map +1 -1
- package/dist/components/collapsible.js.map +1 -1
- package/dist/components/color-tile.js.map +1 -1
- package/dist/components/container.js.map +1 -1
- package/dist/components/counter.js.map +1 -1
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/divider.js.map +1 -1
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/dropdown.js.map +1 -1
- package/dist/components/error-state.js.map +1 -1
- package/dist/components/field.js +1 -1
- package/dist/components/file-upload.js.map +1 -1
- package/dist/components/form.js +2 -2
- package/dist/components/form.js.map +1 -1
- package/dist/components/image-placeholder.js.map +1 -1
- package/dist/components/image-preview.js.map +1 -1
- package/dist/components/image-uploader.js.map +1 -1
- package/dist/components/input.js.map +1 -1
- package/dist/components/menu-item.js.map +1 -1
- package/dist/components/page-state.js.map +1 -1
- package/dist/components/portal-container.js.map +1 -1
- package/dist/components/progress-circle.js.map +1 -1
- package/dist/components/progress.js.map +1 -1
- package/dist/components/prose.js.map +1 -1
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/resizable.js.map +1 -1
- package/dist/components/scheduler.js.map +1 -1
- package/dist/components/search-select.js.map +1 -1
- package/dist/components/sidebar.js.map +1 -1
- package/dist/components/slider.js.map +1 -1
- package/dist/components/stepper.js.map +1 -1
- package/dist/components/switch.js.map +1 -1
- package/dist/components/system-state.js.map +1 -1
- package/dist/components/table.js.map +1 -1
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/tag-input.js.map +1 -1
- package/dist/components/textarea.js.map +1 -1
- package/dist/components/timer.js.map +1 -1
- package/dist/components/toast.js.map +1 -1
- package/dist/components/toggle-group.js.map +1 -1
- package/dist/components/toolbar.js.map +1 -1
- package/dist/index-0ioNhtNM.js.map +1 -1
- package/dist/index-437EL2iq.js.map +1 -1
- package/dist/index-BGQepRFJ.js.map +1 -1
- package/dist/index-BVqs-uqP.js.map +1 -1
- package/dist/index-BZPx6jYI.js.map +1 -1
- package/dist/index-Bb23HztA.js.map +1 -1
- package/dist/index-BpWB3aFK.js.map +1 -1
- package/dist/index-ByaXH_ih.js.map +1 -1
- package/dist/index-BzCriPiK.js.map +1 -1
- package/dist/index-CCKe-Mpx.js.map +1 -1
- package/dist/index-CFaU3UXv.js.map +1 -1
- package/dist/index-CLuiUUQ8.js.map +1 -1
- package/dist/index-CQD-Njgt.js.map +1 -1
- package/dist/index-CmBeyp2d.js.map +1 -1
- package/dist/index-DFZozV_h.js.map +1 -1
- package/dist/index-DHsfW5Rj.js.map +1 -1
- package/dist/index-DHyZ_0Ut.js.map +1 -1
- package/dist/index-DLcqcWxM.js.map +1 -1
- package/dist/index-DRo26PBK.js.map +1 -1
- package/dist/index-DnnQs07z.js.map +1 -1
- package/dist/index-Uiy0Xwy2.js.map +1 -1
- package/dist/index-_ITz1IyW.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/inputBaseStyles-DbzD_jvq.js.map +1 -1
- package/dist/lib/utils.js.map +1 -1
- package/dist/styles-scoped.css +6293 -6265
- package/dist/styles.css +6032 -6004
- package/dist/theme.css +354 -329
- package/dist/types/css.d.ts +4 -4
- package/dist/useBreakpoints-D8wKOvil.js.map +1 -1
- package/dist/useDebounce-BRah78CF.js.map +1 -1
- package/dist/useFileUpload-iDag0iqM.js.map +1 -1
- package/dist/useItemsKeyboardNavigation-CmeOR30y.js.map +1 -1
- package/dist/useMergeRefs-qoKniYqT.js.map +1 -1
- package/dist/usePortalContainer-ae6EzS08.js.map +1 -1
- package/dist/vendors/tanstack/react-table.js.map +1 -1
- package/dist/zod-BMNoK3aM.js.map +1 -1
- package/package.json +1 -1
- package/tailwind.preset.js +444 -444
- package/dist/Field-CKl59qUB.js.map +0 -1
- package/dist/FormStack-B4QOuYgO.js.map +0 -1
- package/dist/design-tokens.source.json +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-upload.js","sources":["../../node_modules/.pnpm/lucide-react@0.460.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/file-archive.js","../../node_modules/.pnpm/lucide-react@0.460.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/file-spreadsheet.js","../../node_modules/.pnpm/lucide-react@0.460.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/file-text.js","../../node_modules/.pnpm/lucide-react@0.460.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/file.js","../../node_modules/.pnpm/lucide-react@0.460.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/headphones.js","../../node_modules/.pnpm/lucide-react@0.460.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/upload.js","../../node_modules/.pnpm/lucide-react@0.460.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/video.js","../../src/hooks/useFileType.ts","../../src/components/file-upload/components/file-upload-icon/FileUploadIcon.tsx","../../src/components/file-upload/components/file-upload-item/FileUploadItem.tsx","../../src/components/file-upload/components/file-upload-error/FileUploadError.tsx","../../src/components/file-upload/components/file-upload-drop-area-icon/FileUploadDropAreaIcon.tsx","../../src/components/file-upload/components/file-upload-drop-area/FileUploadDropArea.tsx","../../src/components/file-upload/components/file-upload-inline-drop-area/FileUploadInlineDropArea.tsx","../../src/components/file-upload/components/file-upload-clear-button/FileUploadClearButton.tsx","../../src/components/file-upload/components/file-upload-input-zone/FileUploadInputZone.tsx","../../src/components/file-upload/components/file-upload-compact-input-zone/FileUploadCompactInputZone.tsx","../../src/components/file-upload/components/file-upload-item-compact/FileUploadItemCompact.tsx","../../src/components/file-upload/FileUpload.tsx","../../src/components/file-upload/file-upload-compact/FileUploadCompact.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.460.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst FileArchive = createLucideIcon(\"FileArchive\", [\n [\"path\", { d: \"M10 12v-1\", key: \"v7bkov\" }],\n [\"path\", { d: \"M10 18v-2\", key: \"1cjy8d\" }],\n [\"path\", { d: \"M10 7V6\", key: \"dljcrl\" }],\n [\"path\", { d: \"M14 2v4a2 2 0 0 0 2 2h4\", key: \"tnqrlb\" }],\n [\n \"path\",\n { d: \"M15.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v16a2 2 0 0 0 .274 1.01\", key: \"gkbcor\" }\n ],\n [\"circle\", { cx: \"10\", cy: \"20\", r: \"2\", key: \"1xzdoj\" }]\n]);\n\nexport { FileArchive as default };\n//# sourceMappingURL=file-archive.js.map\n","/**\n * @license lucide-react v0.460.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst FileSpreadsheet = createLucideIcon(\"FileSpreadsheet\", [\n [\"path\", { d: \"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\", key: \"1rqfz7\" }],\n [\"path\", { d: \"M14 2v4a2 2 0 0 0 2 2h4\", key: \"tnqrlb\" }],\n [\"path\", { d: \"M8 13h2\", key: \"yr2amv\" }],\n [\"path\", { d: \"M14 13h2\", key: \"un5t4a\" }],\n [\"path\", { d: \"M8 17h2\", key: \"2yhykz\" }],\n [\"path\", { d: \"M14 17h2\", key: \"10kma7\" }]\n]);\n\nexport { FileSpreadsheet as default };\n//# sourceMappingURL=file-spreadsheet.js.map\n","/**\n * @license lucide-react v0.460.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst FileText = createLucideIcon(\"FileText\", [\n [\"path\", { d: \"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\", key: \"1rqfz7\" }],\n [\"path\", { d: \"M14 2v4a2 2 0 0 0 2 2h4\", key: \"tnqrlb\" }],\n [\"path\", { d: \"M10 9H8\", key: \"b1mrlr\" }],\n [\"path\", { d: \"M16 13H8\", key: \"t4e002\" }],\n [\"path\", { d: \"M16 17H8\", key: \"z1uh3a\" }]\n]);\n\nexport { FileText as default };\n//# sourceMappingURL=file-text.js.map\n","/**\n * @license lucide-react v0.460.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst File = createLucideIcon(\"File\", [\n [\"path\", { d: \"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\", key: \"1rqfz7\" }],\n [\"path\", { d: \"M14 2v4a2 2 0 0 0 2 2h4\", key: \"tnqrlb\" }]\n]);\n\nexport { File as default };\n//# sourceMappingURL=file.js.map\n","/**\n * @license lucide-react v0.460.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Headphones = createLucideIcon(\"Headphones\", [\n [\n \"path\",\n {\n d: \"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3\",\n key: \"1xhozi\"\n }\n ]\n]);\n\nexport { Headphones as default };\n//# sourceMappingURL=headphones.js.map\n","/**\n * @license lucide-react v0.460.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Upload = createLucideIcon(\"Upload\", [\n [\"path\", { d: \"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\", key: \"ih7n3h\" }],\n [\"polyline\", { points: \"17 8 12 3 7 8\", key: \"t8dd8p\" }],\n [\"line\", { x1: \"12\", x2: \"12\", y1: \"3\", y2: \"15\", key: \"widbto\" }]\n]);\n\nexport { Upload as default };\n//# sourceMappingURL=upload.js.map\n","/**\n * @license lucide-react v0.460.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Video = createLucideIcon(\"Video\", [\n [\n \"path\",\n {\n d: \"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5\",\n key: \"ftymec\"\n }\n ],\n [\"rect\", { x: \"2\", y: \"6\", width: \"14\", height: \"12\", rx: \"2\", key: \"158x01\" }]\n]);\n\nexport { Video as default };\n//# sourceMappingURL=video.js.map\n","import {\r\n\tFileArchiveIcon,\r\n\tFileIcon,\r\n\tFileSpreadsheetIcon,\r\n\tFileTextIcon,\r\n\tHeadphonesIcon,\r\n\tImageIcon,\r\n\tVideoIcon\r\n} from \"lucide-react\";\r\nimport { FileData } from \"./use-file-upload/useFileUpload\";\r\n\r\nexport const useFileType = (file: FileData) => {\r\n\tconst fileType = file.type;\r\n\tconst fileName = file.name;\r\n\r\n\t// Определяем тип файла и возвращаем соответствующую иконку\r\n\tif (\r\n\t\tfileType.includes(\"pdf\") ||\r\n\t\tfileName.endsWith(\".pdf\") ||\r\n\t\tfileType.includes(\"word\") ||\r\n\t\tfileName.endsWith(\".doc\") ||\r\n\t\tfileName.endsWith(\".docx\")\r\n\t) {\r\n\t\treturn FileTextIcon;\r\n\t} else if (\r\n\t\tfileType.includes(\"zip\") ||\r\n\t\tfileType.includes(\"archive\") ||\r\n\t\tfileName.endsWith(\".zip\") ||\r\n\t\tfileName.endsWith(\".rar\")\r\n\t) {\r\n\t\treturn FileArchiveIcon;\r\n\t} else if (fileType.includes(\"excel\") || fileName.endsWith(\".xls\") || fileName.endsWith(\".xlsx\")) {\r\n\t\treturn FileSpreadsheetIcon;\r\n\t} else if (fileType.includes(\"video/\")) {\r\n\t\treturn VideoIcon;\r\n\t} else if (fileType.includes(\"audio/\")) {\r\n\t\treturn HeadphonesIcon;\r\n\t} else if (fileType.startsWith(\"image/\")) {\r\n\t\treturn ImageIcon;\r\n\t}\r\n\r\n\treturn FileIcon;\r\n};\r\n","import { FeatureIcon } from \"@/components/icon\";\r\nimport { tv } from \"tailwind-variants\";\r\nimport { FileData } from \"@/hooks/use-file-upload/useFileUpload\";\r\nimport { useFileType } from \"@/hooks/useFileType\";\r\n\r\nconst fileIconStyles = tv({\r\n\tbase: \"rounded-md text-muted ring-0\"\r\n});\r\n\r\nexport interface FileUploadIconProps {\r\n\tfile: FileData;\r\n}\r\n\r\nexport const FileUploadIcon = ({ file }: FileUploadIconProps) => {\r\n\tconst IconComponent = useFileType(file);\r\n\r\n\treturn <FeatureIcon icon={IconComponent} size=\"lg\" className={fileIconStyles()} />;\r\n};\r\n","import { IconButton } from \"@/components/button\";\r\nimport { FileData } from \"@/hooks/use-file-upload/useFileUpload\";\r\nimport { formatBytes } from \"@/lib/utils/file/formatBytes\";\r\nimport { Download, XIcon } from \"lucide-react\";\r\nimport React from \"react\";\r\nimport { tv } from \"tailwind-variants\";\r\nimport { FileUploadIcon } from \"../file-upload-icon/FileUploadIcon\";\r\nimport { TextOverflowTooltip } from \"@/components/overflow-tooltip\";\r\n\r\nconst fileUploadItemStyles = tv({\r\n\tslots: {\r\n\t\twrapper:\r\n\t\t\t\"box-border flex h-16 justify-between gap-2 rounded-xl border border-secondary-border bg-background p-3 pe-3\",\r\n\t\tinfoWrapper: \"flex min-w-0 flex-1 items-center gap-2.5\",\r\n\t\ttextWrapper: \"flex min-w-0 flex-col gap-0.5\",\r\n\t\ttitle: \"truncate text-sm font-medium\",\r\n\t\tdescription: \"text-xs text-muted\",\r\n\t\tactionWrapper: \"-me-3 -mt-3 flex h-8 items-center -space-x-1.5\"\r\n\t}\r\n});\r\n\r\nexport type FileUploadItemProps = React.HTMLAttributes<HTMLDivElement> & {\r\n\tonClear: () => void;\r\n\tonDownload?: (file: FileData) => void;\r\n\tfile: FileData;\r\n};\r\n\r\nexport const FileUploadItem = React.forwardRef<HTMLDivElement, FileUploadItemProps>(\r\n\t({ onClear, onDownload, file, className, ...props }, ref) => {\r\n\t\tconst styles = fileUploadItemStyles();\r\n\r\n\t\treturn (\r\n\t\t\t<div className={styles.wrapper({ className })} ref={ref} {...props}>\r\n\t\t\t\t<div className={styles.infoWrapper()}>\r\n\t\t\t\t\t<FileUploadIcon file={file} />\r\n\r\n\t\t\t\t\t<div className={styles.textWrapper()}>\r\n\t\t\t\t\t\t<TextOverflowTooltip className={styles.title()}>{file.name}</TextOverflowTooltip>\r\n\t\t\t\t\t\t<p className={styles.description()}>{formatBytes(file.size)}</p>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t<div className={styles.actionWrapper()}>\r\n\t\t\t\t\t{onDownload && (\r\n\t\t\t\t\t\t<IconButton\r\n\t\t\t\t\t\t\tvariant=\"text\"\r\n\t\t\t\t\t\t\ttype=\"button\"\r\n\t\t\t\t\t\t\tsize=\"sm\"\r\n\t\t\t\t\t\t\ticon={Download}\r\n\t\t\t\t\t\t\tonClick={() => onDownload(file)}\r\n\t\t\t\t\t\t\taria-label=\"Download file\"\r\n\t\t\t\t\t\t\ticonClassName=\"size-4\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t)}\r\n\t\t\t\t\t<IconButton\r\n\t\t\t\t\t\tvariant=\"text\"\r\n\t\t\t\t\t\ttype=\"button\"\r\n\t\t\t\t\t\tsize=\"sm\"\r\n\t\t\t\t\t\ticon={XIcon}\r\n\t\t\t\t\t\tonClick={onClear}\r\n\t\t\t\t\t\taria-label=\"Remove file\"\r\n\t\t\t\t\t\ticonClassName=\"size-4\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n);\r\n\r\nFileUploadItem.displayName = \"FileUploadItem\";\r\n","import { Alert, AlertDescription, AlertIcon } from \"@/components/alert\";\r\nimport { AlertCircleIcon } from \"lucide-react\";\r\nimport React from \"react\";\r\n\r\nexport type FileUploadErrorProps = React.HTMLAttributes<HTMLDivElement> & {\r\n\terror: string | string[];\r\n};\r\n\r\nexport const FileUploadError = React.forwardRef<HTMLDivElement, FileUploadErrorProps>(({ error, ...props }, ref) => {\r\n\tconst errorText = Array.isArray(error) ? error.join(\"\\n\") : error;\r\n\treturn (\r\n\t\t<Alert status=\"error\" focus=\"medium\" {...props} ref={ref}>\r\n\t\t\t<AlertIcon icon={AlertCircleIcon} />\r\n\t\t\t<AlertDescription className=\"whitespace-pre-line\">{errorText}</AlertDescription>\r\n\t\t</Alert>\r\n\t);\r\n});\r\n\r\nFileUploadError.displayName = \"FileUploadError\";\r\n","import React from \"react\";\r\nimport { tv } from \"tailwind-variants\";\r\nimport { FeatureIcon } from \"@/components/icon\";\r\nimport { FeatureIconProps } from \"@/components/icon/feature-icon/FeatureIcon\";\r\n\r\nconst fileUploadDropAreaIconStyles = tv({\r\n\tbase: \"shrink-0 bg-status-neutral-fg\"\r\n});\r\n\r\nexport const FileUploadDropAreaIcon: React.FC<FeatureIconProps> = ({ icon, className, ...props }) => {\r\n\treturn <FeatureIcon size=\"xl\" icon={icon} className={fileUploadDropAreaIconStyles({ className })} {...props} />;\r\n};\r\n\r\nFileUploadDropAreaIcon.displayName = \"FileUploadDropAreaIcon\";\r\n","import React from \"react\";\r\nimport { tv } from \"tailwind-variants\";\r\nimport { FileUploadDropAreaIcon } from \"../file-upload-drop-area-icon/FileUploadDropAreaIcon\";\r\nimport { LucideIcon, Upload } from \"lucide-react\";\r\n\r\nconst fileUploadDropAreaStyles = tv({\r\n\tslots: {\r\n\t\twrapper: [\r\n\t\t\t\"has-[:disabled]:pointer-events-none has-[:disabled]:opacity-50\",\r\n\t\t\t\"relative flex min-h-[9.125rem] flex-col items-center justify-center rounded-xl border border-dashed border-primary-border bg-secondary-bg p-6 transition-colors\",\r\n\t\t\t\"hover:bg-secondary-bg-hover\",\r\n\t\t\t\"has-[input:focus]:shadow-focus\",\r\n\t\t\t\"data-[dragging=true]:bg-secondary-bg-hover\"\r\n\t\t],\r\n\t\ttitle: \"mb-1.5 text-sm font-medium text-primary-accent\",\r\n\t\ticon: \"mb-3 size-11\",\r\n\t\tdescription: \"flex flex-wrap justify-center gap-1 text-xs text-muted\"\r\n\t}\r\n});\r\n\r\nexport type FileUploadDropAreaProps = React.HTMLAttributes<HTMLDivElement> & {\r\n\ttitle?: React.ReactNode;\r\n\tdescription?: React.ReactNode;\r\n\ticon?: LucideIcon;\r\n};\r\n\r\nexport const FileUploadDropArea = React.forwardRef<HTMLDivElement, FileUploadDropAreaProps>(\r\n\t(\r\n\t\t{\r\n\t\t\tclassName,\r\n\t\t\ttitle = \"Click to upload or drop your files here \",\r\n\t\t\tdescription = \"All files\\n∙\\nInfinity files\\n∙\\nInfinity size\",\r\n\t\t\ticon,\r\n\t\t\tchildren,\r\n\t\t\t...props\r\n\t\t},\r\n\t\tref\r\n\t) => {\r\n\t\tconst styles = fileUploadDropAreaStyles();\r\n\r\n\t\treturn (\r\n\t\t\t<div role=\"button\" className={styles.wrapper({ className })} ref={ref} {...props}>\r\n\t\t\t\t<FileUploadDropAreaIcon icon={icon || Upload} className={styles.icon()} />\r\n\t\t\t\t<p className={styles.title()}>{title}</p>\r\n\t\t\t\t{description && <p className={styles.description()}>{description}</p>}\r\n\t\t\t\t{children}\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n);\r\n\r\nFileUploadDropArea.displayName = \"FileUploadDropArea\";\r\n","import React from \"react\";\r\nimport { tv } from \"tailwind-variants\";\r\nimport { FileUploadDropAreaIcon } from \"../file-upload-drop-area-icon/FileUploadDropAreaIcon\";\r\nimport { LucideIcon, Upload } from \"lucide-react\";\r\n\r\nconst fileUploadInlineDropAreaStyles = tv({\r\n\tslots: {\r\n\t\twrapper: [\r\n\t\t\t\"has-[:disabled]:pointer-events-none has-[:disabled]:opacity-50\",\r\n\t\t\t\"relative flex h-11 items-center rounded-lg border border-dashed border-primary-border bg-secondary-bg p-1.5 transition-colors\",\r\n\t\t\t\"hover:bg-secondary-bg-hover\",\r\n\t\t\t\"has-[input:focus]:shadow-focus\",\r\n\t\t\t\"data-[dragging=true]:bg-secondary-bg-hover\"\r\n\t\t],\r\n\t\ticon: \"mr-3\",\r\n\t\ttitle: \"text-sm font-medium text-primary-accent\",\r\n\t\tdescription: \"ml-1.5 flex flex-wrap justify-center gap-1.5 text-xs text-muted\"\r\n\t}\r\n});\r\n\r\nexport type FileUploadInlineDropAreaProps = React.HTMLAttributes<HTMLDivElement> & {\r\n\ttitle?: React.ReactNode;\r\n\tdescription?: React.ReactNode;\r\n\ticon?: LucideIcon;\r\n};\r\n\r\nexport const FileUploadInlineDropArea = React.forwardRef<HTMLDivElement, FileUploadInlineDropAreaProps>(\r\n\t(\r\n\t\t{ className, title = \"Upload files\", description = \"Drag & drop or click to browse\", icon, children, ...props },\r\n\t\tref\r\n\t) => {\r\n\t\tconst styles = fileUploadInlineDropAreaStyles();\r\n\r\n\t\treturn (\r\n\t\t\t<div role=\"button\" className={styles.wrapper({ className })} ref={ref} {...props}>\r\n\t\t\t\t<FileUploadDropAreaIcon icon={icon || Upload} className={styles.icon()} size=\"sm\" />\r\n\t\t\t\t<div className=\"flex items-baseline\">\r\n\t\t\t\t\t<p className={styles.title()}>{title}</p>\r\n\t\t\t\t\t{description && (\r\n\t\t\t\t\t\t<>\r\n\t\t\t\t\t\t\t<span className=\"ml-1.5 text-muted\">∙</span>\r\n\t\t\t\t\t\t\t<p className={styles.description()}>{description}</p>\r\n\t\t\t\t\t\t</>\r\n\t\t\t\t\t)}\r\n\t\t\t\t\t{children}\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n);\r\n\r\nFileUploadInlineDropArea.displayName = \"FileUploadInlineDropArea\";\r\n","import { Button, ButtonProps } from \"../../../button\";\r\n\r\n/**\r\n * Кнопка для удаления всех файлов в компоненте загрузки файлов\r\n */\r\nexport type FileUploadClearButtonProps = ButtonProps;\r\n\r\nexport const FileUploadClearButton = ({ children = \"Remove all files\", ...props }: FileUploadClearButtonProps) => {\r\n\treturn (\r\n\t\t<Button size=\"sm\" variant=\"outline\" type=\"button\" {...props}>\r\n\t\t\t{children}\r\n\t\t</Button>\r\n\t);\r\n};\r\n\r\nFileUploadClearButton.displayName = \"FileUploadClearButton\";\r\n","import { FileUploadActions } from \"@/hooks/use-file-upload/useFileUpload\";\r\nimport { FileUploadTexts } from \"../../FileUpload\";\r\nimport { FileUploadDropArea } from \"../file-upload-drop-area/FileUploadDropArea\";\r\n\r\nexport type FileUploadInputZoneProps = Omit<FileUploadTexts, \"removeBtnText\"> &\r\n\tPick<\r\n\t\tFileUploadActions,\r\n\t\t\"openFileDialog\" | \"handleDragEnter\" | \"handleDragLeave\" | \"handleDragOver\" | \"handleDrop\" | \"getInputProps\"\r\n\t> & {\r\n\t\tisDragging?: boolean;\r\n\t};\r\n\r\nexport const FileUploadInputZone = ({\r\n\tisDragging,\r\n\tgetInputProps,\r\n\topenFileDialog,\r\n\thandleDragEnter,\r\n\thandleDragLeave,\r\n\thandleDragOver,\r\n\thandleDrop,\r\n\t...props\r\n}: FileUploadInputZoneProps) => {\r\n\treturn (\r\n\t\t<FileUploadDropArea\r\n\t\t\tonClick={openFileDialog}\r\n\t\t\tonDragEnter={handleDragEnter}\r\n\t\t\tonDragLeave={handleDragLeave}\r\n\t\t\tonDragOver={handleDragOver}\r\n\t\t\tonDrop={handleDrop}\r\n\t\t\tdata-dragging={isDragging || undefined}\r\n\t\t\t{...props}\r\n\t\t>\r\n\t\t\t<input className=\"sr-only\" aria-label=\"Upload files\" {...getInputProps()} />\r\n\t\t</FileUploadDropArea>\r\n\t);\r\n};\r\n\r\nFileUploadInputZone.displayName = \"FileUploadInputZone\";\r\n","import { FileUploadActions } from \"@/hooks/use-file-upload/useFileUpload\";\r\nimport { FileUploadTexts } from \"../../FileUpload\";\r\nimport { FileUploadInlineDropArea } from \"../file-upload-inline-drop-area/FileUploadInlineDropArea\";\r\n\r\nexport type FileUploadCompactInputZoneProps = Omit<FileUploadTexts, \"removeBtnText\" | \"helpText\"> &\r\n\tPick<\r\n\t\tFileUploadActions,\r\n\t\t\"openFileDialog\" | \"handleDragEnter\" | \"handleDragLeave\" | \"handleDragOver\" | \"handleDrop\" | \"getInputProps\"\r\n\t> & {\r\n\t\tisDragging?: boolean;\r\n\t};\r\n\r\nexport const FileUploadCompactInputZone = ({\r\n\tisDragging,\r\n\tgetInputProps,\r\n\topenFileDialog,\r\n\thandleDragEnter,\r\n\thandleDragLeave,\r\n\thandleDragOver,\r\n\thandleDrop,\r\n\t...props\r\n}: FileUploadCompactInputZoneProps) => {\r\n\treturn (\r\n\t\t<FileUploadInlineDropArea\r\n\t\t\tonClick={openFileDialog}\r\n\t\t\tonDragEnter={handleDragEnter}\r\n\t\t\tonDragLeave={handleDragLeave}\r\n\t\t\tonDragOver={handleDragOver}\r\n\t\t\tonDrop={handleDrop}\r\n\t\t\tdata-dragging={isDragging || undefined}\r\n\t\t\t{...props}\r\n\t\t>\r\n\t\t\t<input className=\"sr-only\" aria-label=\"Upload files\" {...getInputProps()} />\r\n\t\t</FileUploadInlineDropArea>\r\n\t);\r\n};\r\n\r\nFileUploadCompactInputZone.displayName = \"FileUploadCompactInputZone\";\r\n","import { IconButton } from \"@/components/button\";\r\nimport { FileData } from \"@/hooks/use-file-upload/useFileUpload\";\r\nimport { formatBytes } from \"@/lib/utils/file/formatBytes\";\r\nimport { Download, XIcon } from \"lucide-react\";\r\nimport React from \"react\";\r\nimport { tv } from \"tailwind-variants\";\r\nimport { useFileType } from \"@/hooks/useFileType\";\r\nimport { Icon } from \"@/components/icon\";\r\nimport { TextOverflowTooltip } from \"@/components/overflow-tooltip\";\r\n\r\nconst fileUploadItemCompactStyles = tv({\r\n\tslots: {\r\n\t\twrapper:\r\n\t\t\t\"box-border flex h-10 items-center gap-2 rounded-lg border border-secondary-border bg-background p-2.5 pr-1\",\r\n\t\ticon: \"text-muted\",\r\n\t\tinfoWrapper: \"flex w-full items-center overflow-hidden\",\r\n\t\ttextWrapper: \"flex w-full items-center justify-between\",\r\n\t\ttitle: \"truncate text-sm font-medium\",\r\n\t\tdescription: \"text-sm text-muted\",\r\n\t\tactionWrapper: \"ml-auto flex items-center -space-x-1.5\"\r\n\t}\r\n});\r\n\r\nexport type FileUploadItemCompactProps = React.HTMLAttributes<HTMLDivElement> & {\r\n\tonClear: () => void;\r\n\tfile: FileData;\r\n\trenderIcon?: React.ReactNode;\r\n\tonDownload?: (file: FileData) => void;\r\n};\r\n\r\nexport const FileUploadItemCompact = React.forwardRef<HTMLDivElement, FileUploadItemCompactProps>(\r\n\t({ onClear, file, className, renderIcon, onDownload, ...props }, ref) => {\r\n\t\tconst styles = fileUploadItemCompactStyles();\r\n\t\tconst IconComponent = useFileType(file);\r\n\r\n\t\treturn (\r\n\t\t\t<div className=\"relative\">\r\n\t\t\t\t<div className={styles.wrapper({ className })} ref={ref} {...props}>\r\n\t\t\t\t\t{renderIcon ?? (\r\n\t\t\t\t\t\t<div className=\"size-5\">\r\n\t\t\t\t\t\t\t<Icon icon={IconComponent} size=\"lg\" className={styles.icon()} />\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t)}\r\n\r\n\t\t\t\t\t<div className={styles.infoWrapper()}>\r\n\t\t\t\t\t\t<div className={styles.textWrapper()}>\r\n\t\t\t\t\t\t\t<TextOverflowTooltip className={styles.title()}>{file.name}</TextOverflowTooltip>\r\n\t\t\t\t\t\t\t<p className={styles.description()}>{formatBytes(file.size)}</p>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<div className={styles.actionWrapper()}>\r\n\t\t\t\t\t\t{onDownload && (\r\n\t\t\t\t\t\t\t<IconButton\r\n\t\t\t\t\t\t\t\tvariant=\"text\"\r\n\t\t\t\t\t\t\t\tsize=\"sm\"\r\n\t\t\t\t\t\t\t\ttype=\"button\"\r\n\t\t\t\t\t\t\t\ticon={Download}\r\n\t\t\t\t\t\t\t\tonClick={() => onDownload(file)}\r\n\t\t\t\t\t\t\t\taria-label=\"Download file\"\r\n\t\t\t\t\t\t\t\ticonClassName=\"size-4\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t<IconButton\r\n\t\t\t\t\t\t\tvariant=\"text\"\r\n\t\t\t\t\t\t\tsize=\"sm\"\r\n\t\t\t\t\t\t\ttype=\"button\"\r\n\t\t\t\t\t\t\ticon={XIcon}\r\n\t\t\t\t\t\t\tonClick={onClear}\r\n\t\t\t\t\t\t\taria-label=\"Remove file\"\r\n\t\t\t\t\t\t\ticonClassName=\"size-4\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n);\r\n\r\nFileUploadItemCompact.displayName = \"FileUploadItemCompact\";\r\n","import {\r\n\tFileData,\r\n\tFileMetadata,\r\n\tFileUploadConstraints,\r\n\tFileValue,\r\n\tuseFileUpload\r\n} from \"@/hooks/use-file-upload/useFileUpload\";\r\nimport { useCallback, useMemo } from \"react\";\r\nimport { tv } from \"tailwind-variants\";\r\nimport { FileUploadClearButton } from \"./components/file-upload-clear-button/FileUploadClearButton\";\r\nimport { FileUploadError } from \"./components/file-upload-error/FileUploadError\";\r\nimport { FileUploadInputZone } from \"./components/file-upload-input-zone/FileUploadInputZone\";\r\nimport { FileUploadItem } from \"./components/file-upload-item/FileUploadItem\";\r\nimport { FileUploadErrorMessages } from \"@/hooks/use-file-upload\";\r\n\r\nconst fileUploadStyles = tv({\r\n\tbase: \"flex flex-col gap-3\"\r\n});\r\n\r\nexport type FileUploadTexts = {\r\n\ttitle?: string;\r\n\tdescription?: string;\r\n\thelpText?: string;\r\n\tremoveBtnText?: string;\r\n};\r\n\r\nexport type FileUploadBaseProps = FileUploadConstraints & FileUploadTexts;\r\n\r\nexport type FileUploadProps = FileUploadBaseProps & {\r\n\tfiles?: FileValue[];\r\n\tonChange?: (files: FileValue[]) => void;\r\n\tonRemove?: (file: FileValue, index: number) => void;\r\n\tonAdd?: (files: FileValue[]) => void;\r\n\tonClear?: () => void;\r\n\tonDownload?: (file: FileData) => void;\r\n\r\n\tinitialFiles?: FileMetadata[];\r\n\tclassName?: string;\r\n\terrorMessages?: Partial<FileUploadErrorMessages>;\r\n};\r\n\r\nexport const FileUpload = (props: FileUploadProps) => {\r\n\tconst {\r\n\t\tfiles,\r\n\t\tonRemove,\r\n\t\tonAdd,\r\n\t\tonClear,\r\n\t\tonDownload,\r\n\t\tinitialFiles,\r\n\t\tonChange,\r\n\t\tclassName,\r\n\t\ttitle,\r\n\t\tdescription,\r\n\t\thelpText,\r\n\t\tremoveBtnText,\r\n\t\terrorMessages,\r\n\t\tmultiple = true,\r\n\t\t...constraints\r\n\t} = props;\r\n\tconst [{ files: stateFiles, isDragging, errors }, actions] = useFileUpload({\r\n\t\t...constraints,\r\n\t\tinitialFiles,\r\n\t\tmultiple,\r\n\t\terrorMessages,\r\n\t\tonFilesChange: (filesWithPreview) => {\r\n\t\t\tconst files = filesWithPreview.map((file) => file.file);\r\n\t\t\tonChange?.(files);\r\n\t\t},\r\n\t\tonFilesAdded: (filesWithPreview) => {\r\n\t\t\tconst files = filesWithPreview.map((file) => file.file);\r\n\t\t\tonAdd?.(files);\r\n\t\t}\r\n\t});\r\n\r\n\tconst actualFiles = useMemo(() => {\r\n\t\treturn files || stateFiles.map((file) => file.file);\r\n\t}, [files, stateFiles]);\r\n\r\n\tconst handleClearAll = useCallback(() => {\r\n\t\tactions.clearFiles();\r\n\t\tonClear?.();\r\n\t}, [actions, onClear]);\r\n\r\n\tconst handleRemoveFile = useCallback(\r\n\t\t(file: FileValue, index: number) => {\r\n\t\t\tconst fileId = stateFiles.find((f) => f.file.name === file.name && f.file.size === file.size)?.id;\r\n\t\t\tif (fileId) actions.removeFile(fileId);\r\n\t\t\tonRemove?.(file, index);\r\n\t\t},\r\n\t\t[stateFiles, actions, onRemove]\r\n\t);\r\n\r\n\treturn (\r\n\t\t<div className={fileUploadStyles({ className })}>\r\n\t\t\t<FileUploadInputZone\r\n\t\t\t\t{...actions}\r\n\t\t\t\tisDragging={isDragging}\r\n\t\t\t\ttitle={title}\r\n\t\t\t\tdescription={description}\r\n\t\t\t\thelpText={helpText}\r\n\t\t\t/>\r\n\r\n\t\t\t{errors.length > 0 && <FileUploadError error={errors} />}\r\n\r\n\t\t\t{actualFiles.length > 0 && (\r\n\t\t\t\t<div className=\"space-y-2\">\r\n\t\t\t\t\t{actualFiles.map((file, index) => (\r\n\t\t\t\t\t\t<FileUploadItem\r\n\t\t\t\t\t\t\tkey={index}\r\n\t\t\t\t\t\t\tfile={file}\r\n\t\t\t\t\t\t\tonClear={() => handleRemoveFile(file, index)}\r\n\t\t\t\t\t\t\tonDownload={onDownload}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t))}\r\n\t\t\t\t\t{actualFiles.length > 1 && (\r\n\t\t\t\t\t\t<FileUploadClearButton onClick={handleClearAll}>{removeBtnText}</FileUploadClearButton>\r\n\t\t\t\t\t)}\r\n\t\t\t\t</div>\r\n\t\t\t)}\r\n\t\t</div>\r\n\t);\r\n};\r\n\r\nFileUpload.displayName = \"FileUpload\";\r\n","import { FileMetadata, FileValue, useFileUpload, type FileUploadErrorMessages } from \"@/hooks/use-file-upload\";\r\nimport React, { useCallback, useMemo } from \"react\";\r\nimport { tv } from \"tailwind-variants\";\r\nimport { FileUploadBaseProps } from \"../FileUpload\";\r\nimport { FileUploadItemCompact } from \"../components/file-upload-item-compact/FileUploadItemCompact\";\r\nimport { FileUploadError } from \"../components/file-upload-error/FileUploadError\";\r\nimport { FileUploadCompactInputZone } from \"../components/file-upload-compact-input-zone/FileUploadCompactInputZone\";\r\nimport { FileData } from \"@/hooks/use-file-upload/useFileUpload\";\r\n\r\nconst fileUploadStyles = tv({\r\n\tbase: \"box-border flex flex-col gap-2\"\r\n});\r\n\r\nexport type FileUploadCompactProps = Omit<FileUploadBaseProps, \"removeBtnText\" | \"helpText\"> & {\r\n\tfiles?: FileValue[];\r\n\tonChange?: (files: FileValue[]) => void;\r\n\tonRemove?: (file: FileValue, index: number) => void;\r\n\tonAdd?: (files: FileValue[]) => void;\r\n\tonDownload?: (file: FileData) => void;\r\n\tinitialFiles?: FileMetadata[];\r\n\tclassName?: string;\r\n\terrorMessages?: Partial<FileUploadErrorMessages>;\r\n\trenderFileIcon?: (file: FileValue) => React.ReactNode;\r\n};\r\n\r\nexport const FileUploadCompact = (props: FileUploadCompactProps) => {\r\n\tconst {\r\n\t\tfiles,\r\n\t\tonRemove,\r\n\t\tonDownload,\r\n\t\tonAdd,\r\n\t\tinitialFiles,\r\n\t\tonChange,\r\n\t\tclassName,\r\n\t\ttitle,\r\n\t\tdescription,\r\n\t\tmultiple = true,\r\n\t\terrorMessages,\r\n\t\trenderFileIcon,\r\n\t\t...constraints\r\n\t} = props;\r\n\tconst [{ files: stateFiles, isDragging, errors }, actions] = useFileUpload({\r\n\t\t...constraints,\r\n\t\tinitialFiles,\r\n\t\tmultiple,\r\n\t\terrorMessages,\r\n\t\tonFilesChange: (filesWithPreview) => {\r\n\t\t\tconst files = filesWithPreview.map((file) => file.file);\r\n\t\t\tonChange?.(files);\r\n\t\t},\r\n\t\tonFilesAdded: (filesWithPreview) => {\r\n\t\t\tconst files = filesWithPreview.map((file) => file.file);\r\n\t\t\tonAdd?.(files);\r\n\t\t}\r\n\t});\r\n\r\n\tconst actualFiles = useMemo(() => {\r\n\t\treturn files || stateFiles.map((file) => file.file);\r\n\t}, [files, stateFiles]);\r\n\r\n\tconst handleRemoveFile = useCallback(\r\n\t\t(file: FileValue, index: number) => {\r\n\t\t\tconst fileId = stateFiles.find((f) => f.file.name === file.name && f.file.size === file.size)?.id;\r\n\t\t\tif (fileId) actions.removeFile(fileId);\r\n\t\t\tonRemove?.(file, index);\r\n\t\t},\r\n\t\t[stateFiles, actions, onRemove]\r\n\t);\r\n\r\n\treturn (\r\n\t\t<div className={fileUploadStyles({ className })}>\r\n\t\t\t<FileUploadCompactInputZone {...actions} isDragging={isDragging} title={title} description={description} />\r\n\r\n\t\t\t{errors.length > 0 && <FileUploadError error={errors} />}\r\n\r\n\t\t\t{actualFiles.length > 0 && (\r\n\t\t\t\t<div>\r\n\t\t\t\t\t{actualFiles.map((file, index) => {\r\n\t\t\t\t\t\tconst isFirst = index === 0;\r\n\t\t\t\t\t\tconst isOnly = actualFiles.length === 1;\r\n\t\t\t\t\t\tconst isLast = index === actualFiles.length - 1;\r\n\r\n\t\t\t\t\t\tlet itemClassName = \"\";\r\n\t\t\t\t\t\tif (isOnly) {\r\n\t\t\t\t\t\t\titemClassName = \"\";\r\n\t\t\t\t\t\t} else if (isFirst) {\r\n\t\t\t\t\t\t\titemClassName = \"border-b-0 rounded-b-none\";\r\n\t\t\t\t\t\t} else if (isLast) {\r\n\t\t\t\t\t\t\titemClassName = \"rounded-t-none\";\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\titemClassName = \"border-b-0 rounded-none\";\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\treturn (\r\n\t\t\t\t\t\t\t<FileUploadItemCompact\r\n\t\t\t\t\t\t\t\tkey={index}\r\n\t\t\t\t\t\t\t\tfile={file}\r\n\t\t\t\t\t\t\t\tonClear={() => handleRemoveFile(file, index)}\r\n\t\t\t\t\t\t\t\tclassName={itemClassName}\r\n\t\t\t\t\t\t\t\trenderIcon={renderFileIcon?.(file)}\r\n\t\t\t\t\t\t\t\tonDownload={onDownload}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t})}\r\n\t\t\t\t</div>\r\n\t\t\t)}\r\n\t\t</div>\r\n\t);\r\n};\r\n\r\nFileUploadCompact.displayName = \"FileUploadCompact\";\r\n"],"names":["FileArchive","createLucideIcon","FileSpreadsheet","FileText","File","Headphones","Upload","Video","useFileType","file","fileType","fileName","FileTextIcon","FileArchiveIcon","FileSpreadsheetIcon","VideoIcon","HeadphonesIcon","ImageIcon","FileIcon","fileIconStyles","tv","FileUploadIcon","IconComponent","jsx","FeatureIcon","fileUploadItemStyles","FileUploadItem","React","onClear","onDownload","className","props","ref","styles","jsxs","TextOverflowTooltip","formatBytes","IconButton","Download","XIcon","FileUploadError","error","errorText","Alert","AlertIcon","AlertCircleIcon","AlertDescription","fileUploadDropAreaIconStyles","FileUploadDropAreaIcon","icon","fileUploadDropAreaStyles","FileUploadDropArea","title","description","children","fileUploadInlineDropAreaStyles","FileUploadInlineDropArea","Fragment","FileUploadClearButton","Button","FileUploadInputZone","isDragging","getInputProps","openFileDialog","handleDragEnter","handleDragLeave","handleDragOver","handleDrop","FileUploadCompactInputZone","fileUploadItemCompactStyles","FileUploadItemCompact","renderIcon","Icon","fileUploadStyles","FileUpload","files","onRemove","onAdd","initialFiles","onChange","helpText","removeBtnText","errorMessages","multiple","constraints","stateFiles","errors","actions","useFileUpload","filesWithPreview","actualFiles","useMemo","handleClearAll","useCallback","handleRemoveFile","index","fileId","f","FileUploadCompact","renderFileIcon","isFirst","isOnly","isLast","itemClassName"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,KAAcC,EAAiB,eAAe;AAAA,EAClD,CAAC,QAAQ,EAAE,GAAG,aAAa,KAAK,SAAQ,CAAE;AAAA,EAC1C,CAAC,QAAQ,EAAE,GAAG,aAAa,KAAK,SAAQ,CAAE;AAAA,EAC1C,CAAC,QAAQ,EAAE,GAAG,WAAW,KAAK,SAAQ,CAAE;AAAA,EACxC,CAAC,QAAQ,EAAE,GAAG,2BAA2B,KAAK,SAAQ,CAAE;AAAA,EACxD;AAAA,IACE;AAAA,IACA,EAAE,GAAG,2EAA2E,KAAK,SAAQ;AAAA,EAC9F;AAAA,EACD,CAAC,UAAU,EAAE,IAAI,MAAM,IAAI,MAAM,GAAG,KAAK,KAAK,SAAU,CAAA;AAC1D,CAAC;ACnBD;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMC,KAAkBD,EAAiB,mBAAmB;AAAA,EAC1D,CAAC,QAAQ,EAAE,GAAG,8DAA8D,KAAK,SAAQ,CAAE;AAAA,EAC3F,CAAC,QAAQ,EAAE,GAAG,2BAA2B,KAAK,SAAQ,CAAE;AAAA,EACxD,CAAC,QAAQ,EAAE,GAAG,WAAW,KAAK,SAAQ,CAAE;AAAA,EACxC,CAAC,QAAQ,EAAE,GAAG,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WAAWS,CAAM,GACrCpB,IAAWnE,GAAMsF,CAAK;AAAA,IACvB;AAAA,IACA,CAACV,GAAYE,GAASX,CAAQ;AAAA,EAC/B;AAEA,2BACE,OAAI,EAAA,WAAWH,GAAiB,EAAE,WAAA3C,EAAA,CAAW,GAC7C,UAAA;AAAA,IAAA,gBAAAP,EAAC6C,GAA4B,EAAA,GAAGmB,GAAS,YAAA1B,GAAwB,OAAAT,GAAc,aAAAC,GAA0B;AAAA,IAExGiC,EAAO,SAAS,KAAM,gBAAA/D,EAAAiB,GAAA,EAAgB,OAAO8C,GAAQ;AAAA,IAErDI,EAAY,SAAS,KACrB,gBAAAnE,EAAC,SACC,UAAYmE,EAAA,IAAI,CAACjF,GAAMsF,MAAU;AACjC,YAAMK,IAAUL,MAAU,GACpBM,IAASX,EAAY,WAAW,GAChCY,IAASP,MAAUL,EAAY,SAAS;AAE9C,UAAIa,IAAgB;AACpB,aAAIF,IACaE,IAAA,KACNH,IACMG,IAAA,8BACND,IACMC,IAAA,mBAEAA,IAAA,2BAIhB,gBAAAhF;AAAA,QAAC+C;AAAA,QAAA;AAAA,UAEA,MAAA7D;AAAA,UACA,SAAS,MAAMqF,EAAiBrF,GAAMsF,CAAK;AAAA,UAC3C,WAAWQ;AAAA,UACX,YAAYJ,IAAiB1F,CAAI;AAAA,UACjC,YAAAoB;AAAA,QAAA;AAAA,QALKkE;AAAA,MAMN;AAAA,IAAA,CAED,EACF,CAAA;AAAA,EAAA,GAEF;AAEF;AAEAG,GAAkB,cAAc;","x_google_ignoreList":[0,1,2,3,4,5,6]}
|
|
1
|
+
{"version":3,"file":"file-upload.js","sources":["../../node_modules/.pnpm/lucide-react@0.460.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/file-archive.js","../../node_modules/.pnpm/lucide-react@0.460.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/file-spreadsheet.js","../../node_modules/.pnpm/lucide-react@0.460.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/file-text.js","../../node_modules/.pnpm/lucide-react@0.460.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/file.js","../../node_modules/.pnpm/lucide-react@0.460.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/headphones.js","../../node_modules/.pnpm/lucide-react@0.460.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/upload.js","../../node_modules/.pnpm/lucide-react@0.460.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/video.js","../../src/hooks/useFileType.ts","../../src/components/file-upload/components/file-upload-icon/FileUploadIcon.tsx","../../src/components/file-upload/components/file-upload-item/FileUploadItem.tsx","../../src/components/file-upload/components/file-upload-error/FileUploadError.tsx","../../src/components/file-upload/components/file-upload-drop-area-icon/FileUploadDropAreaIcon.tsx","../../src/components/file-upload/components/file-upload-drop-area/FileUploadDropArea.tsx","../../src/components/file-upload/components/file-upload-inline-drop-area/FileUploadInlineDropArea.tsx","../../src/components/file-upload/components/file-upload-clear-button/FileUploadClearButton.tsx","../../src/components/file-upload/components/file-upload-input-zone/FileUploadInputZone.tsx","../../src/components/file-upload/components/file-upload-compact-input-zone/FileUploadCompactInputZone.tsx","../../src/components/file-upload/components/file-upload-item-compact/FileUploadItemCompact.tsx","../../src/components/file-upload/FileUpload.tsx","../../src/components/file-upload/file-upload-compact/FileUploadCompact.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.460.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst FileArchive = createLucideIcon(\"FileArchive\", [\n [\"path\", { d: \"M10 12v-1\", key: \"v7bkov\" }],\n [\"path\", { d: \"M10 18v-2\", key: \"1cjy8d\" }],\n [\"path\", { d: \"M10 7V6\", key: \"dljcrl\" }],\n [\"path\", { d: \"M14 2v4a2 2 0 0 0 2 2h4\", key: \"tnqrlb\" }],\n [\n \"path\",\n { d: \"M15.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v16a2 2 0 0 0 .274 1.01\", key: \"gkbcor\" }\n ],\n [\"circle\", { cx: \"10\", cy: \"20\", r: \"2\", key: \"1xzdoj\" }]\n]);\n\nexport { FileArchive as default };\n//# sourceMappingURL=file-archive.js.map\n","/**\n * @license lucide-react v0.460.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst FileSpreadsheet = createLucideIcon(\"FileSpreadsheet\", [\n [\"path\", { d: \"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\", key: \"1rqfz7\" }],\n [\"path\", { d: \"M14 2v4a2 2 0 0 0 2 2h4\", key: \"tnqrlb\" }],\n [\"path\", { d: \"M8 13h2\", key: \"yr2amv\" }],\n [\"path\", { d: \"M14 13h2\", key: \"un5t4a\" }],\n [\"path\", { d: \"M8 17h2\", key: \"2yhykz\" }],\n [\"path\", { d: \"M14 17h2\", key: \"10kma7\" }]\n]);\n\nexport { FileSpreadsheet as default };\n//# sourceMappingURL=file-spreadsheet.js.map\n","/**\n * @license lucide-react v0.460.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst FileText = createLucideIcon(\"FileText\", [\n [\"path\", { d: \"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\", key: \"1rqfz7\" }],\n [\"path\", { d: \"M14 2v4a2 2 0 0 0 2 2h4\", key: \"tnqrlb\" }],\n [\"path\", { d: \"M10 9H8\", key: \"b1mrlr\" }],\n [\"path\", { d: \"M16 13H8\", key: \"t4e002\" }],\n [\"path\", { d: \"M16 17H8\", key: \"z1uh3a\" }]\n]);\n\nexport { FileText as default };\n//# sourceMappingURL=file-text.js.map\n","/**\n * @license lucide-react v0.460.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst File = createLucideIcon(\"File\", [\n [\"path\", { d: \"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\", key: \"1rqfz7\" }],\n [\"path\", { d: \"M14 2v4a2 2 0 0 0 2 2h4\", key: \"tnqrlb\" }]\n]);\n\nexport { File as default };\n//# sourceMappingURL=file.js.map\n","/**\n * @license lucide-react v0.460.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Headphones = createLucideIcon(\"Headphones\", [\n [\n \"path\",\n {\n d: \"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3\",\n key: \"1xhozi\"\n }\n ]\n]);\n\nexport { Headphones as default };\n//# sourceMappingURL=headphones.js.map\n","/**\n * @license lucide-react v0.460.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Upload = createLucideIcon(\"Upload\", [\n [\"path\", { d: \"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\", key: \"ih7n3h\" }],\n [\"polyline\", { points: \"17 8 12 3 7 8\", key: \"t8dd8p\" }],\n [\"line\", { x1: \"12\", x2: \"12\", y1: \"3\", y2: \"15\", key: \"widbto\" }]\n]);\n\nexport { Upload as default };\n//# sourceMappingURL=upload.js.map\n","/**\n * @license lucide-react v0.460.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Video = createLucideIcon(\"Video\", [\n [\n \"path\",\n {\n d: \"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5\",\n key: \"ftymec\"\n }\n ],\n [\"rect\", { x: \"2\", y: \"6\", width: \"14\", height: \"12\", rx: \"2\", key: \"158x01\" }]\n]);\n\nexport { Video as default };\n//# sourceMappingURL=video.js.map\n","import {\n\tFileArchiveIcon,\n\tFileIcon,\n\tFileSpreadsheetIcon,\n\tFileTextIcon,\n\tHeadphonesIcon,\n\tImageIcon,\n\tVideoIcon\n} from \"lucide-react\";\nimport { FileData } from \"./use-file-upload/useFileUpload\";\n\nexport const useFileType = (file: FileData) => {\n\tconst fileType = file.type;\n\tconst fileName = file.name;\n\n\t// Определяем тип файла и возвращаем соответствующую иконку\n\tif (\n\t\tfileType.includes(\"pdf\") ||\n\t\tfileName.endsWith(\".pdf\") ||\n\t\tfileType.includes(\"word\") ||\n\t\tfileName.endsWith(\".doc\") ||\n\t\tfileName.endsWith(\".docx\")\n\t) {\n\t\treturn FileTextIcon;\n\t} else if (\n\t\tfileType.includes(\"zip\") ||\n\t\tfileType.includes(\"archive\") ||\n\t\tfileName.endsWith(\".zip\") ||\n\t\tfileName.endsWith(\".rar\")\n\t) {\n\t\treturn FileArchiveIcon;\n\t} else if (fileType.includes(\"excel\") || fileName.endsWith(\".xls\") || fileName.endsWith(\".xlsx\")) {\n\t\treturn FileSpreadsheetIcon;\n\t} else if (fileType.includes(\"video/\")) {\n\t\treturn VideoIcon;\n\t} else if (fileType.includes(\"audio/\")) {\n\t\treturn HeadphonesIcon;\n\t} else if (fileType.startsWith(\"image/\")) {\n\t\treturn ImageIcon;\n\t}\n\n\treturn FileIcon;\n};\n","import { FeatureIcon } from \"@/components/icon\";\nimport { tv } from \"tailwind-variants\";\nimport { FileData } from \"@/hooks/use-file-upload/useFileUpload\";\nimport { useFileType } from \"@/hooks/useFileType\";\n\nconst fileIconStyles = tv({\n\tbase: \"rounded-md text-muted ring-0\"\n});\n\nexport interface FileUploadIconProps {\n\tfile: FileData;\n}\n\nexport const FileUploadIcon = ({ file }: FileUploadIconProps) => {\n\tconst IconComponent = useFileType(file);\n\n\treturn <FeatureIcon icon={IconComponent} size=\"lg\" className={fileIconStyles()} />;\n};\n","import { IconButton } from \"@/components/button\";\nimport { FileData } from \"@/hooks/use-file-upload/useFileUpload\";\nimport { formatBytes } from \"@/lib/utils/file/formatBytes\";\nimport { Download, XIcon } from \"lucide-react\";\nimport React from \"react\";\nimport { tv } from \"tailwind-variants\";\nimport { FileUploadIcon } from \"../file-upload-icon/FileUploadIcon\";\nimport { TextOverflowTooltip } from \"@/components/overflow-tooltip\";\n\nconst fileUploadItemStyles = tv({\n\tslots: {\n\t\twrapper:\n\t\t\t\"box-border flex h-16 justify-between gap-2 rounded-xl border border-secondary-border bg-background p-3 pe-3\",\n\t\tinfoWrapper: \"flex min-w-0 flex-1 items-center gap-2.5\",\n\t\ttextWrapper: \"flex min-w-0 flex-col gap-0.5\",\n\t\ttitle: \"truncate text-sm font-medium\",\n\t\tdescription: \"text-xs text-muted\",\n\t\tactionWrapper: \"-me-3 -mt-3 flex h-8 items-center -space-x-1.5\"\n\t}\n});\n\nexport type FileUploadItemProps = React.HTMLAttributes<HTMLDivElement> & {\n\tonClear: () => void;\n\tonDownload?: (file: FileData) => void;\n\tfile: FileData;\n};\n\nexport const FileUploadItem = React.forwardRef<HTMLDivElement, FileUploadItemProps>(\n\t({ onClear, onDownload, file, className, ...props }, ref) => {\n\t\tconst styles = fileUploadItemStyles();\n\n\t\treturn (\n\t\t\t<div className={styles.wrapper({ className })} ref={ref} {...props}>\n\t\t\t\t<div className={styles.infoWrapper()}>\n\t\t\t\t\t<FileUploadIcon file={file} />\n\n\t\t\t\t\t<div className={styles.textWrapper()}>\n\t\t\t\t\t\t<TextOverflowTooltip className={styles.title()}>{file.name}</TextOverflowTooltip>\n\t\t\t\t\t\t<p className={styles.description()}>{formatBytes(file.size)}</p>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<div className={styles.actionWrapper()}>\n\t\t\t\t\t{onDownload && (\n\t\t\t\t\t\t<IconButton\n\t\t\t\t\t\t\tvariant=\"text\"\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\ticon={Download}\n\t\t\t\t\t\t\tonClick={() => onDownload(file)}\n\t\t\t\t\t\t\taria-label=\"Download file\"\n\t\t\t\t\t\t\ticonClassName=\"size-4\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t\t<IconButton\n\t\t\t\t\t\tvariant=\"text\"\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\ticon={XIcon}\n\t\t\t\t\t\tonClick={onClear}\n\t\t\t\t\t\taria-label=\"Remove file\"\n\t\t\t\t\t\ticonClassName=\"size-4\"\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n);\n\nFileUploadItem.displayName = \"FileUploadItem\";\n","import { Alert, AlertDescription, AlertIcon } from \"@/components/alert\";\nimport { AlertCircleIcon } from \"lucide-react\";\nimport React from \"react\";\n\nexport type FileUploadErrorProps = React.HTMLAttributes<HTMLDivElement> & {\n\terror: string | string[];\n};\n\nexport const FileUploadError = React.forwardRef<HTMLDivElement, FileUploadErrorProps>(({ error, ...props }, ref) => {\n\tconst errorText = Array.isArray(error) ? error.join(\"\\n\") : error;\n\treturn (\n\t\t<Alert status=\"error\" focus=\"medium\" {...props} ref={ref}>\n\t\t\t<AlertIcon icon={AlertCircleIcon} />\n\t\t\t<AlertDescription className=\"whitespace-pre-line\">{errorText}</AlertDescription>\n\t\t</Alert>\n\t);\n});\n\nFileUploadError.displayName = \"FileUploadError\";\n","import React from \"react\";\nimport { tv } from \"tailwind-variants\";\nimport { FeatureIcon } from \"@/components/icon\";\nimport { FeatureIconProps } from \"@/components/icon/feature-icon/FeatureIcon\";\n\nconst fileUploadDropAreaIconStyles = tv({\n\tbase: \"shrink-0 bg-status-neutral-fg\"\n});\n\nexport const FileUploadDropAreaIcon: React.FC<FeatureIconProps> = ({ icon, className, ...props }) => {\n\treturn <FeatureIcon size=\"xl\" icon={icon} className={fileUploadDropAreaIconStyles({ className })} {...props} />;\n};\n\nFileUploadDropAreaIcon.displayName = \"FileUploadDropAreaIcon\";\n","import React from \"react\";\nimport { tv } from \"tailwind-variants\";\nimport { FileUploadDropAreaIcon } from \"../file-upload-drop-area-icon/FileUploadDropAreaIcon\";\nimport { LucideIcon, Upload } from \"lucide-react\";\n\nconst fileUploadDropAreaStyles = tv({\n\tslots: {\n\t\twrapper: [\n\t\t\t\"has-[:disabled]:pointer-events-none has-[:disabled]:opacity-50\",\n\t\t\t\"relative flex min-h-[9.125rem] flex-col items-center justify-center rounded-xl border border-dashed border-primary-border bg-secondary-bg p-6 transition-colors\",\n\t\t\t\"hover:bg-secondary-bg-hover\",\n\t\t\t\"has-[input:focus]:shadow-focus\",\n\t\t\t\"data-[dragging=true]:bg-secondary-bg-hover\"\n\t\t],\n\t\ttitle: \"mb-1.5 text-sm font-medium text-primary-accent\",\n\t\ticon: \"mb-3 size-11\",\n\t\tdescription: \"flex flex-wrap justify-center gap-1 text-xs text-muted\"\n\t}\n});\n\nexport type FileUploadDropAreaProps = React.HTMLAttributes<HTMLDivElement> & {\n\ttitle?: React.ReactNode;\n\tdescription?: React.ReactNode;\n\ticon?: LucideIcon;\n};\n\nexport const FileUploadDropArea = React.forwardRef<HTMLDivElement, FileUploadDropAreaProps>(\n\t(\n\t\t{\n\t\t\tclassName,\n\t\t\ttitle = \"Click to upload or drop your files here \",\n\t\t\tdescription = \"All files\\n∙\\nInfinity files\\n∙\\nInfinity size\",\n\t\t\ticon,\n\t\t\tchildren,\n\t\t\t...props\n\t\t},\n\t\tref\n\t) => {\n\t\tconst styles = fileUploadDropAreaStyles();\n\n\t\treturn (\n\t\t\t<div role=\"button\" className={styles.wrapper({ className })} ref={ref} {...props}>\n\t\t\t\t<FileUploadDropAreaIcon icon={icon || Upload} className={styles.icon()} />\n\t\t\t\t<p className={styles.title()}>{title}</p>\n\t\t\t\t{description && <p className={styles.description()}>{description}</p>}\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t);\n\t}\n);\n\nFileUploadDropArea.displayName = \"FileUploadDropArea\";\n","import React from \"react\";\nimport { tv } from \"tailwind-variants\";\nimport { FileUploadDropAreaIcon } from \"../file-upload-drop-area-icon/FileUploadDropAreaIcon\";\nimport { LucideIcon, Upload } from \"lucide-react\";\n\nconst fileUploadInlineDropAreaStyles = tv({\n\tslots: {\n\t\twrapper: [\n\t\t\t\"has-[:disabled]:pointer-events-none has-[:disabled]:opacity-50\",\n\t\t\t\"relative flex h-11 items-center rounded-lg border border-dashed border-primary-border bg-secondary-bg p-1.5 transition-colors\",\n\t\t\t\"hover:bg-secondary-bg-hover\",\n\t\t\t\"has-[input:focus]:shadow-focus\",\n\t\t\t\"data-[dragging=true]:bg-secondary-bg-hover\"\n\t\t],\n\t\ticon: \"mr-3\",\n\t\ttitle: \"text-sm font-medium text-primary-accent\",\n\t\tdescription: \"ml-1.5 flex flex-wrap justify-center gap-1.5 text-xs text-muted\"\n\t}\n});\n\nexport type FileUploadInlineDropAreaProps = React.HTMLAttributes<HTMLDivElement> & {\n\ttitle?: React.ReactNode;\n\tdescription?: React.ReactNode;\n\ticon?: LucideIcon;\n};\n\nexport const FileUploadInlineDropArea = React.forwardRef<HTMLDivElement, FileUploadInlineDropAreaProps>(\n\t(\n\t\t{ className, title = \"Upload files\", description = \"Drag & drop or click to browse\", icon, children, ...props },\n\t\tref\n\t) => {\n\t\tconst styles = fileUploadInlineDropAreaStyles();\n\n\t\treturn (\n\t\t\t<div role=\"button\" className={styles.wrapper({ className })} ref={ref} {...props}>\n\t\t\t\t<FileUploadDropAreaIcon icon={icon || Upload} className={styles.icon()} size=\"sm\" />\n\t\t\t\t<div className=\"flex items-baseline\">\n\t\t\t\t\t<p className={styles.title()}>{title}</p>\n\t\t\t\t\t{description && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<span className=\"ml-1.5 text-muted\">∙</span>\n\t\t\t\t\t\t\t<p className={styles.description()}>{description}</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t)}\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n);\n\nFileUploadInlineDropArea.displayName = \"FileUploadInlineDropArea\";\n","import { Button, ButtonProps } from \"../../../button\";\n\n/**\n * Кнопка для удаления всех файлов в компоненте загрузки файлов\n */\nexport type FileUploadClearButtonProps = ButtonProps;\n\nexport const FileUploadClearButton = ({ children = \"Remove all files\", ...props }: FileUploadClearButtonProps) => {\n\treturn (\n\t\t<Button size=\"sm\" variant=\"outline\" type=\"button\" {...props}>\n\t\t\t{children}\n\t\t</Button>\n\t);\n};\n\nFileUploadClearButton.displayName = \"FileUploadClearButton\";\n","import { FileUploadActions } from \"@/hooks/use-file-upload/useFileUpload\";\nimport { FileUploadTexts } from \"../../FileUpload\";\nimport { FileUploadDropArea } from \"../file-upload-drop-area/FileUploadDropArea\";\n\nexport type FileUploadInputZoneProps = Omit<FileUploadTexts, \"removeBtnText\"> &\n\tPick<\n\t\tFileUploadActions,\n\t\t\"openFileDialog\" | \"handleDragEnter\" | \"handleDragLeave\" | \"handleDragOver\" | \"handleDrop\" | \"getInputProps\"\n\t> & {\n\t\tisDragging?: boolean;\n\t};\n\nexport const FileUploadInputZone = ({\n\tisDragging,\n\tgetInputProps,\n\topenFileDialog,\n\thandleDragEnter,\n\thandleDragLeave,\n\thandleDragOver,\n\thandleDrop,\n\t...props\n}: FileUploadInputZoneProps) => {\n\treturn (\n\t\t<FileUploadDropArea\n\t\t\tonClick={openFileDialog}\n\t\t\tonDragEnter={handleDragEnter}\n\t\t\tonDragLeave={handleDragLeave}\n\t\t\tonDragOver={handleDragOver}\n\t\t\tonDrop={handleDrop}\n\t\t\tdata-dragging={isDragging || undefined}\n\t\t\t{...props}\n\t\t>\n\t\t\t<input className=\"sr-only\" aria-label=\"Upload files\" {...getInputProps()} />\n\t\t</FileUploadDropArea>\n\t);\n};\n\nFileUploadInputZone.displayName = \"FileUploadInputZone\";\n","import { FileUploadActions } from \"@/hooks/use-file-upload/useFileUpload\";\nimport { FileUploadTexts } from \"../../FileUpload\";\nimport { FileUploadInlineDropArea } from \"../file-upload-inline-drop-area/FileUploadInlineDropArea\";\n\nexport type FileUploadCompactInputZoneProps = Omit<FileUploadTexts, \"removeBtnText\" | \"helpText\"> &\n\tPick<\n\t\tFileUploadActions,\n\t\t\"openFileDialog\" | \"handleDragEnter\" | \"handleDragLeave\" | \"handleDragOver\" | \"handleDrop\" | \"getInputProps\"\n\t> & {\n\t\tisDragging?: boolean;\n\t};\n\nexport const FileUploadCompactInputZone = ({\n\tisDragging,\n\tgetInputProps,\n\topenFileDialog,\n\thandleDragEnter,\n\thandleDragLeave,\n\thandleDragOver,\n\thandleDrop,\n\t...props\n}: FileUploadCompactInputZoneProps) => {\n\treturn (\n\t\t<FileUploadInlineDropArea\n\t\t\tonClick={openFileDialog}\n\t\t\tonDragEnter={handleDragEnter}\n\t\t\tonDragLeave={handleDragLeave}\n\t\t\tonDragOver={handleDragOver}\n\t\t\tonDrop={handleDrop}\n\t\t\tdata-dragging={isDragging || undefined}\n\t\t\t{...props}\n\t\t>\n\t\t\t<input className=\"sr-only\" aria-label=\"Upload files\" {...getInputProps()} />\n\t\t</FileUploadInlineDropArea>\n\t);\n};\n\nFileUploadCompactInputZone.displayName = \"FileUploadCompactInputZone\";\n","import { IconButton } from \"@/components/button\";\nimport { FileData } from \"@/hooks/use-file-upload/useFileUpload\";\nimport { formatBytes } from \"@/lib/utils/file/formatBytes\";\nimport { Download, XIcon } from \"lucide-react\";\nimport React from \"react\";\nimport { tv } from \"tailwind-variants\";\nimport { useFileType } from \"@/hooks/useFileType\";\nimport { Icon } from \"@/components/icon\";\nimport { TextOverflowTooltip } from \"@/components/overflow-tooltip\";\n\nconst fileUploadItemCompactStyles = tv({\n\tslots: {\n\t\twrapper:\n\t\t\t\"box-border flex h-10 items-center gap-2 rounded-lg border border-secondary-border bg-background p-2.5 pr-1\",\n\t\ticon: \"text-muted\",\n\t\tinfoWrapper: \"flex w-full items-center overflow-hidden\",\n\t\ttextWrapper: \"flex w-full items-center justify-between\",\n\t\ttitle: \"truncate text-sm font-medium\",\n\t\tdescription: \"text-sm text-muted\",\n\t\tactionWrapper: \"ml-auto flex items-center -space-x-1.5\"\n\t}\n});\n\nexport type FileUploadItemCompactProps = React.HTMLAttributes<HTMLDivElement> & {\n\tonClear: () => void;\n\tfile: FileData;\n\trenderIcon?: React.ReactNode;\n\tonDownload?: (file: FileData) => void;\n};\n\nexport const FileUploadItemCompact = React.forwardRef<HTMLDivElement, FileUploadItemCompactProps>(\n\t({ onClear, file, className, renderIcon, onDownload, ...props }, ref) => {\n\t\tconst styles = fileUploadItemCompactStyles();\n\t\tconst IconComponent = useFileType(file);\n\n\t\treturn (\n\t\t\t<div className=\"relative\">\n\t\t\t\t<div className={styles.wrapper({ className })} ref={ref} {...props}>\n\t\t\t\t\t{renderIcon ?? (\n\t\t\t\t\t\t<div className=\"size-5\">\n\t\t\t\t\t\t\t<Icon icon={IconComponent} size=\"lg\" className={styles.icon()} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\n\t\t\t\t\t<div className={styles.infoWrapper()}>\n\t\t\t\t\t\t<div className={styles.textWrapper()}>\n\t\t\t\t\t\t\t<TextOverflowTooltip className={styles.title()}>{file.name}</TextOverflowTooltip>\n\t\t\t\t\t\t\t<p className={styles.description()}>{formatBytes(file.size)}</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div className={styles.actionWrapper()}>\n\t\t\t\t\t\t{onDownload && (\n\t\t\t\t\t\t\t<IconButton\n\t\t\t\t\t\t\t\tvariant=\"text\"\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\ticon={Download}\n\t\t\t\t\t\t\t\tonClick={() => onDownload(file)}\n\t\t\t\t\t\t\t\taria-label=\"Download file\"\n\t\t\t\t\t\t\t\ticonClassName=\"size-4\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<IconButton\n\t\t\t\t\t\t\tvariant=\"text\"\n\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\ticon={XIcon}\n\t\t\t\t\t\t\tonClick={onClear}\n\t\t\t\t\t\t\taria-label=\"Remove file\"\n\t\t\t\t\t\t\ticonClassName=\"size-4\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n);\n\nFileUploadItemCompact.displayName = \"FileUploadItemCompact\";\n","import {\n\tFileData,\n\tFileMetadata,\n\tFileUploadConstraints,\n\tFileValue,\n\tuseFileUpload\n} from \"@/hooks/use-file-upload/useFileUpload\";\nimport { useCallback, useMemo } from \"react\";\nimport { tv } from \"tailwind-variants\";\nimport { FileUploadClearButton } from \"./components/file-upload-clear-button/FileUploadClearButton\";\nimport { FileUploadError } from \"./components/file-upload-error/FileUploadError\";\nimport { FileUploadInputZone } from \"./components/file-upload-input-zone/FileUploadInputZone\";\nimport { FileUploadItem } from \"./components/file-upload-item/FileUploadItem\";\nimport { FileUploadErrorMessages } from \"@/hooks/use-file-upload\";\n\nconst fileUploadStyles = tv({\n\tbase: \"flex flex-col gap-3\"\n});\n\nexport type FileUploadTexts = {\n\ttitle?: string;\n\tdescription?: string;\n\thelpText?: string;\n\tremoveBtnText?: string;\n};\n\nexport type FileUploadBaseProps = FileUploadConstraints & FileUploadTexts;\n\nexport type FileUploadProps = FileUploadBaseProps & {\n\tfiles?: FileValue[];\n\tonChange?: (files: FileValue[]) => void;\n\tonRemove?: (file: FileValue, index: number) => void;\n\tonAdd?: (files: FileValue[]) => void;\n\tonClear?: () => void;\n\tonDownload?: (file: FileData) => void;\n\n\tinitialFiles?: FileMetadata[];\n\tclassName?: string;\n\terrorMessages?: Partial<FileUploadErrorMessages>;\n};\n\nexport const FileUpload = (props: FileUploadProps) => {\n\tconst {\n\t\tfiles,\n\t\tonRemove,\n\t\tonAdd,\n\t\tonClear,\n\t\tonDownload,\n\t\tinitialFiles,\n\t\tonChange,\n\t\tclassName,\n\t\ttitle,\n\t\tdescription,\n\t\thelpText,\n\t\tremoveBtnText,\n\t\terrorMessages,\n\t\tmultiple = true,\n\t\t...constraints\n\t} = props;\n\tconst [{ files: stateFiles, isDragging, errors }, actions] = useFileUpload({\n\t\t...constraints,\n\t\tinitialFiles,\n\t\tmultiple,\n\t\terrorMessages,\n\t\tonFilesChange: (filesWithPreview) => {\n\t\t\tconst files = filesWithPreview.map((file) => file.file);\n\t\t\tonChange?.(files);\n\t\t},\n\t\tonFilesAdded: (filesWithPreview) => {\n\t\t\tconst files = filesWithPreview.map((file) => file.file);\n\t\t\tonAdd?.(files);\n\t\t}\n\t});\n\n\tconst actualFiles = useMemo(() => {\n\t\treturn files || stateFiles.map((file) => file.file);\n\t}, [files, stateFiles]);\n\n\tconst handleClearAll = useCallback(() => {\n\t\tactions.clearFiles();\n\t\tonClear?.();\n\t}, [actions, onClear]);\n\n\tconst handleRemoveFile = useCallback(\n\t\t(file: FileValue, index: number) => {\n\t\t\tconst fileId = stateFiles.find((f) => f.file.name === file.name && f.file.size === file.size)?.id;\n\t\t\tif (fileId) actions.removeFile(fileId);\n\t\t\tonRemove?.(file, index);\n\t\t},\n\t\t[stateFiles, actions, onRemove]\n\t);\n\n\treturn (\n\t\t<div className={fileUploadStyles({ className })}>\n\t\t\t<FileUploadInputZone\n\t\t\t\t{...actions}\n\t\t\t\tisDragging={isDragging}\n\t\t\t\ttitle={title}\n\t\t\t\tdescription={description}\n\t\t\t\thelpText={helpText}\n\t\t\t/>\n\n\t\t\t{errors.length > 0 && <FileUploadError error={errors} />}\n\n\t\t\t{actualFiles.length > 0 && (\n\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t{actualFiles.map((file, index) => (\n\t\t\t\t\t\t<FileUploadItem\n\t\t\t\t\t\t\tkey={index}\n\t\t\t\t\t\t\tfile={file}\n\t\t\t\t\t\t\tonClear={() => handleRemoveFile(file, index)}\n\t\t\t\t\t\t\tonDownload={onDownload}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t\t{actualFiles.length > 1 && (\n\t\t\t\t\t\t<FileUploadClearButton onClick={handleClearAll}>{removeBtnText}</FileUploadClearButton>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n\nFileUpload.displayName = \"FileUpload\";\n","import { FileMetadata, FileValue, useFileUpload, type FileUploadErrorMessages } from \"@/hooks/use-file-upload\";\nimport React, { useCallback, useMemo } from \"react\";\nimport { tv } from \"tailwind-variants\";\nimport { FileUploadBaseProps } from \"../FileUpload\";\nimport { FileUploadItemCompact } from \"../components/file-upload-item-compact/FileUploadItemCompact\";\nimport { FileUploadError } from \"../components/file-upload-error/FileUploadError\";\nimport { FileUploadCompactInputZone } from \"../components/file-upload-compact-input-zone/FileUploadCompactInputZone\";\nimport { FileData } from \"@/hooks/use-file-upload/useFileUpload\";\n\nconst fileUploadStyles = tv({\n\tbase: \"box-border flex flex-col gap-2\"\n});\n\nexport type FileUploadCompactProps = Omit<FileUploadBaseProps, \"removeBtnText\" | \"helpText\"> & {\n\tfiles?: FileValue[];\n\tonChange?: (files: FileValue[]) => void;\n\tonRemove?: (file: FileValue, index: number) => void;\n\tonAdd?: (files: FileValue[]) => void;\n\tonDownload?: (file: FileData) => void;\n\tinitialFiles?: FileMetadata[];\n\tclassName?: string;\n\terrorMessages?: Partial<FileUploadErrorMessages>;\n\trenderFileIcon?: (file: FileValue) => React.ReactNode;\n};\n\nexport const FileUploadCompact = (props: FileUploadCompactProps) => {\n\tconst {\n\t\tfiles,\n\t\tonRemove,\n\t\tonDownload,\n\t\tonAdd,\n\t\tinitialFiles,\n\t\tonChange,\n\t\tclassName,\n\t\ttitle,\n\t\tdescription,\n\t\tmultiple = true,\n\t\terrorMessages,\n\t\trenderFileIcon,\n\t\t...constraints\n\t} = props;\n\tconst [{ files: stateFiles, isDragging, errors }, actions] = useFileUpload({\n\t\t...constraints,\n\t\tinitialFiles,\n\t\tmultiple,\n\t\terrorMessages,\n\t\tonFilesChange: (filesWithPreview) => {\n\t\t\tconst files = filesWithPreview.map((file) => file.file);\n\t\t\tonChange?.(files);\n\t\t},\n\t\tonFilesAdded: (filesWithPreview) => {\n\t\t\tconst files = filesWithPreview.map((file) => file.file);\n\t\t\tonAdd?.(files);\n\t\t}\n\t});\n\n\tconst actualFiles = useMemo(() => {\n\t\treturn files || stateFiles.map((file) => file.file);\n\t}, [files, stateFiles]);\n\n\tconst handleRemoveFile = useCallback(\n\t\t(file: FileValue, index: number) => {\n\t\t\tconst fileId = stateFiles.find((f) => f.file.name === file.name && f.file.size === file.size)?.id;\n\t\t\tif (fileId) actions.removeFile(fileId);\n\t\t\tonRemove?.(file, index);\n\t\t},\n\t\t[stateFiles, actions, onRemove]\n\t);\n\n\treturn (\n\t\t<div className={fileUploadStyles({ className })}>\n\t\t\t<FileUploadCompactInputZone {...actions} isDragging={isDragging} title={title} description={description} />\n\n\t\t\t{errors.length > 0 && <FileUploadError error={errors} />}\n\n\t\t\t{actualFiles.length > 0 && (\n\t\t\t\t<div>\n\t\t\t\t\t{actualFiles.map((file, index) => {\n\t\t\t\t\t\tconst isFirst = index === 0;\n\t\t\t\t\t\tconst isOnly = actualFiles.length === 1;\n\t\t\t\t\t\tconst isLast = index === actualFiles.length - 1;\n\n\t\t\t\t\t\tlet itemClassName = \"\";\n\t\t\t\t\t\tif (isOnly) {\n\t\t\t\t\t\t\titemClassName = \"\";\n\t\t\t\t\t\t} else if (isFirst) {\n\t\t\t\t\t\t\titemClassName = \"border-b-0 rounded-b-none\";\n\t\t\t\t\t\t} else if (isLast) {\n\t\t\t\t\t\t\titemClassName = \"rounded-t-none\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\titemClassName = \"border-b-0 rounded-none\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<FileUploadItemCompact\n\t\t\t\t\t\t\t\tkey={index}\n\t\t\t\t\t\t\t\tfile={file}\n\t\t\t\t\t\t\t\tonClear={() => handleRemoveFile(file, index)}\n\t\t\t\t\t\t\t\tclassName={itemClassName}\n\t\t\t\t\t\t\t\trenderIcon={renderFileIcon?.(file)}\n\t\t\t\t\t\t\t\tonDownload={onDownload}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n\nFileUploadCompact.displayName = \"FileUploadCompact\";\n"],"names":["FileArchive","createLucideIcon","FileSpreadsheet","FileText","File","Headphones","Upload","Video","useFileType","file","fileType","fileName","FileTextIcon","FileArchiveIcon","FileSpreadsheetIcon","VideoIcon","HeadphonesIcon","ImageIcon","FileIcon","fileIconStyles","tv","FileUploadIcon","IconComponent","jsx","FeatureIcon","fileUploadItemStyles","FileUploadItem","React","onClear","onDownload","className","props","ref","styles","jsxs","TextOverflowTooltip","formatBytes","IconButton","Download","XIcon","FileUploadError","error","errorText","Alert","AlertIcon","AlertCircleIcon","AlertDescription","fileUploadDropAreaIconStyles","FileUploadDropAreaIcon","icon","fileUploadDropAreaStyles","FileUploadDropArea","title","description","children","fileUploadInlineDropAreaStyles","FileUploadInlineDropArea","Fragment","FileUploadClearButton","Button","FileUploadInputZone","isDragging","getInputProps","openFileDialog","handleDragEnter","handleDragLeave","handleDragOver","handleDrop","FileUploadCompactInputZone","fileUploadItemCompactStyles","FileUploadItemCompact","renderIcon","Icon","fileUploadStyles","FileUpload","files","onRemove","onAdd","initialFiles","onChange","helpText","removeBtnText","errorMessages","multiple","constraints","stateFiles","errors","actions","useFileUpload","filesWithPreview","actualFiles","useMemo","handleClearAll","useCallback","handleRemoveFile","index","fileId","f","FileUploadCompact","renderFileIcon","isFirst","isOnly","isLast","itemClassName"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,KAAcC,EAAiB,eAAe;AAAA,EAClD,CAAC,QAAQ,EAAE,GAAG,aAAa,KAAK,SAAQ,CAAE;AAAA,EAC1C,CAAC,QAAQ,EAAE,GAAG,aAAa,KAAK,SAAQ,CAAE;AAAA,EAC1C,CAAC,QAAQ,EAAE,GAAG,WAAW,KAAK,SAAQ,CAAE;AAAA,EACxC,CAAC,QAAQ,EAAE,GAAG,2BAA2B,KAAK,SAAQ,CAAE;AAAA,EACxD;AAAA,IACE;AAAA,IACA,EAAE,GAAG,2EAA2E,KAAK,SAAQ;AAAA,EAC9F;AAAA,EACD,CAAC,UAAU,EAAE,IAAI,MAAM,IAAI,MAAM,GAAG,KAAK,KAAK,SAAU,CAAA;AAC1D,CAAC;ACnBD;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMC,KAAkBD,EAAiB,mBAAmB;AAAA,EAC1D,CAAC,QAAQ,EAAE,GAAG,8DAA8D,KAAK,SAAQ,CAAE;AAAA,EAC3F,CAAC,QAAQ,EAAE,GAAG,2BAA2B,KAAK,SAAQ,CAAE;AAAA,EACxD,CAAC,QAAQ,EAAE,GAAG,WAAW,KAAK,SAAQ,CAAE;AAAA,EACxC,CAAC,QAAQ,EAAE,GAAG,YAAY,KAAK,SAAQ,CAAE;AAAA,EACzC,CAAC,QAAQ,EAAE,GAAG,WAAW,KAAK,SAAQ,CAAE;AAAA,EACxC,CAAC,QAAQ,EAAE,GAAG,YAAY,KAAK,SAAU,CAAA;AAC3C,CAAC;AChBD;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAME,KAAWF,EAAiB,YAAY;AAAA,EAC5C,CAAC,QAAQ,EAAE,GAAG,8DAA8D,KAAK,SAAQ,CAA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ExGiC,EAAO,SAAS,KAAM,gBAAA/D,EAAAiB,GAAA,EAAgB,OAAO8C,GAAQ;AAAA,IAErDI,EAAY,SAAS,KACrB,gBAAAnE,EAAC,SACC,UAAYmE,EAAA,IAAI,CAACjF,GAAMsF,MAAU;AACjC,YAAMK,IAAUL,MAAU,GACpBM,IAASX,EAAY,WAAW,GAChCY,IAASP,MAAUL,EAAY,SAAS;AAE9C,UAAIa,IAAgB;AACpB,aAAIF,IACaE,IAAA,KACNH,IACMG,IAAA,8BACND,IACMC,IAAA,mBAEAA,IAAA,2BAIhB,gBAAAhF;AAAA,QAAC+C;AAAA,QAAA;AAAA,UAEA,MAAA7D;AAAA,UACA,SAAS,MAAMqF,EAAiBrF,GAAMsF,CAAK;AAAA,UAC3C,WAAWQ;AAAA,UACX,YAAYJ,IAAiB1F,CAAI;AAAA,UACjC,YAAAoB;AAAA,QAAA;AAAA,QALKkE;AAAA,MAMN;AAAA,IAAA,CAED,EACF,CAAA;AAAA,EAAA,GAEF;AAEF;AAEAG,GAAkB,cAAc;","x_google_ignoreList":[0,1,2,3,4,5,6]}
|
package/dist/components/form.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as i } from "../FormStack-
|
|
2
|
-
import { a as R, d as w, g as C, f as h, b as _, c as j, e as k, u as I } from "../FormStack-
|
|
1
|
+
import { F as i } from "../FormStack-DO15vBgd.js";
|
|
2
|
+
import { a as R, d as w, g as C, f as h, b as _, c as j, e as k, u as I } from "../FormStack-DO15vBgd.js";
|
|
3
3
|
import { jsx as t } from "react/jsx-runtime";
|
|
4
4
|
import { T as a } from "../index-BVqs-uqP.js";
|
|
5
5
|
import { F as M, d as q, a as z, b as A, e as E } from "../FormHeader--F6b2aRk.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.js","sources":["../../src/components/form/components/form-section-title/FormSectionTitle.tsx","../../src/components/form/components/form-divider/FormDivider.tsx","../../src/components/form/components/form-section-header-button/FormSectionHeaderButton.tsx","../../src/components/form/components/form-field-set/FormFieldSet.tsx"],"sourcesContent":["import { tv } from \"tailwind-variants\";\
|
|
1
|
+
{"version":3,"file":"form.js","sources":["../../src/components/form/components/form-section-title/FormSectionTitle.tsx","../../src/components/form/components/form-divider/FormDivider.tsx","../../src/components/form/components/form-section-header-button/FormSectionHeaderButton.tsx","../../src/components/form/components/form-field-set/FormFieldSet.tsx"],"sourcesContent":["import { tv } from \"tailwind-variants\";\n\nconst formSectionTitle = tv({\n\tbase: \"text-md font-semibold\"\n});\n\nexport interface FormSectionTitleProps {\n\t/** Дочерние элементы */\n\tchildren: React.ReactNode;\n\t/** Дополнительные классы */\n\tclassName?: string;\n\t/**\n\t * HTML тег для заголовка\n\t * @default \"h3\"\n\t */\n\tas?: \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n}\n\n/**\n * Заголовок секции формы\n */\nexport function FormSectionTitle({ children, className, as: Component = \"h3\" }: FormSectionTitleProps) {\n\treturn <Component className={formSectionTitle({ className })}>{children}</Component>;\n}\n","import { Divider } from \"@/components/divider\";\nimport { DividerProps } from \"@/components/divider/Divider\";\nimport React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nconst formDividerStyles = tv({\n\tbase: \"mb-4 mt-4 lg:mb-3.5 lg:mt-5\"\n});\n\n/**\n * Девайдер формы\n */\nexport const FormDivider = React.forwardRef<HTMLDivElement, DividerProps>(({ className, ...props }, ref) => {\n\treturn <Divider ref={ref} className={formDividerStyles({ className })} {...props} />;\n});\n\nFormDivider.displayName = \"FormDivider\";\n","import { Button, ButtonProps } from \"@/components/button\";\nimport React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nconst formSectionHeaderButtonStyles = tv({\n\tslots: {\n\t\tbutton: \"h-full rounded-none p-0\",\n\t\tcontainer: \"leading-none\"\n\t}\n});\n\ntype FormSectionHeaderButtonProps = ButtonProps;\n\n/**\n * Кнопка для отдельной секции\n */\nexport const FormSectionHeaderButton = React.forwardRef<HTMLButtonElement, FormSectionHeaderButtonProps>(\n\t({ className, children, ...props }, ref) => {\n\t\tconst styles = formSectionHeaderButtonStyles();\n\n\t\treturn (\n\t\t\t<Button\n\t\t\t\tref={ref}\n\t\t\t\tcontainerClassName={styles.container()}\n\t\t\t\tclassName={styles.button({ class: className })}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</Button>\n\t\t);\n\t}\n);\n\nFormSectionHeaderButton.displayName = \"FormSectionHeaderButton\";\n","import React from \"react\";\nimport { tv } from \"tailwind-variants\";\nimport { FormStack } from \"../form-stack/FormStack\";\n\nconst formFieldSetStyles = tv({\n\tbase: \"rounded-xl border border-secondary-border p-4 lg:p-6\"\n});\n\n/** Оболочка для группы полей формы с рамкой и внутренними отступами */\nexport const FormFieldSet = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n\t({ className, children, ...props }, ref) => {\n\t\treturn (\n\t\t\t<FormStack ref={ref} className={formFieldSetStyles({ className })} {...props}>\n\t\t\t\t{children}\n\t\t\t</FormStack>\n\t\t);\n\t}\n);\n\nFormFieldSet.displayName = \"FormFieldSet\";\n"],"names":["formSectionTitle","tv","FormSectionTitle","children","className","Component","jsx","formDividerStyles","FormDivider","React","props","ref","Divider","formSectionHeaderButtonStyles","FormSectionHeaderButton","styles","Button","formFieldSetStyles","FormFieldSet","FormStack"],"mappings":";;;;;;;;;AAEA,MAAMA,IAAmBC,EAAG;AAAA,EAC3B,MAAM;AACP,CAAC;AAiBM,SAASC,EAAiB,EAAE,UAAAC,GAAU,WAAAC,GAAW,IAAIC,IAAY,QAA+B;AAC/F,SAAA,gBAAAC,EAACD,KAAU,WAAWL,EAAiB,EAAE,WAAAI,EAAU,CAAC,GAAI,UAAAD,GAAS;AACzE;AClBA,MAAMI,IAAoBN,EAAG;AAAA,EAC5B,MAAM;AACP,CAAC,GAKYO,IAAcC,EAAM,WAAyC,CAAC,EAAE,WAAAL,GAAW,GAAGM,EAAM,GAAGC,MAC5F,gBAAAL,EAACM,GAAQ,EAAA,KAAAD,GAAU,WAAWJ,EAAkB,EAAE,WAAAH,EAAW,CAAA,GAAI,GAAGM,GAAO,CAClF;AAEDF,EAAY,cAAc;ACZ1B,MAAMK,IAAgCZ,EAAG;AAAA,EACxC,OAAO;AAAA,IACN,QAAQ;AAAA,IACR,WAAW;AAAA,EAAA;AAEb,CAAC,GAOYa,IAA0BL,EAAM;AAAA,EAC5C,CAAC,EAAE,WAAAL,GAAW,UAAAD,GAAU,GAAGO,EAAA,GAASC,MAAQ;AAC3C,UAAMI,IAASF,EAA8B;AAG5C,WAAA,gBAAAP;AAAA,MAACU;AAAA,MAAA;AAAA,QACA,KAAAL;AAAA,QACA,oBAAoBI,EAAO,UAAU;AAAA,QACrC,WAAWA,EAAO,OAAO,EAAE,OAAOX,GAAW;AAAA,QAC5C,GAAGM;AAAA,QAEH,UAAAP;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGH;AAEAW,EAAwB,cAAc;AC7BtC,MAAMG,IAAqBhB,EAAG;AAAA,EAC7B,MAAM;AACP,CAAC,GAGYiB,IAAeT,EAAM;AAAA,EACjC,CAAC,EAAE,WAAAL,GAAW,UAAAD,GAAU,GAAGO,EAAA,GAASC,MAElC,gBAAAL,EAACa,GAAU,EAAA,KAAAR,GAAU,WAAWM,EAAmB,EAAE,WAAAb,GAAW,GAAI,GAAGM,GACrE,UAAAP,EACF,CAAA;AAGH;AAEAe,EAAa,cAAc;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-placeholder.js","sources":["../../src/components/image-placeholder/ImagePlaceholder.tsx"],"sourcesContent":["import { VariantsConfig } from \"@/lib/utils/variants\";\
|
|
1
|
+
{"version":3,"file":"image-placeholder.js","sources":["../../src/components/image-placeholder/ImagePlaceholder.tsx"],"sourcesContent":["import { VariantsConfig } from \"@/lib/utils/variants\";\nimport React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nexport interface ImagePlaceholderVariants {\n\tsize?: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n}\n\nconst imagePlaceholderStyles = tv({\n\tbase: \"aspect-square rounded-xl border border-dashed border-primary-border\",\n\tvariants: {\n\t\tsize: {\n\t\t\txs: \"h-[3.75rem] w-[3.75rem]\",\n\t\t\tsm: \"h-20 w-20\",\n\t\t\tmd: \"h-[7.5rem] w-[7.5rem]\",\n\t\t\tlg: \"h-[11.5rem] w-[11.5rem]\",\n\t\t\txl: \"h-96 w-96\"\n\t\t}\n\t} satisfies VariantsConfig<ImagePlaceholderVariants>\n});\n\nexport type ImagePlaceholderProps = React.HTMLAttributes<HTMLDivElement> & ImagePlaceholderVariants;\n\nexport const ImagePlaceholder = React.forwardRef<HTMLDivElement, ImagePlaceholderProps>(\n\t({ className, size, ...props }, ref) => {\n\t\treturn <div ref={ref} className={imagePlaceholderStyles({ className, size })} {...props} />;\n\t}\n);\n\nImagePlaceholder.displayName = \"ImagePlaceholder\";\n"],"names":["imagePlaceholderStyles","tv","ImagePlaceholder","React","className","size","props","ref","jsx"],"mappings":";;;AAQA,MAAMA,IAAyBC,EAAG;AAAA,EACjC,MAAM;AAAA,EACN,UAAU;AAAA,IACT,MAAM;AAAA,MACL,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA;AAAA,EACL;AAEF,CAAC,GAIYC,IAAmBC,EAAM;AAAA,EACrC,CAAC,EAAE,WAAAC,GAAW,MAAAC,GAAM,GAAGC,EAAA,GAASC,MACxB,gBAAAC,EAAC,OAAI,EAAA,KAAAD,GAAU,WAAWP,EAAuB,EAAE,WAAAI,GAAW,MAAAC,EAAK,CAAC,GAAI,GAAGC,EAAO,CAAA;AAE3F;AAEAJ,EAAiB,cAAc;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-preview.js","sources":["../../node_modules/.pnpm/lucide-react@0.460.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/image-off.js","../../src/components/image-uploader/components/ImageUploaderButton.tsx","../../src/components/image-preview/ImagePreview.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.460.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst ImageOff = createLucideIcon(\"ImageOff\", [\n [\"line\", { x1: \"2\", x2: \"22\", y1: \"2\", y2: \"22\", key: \"a6p6uj\" }],\n [\"path\", { d: \"M10.41 10.41a2 2 0 1 1-2.83-2.83\", key: \"1bzlo9\" }],\n [\"line\", { x1: \"13.5\", x2: \"6\", y1: \"13.5\", y2: \"21\", key: \"1q0aeu\" }],\n [\"line\", { x1: \"18\", x2: \"21\", y1: \"12\", y2: \"15\", key: \"5mozeu\" }],\n [\n \"path\",\n {\n d: \"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59\",\n key: \"mmje98\"\n }\n ],\n [\"path\", { d: \"M21 15V5a2 2 0 0 0-2-2H9\", key: \"43el77\" }]\n]);\n\nexport { ImageOff as default };\n//# sourceMappingURL=image-off.js.map\n","import { Button } from \"@/components/button\";\
|
|
1
|
+
{"version":3,"file":"image-preview.js","sources":["../../node_modules/.pnpm/lucide-react@0.460.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/image-off.js","../../src/components/image-uploader/components/ImageUploaderButton.tsx","../../src/components/image-preview/ImagePreview.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.460.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst ImageOff = createLucideIcon(\"ImageOff\", [\n [\"line\", { x1: \"2\", x2: \"22\", y1: \"2\", y2: \"22\", key: \"a6p6uj\" }],\n [\"path\", { d: \"M10.41 10.41a2 2 0 1 1-2.83-2.83\", key: \"1bzlo9\" }],\n [\"line\", { x1: \"13.5\", x2: \"6\", y1: \"13.5\", y2: \"21\", key: \"1q0aeu\" }],\n [\"line\", { x1: \"18\", x2: \"21\", y1: \"12\", y2: \"15\", key: \"5mozeu\" }],\n [\n \"path\",\n {\n d: \"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59\",\n key: \"mmje98\"\n }\n ],\n [\"path\", { d: \"M21 15V5a2 2 0 0 0-2-2H9\", key: \"43el77\" }]\n]);\n\nexport { ImageOff as default };\n//# sourceMappingURL=image-off.js.map\n","import { Button } from \"@/components/button\";\nimport { Icon } from \"@/components/icon\";\nimport { LucideIcon } from \"lucide-react\";\nimport React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nconst imageUploaderButtonStyles = tv({\n\tslots: {\n\t\tcontainer: \"h-4 w-4 rounded-full border border-muted bg-primary-bg p-1\",\n\t\ticon: \"h-2 w-2 stroke-[3px] text-muted\"\n\t}\n});\n\nexport type ImageUploaderButtonProps = React.HTMLAttributes<HTMLButtonElement> & {\n\ticon: LucideIcon;\n};\n\nexport const ImageUploaderButton = React.forwardRef<HTMLButtonElement, ImageUploaderButtonProps>(\n\t({ className, onClick, icon, ...props }, ref) => {\n\t\tconst styles = imageUploaderButtonStyles();\n\n\t\treturn (\n\t\t\t<Button\n\t\t\t\tvariant=\"outline\"\n\t\t\t\tref={ref}\n\t\t\t\tclassName={styles.container({ className })}\n\t\t\t\tonClick={onClick}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t<Icon className={styles.icon()} icon={icon} />\n\t\t\t</Button>\n\t\t);\n\t}\n);\n\nImageUploaderButton.displayName = \"ImageUploaderButton\";\n","import React, { useCallback, KeyboardEvent } from \"react\";\nimport { tv } from \"tailwind-variants\";\nimport { ImageUploaderButton } from \"../image-uploader/components/ImageUploaderButton\";\nimport { Download, ImageOff, RotateCw, X } from \"lucide-react\";\nimport { Icon } from \"../icon\";\nimport { VariantsConfig } from \"@/lib/utils/variants\";\n\nexport interface ImagePreviewVariants {\n\tsize?: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n\terror?: boolean;\n}\n\nconst imagePreviewStyles = tv({\n\tslots: {\n\t\tcontainer:\n\t\t\t\"group relative flex aspect-square cursor-pointer items-center justify-center rounded-xl outline-none focus-visible:shadow-focus\",\n\t\timage: \"aspect-square h-full rounded-xl\",\n\t\tbuttonWrapper: \"absolute right-1 top-1 flex gap-1\",\n\t\ticon: \"h-8 w-8 stroke-[1.5px] text-muted\",\n\t\toverlay: \"absolute inset-0 rounded-xl group-hover:bg-slate-900/20\"\n\t},\n\tvariants: {\n\t\terror: {\n\t\t\ttrue: {\n\t\t\t\tcontainer:\n\t\t\t\t\t\"border border-status-error-secondary-border hover:border-status-error-primary-border hover:bg-status-error-bg focus-visible:border-status-error-secondary-border focus-visible:shadow-focus-error\"\n\t\t\t}\n\t\t},\n\t\tsize: {\n\t\t\txs: { container: \"h-[3.75rem] w-[3.75rem]\" },\n\t\t\tsm: { container: \"h-20 w-20\" },\n\t\t\tmd: { container: \"h-[7.5rem] w-[7.5rem]\" },\n\t\t\tlg: { container: \"h-[11.5rem] w-[11.5rem]\" },\n\t\t\txl: { container: \"h-96 w-96\" }\n\t\t}\n\t} satisfies VariantsConfig<ImagePreviewVariants>\n});\n\nexport type ImagePreviewProps = Omit<React.HTMLAttributes<HTMLDivElement>, \"onClick\"> &\n\tImagePreviewVariants & {\n\t\turl: string;\n\t\talt: string;\n\t\treadonly?: boolean;\n\t\tonImageClick?: (e: React.MouseEvent<HTMLDivElement> | KeyboardEvent<HTMLDivElement>) => void;\n\t\tonDownload?: (url: string) => void;\n\t\tonRetry?: () => void;\n\t\tonClear?: () => void;\n\t};\n\nexport const ImagePreview = React.forwardRef<HTMLDivElement, ImagePreviewProps>(\n\t({ className, error, readonly, onClear, onRetry, size, url, alt, onImageClick, onDownload, ...props }, ref) => {\n\t\tconst styles = imagePreviewStyles({ className, size, error });\n\n\t\tconst handleDownload = useCallback(\n\t\t\t(e: React.MouseEvent<HTMLButtonElement>) => {\n\t\t\t\te.preventDefault();\n\t\t\t\te.stopPropagation();\n\t\t\t\tonDownload?.(url);\n\t\t\t},\n\t\t\t[onDownload, url]\n\t\t);\n\n\t\tconst handleClear = useCallback(\n\t\t\t(e: React.MouseEvent<HTMLButtonElement>) => {\n\t\t\t\te.preventDefault();\n\t\t\t\te.stopPropagation();\n\t\t\t\tonClear?.();\n\t\t\t},\n\t\t\t[onClear]\n\t\t);\n\n\t\tconst handleRetry = useCallback(\n\t\t\t(e: React.MouseEvent<HTMLButtonElement>) => {\n\t\t\t\te.preventDefault();\n\t\t\t\te.stopPropagation();\n\t\t\t\tonRetry?.();\n\t\t\t},\n\t\t\t[onRetry]\n\t\t);\n\n\t\tconst handleKeyDown = useCallback(\n\t\t\t(e: KeyboardEvent<HTMLDivElement>) => {\n\t\t\t\tif (e.key === \"Enter\" || e.key === \" \") {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tonImageClick?.(e);\n\t\t\t\t}\n\t\t\t},\n\t\t\t[onImageClick]\n\t\t);\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\trole=\"button\"\n\t\t\t\ttabIndex={0}\n\t\t\t\tonClick={onImageClick}\n\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\tclassName={styles.container()}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{!error && <img src={url} alt={alt} className={styles.image()} />}\n\t\t\t\t{!error && <div className={styles.overlay()} />}\n\n\t\t\t\t{error && <Icon icon={ImageOff} className={styles.icon()} />}\n\n\t\t\t\t<div className={styles.buttonWrapper()}>\n\t\t\t\t\t{!error && onDownload && <ImageUploaderButton icon={Download} onClick={handleDownload} />}\n\t\t\t\t\t{error && onRetry && <ImageUploaderButton icon={RotateCw} onClick={handleRetry} />}\n\t\t\t\t\t{!readonly && onClear && <ImageUploaderButton icon={X} onClick={handleClear} />}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n);\n\nImagePreview.displayName = \"ImagePreview\";\n"],"names":["ImageOff","createLucideIcon","imageUploaderButtonStyles","tv","ImageUploaderButton","React","className","onClick","icon","props","ref","styles","jsx","Button","Icon","imagePreviewStyles","ImagePreview","error","readonly","onClear","onRetry","size","url","alt","onImageClick","onDownload","handleDownload","useCallback","handleClear","handleRetry","handleKeyDown","jsxs","Download","RotateCw","X"],"mappings":";;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAWC,EAAiB,YAAY;AAAA,EAC5C,CAAC,QAAQ,EAAE,IAAI,KAAK,IAAI,MAAM,IAAI,KAAK,IAAI,MAAM,KAAK,SAAQ,CAAE;AAAA,EAChE,CAAC,QAAQ,EAAE,GAAG,oCAAoC,KAAK,SAAQ,CAAE;AAAA,EACjE,CAAC,QAAQ,EAAE,IAAI,QAAQ,IAAI,KAAK,IAAI,QAAQ,IAAI,MAAM,KAAK,SAAQ,CAAE;AAAA,EACrE,CAAC,QAAQ,EAAE,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,KAAK,SAAQ,CAAE;AAAA,EAClE;AAAA,IACE;AAAA,IACA;AAAA,MACE,GAAG;AAAA,MACH,KAAK;AAAA,IACX;AAAA,EACG;AAAA,EACD,CAAC,QAAQ,EAAE,GAAG,4BAA4B,KAAK,SAAU,CAAA;AAC3D,CAAC,GChBKC,IAA4BC,EAAG;AAAA,EACpC,OAAO;AAAA,IACN,WAAW;AAAA,IACX,MAAM;AAAA,EAAA;AAER,CAAC,GAMYC,IAAsBC,EAAM;AAAA,EACxC,CAAC,EAAE,WAAAC,GAAW,SAAAC,GAAS,MAAAC,GAAM,GAAGC,KAASC,MAAQ;AAChD,UAAMC,IAAST,EAA0B;AAGxC,WAAA,gBAAAU;AAAA,MAACC;AAAA,MAAA;AAAA,QACA,SAAQ;AAAA,QACR,KAAAH;AAAA,QACA,WAAWC,EAAO,UAAU,EAAE,WAAAL,GA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components/image-uploader/components/ImageCameraAddSvg.tsx","../../src/components/image-uploader/ImageUploader.tsx"],"sourcesContent":["interface ImageCameraAddProps {\
|
|
1
|
+
{"version":3,"file":"image-uploader.js","sources":["../../src/components/image-uploader/components/ImageCameraAddSvg.tsx","../../src/components/image-uploader/ImageUploader.tsx"],"sourcesContent":["interface ImageCameraAddProps {\n\tclassName?: string;\n}\n\nexport const ImageCameraAddSvg = ({ className }: ImageCameraAddProps) => {\n\treturn (\n\t\t<svg\n\t\t\twidth=\"33\"\n\t\t\theight=\"29\"\n\t\t\tviewBox=\"0 0 33 29\"\n\t\t\tclassName={className}\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t>\n\t\t\t<path\n\t\t\t\td=\"M27.4463 16.9258C27.9982 16.926 28.4461 17.3739 28.4463 17.9258V21.5322H31.9746C32.5266 21.5325 32.9746 21.9801 32.9746 22.5322C32.9743 23.0841 32.5265 23.5319 31.9746 23.5322H28.4463V27.1377C28.4461 27.6896 27.9982 28.1374 27.4463 28.1377C26.8941 28.1377 26.4465 27.6898 26.4463 27.1377V23.5322H22.918C22.3659 23.5322 21.9182 23.0843 21.918 22.5322C21.918 21.9799 22.3657 21.5322 22.918 21.5322H26.4463V17.9258C26.4465 17.3737 26.8941 16.9258 27.4463 16.9258ZM17.6523 0.0449219C17.9098 0.0739444 18.1484 0.202586 18.3145 0.405273L21.3164 4.06934H24.8047L24.9863 4.07324C25.8909 4.11901 26.7469 4.50459 27.3857 5.1543C28.0666 5.8469 28.4463 6.78361 28.4463 7.75586V12.2402C28.4462 12.7923 27.9983 13.24 27.4463 13.2402C26.894 13.2402 26.4463 12.7925 26.4463 12.2402V7.75586C26.4463 7.30322 26.2686 6.87167 25.959 6.55664C25.6885 6.28172 25.3364 6.11468 24.9648 6.07715L24.8047 6.06934H20.8428C20.5434 6.06934 20.2593 5.93454 20.0693 5.70312L17.0664 2.03906H11.4102L8.4082 5.70312C8.21833 5.93464 7.93419 6.06925 7.63477 6.06934H3.67285C3.24307 6.06934 2.82676 6.24223 2.51758 6.55664C2.20786 6.87168 2.03125 7.30316 2.03125 7.75586V19.8447C2.03127 20.2974 2.20792 20.7289 2.51758 21.0439C2.82675 21.3583 3.2431 21.5322 3.67285 21.5322H17.6348L17.7373 21.5371C18.2412 21.5886 18.6348 22.0147 18.6348 22.5322C18.6345 23.0495 18.2411 23.4749 17.7373 23.5264L17.6348 23.5322H3.67285C2.70169 23.5322 1.77333 23.1393 1.0918 22.4463C0.410823 21.7537 0.03127 20.817 0.03125 19.8447V7.75586C0.03125 6.78353 0.410805 5.84692 1.0918 5.1543C1.77333 4.46129 2.70169 4.06934 3.67285 4.06934H7.16113L10.1631 0.405273L10.2393 0.323242C10.4248 0.142425 10.6745 0.0391387 10.9365 0.0390625H17.54L17.6523 0.0449219ZM14.2383 8.09863C16.9946 8.09879 19.2012 10.3671 19.2012 13.1289C19.201 15.8906 16.9945 18.158 14.2383 18.1582C11.4821 18.158 9.2765 15.8906 9.27637 13.1289C9.27637 10.3671 11.482 8.09885 14.2383 8.09863ZM14.2383 10.0986C12.6184 10.0988 11.2764 11.4397 11.2764 13.1289C11.2765 14.818 12.6184 16.158 14.2383 16.1582C15.8582 16.158 17.201 14.8181 17.2012 13.1289C17.2012 11.4396 15.8582 10.0988 14.2383 10.0986Z\"\n\t\t\t\tfill=\"currentColor\"\n\t\t\t/>\n\t\t</svg>\n\t);\n};\n","import React, { useRef } from \"react\";\nimport { tv } from \"tailwind-variants\";\nimport { ImageCameraAddSvg } from \"./components/ImageCameraAddSvg\";\nimport { Button } from \"../button\";\nimport { Image } from \"lucide-react\";\nimport { Icon } from \"../icon\";\nimport { cn } from \"@/lib/utils\";\nimport { VariantsConfig } from \"@/lib/utils/variants\";\n\nexport interface ImageUploaderVariants {\n\treadonly?: boolean;\n\terror?: boolean;\n\tsize?: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n}\n\nconst imageUploaderStyles = tv({\n\tslots: {\n\t\tcontainer:\n\t\t\t\"group relative flex aspect-square items-center justify-center rounded-xl p-6 hover:shadow-soft-base focus-visible:shadow-focus focus-visible:ring-0\",\n\t\ticon: \"h-8 w-8 stroke-[1.5px] text-muted group-hover:text-primary\",\n\t\tinput: \"hidden\",\n\t\t// Кастомная иконка для состояния загрузки с фиксированными размерами (35 и 33px) и небольшим смещением для визуального баланса\n\t\tcustomIcon: \"h-[2.1875rem] w-[2.0625rem] translate-x-0.5 translate-y-0.5\"\n\t},\n\tvariants: {\n\t\treadonly: {\n\t\t\ttrue: {\n\t\t\t\tcontainer:\n\t\t\t\t\t\"cursor-default bg-secondary-bg-hover hover:border-secondary-border hover:shadow-soft-sm focus-visible:bg-secondary-bg-hover\",\n\t\t\t\ticon: \"group-hover:text-muted\"\n\t\t\t}\n\t\t},\n\t\terror: {\n\t\t\ttrue: {\n\t\t\t\tcontainer:\n\t\t\t\t\t\"border-status-error-secondary-border hover:border-status-error-primary-border hover:bg-status-error-bg focus-visible:border-status-error-secondary-border focus-visible:shadow-focus-error\",\n\t\t\t\ticon: \"group-hover:text-muted\"\n\t\t\t}\n\t\t},\n\t\tsize: {\n\t\t\txs: { container: \"h-[3.75rem] w-[3.75rem]\" },\n\t\t\tsm: { container: \"h-20 w-20\" },\n\t\t\tmd: { container: \"h-[7.5rem] w-[7.5rem]\" },\n\t\t\tlg: { container: \"h-[11.5rem] w-[11.5rem]\" },\n\t\t\txl: { container: \"h-96 w-96\" }\n\t\t}\n\t} satisfies VariantsConfig<ImageUploaderVariants>\n});\n\nexport type ImageUploaderProps = Omit<React.ComponentPropsWithoutRef<typeof Button>, \"onChange\"> &\n\tImageUploaderVariants & {\n\t\tonChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n\t\twhiteList?: string;\n\t};\n\nexport const ImageUploader = React.forwardRef<HTMLButtonElement, ImageUploaderProps>(\n\t({ className, error, readonly, size, onChange, whiteList = \"image/*\", ...props }, ref) => {\n\t\tconst fileInputRef = useRef<HTMLInputElement>(null);\n\t\tconst styles = imageUploaderStyles({ className, readonly, error, size });\n\n\t\treturn (\n\t\t\t<Button\n\t\t\t\tref={ref}\n\t\t\t\ttype=\"button\"\n\t\t\t\tvariant=\"outline\"\n\t\t\t\tclassName={styles.container()}\n\t\t\t\tonClick={() => !readonly && fileInputRef.current?.click()}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t<input\n\t\t\t\t\tref={fileInputRef}\n\t\t\t\t\ttype=\"file\"\n\t\t\t\t\tclassName={styles.input()}\n\t\t\t\t\tonChange={onChange}\n\t\t\t\t\taccept={whiteList}\n\t\t\t\t/>\n\n\t\t\t\t{readonly && <Icon icon={Image} className={styles.icon()} />}\n\t\t\t\t{!readonly && <ImageCameraAddSvg className={cn(styles.icon(), styles.customIcon())} />}\n\t\t\t</Button>\n\t\t);\n\t}\n);\n\nImageUploader.displayName = \"ImageUploader\";\n"],"names":["ImageCameraAddSvg","className","jsx","imageUploaderStyles","tv","ImageUploader","React","error","readonly","size","onChange","whiteList","props","ref","fileInputRef","useRef","styles","jsxs","Button","Icon","Image","cn"],"mappings":";;;;;;;AAIO,MAAMA,IAAoB,CAAC,EAAE,WAAAC,QAElC,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACA,OAAM;AAAA,IACN,QAAO;AAAA,IACP,SAAQ;AAAA,IACR,WAAAD;AAAA,IACA,MAAK;AAAA,IACL,OAAM;AAAA,IAEN,UAAA,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QACA,GAAE;AAAA,QACF,MAAK;AAAA,MAAA;AAAA,IAAA;AAAA,EACN;AACD,GCHIC,IAAsBC,EAAG;AAAA,EAC9B,OAAO;AAAA,IACN,WACC;AAAA,IACD,MAAM;AAAA,IACN,OAAO;AAAA;AAAA,IAEP,YAAY;AAAA,EACb;AAAA,EACA,UAAU;AAAA,IACT,UAAU;AAAA,MACT,MAAM;AAAA,QACL,WACC;AAAA,QACD,MAAM;AAAA,MAAA;AAAA,IAER;AAAA,IAC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;AAEAX,EAAc,cAAc;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","sources":["../../node_modules/.pnpm/lucide-react@0.460.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/eye-off.js","../../node_modules/.pnpm/lucide-react@0.460.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/eye.js","../../src/components/input/input/Input.tsx","../../src/components/input/web-input/WebInput.tsx","../../src/lib/utils/file/downloadFile.ts","../../src/components/input/file-input/FileInput.tsx","../../src/components/input/secret-input/SecretInput.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.460.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst EyeOff = createLucideIcon(\"EyeOff\", [\n [\n \"path\",\n {\n d: \"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49\",\n key: \"ct8e1f\"\n }\n ],\n [\"path\", { d: \"M14.084 14.158a3 3 0 0 1-4.242-4.242\", key: \"151rxh\" }],\n [\n \"path\",\n {\n d: \"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143\",\n key: \"13bj9a\"\n }\n ],\n [\"path\", { d: \"m2 2 20 20\", key: \"1ooewy\" }]\n]);\n\nexport { EyeOff as default };\n//# sourceMappingURL=eye-off.js.map\n","/**\n * @license lucide-react v0.460.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Eye = createLucideIcon(\"Eye\", [\n [\n \"path\",\n {\n d: \"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0\",\n key: \"1nclc0\"\n }\n ],\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"3\", key: \"1v7zrd\" }]\n]);\n\nexport { Eye as default };\n//# sourceMappingURL=eye.js.map\n","import React, { useRef } from \"react\";\r\nimport { useMergeRefs } from \"../../../hooks/useMergeRefs\";\r\nimport { useCustomValidity } from \"../../../hooks/useCustomValidity\";\r\nimport { inputBaseControlStyles } from \"../styles/inputBaseStyles\";\r\nimport { tv } from \"tailwind-variants\";\r\n\r\nexport type InputProps = React.ComponentProps<\"input\"> & {\r\n\t/** Текст сообщения об ошибке. При наличии делает поле невалидным */\r\n\terror?: string;\r\n};\r\n\r\nconst inputStyles = tv({\r\n\textend: inputBaseControlStyles,\r\n\tbase: \"h-10 lg:h-9\"\r\n});\r\n\r\n/**\r\n * Стилизованный базовый компонент для создания инпутов.\r\n */\r\nexport const Input = React.forwardRef<HTMLInputElement, InputProps>(\r\n\t({ type = \"text\", className, error, ...other }, ref) => {\r\n\t\tconst inputRef = useRef<HTMLInputElement>(null);\r\n\t\tconst mergedRef = useMergeRefs(inputRef, ref);\r\n\r\n\t\tuseCustomValidity(inputRef, error);\r\n\r\n\t\treturn (\r\n\t\t\t<input\r\n\t\t\t\ttype={type}\r\n\t\t\t\tclassName={inputStyles({ className })}\r\n\t\t\t\tref={mergedRef}\r\n\t\t\t\taria-invalid={!!error}\r\n\t\t\t\t{...other}\r\n\t\t\t/>\r\n\t\t);\r\n\t}\r\n);\r\n\r\nInput.displayName = \"Input\";\r\n\r\nexport default Input;\r\n","import React from \"react\";\r\nimport { useMergeRefs } from \"@/hooks/useMergeRefs\";\r\nimport { useInputWithActions } from \"@/hooks/useInputWithActions\";\r\nimport { InputGroup, InputGroupInput, InputGroupText, InputGroupButton } from \"../input-group/InputGroup\";\r\nimport { CircleX, Copy, Check } from \"lucide-react\";\r\nimport { tv } from \"tailwind-variants\";\r\n\r\nconst webInputStyles = tv({\r\n\tbase: \"group\",\r\n\tslots: {\r\n\t\taction: \"opacity-0 group-focus-within:opacity-100 group-hover:opacity-100\"\r\n\t}\r\n});\r\n\r\nexport interface WebInputProps extends Omit<React.ComponentProps<\"input\">, \"onChange\"> {\r\n\t/** Содержимое в начале поля (например, префикс URL) */\r\n\tstartContent?: React.ReactNode;\r\n\t/** Флаг для отображения кнопки очистки значения */\r\n\tshowClearIcon?: boolean;\r\n\t/** Флаг для отображения кнопки копирования значения */\r\n\tshowCopyIcon?: boolean;\r\n\t/** Колбэк на изменение значения */\r\n\tonChange?: (value: string | null) => void;\r\n\t/** Текст сообщения об ошибке */\r\n\terror?: string;\r\n}\r\n\r\nexport const WebInput = React.forwardRef<HTMLInputElement, WebInputProps>(\r\n\t(\r\n\t\t{\r\n\t\t\tstartContent = \"https://\",\r\n\t\t\tshowClearIcon = true,\r\n\t\t\tshowCopyIcon = true,\r\n\t\t\tvalue,\r\n\t\t\tdefaultValue,\r\n\t\t\tonChange,\r\n\t\t\treadOnly,\r\n\t\t\tdisabled,\r\n\t\t\terror,\r\n\t\t\tclassName,\r\n\t\t\t...props\r\n\t\t},\r\n\t\tref\r\n\t) => {\r\n\t\tconst styles = webInputStyles();\r\n\r\n\t\tconst inputActions = useInputWithActions({\r\n\t\t\tvalue,\r\n\t\t\tdefaultValue,\r\n\t\t\tonChange,\r\n\t\t\treadOnly,\r\n\t\t\tdisabled,\r\n\t\t\tshowClearIcon,\r\n\t\t\tshowCopyIcon\r\n\t\t});\r\n\r\n\t\tconst mergedRef = useMergeRefs(ref, inputActions.inputRef);\r\n\r\n\t\treturn (\r\n\t\t\t<InputGroup className={styles.base({ className })}>\r\n\t\t\t\t{startContent != null && <InputGroupText type=\"primary\">{startContent}</InputGroupText>}\r\n\r\n\t\t\t\t<InputGroupInput\r\n\t\t\t\t\tref={mergedRef}\r\n\t\t\t\t\tvalue={value}\r\n\t\t\t\t\tdefaultValue={defaultValue}\r\n\t\t\t\t\tonChange={inputActions.handleChange}\r\n\t\t\t\t\treadOnly={readOnly}\r\n\t\t\t\t\tdisabled={disabled}\r\n\t\t\t\t\terror={error}\r\n\t\t\t\t\t{...props}\r\n\t\t\t\t/>\r\n\r\n\t\t\t\t{inputActions.shouldShowClearIcon && (\r\n\t\t\t\t\t<InputGroupButton\r\n\t\t\t\t\t\ticon={CircleX}\r\n\t\t\t\t\t\tonClick={inputActions.handleClear}\r\n\t\t\t\t\t\ttype=\"button\"\r\n\t\t\t\t\t\tclassName={styles.action()}\r\n\t\t\t\t\t/>\r\n\t\t\t\t)}\r\n\r\n\t\t\t\t{inputActions.shouldShowCopyIcon && (\r\n\t\t\t\t\t<InputGroupButton\r\n\t\t\t\t\t\ticon={inputActions.hasCopied ? Check : Copy}\r\n\t\t\t\t\t\tonClick={inputActions.handleCopy}\r\n\t\t\t\t\t\ttype=\"button\"\r\n\t\t\t\t\t\tclassName={styles.action()}\r\n\t\t\t\t\t/>\r\n\t\t\t\t)}\r\n\t\t\t</InputGroup>\r\n\t\t);\r\n\t}\r\n);\r\n\r\nWebInput.displayName = \"WebInput\";\r\n\r\nexport default WebInput;\r\n","import { FileValue } from \"@/components/input\";\r\n\r\nexport function downloadFile(value: FileValue) {\r\n\tif (!value) return;\r\n\r\n\tif (value instanceof File) {\r\n\t\t// Логика для браузерного File объекта\r\n\t\tconst url = URL.createObjectURL(value);\r\n\t\tconst link = document.createElement(\"a\");\r\n\t\tlink.href = url;\r\n\t\tlink.download = value.name;\r\n\t\tdocument.body.appendChild(link);\r\n\t\tlink.click();\r\n\t\tdocument.body.removeChild(link);\r\n\t\t// Освобождаем память\r\n\t\tURL.revokeObjectURL(url);\r\n\t} else if (value.url) {\r\n\t\t// Логика для FileInfo с URL\r\n\t\tconst link = document.createElement(\"a\");\r\n\t\tlink.href = value.url;\r\n\t\tlink.download = value.name;\r\n\t\tlink.target = \"_blank\";\r\n\t\tdocument.body.appendChild(link);\r\n\t\tlink.click();\r\n\t\tdocument.body.removeChild(link);\r\n\t}\r\n}\r\n","import React, { useRef, useCallback, useState, useEffect } from \"react\";\r\nimport { useMergeRefs } from \"@/hooks/useMergeRefs\";\r\nimport { InputGroup, InputGroupButton, InputGroupText } from \"../input-group/InputGroup\";\r\nimport { CircleX, Download } from \"lucide-react\";\r\nimport { tv } from \"tailwind-variants\";\r\nimport { downloadFile } from \"@/lib/utils/file/downloadFile\";\r\n\r\nconst fileInputStyles = tv({\r\n\tbase: \"group relative cursor-pointer\",\r\n\tslots: {\r\n\t\taction: \"opacity-0 group-focus-within:opacity-100 group-hover:opacity-100\",\r\n\t\tfileDisplay:\r\n\t\t\t\"flex min-w-0 flex-1 items-center truncate bg-transparent px-3 py-2.5 italic text-primary-fg lg:py-2\",\r\n\t\tplaceholder: \"text-muted\"\r\n\t}\r\n});\r\n\r\n/** Упрощенная информация о файле */\r\nexport interface FileInfo {\r\n\t/** id файла */\r\n\tid: number;\r\n\t/** Имя файла */\r\n\tname: string;\r\n\t/** URL для скачивания или просмотра файла */\r\n\turl: string;\r\n\t/** Размер файла в байтах (опционально) */\r\n\tsize?: number;\r\n\t/** MIME-тип файла (опционально) */\r\n\ttype?: string;\r\n}\r\n\r\n/** Тип файла - либо браузерный File, либо упрощенная FileInfo */\r\nexport type FileValue = File | FileInfo | null;\r\n\r\nexport interface FileInputProps\r\n\textends Omit<React.ComponentProps<\"input\">, \"type\" | \"onChange\" | \"value\" | \"defaultValue\"> {\r\n\t/** Текущий файл (для controlled режима) */\r\n\tvalue?: FileValue;\r\n\t/** Файл по умолчанию (для uncontrolled режима) */\r\n\tdefaultValue?: FileValue;\r\n\t/** Флаг для отображения кнопки очистки значения */\r\n\tshowClearIcon?: boolean;\r\n\t/** Колбэк на изменение файла */\r\n\tonChange?: (file: FileValue) => void;\r\n\t/** Текст сообщения об ошибке */\r\n\terror?: string;\r\n\t/** Плейсхолдер для отображения когда файл не выбран */\r\n\tplaceholder?: string;\r\n\t/** Текст кнопки выбора файла */\r\n\tchooseButtonText?: string;\r\n}\r\n\r\nexport const FileInput = React.forwardRef<HTMLInputElement, FileInputProps>(\r\n\t(\r\n\t\t{\r\n\t\t\tvalue,\r\n\t\t\tdefaultValue,\r\n\t\t\tshowClearIcon = true,\r\n\t\t\tonChange,\r\n\t\t\tdisabled,\r\n\t\t\terror,\r\n\t\t\tclassName,\r\n\t\t\tplaceholder = \"File not selected\",\r\n\t\t\tchooseButtonText = \"Choose file\",\r\n\t\t\taccept,\r\n\t\t\t...props\r\n\t\t},\r\n\t\tref\r\n\t) => {\r\n\t\tconst styles = fileInputStyles();\r\n\t\tconst inputRef = useRef<HTMLInputElement>(null);\r\n\t\tconst [internalValue, setInternalValue] = useState<FileValue>(defaultValue || null);\r\n\r\n\t\tconst mergedRef = useMergeRefs(ref, inputRef);\r\n\r\n\t\t// Определяем, находимся ли мы в controlled режиме\r\n\t\tconst isControlled = value !== undefined;\r\n\t\tconst currentValue = isControlled ? value : internalValue;\r\n\r\n\t\t// Синхронизируем внутреннее состояние с defaultValue при изменении\r\n\t\tuseEffect(() => {\r\n\t\t\tif (!isControlled && defaultValue !== undefined) {\r\n\t\t\t\tsetInternalValue(defaultValue);\r\n\t\t\t}\r\n\t\t}, [defaultValue, isControlled]);\r\n\r\n\t\tconst handleFileChange = useCallback(\r\n\t\t\t(event: React.ChangeEvent<HTMLInputElement>) => {\r\n\t\t\t\tconst file = event.target.files?.[0] || null;\r\n\r\n\t\t\t\tif (!isControlled) {\r\n\t\t\t\t\tsetInternalValue(file);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tonChange?.(file);\r\n\t\t\t},\r\n\t\t\t[onChange, isControlled]\r\n\t\t);\r\n\r\n\t\tconst handleClear = useCallback(\r\n\t\t\t(e: React.MouseEvent) => {\r\n\t\t\t\te.stopPropagation();\r\n\t\t\t\tif (inputRef.current) {\r\n\t\t\t\t\tinputRef.current.value = \"\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!isControlled) {\r\n\t\t\t\t\tsetInternalValue(null);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tonChange?.(null);\r\n\t\t\t},\r\n\t\t\t[onChange, isControlled]\r\n\t\t);\r\n\r\n\t\tconst handleChooseFile = useCallback(() => {\r\n\t\t\tif (!currentValue) {\r\n\t\t\t\tinputRef.current?.click();\r\n\t\t\t}\r\n\t\t}, [currentValue]);\r\n\r\n\t\tconst handleDownload = useCallback(() => downloadFile(currentValue), [currentValue]);\r\n\r\n\t\tconst shouldShowClearIcon = showClearIcon && currentValue && !disabled;\r\n\t\tconst shouldShowDownloadIcon =\r\n\t\t\tcurrentValue && (currentValue instanceof File || (!(currentValue instanceof File) && currentValue.url));\r\n\r\n\t\t// Получаем имя файла для отображения\r\n\t\tconst getFileName = (fileValue: FileValue): string | null => {\r\n\t\t\tif (!fileValue) return null;\r\n\t\t\tif (fileValue instanceof File) {\r\n\t\t\t\treturn fileValue.name;\r\n\t\t\t}\r\n\t\t\treturn fileValue.name;\r\n\t\t};\r\n\r\n\t\tconst fileName = getFileName(currentValue);\r\n\r\n\t\treturn (\r\n\t\t\t<InputGroup className={styles.base({ className })} onClick={handleChooseFile}>\r\n\t\t\t\t<InputGroupText type=\"primary\">{chooseButtonText}</InputGroupText>\r\n\r\n\t\t\t\t<div className={styles.fileDisplay()}>\r\n\t\t\t\t\t{fileName ? <span>{fileName}</span> : <span className={styles.placeholder()}>{placeholder}</span>}\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t{shouldShowClearIcon && (\r\n\t\t\t\t\t<InputGroupButton icon={CircleX} onClick={handleClear} type=\"button\" className={styles.action()} />\r\n\t\t\t\t)}\r\n\r\n\t\t\t\t{shouldShowDownloadIcon && (\r\n\t\t\t\t\t<InputGroupButton\r\n\t\t\t\t\t\ticon={Download}\r\n\t\t\t\t\t\tonClick={handleDownload}\r\n\t\t\t\t\t\ttype=\"button\"\r\n\t\t\t\t\t\tclassName={styles.action()}\r\n\t\t\t\t\t/>\r\n\t\t\t\t)}\r\n\r\n\t\t\t\t<input\r\n\t\t\t\t\tref={mergedRef}\r\n\t\t\t\t\ttype=\"file\"\r\n\t\t\t\t\tonChange={handleFileChange}\r\n\t\t\t\t\tdisabled={disabled}\r\n\t\t\t\t\taccept={accept}\r\n\t\t\t\t\tclassName=\"sr-only\"\r\n\t\t\t\t\taria-invalid={!!error}\r\n\t\t\t\t\t{...props}\r\n\t\t\t\t/>\r\n\t\t\t</InputGroup>\r\n\t\t);\r\n\t}\r\n);\r\n\r\nFileInput.displayName = \"FileInput\";\r\n\r\nexport default FileInput;\r\n","import { useInputWithActions } from \"@/hooks/useInputWithActions\";\r\nimport { useMergeRefs } from \"@/hooks/useMergeRefs\";\r\nimport { Check, CircleX, Copy, Eye, EyeOff } from \"lucide-react\";\r\nimport React, { HTMLAttributes, useCallback, useState } from \"react\";\r\nimport { InputGroup, InputGroupButton, InputGroupInput } from \"../input-group/InputGroup\";\r\nimport { InputProps } from \"../input/Input\";\r\n\r\nexport interface SecretInputProps\r\n\textends Omit<InputProps, \"onChange\" | \"type\">,\r\n\t\tOmit<HTMLAttributes<HTMLInputElement>, \"onChange\" | \"type\"> {\r\n\t/** Флаг для отображения кнопки очистки значения */\r\n\tshowClearIcon?: boolean;\r\n\t/** Флаг для отображения кнопки копирования значения */\r\n\tshowCopyIcon?: boolean;\r\n\t/** Колбэк на изменение значения */\r\n\tonChange?: (value: string | null) => void;\r\n}\r\n\r\n/**\r\n * Компонент для ввода секретных данных с возможностью переключения видимости текста.\r\n */\r\nexport const SecretInput = React.forwardRef<HTMLInputElement, SecretInputProps>(\r\n\t(\r\n\t\t{ showClearIcon, showCopyIcon, value, defaultValue, onChange, readOnly, disabled, error, className, ...props },\r\n\t\tref\r\n\t) => {\r\n\t\tconst [type, setType] = useState<\"password\" | \"text\">(\"password\");\r\n\r\n\t\tconst handleShowValueToggle = useCallback(() => {\r\n\t\t\tsetType((prev) => (prev === \"password\" ? \"text\" : \"password\"));\r\n\t\t}, []);\r\n\r\n\t\tconst inputActions = useInputWithActions({\r\n\t\t\tvalue,\r\n\t\t\tdefaultValue,\r\n\t\t\tonChange,\r\n\t\t\treadOnly,\r\n\t\t\tdisabled,\r\n\t\t\tshowClearIcon,\r\n\t\t\tshowCopyIcon\r\n\t\t});\r\n\r\n\t\tconst mergedRef = useMergeRefs(ref, inputActions.inputRef);\r\n\r\n\t\treturn (\r\n\t\t\t<InputGroup className={className}>\r\n\t\t\t\t<InputGroupInput\r\n\t\t\t\t\tref={mergedRef}\r\n\t\t\t\t\ttype={type}\r\n\t\t\t\t\tvalue={value}\r\n\t\t\t\t\tdefaultValue={defaultValue}\r\n\t\t\t\t\tonChange={inputActions.handleChange}\r\n\t\t\t\t\treadOnly={readOnly}\r\n\t\t\t\t\tdisabled={disabled}\r\n\t\t\t\t\terror={error}\r\n\t\t\t\t\t{...props}\r\n\t\t\t\t/>\r\n\r\n\t\t\t\t{inputActions.shouldShowClearIcon && (\r\n\t\t\t\t\t<InputGroupButton icon={CircleX} onClick={inputActions.handleClear} type=\"button\" />\r\n\t\t\t\t)}\r\n\r\n\t\t\t\t{inputActions.shouldShowCopyIcon && (\r\n\t\t\t\t\t<InputGroupButton\r\n\t\t\t\t\t\ticon={inputActions.hasCopied ? Check : Copy}\r\n\t\t\t\t\t\tonClick={inputActions.handleCopy}\r\n\t\t\t\t\t\ttype=\"button\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t)}\r\n\r\n\t\t\t\t<InputGroupButton icon={type === \"password\" ? Eye : EyeOff} onClick={handleShowValueToggle} />\r\n\t\t\t</InputGroup>\r\n\t\t);\r\n\t}\r\n);\r\n\r\nSecretInput.displayName = \"SecretInput\";\r\n"],"names":["EyeOff","createLucideIcon","Eye","inputStyles","tv","inputBaseControlStyles","Input","React","type","className","error","other","ref","inputRef","useRef","mergedRef","useMergeRefs","useCustomValidity","jsx","webInputStyles","WebInput","startContent","showClearIcon","showCopyIcon","value","defaultValue","onChange","readOnly","disabled","props","styles","inputActions","useInputWithActions","jsxs","InputGroup","InputGroupText","InputGroupInput","InputGroupButton","CircleX","Check","Copy","downloadFile","url","link","fileInputStyles","FileInput","placeholder","chooseButtonText","accept","internalValue","setInternalValue","useState","isControlled","currentValue","useEffect","handleFileChange","useCallback","event","file","handleClear","e","handleChooseFile","handleDownload","shouldShowClearIcon","shouldShowDownloadIcon","fileName","fileValue","Download","SecretInput","setType","handleShowValueToggle","prev"],"mappings":";;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAASC,EAAiB,UAAU;AAAA,EACxC;AAAA,IACE;AAAA,IACA;AAAA,MACE,GAAG;AAAA,MACH,KAAK;AAAA,IACX;AAAA,EACG;AAAA,EACD,CAAC,QAAQ,EAAE,GAAG,wCAAwC,KAAK,SAAQ,CAAE;AAAA,EACrE;AAAA,IACE;AAAA,IACA;AAAA,MACE,GAAG;AAAA,MACH,KAAK;AAAA,IACX;AAAA,EACG;AAAA,EACD,CAAC,QAAQ,EAAE,GAAG,cAAc,KAAK,SAAU,CAAA;AAC7C,CAAC;AC1BD;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMC,IAAMD,EAAiB,OAAO;AAAA,EAClC;AAAA,IACE;AAAA,IACA;AAAA,MACE,GAAG;AAAA,MACH,KAAK;AAAA,IACX;AAAA,EACG;AAAA,EACD,CAAC,UAAU,EAAE,IAAI,MAAM,IAAI,MAAM,GAAG,KAAK,KAAK,SAAU,CAAA;AAC1D,CAAC,GCPKE,IAAcC,EAAG;AAAA,EACtB,QAAQC;AAAA,EACR,MAAM;AACP,CAAC,GAKYC,IAAQC,EAAM;AAAA,EAC1B,CAAC,EAAE,MAAAC,IAAO,QAAQ,WAAAC,GAAW,OAAAC,GAAO,GAAGC,EAAM,GAAGC,MAAQ;AACjD,UAAAC,IAAWC,EAAyB,IAAI,GACxCC,IAAYC,EAAaH,GAAUD,CAAG;AAE5C,WAAAK,EAAkBJ,GAAUH,CAAK,GAGhC,gBAAAQ;AAAA,MAAC;AAAA,MAAA;AAAA,QACA,MAAAV;AAAA,QACA,WAAWL,EAAY,EAAE,WAAAM,GAAW;AAAA,QACpC,KAAKM;AAAA,QACL,gBAAc,CAAC,CAACL;AAAA,QACf,GA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AAAR;AAAA,MACA,cAAAC;AAAA,MACA,UAAAC;AAAA,MACA,UAAAC;AAAA,MACA,UAAAC;AAAA,MACA,eAAAN;AAAA,MACA,cAAAC;AAAA,IAAA,CACA,GAEKR,IAAYC,EAAaJ,GAAKmB,EAAa,QAAQ;AAGxD,WAAA,gBAAAE,EAACC,KAAW,WAAAzB,GACX,UAAA;AAAA,MAAA,gBAAAS;AAAA,QAACkB;AAAA,QAAA;AAAA,UACA,KAAKrB;AAAA,UACL,MAAAP;AAAA,UACA,OAAAgB;AAAA,UACA,cAAAC;AAAA,UACA,UAAUM,EAAa;AAAA,UACvB,UAAAJ;AAAA,UACA,UAAAC;AAAA,UACA,OAAAlB;AAAA,UACC,GAAGmB;AAAA,QAAA;AAAA,MACL;AAAA,MAECE,EAAa,uBACb,gBAAAb,EAACmB,GAAiB,EAAA,MAAMC,GAAS,SAASP,EAAa,aAAa,MAAK,SAAS,CAAA;AAAA,MAGlFA,EAAa,sBACb,gBAAAb;AAAA,QAACmB;AAAA,QAAA;AAAA,UACA,MAAMN,EAAa,YAAYQ,IAAQC;AAAA,UACvC,SAAST,EAAa;AAAA,UACtB,MAAK;AAAA,QAAA;AAAA,MACN;AAAA,MAGD,gBAAAb,EAACmB,KAAiB,MAAM7B,MAAS,aAAaN,IAAMF,GAAQ,SAASsE,EAAuB,CAAA;AAAA,IAAA,GAC7F;AAAA,EAAA;AAGH;AAEAF,GAAY,cAAc;","x_google_ignoreList":[0,1]}
|
|
1
|
+
{"version":3,"file":"input.js","sources":["../../node_modules/.pnpm/lucide-react@0.460.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/eye-off.js","../../node_modules/.pnpm/lucide-react@0.460.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/eye.js","../../src/components/input/input/Input.tsx","../../src/components/input/web-input/WebInput.tsx","../../src/lib/utils/file/downloadFile.ts","../../src/components/input/file-input/FileInput.tsx","../../src/components/input/secret-input/SecretInput.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.460.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst EyeOff = createLucideIcon(\"EyeOff\", [\n [\n \"path\",\n {\n d: \"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49\",\n key: \"ct8e1f\"\n }\n ],\n [\"path\", { d: \"M14.084 14.158a3 3 0 0 1-4.242-4.242\", key: \"151rxh\" }],\n [\n \"path\",\n {\n d: \"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143\",\n key: \"13bj9a\"\n }\n ],\n [\"path\", { d: \"m2 2 20 20\", key: \"1ooewy\" }]\n]);\n\nexport { EyeOff as default };\n//# sourceMappingURL=eye-off.js.map\n","/**\n * @license lucide-react v0.460.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Eye = createLucideIcon(\"Eye\", [\n [\n \"path\",\n {\n d: \"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0\",\n key: \"1nclc0\"\n }\n ],\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"3\", key: \"1v7zrd\" }]\n]);\n\nexport { Eye as default };\n//# sourceMappingURL=eye.js.map\n","import React, { useRef } from \"react\";\nimport { useMergeRefs } from \"../../../hooks/useMergeRefs\";\nimport { useCustomValidity } from \"../../../hooks/useCustomValidity\";\nimport { inputBaseControlStyles } from \"../styles/inputBaseStyles\";\nimport { tv } from \"tailwind-variants\";\n\nexport type InputProps = React.ComponentProps<\"input\"> & {\n\t/** Текст сообщения об ошибке. При наличии делает поле невалидным */\n\terror?: string;\n};\n\nconst inputStyles = tv({\n\textend: inputBaseControlStyles,\n\tbase: \"h-10 lg:h-9\"\n});\n\n/**\n * Стилизованный базовый компонент для создания инпутов.\n */\nexport const Input = React.forwardRef<HTMLInputElement, InputProps>(\n\t({ type = \"text\", className, error, ...other }, ref) => {\n\t\tconst inputRef = useRef<HTMLInputElement>(null);\n\t\tconst mergedRef = useMergeRefs(inputRef, ref);\n\n\t\tuseCustomValidity(inputRef, error);\n\n\t\treturn (\n\t\t\t<input\n\t\t\t\ttype={type}\n\t\t\t\tclassName={inputStyles({ className })}\n\t\t\t\tref={mergedRef}\n\t\t\t\taria-invalid={!!error}\n\t\t\t\t{...other}\n\t\t\t/>\n\t\t);\n\t}\n);\n\nInput.displayName = \"Input\";\n\nexport default Input;\n","import React from \"react\";\nimport { useMergeRefs } from \"@/hooks/useMergeRefs\";\nimport { useInputWithActions } from \"@/hooks/useInputWithActions\";\nimport { InputGroup, InputGroupInput, InputGroupText, InputGroupButton } from \"../input-group/InputGroup\";\nimport { CircleX, Copy, Check } from \"lucide-react\";\nimport { tv } from \"tailwind-variants\";\n\nconst webInputStyles = tv({\n\tbase: \"group\",\n\tslots: {\n\t\taction: \"opacity-0 group-focus-within:opacity-100 group-hover:opacity-100\"\n\t}\n});\n\nexport interface WebInputProps extends Omit<React.ComponentProps<\"input\">, \"onChange\"> {\n\t/** Содержимое в начале поля (например, префикс URL) */\n\tstartContent?: React.ReactNode;\n\t/** Флаг для отображения кнопки очистки значения */\n\tshowClearIcon?: boolean;\n\t/** Флаг для отображения кнопки копирования значения */\n\tshowCopyIcon?: boolean;\n\t/** Колбэк на изменение значения */\n\tonChange?: (value: string | null) => void;\n\t/** Текст сообщения об ошибке */\n\terror?: string;\n}\n\nexport const WebInput = React.forwardRef<HTMLInputElement, WebInputProps>(\n\t(\n\t\t{\n\t\t\tstartContent = \"https://\",\n\t\t\tshowClearIcon = true,\n\t\t\tshowCopyIcon = true,\n\t\t\tvalue,\n\t\t\tdefaultValue,\n\t\t\tonChange,\n\t\t\treadOnly,\n\t\t\tdisabled,\n\t\t\terror,\n\t\t\tclassName,\n\t\t\t...props\n\t\t},\n\t\tref\n\t) => {\n\t\tconst styles = webInputStyles();\n\n\t\tconst inputActions = useInputWithActions({\n\t\t\tvalue,\n\t\t\tdefaultValue,\n\t\t\tonChange,\n\t\t\treadOnly,\n\t\t\tdisabled,\n\t\t\tshowClearIcon,\n\t\t\tshowCopyIcon\n\t\t});\n\n\t\tconst mergedRef = useMergeRefs(ref, inputActions.inputRef);\n\n\t\treturn (\n\t\t\t<InputGroup className={styles.base({ className })}>\n\t\t\t\t{startContent != null && <InputGroupText type=\"primary\">{startContent}</InputGroupText>}\n\n\t\t\t\t<InputGroupInput\n\t\t\t\t\tref={mergedRef}\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\tonChange={inputActions.handleChange}\n\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\terror={error}\n\t\t\t\t\t{...props}\n\t\t\t\t/>\n\n\t\t\t\t{inputActions.shouldShowClearIcon && (\n\t\t\t\t\t<InputGroupButton\n\t\t\t\t\t\ticon={CircleX}\n\t\t\t\t\t\tonClick={inputActions.handleClear}\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tclassName={styles.action()}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\n\t\t\t\t{inputActions.shouldShowCopyIcon && (\n\t\t\t\t\t<InputGroupButton\n\t\t\t\t\t\ticon={inputActions.hasCopied ? Check : Copy}\n\t\t\t\t\t\tonClick={inputActions.handleCopy}\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tclassName={styles.action()}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</InputGroup>\n\t\t);\n\t}\n);\n\nWebInput.displayName = \"WebInput\";\n\nexport default WebInput;\n","import { FileValue } from \"@/components/input\";\n\nexport function downloadFile(value: FileValue) {\n\tif (!value) return;\n\n\tif (value instanceof File) {\n\t\t// Логика для браузерного File объекта\n\t\tconst url = URL.createObjectURL(value);\n\t\tconst link = document.createElement(\"a\");\n\t\tlink.href = url;\n\t\tlink.download = value.name;\n\t\tdocument.body.appendChild(link);\n\t\tlink.click();\n\t\tdocument.body.removeChild(link);\n\t\t// Освобождаем память\n\t\tURL.revokeObjectURL(url);\n\t} else if (value.url) {\n\t\t// Логика для FileInfo с URL\n\t\tconst link = document.createElement(\"a\");\n\t\tlink.href = value.url;\n\t\tlink.download = value.name;\n\t\tlink.target = \"_blank\";\n\t\tdocument.body.appendChild(link);\n\t\tlink.click();\n\t\tdocument.body.removeChild(link);\n\t}\n}\n","import React, { useRef, useCallback, useState, useEffect } from \"react\";\nimport { useMergeRefs } from \"@/hooks/useMergeRefs\";\nimport { InputGroup, InputGroupButton, InputGroupText } from \"../input-group/InputGroup\";\nimport { CircleX, Download } from \"lucide-react\";\nimport { tv } from \"tailwind-variants\";\nimport { downloadFile } from \"@/lib/utils/file/downloadFile\";\n\nconst fileInputStyles = tv({\n\tbase: \"group relative cursor-pointer\",\n\tslots: {\n\t\taction: \"opacity-0 group-focus-within:opacity-100 group-hover:opacity-100\",\n\t\tfileDisplay:\n\t\t\t\"flex min-w-0 flex-1 items-center truncate bg-transparent px-3 py-2.5 italic text-primary-fg lg:py-2\",\n\t\tplaceholder: \"text-muted\"\n\t}\n});\n\n/** Упрощенная информация о файле */\nexport interface FileInfo {\n\t/** id файла */\n\tid: number;\n\t/** Имя файла */\n\tname: string;\n\t/** URL для скачивания или просмотра файла */\n\turl: string;\n\t/** Размер файла в байтах (опционально) */\n\tsize?: number;\n\t/** MIME-тип файла (опционально) */\n\ttype?: string;\n}\n\n/** Тип файла - либо браузерный File, либо упрощенная FileInfo */\nexport type FileValue = File | FileInfo | null;\n\nexport interface FileInputProps\n\textends Omit<React.ComponentProps<\"input\">, \"type\" | \"onChange\" | \"value\" | \"defaultValue\"> {\n\t/** Текущий файл (для controlled режима) */\n\tvalue?: FileValue;\n\t/** Файл по умолчанию (для uncontrolled режима) */\n\tdefaultValue?: FileValue;\n\t/** Флаг для отображения кнопки очистки значения */\n\tshowClearIcon?: boolean;\n\t/** Колбэк на изменение файла */\n\tonChange?: (file: FileValue) => void;\n\t/** Текст сообщения об ошибке */\n\terror?: string;\n\t/** Плейсхолдер для отображения когда файл не выбран */\n\tplaceholder?: string;\n\t/** Текст кнопки выбора файла */\n\tchooseButtonText?: string;\n}\n\nexport const FileInput = React.forwardRef<HTMLInputElement, FileInputProps>(\n\t(\n\t\t{\n\t\t\tvalue,\n\t\t\tdefaultValue,\n\t\t\tshowClearIcon = true,\n\t\t\tonChange,\n\t\t\tdisabled,\n\t\t\terror,\n\t\t\tclassName,\n\t\t\tplaceholder = \"File not selected\",\n\t\t\tchooseButtonText = \"Choose file\",\n\t\t\taccept,\n\t\t\t...props\n\t\t},\n\t\tref\n\t) => {\n\t\tconst styles = fileInputStyles();\n\t\tconst inputRef = useRef<HTMLInputElement>(null);\n\t\tconst [internalValue, setInternalValue] = useState<FileValue>(defaultValue || null);\n\n\t\tconst mergedRef = useMergeRefs(ref, inputRef);\n\n\t\t// Определяем, находимся ли мы в controlled режиме\n\t\tconst isControlled = value !== undefined;\n\t\tconst currentValue = isControlled ? value : internalValue;\n\n\t\t// Синхронизируем внутреннее состояние с defaultValue при изменении\n\t\tuseEffect(() => {\n\t\t\tif (!isControlled && defaultValue !== undefined) {\n\t\t\t\tsetInternalValue(defaultValue);\n\t\t\t}\n\t\t}, [defaultValue, isControlled]);\n\n\t\tconst handleFileChange = useCallback(\n\t\t\t(event: React.ChangeEvent<HTMLInputElement>) => {\n\t\t\t\tconst file = event.target.files?.[0] || null;\n\n\t\t\t\tif (!isControlled) {\n\t\t\t\t\tsetInternalValue(file);\n\t\t\t\t}\n\n\t\t\t\tonChange?.(file);\n\t\t\t},\n\t\t\t[onChange, isControlled]\n\t\t);\n\n\t\tconst handleClear = useCallback(\n\t\t\t(e: React.MouseEvent) => {\n\t\t\t\te.stopPropagation();\n\t\t\t\tif (inputRef.current) {\n\t\t\t\t\tinputRef.current.value = \"\";\n\t\t\t\t}\n\n\t\t\t\tif (!isControlled) {\n\t\t\t\t\tsetInternalValue(null);\n\t\t\t\t}\n\n\t\t\t\tonChange?.(null);\n\t\t\t},\n\t\t\t[onChange, isControlled]\n\t\t);\n\n\t\tconst handleChooseFile = useCallback(() => {\n\t\t\tif (!currentValue) {\n\t\t\t\tinputRef.current?.click();\n\t\t\t}\n\t\t}, [currentValue]);\n\n\t\tconst handleDownload = useCallback(() => downloadFile(currentValue), [currentValue]);\n\n\t\tconst shouldShowClearIcon = showClearIcon && currentValue && !disabled;\n\t\tconst shouldShowDownloadIcon =\n\t\t\tcurrentValue && (currentValue instanceof File || (!(currentValue instanceof File) && currentValue.url));\n\n\t\t// Получаем имя файла для отображения\n\t\tconst getFileName = (fileValue: FileValue): string | null => {\n\t\t\tif (!fileValue) return null;\n\t\t\tif (fileValue instanceof File) {\n\t\t\t\treturn fileValue.name;\n\t\t\t}\n\t\t\treturn fileValue.name;\n\t\t};\n\n\t\tconst fileName = getFileName(currentValue);\n\n\t\treturn (\n\t\t\t<InputGroup className={styles.base({ className })} onClick={handleChooseFile}>\n\t\t\t\t<InputGroupText type=\"primary\">{chooseButtonText}</InputGroupText>\n\n\t\t\t\t<div className={styles.fileDisplay()}>\n\t\t\t\t\t{fileName ? <span>{fileName}</span> : <span className={styles.placeholder()}>{placeholder}</span>}\n\t\t\t\t</div>\n\n\t\t\t\t{shouldShowClearIcon && (\n\t\t\t\t\t<InputGroupButton icon={CircleX} onClick={handleClear} type=\"button\" className={styles.action()} />\n\t\t\t\t)}\n\n\t\t\t\t{shouldShowDownloadIcon && (\n\t\t\t\t\t<InputGroupButton\n\t\t\t\t\t\ticon={Download}\n\t\t\t\t\t\tonClick={handleDownload}\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tclassName={styles.action()}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\n\t\t\t\t<input\n\t\t\t\t\tref={mergedRef}\n\t\t\t\t\ttype=\"file\"\n\t\t\t\t\tonChange={handleFileChange}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\taccept={accept}\n\t\t\t\t\tclassName=\"sr-only\"\n\t\t\t\t\taria-invalid={!!error}\n\t\t\t\t\t{...props}\n\t\t\t\t/>\n\t\t\t</InputGroup>\n\t\t);\n\t}\n);\n\nFileInput.displayName = \"FileInput\";\n\nexport default FileInput;\n","import { useInputWithActions } from \"@/hooks/useInputWithActions\";\nimport { useMergeRefs } from \"@/hooks/useMergeRefs\";\nimport { Check, CircleX, Copy, Eye, EyeOff } from \"lucide-react\";\nimport React, { HTMLAttributes, useCallback, useState } from \"react\";\nimport { InputGroup, InputGroupButton, InputGroupInput } from \"../input-group/InputGroup\";\nimport { InputProps } from \"../input/Input\";\n\nexport interface SecretInputProps\n\textends Omit<InputProps, \"onChange\" | \"type\">,\n\t\tOmit<HTMLAttributes<HTMLInputElement>, \"onChange\" | \"type\"> {\n\t/** Флаг для отображения кнопки очистки значения */\n\tshowClearIcon?: boolean;\n\t/** Флаг для отображения кнопки копирования значения */\n\tshowCopyIcon?: boolean;\n\t/** Колбэк на изменение значения */\n\tonChange?: (value: string | null) => void;\n}\n\n/**\n * Компонент для ввода секретных данных с возможностью переключения видимости текста.\n */\nexport const SecretInput = React.forwardRef<HTMLInputElement, SecretInputProps>(\n\t(\n\t\t{ showClearIcon, showCopyIcon, value, defaultValue, onChange, readOnly, disabled, error, className, ...props },\n\t\tref\n\t) => {\n\t\tconst [type, setType] = useState<\"password\" | \"text\">(\"password\");\n\n\t\tconst handleShowValueToggle = useCallback(() => {\n\t\t\tsetType((prev) => (prev === \"password\" ? \"text\" : \"password\"));\n\t\t}, []);\n\n\t\tconst inputActions = useInputWithActions({\n\t\t\tvalue,\n\t\t\tdefaultValue,\n\t\t\tonChange,\n\t\t\treadOnly,\n\t\t\tdisabled,\n\t\t\tshowClearIcon,\n\t\t\tshowCopyIcon\n\t\t});\n\n\t\tconst mergedRef = useMergeRefs(ref, inputActions.inputRef);\n\n\t\treturn (\n\t\t\t<InputGroup className={className}>\n\t\t\t\t<InputGroupInput\n\t\t\t\t\tref={mergedRef}\n\t\t\t\t\ttype={type}\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\tonChange={inputActions.handleChange}\n\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\terror={error}\n\t\t\t\t\t{...props}\n\t\t\t\t/>\n\n\t\t\t\t{inputActions.shouldShowClearIcon && (\n\t\t\t\t\t<InputGroupButton icon={CircleX} onClick={inputActions.handleClear} type=\"button\" />\n\t\t\t\t)}\n\n\t\t\t\t{inputActions.shouldShowCopyIcon && (\n\t\t\t\t\t<InputGroupButton\n\t\t\t\t\t\ticon={inputActions.hasCopied ? Check : Copy}\n\t\t\t\t\t\tonClick={inputActions.handleCopy}\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t/>\n\t\t\t\t)}\n\n\t\t\t\t<InputGroupButton icon={type === \"password\" ? Eye : EyeOff} onClick={handleShowValueToggle} />\n\t\t\t</InputGroup>\n\t\t);\n\t}\n);\n\nSecretInput.displayName = \"SecretInput\";\n"],"names":["EyeOff","createLucideIcon","Eye","inputStyles","tv","inputBaseControlStyles","Input","React","type","className","error","other","ref","inputRef","useRef","mergedRef","useMergeRefs","useCustomValidity","jsx","webInputStyles","WebInput","startContent","showClearIcon","showCopyIcon","value","defaultValue","onChange","readOnly","disabled","props","styles","inputActions","useInputWithActions","jsxs","InputGroup","InputGroupText","InputGroupInput","InputGroupButton","CircleX","Check","Copy","downloadFile","url","link","fileInputStyles","FileInput","placeholder","chooseButtonText","accept","internalValue","setInternalValue","useState","isControlled","currentValue","useEffect","handleFileChange","useCallback","event","file","handleClear","e","handleChooseFile","handleDownload","shouldShowClearIcon","shouldShowDownloadIcon","fileName","fileValue","Download","SecretInput","setType","handleShowValueToggle","prev"],"mappings":";;;;;;;;;;;;;AAAA;AAAA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