@evolve.ui/core-components 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/{BottomSheet-ZV_eq3xt.mjs → BottomSheet-CNVLnEoD.mjs} +3 -3
  2. package/BottomSheet-CNVLnEoD.mjs.map +1 -0
  3. package/{BottomSheet-emWP9Fct.cjs → BottomSheet-D5w0WZDl.cjs} +3 -3
  4. package/BottomSheet-D5w0WZDl.cjs.map +1 -0
  5. package/Button.cjs +1 -1
  6. package/Button.mjs +1 -1
  7. package/{CookieConsent-CIwm0bTz.mjs → CookieConsent-B9dg9WdC.mjs} +2 -2
  8. package/{CookieConsent-CIwm0bTz.mjs.map → CookieConsent-B9dg9WdC.mjs.map} +1 -1
  9. package/{CookieConsent-PIglB_bb.cjs → CookieConsent-BSXJHMwX.cjs} +2 -2
  10. package/{CookieConsent-PIglB_bb.cjs.map → CookieConsent-BSXJHMwX.cjs.map} +1 -1
  11. package/{Drawer-9HFG45OA.cjs → Drawer-3rA9dGCl.cjs} +2 -2
  12. package/{Drawer-9HFG45OA.cjs.map → Drawer-3rA9dGCl.cjs.map} +1 -1
  13. package/Drawer-CFZbwg0R.d.cts.map +1 -1
  14. package/Drawer-CFZbwg0R.d.mts.map +1 -1
  15. package/{Drawer-BkCPfK6P.mjs → Drawer-DzKEmewj.mjs} +2 -2
  16. package/{Drawer-BkCPfK6P.mjs.map → Drawer-DzKEmewj.mjs.map} +1 -1
  17. package/{FavoriteButton-CC3qL0lR.mjs → FavoriteButton-7nK77lQP.mjs} +6 -6
  18. package/FavoriteButton-7nK77lQP.mjs.map +1 -0
  19. package/{FavoriteButton-BGF-3dze.d.cts → FavoriteButton-B8r_qtlj.d.cts} +2 -2
  20. package/{FavoriteButton-BGF-3dze.d.cts.map → FavoriteButton-B8r_qtlj.d.cts.map} +1 -1
  21. package/{FavoriteButton-DliYzkfu.cjs → FavoriteButton-BkIaWfgD.cjs} +6 -6
  22. package/FavoriteButton-BkIaWfgD.cjs.map +1 -0
  23. package/{FavoriteButton-BZEGWrRo.d.mts → FavoriteButton-hIkGjcKH.d.mts} +2 -2
  24. package/{FavoriteButton-BZEGWrRo.d.mts.map → FavoriteButton-hIkGjcKH.d.mts.map} +1 -1
  25. package/{FileUpload-p_pl9NXr.mjs → FileUpload-BfZOMsLs.mjs} +6 -6
  26. package/FileUpload-BfZOMsLs.mjs.map +1 -0
  27. package/{FileUpload--e_UJ_ek.cjs → FileUpload-gjRbkgrL.cjs} +6 -6
  28. package/FileUpload-gjRbkgrL.cjs.map +1 -0
  29. package/IconButton.cjs +1 -1
  30. package/IconButton.mjs +1 -1
  31. package/{ImageSlider-BidXfnLj.cjs → ImageSlider-CAgxQffP.cjs} +3 -3
  32. package/ImageSlider-CAgxQffP.cjs.map +1 -0
  33. package/{ImageSlider-CDrg_TbL.mjs → ImageSlider-fdrJ6lIJ.mjs} +3 -3
  34. package/ImageSlider-fdrJ6lIJ.mjs.map +1 -0
  35. package/InfoIconTooltip.cjs +1 -1
  36. package/InfoIconTooltip.cjs.map +1 -1
  37. package/InfoIconTooltip.mjs +1 -1
  38. package/InfoIconTooltip.mjs.map +1 -1
  39. package/InlineButton-CRLbNJZ3.d.mts.map +1 -1
  40. package/InlineButton-DoXGLiSE.d.cts.map +1 -1
  41. package/Input.cjs +1 -1
  42. package/Input.cjs.map +1 -1
  43. package/Input.mjs +1 -1
  44. package/Input.mjs.map +1 -1
  45. package/JumpMenu-BXYZnPIH.cjs.map +1 -1
  46. package/JumpMenu-DcZjAiej.mjs.map +1 -1
  47. package/{Menu-Cxu8CaX1.mjs → Menu-Bn4smlEe.mjs} +2 -2
  48. package/Menu-Bn4smlEe.mjs.map +1 -0
  49. package/{Menu-ClUogmwE.cjs → Menu-DuDhtoNP.cjs} +2 -2
  50. package/Menu-DuDhtoNP.cjs.map +1 -0
  51. package/Modal-DM0aXJZ5.d.cts.map +1 -1
  52. package/Modal-DM0aXJZ5.d.mts.map +1 -1
  53. package/{Modal-C6gatdtT.mjs → Modal-DtxWd7Le.mjs} +3 -2
  54. package/{Modal-C6gatdtT.mjs.map → Modal-DtxWd7Le.mjs.map} +1 -1
  55. package/{Modal-CiBqXyiK.cjs → Modal-q4HhBAQU.cjs} +3 -2
  56. package/Modal-q4HhBAQU.cjs.map +1 -0
  57. package/{Pagination-bAtbN478.cjs → Pagination-Denb9_zB.cjs} +2 -2
  58. package/{Pagination-bAtbN478.cjs.map → Pagination-Denb9_zB.cjs.map} +1 -1
  59. package/{Pagination-DIpGKMLz.mjs → Pagination-Dyfeys4B.mjs} +2 -2
  60. package/{Pagination-DIpGKMLz.mjs.map → Pagination-Dyfeys4B.mjs.map} +1 -1
  61. package/PhoneInput-B5pkpkdt.mjs.map +1 -1
  62. package/PhoneInput-BXnkBME4.d.mts.map +1 -1
  63. package/PhoneInput-Bkrbrins.d.cts.map +1 -1
  64. package/PhoneInput-CUMPOSxJ.cjs.map +1 -1
  65. package/{ProgressCircle-BC81D9sU.cjs → ProgressCircle-B6R4dxoV.cjs} +2 -2
  66. package/{ProgressCircle-BC81D9sU.cjs.map → ProgressCircle-B6R4dxoV.cjs.map} +1 -1
  67. package/{ProgressCircle-ae8cvZhe.mjs → ProgressCircle-zSai1HTT.mjs} +2 -2
  68. package/{ProgressCircle-ae8cvZhe.mjs.map → ProgressCircle-zSai1HTT.mjs.map} +1 -1
  69. package/SearchInput-DYIPC8Cd.d.cts.map +1 -1
  70. package/SearchInput-IfEWePDQ.d.mts.map +1 -1
  71. package/{Select-BkZu8OLs.mjs → Select-CH_ZN88G.mjs} +2 -2
  72. package/Select-CH_ZN88G.mjs.map +1 -0
  73. package/{Select-BXDjzyDs.cjs → Select-DCCcyLT4.cjs} +2 -2
  74. package/Select-DCCcyLT4.cjs.map +1 -0
  75. package/{SplitButton-DcmmLW8j.cjs → SplitButton-B_Y253RU.cjs} +2 -2
  76. package/{SplitButton-DcmmLW8j.cjs.map → SplitButton-B_Y253RU.cjs.map} +1 -1
  77. package/{SplitButton-WE5ymwCQ.mjs → SplitButton-_poP9Ykq.mjs} +2 -2
  78. package/{SplitButton-WE5ymwCQ.mjs.map → SplitButton-_poP9Ykq.mjs.map} +1 -1
  79. package/{Table-M-rANdMt.mjs → Table-CQGtDpvH.mjs} +3 -3
  80. package/{Table-M-rANdMt.mjs.map → Table-CQGtDpvH.mjs.map} +1 -1
  81. package/{Table-CLlDragJ.cjs → Table-D4UYosb1.cjs} +3 -3
  82. package/{Table-CLlDragJ.cjs.map → Table-D4UYosb1.cjs.map} +1 -1
  83. package/Typography/InlineButton.cjs +1 -1
  84. package/Typography/InlineButton.cjs.map +1 -1
  85. package/Typography/InlineButton.mjs +1 -1
  86. package/Typography/InlineButton.mjs.map +1 -1
  87. package/{ViewMore-BBoUvo7p.cjs → ViewMore-BcoSRZSl.cjs} +14 -1
  88. package/ViewMore-BcoSRZSl.cjs.map +1 -0
  89. package/{ViewMore-BrZPuE4E.mjs → ViewMore-Be0TQZ_2.mjs} +14 -1
  90. package/ViewMore-Be0TQZ_2.mjs.map +1 -0
  91. package/bottomSheet.cjs +1 -1
  92. package/bottomSheet.mjs +1 -1
  93. package/{buttonColorClasses-C3hg1at8.cjs → buttonColorClasses-CQQmLYfk.cjs} +4 -4
  94. package/buttonColorClasses-CQQmLYfk.cjs.map +1 -0
  95. package/{buttonColorClasses-B7OU4aQA.mjs → buttonColorClasses-CQnqAJXl.mjs} +4 -4
  96. package/buttonColorClasses-CQnqAJXl.mjs.map +1 -0
  97. package/card/components/createFavoriteButton.cjs +1 -1
  98. package/card/components/createFavoriteButton.mjs +1 -1
  99. package/cookieConsent.cjs +1 -1
  100. package/cookieConsent.mjs +1 -1
  101. package/drawer.cjs +1 -1
  102. package/drawer.mjs +1 -1
  103. package/favoriteButton.cjs +1 -1
  104. package/favoriteButton.d.cts +1 -1
  105. package/favoriteButton.d.mts +1 -1
  106. package/favoriteButton.mjs +1 -1
  107. package/featureFlags/hooks.d.cts +1 -1
  108. package/featureFlags/hooks.d.mts +1 -1
  109. package/fileUpload/testUtils/mockFilesAndImages.d.cts +3 -3
  110. package/fileUpload/testUtils/mockFilesAndImages.d.cts.map +1 -1
  111. package/fileUpload/testUtils/mockFilesAndImages.d.mts +3 -3
  112. package/fileUpload/testUtils/mockFilesAndImages.d.mts.map +1 -1
  113. package/fileUpload/testUtils/testUtils.d.cts +1 -1
  114. package/fileUpload/testUtils/testUtils.d.cts.map +1 -1
  115. package/fileUpload/testUtils/testUtils.d.mts +1 -1
  116. package/fileUpload/testUtils/testUtils.d.mts.map +1 -1
  117. package/fileUpload.cjs +1 -1
  118. package/fileUpload.mjs +1 -1
  119. package/imageSlider.cjs +1 -1
  120. package/imageSlider.mjs +1 -1
  121. package/index.cjs +14 -14
  122. package/index.d.cts +1 -1
  123. package/index.d.mts +1 -1
  124. package/index.mjs +14 -14
  125. package/menu.cjs +1 -1
  126. package/menu.mjs +1 -1
  127. package/modal/useCloseModal.cjs +2 -1
  128. package/modal/useCloseModal.cjs.map +1 -1
  129. package/modal/useCloseModal.mjs +2 -1
  130. package/modal/useCloseModal.mjs.map +1 -1
  131. package/modal.cjs +1 -1
  132. package/modal.mjs +1 -1
  133. package/package.json +2 -4
  134. package/pagination.cjs +1 -1
  135. package/pagination.mjs +1 -1
  136. package/progressCircle.cjs +1 -1
  137. package/progressCircle.mjs +1 -1
  138. package/searchInput.cjs +4 -4
  139. package/searchInput.cjs.map +1 -1
  140. package/searchInput.mjs +4 -4
  141. package/searchInput.mjs.map +1 -1
  142. package/select.cjs +1 -1
  143. package/select.mjs +1 -1
  144. package/selectAsync.cjs +1 -1
  145. package/selectAsync.mjs +1 -1
  146. package/selectAsyncCreatable.cjs +1 -1
  147. package/selectAsyncCreatable.mjs +1 -1
  148. package/selectCreatable.cjs +1 -1
  149. package/selectCreatable.mjs +1 -1
  150. package/splitButton.cjs +1 -1
  151. package/splitButton.mjs +1 -1
  152. package/src/BottomSheet/components/BottomSheetContentArea/BottomSheetContentArea.tsx +4 -3
  153. package/src/BottomSheet/components/BottomSheetOverlay/BottomSheetOverlayTranslate3d.tsx +5 -2
  154. package/src/Button/buttonColorClasses.ts +8 -3
  155. package/src/Drawer/Drawer.tsx +5 -8
  156. package/src/FavoriteButton/components/IconOnlyFavoriteButton/IconOnlyFavoriteButton.tsx +4 -1
  157. package/src/FavoriteButton/components/LabeledAnimatedFavoriteButton/LabeledAnimatedFavoriteButton.tsx +13 -6
  158. package/src/FavoriteButton/types/favoriteButton.ts +1 -1
  159. package/src/FileUpload/components/GridFileCard/GridFileCard.tsx +1 -1
  160. package/src/FileUpload/components/ListFileCard/ListFileCard.tsx +2 -2
  161. package/src/ImageSlider/ImageSlider.tsx +3 -1
  162. package/src/ImageSlider/components/Thumbnails/Thumbnails.tsx +1 -1
  163. package/src/JumpMenu/components/JumpMenuItem/JumpMenuItem.tsx +4 -1
  164. package/src/Menu/components/MenuItem/MenuItem.tsx +1 -1
  165. package/src/Modal/ComposableModal.tsx +9 -1
  166. package/src/Modal/hooks/useCloseModal.ts +8 -1
  167. package/src/PhoneInput/PhoneInput.tsx +7 -1
  168. package/src/ProgressCircle/ProgressCircle.tsx +1 -1
  169. package/src/SearchInput/SearchInput.tsx +5 -4
  170. package/src/Select/selectComponents.tsx +1 -2
  171. package/src/Tabs/Tabs.tsx +4 -4
  172. package/src/TextArea/TextArea.tsx +2 -0
  173. package/src/TextInput/TextInput.tsx +1 -1
  174. package/src/Tooltip/InfoIconTooltip.tsx +1 -1
  175. package/src/Typography/InlineButton/InlineButton.tsx +4 -3
  176. package/src/utils/smoothScrollTo.ts +18 -0
  177. package/table.cjs +1 -1
  178. package/table.mjs +1 -1
  179. package/tabs.cjs +1 -1
  180. package/tabs.cjs.map +1 -1
  181. package/tabs.mjs +1 -1
  182. package/tabs.mjs.map +1 -1
  183. package/textArea.cjs.map +1 -1
  184. package/textArea.mjs.map +1 -1
  185. package/viewMore.cjs +1 -1
  186. package/viewMore.mjs +1 -1
  187. package/BottomSheet-ZV_eq3xt.mjs.map +0 -1
  188. package/BottomSheet-emWP9Fct.cjs.map +0 -1
  189. package/FavoriteButton-CC3qL0lR.mjs.map +0 -1
  190. package/FavoriteButton-DliYzkfu.cjs.map +0 -1
  191. package/FileUpload--e_UJ_ek.cjs.map +0 -1
  192. package/FileUpload-p_pl9NXr.mjs.map +0 -1
  193. package/ImageSlider-BidXfnLj.cjs.map +0 -1
  194. package/ImageSlider-CDrg_TbL.mjs.map +0 -1
  195. package/Menu-ClUogmwE.cjs.map +0 -1
  196. package/Menu-Cxu8CaX1.mjs.map +0 -1
  197. package/Modal-CiBqXyiK.cjs.map +0 -1
  198. package/Select-BXDjzyDs.cjs.map +0 -1
  199. package/Select-BkZu8OLs.mjs.map +0 -1
  200. package/ViewMore-BBoUvo7p.cjs.map +0 -1
  201. package/ViewMore-BrZPuE4E.mjs.map +0 -1
  202. package/buttonColorClasses-B7OU4aQA.mjs.map +0 -1
  203. package/buttonColorClasses-C3hg1at8.cjs.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"FileUpload--e_UJ_ek.cjs","names":["UploadValidationProvider","createMessageContext","resolveContextAwareMessage","builtInErrorCodes","createMessageContext","resolveContextAwareMessage","ACCEPTED_MIME_TYPES","useWindowIsMobile","SubtleLink","UploadSimple","BodyPrimary","Badge","builtInErrorCodes","H4","BodyPrimary","Table","Tabs","useFileValidation","formatFileSize","LabelMini","Caption","useImageFilePreviewUrl","formatFileSize","BodySecondary","Trash","Checkbox","Badge","DotsSixVertical","Paperclip","IconButton","Menu","DotsThreeOutlineVertical","MenuItem","BodyPrimary","ProgressCircle","useImageFilePreviewUrl","formatFileSize","BodySecondary","Checkbox","DotsSixVertical","Paperclip","BodyPrimary","IconButton","Trash","ProgressCircle","useWindowWidth","breakpoints","ImageSquare","ImagesSquare","FileText","Files","FilePdf","FileCsv","FileArchive","useFileValidation","UploadSimple","BodyPrimary"],"sources":["../src/FileUpload/providers/FileUploadProvider.tsx","../src/FileUpload/hooks/upload/useHandleDragEnter/useHandleDragEnter.ts","../src/FileUpload/hooks/upload/useHandleDrop/createFileRejectionHelpers.ts","../src/FileUpload/hooks/upload/useHandleDrop/useHandleDrop.ts","../src/FileUpload/hooks/upload/useUploadAvailability/useUploadAvailability.ts","../src/FileUpload/hooks/validation/createDropzoneValidator.ts","../src/FileUpload/utils/getMimeTypes.ts","../src/FileUpload/utils/styles.ts","../src/FileUpload/components/FileDropzone/components/DropzoneContent/DropzoneText.tsx","../src/FileUpload/components/FileDropzone/components/DropzoneContent/DropzoneContent.tsx","../src/FileUpload/components/FileDropzone/components/FileDropzoneDebugger/FileRejectionsDisplay.tsx","../src/FileUpload/components/FileDropzone/components/FileDropzoneDebugger/FileDropzoneDebugger.tsx","../src/FileUpload/components/FileDropzone/FileDropzone.tsx","../src/FileUpload/components/GridFileCard/utils/sortable.ts","../src/FileUpload/components/GridFileCard/GridFileCard.tsx","../src/FileUpload/components/ListFileCard/ListFileCard.tsx","../src/FileUpload/components/FileCard/FileCard.tsx","../src/FileUpload/components/FilePreviewList/virtualizerComponents/FilePreviewVirtualizedList/FilePreviewVirtualizedList.tsx","../src/FileUpload/components/FilePreviewList/FilePreviewList.tsx","../src/FileUpload/components/FileUpload/FileUpload.tsx","../src/FileUpload/components/FileDropzoneOverlay/components/OverlayDropzoneDragText.tsx","../src/FileUpload/components/FileDropzoneOverlay/components/OverlayDropzoneContent.tsx","../src/FileUpload/components/FileDropzoneOverlay/styles.ts","../src/FileUpload/components/FileDropzoneOverlay/FileDropzoneOverlay.tsx","../src/FileUpload/components/FileUploadCanvas/FileUploadCanvas.tsx"],"sourcesContent":["import { createContext, useContext, useState } from 'react';\n\nimport { FileResource } from '../types';\nimport { CommonFileTypes, FileError, FileRejection, FileValidator } from '../types/commonTypes';\nimport { UploadValidationProvider } from './UploadValidationProvider';\n\n/**\n * Context type for the FileUploadProvider\n * Contains both file state management and callback handlers for file operations.\n * This context makes file upload state and operations available to all child components.\n *\n * @property disabled - Whether the file upload functionality is disabled\n * @property files - Array of currently selected/uploaded files\n * @property onDrop - Callback triggered when files are dropped, with both accepted and rejected files\n * @property onDropAccepted - Callback triggered when files pass validation\n * @property onDropRejected - Callback triggered when files fail validation\n * @property onFileDelete - Callback triggered when a file is deleted from the preview\n * @property setFiles - State setter function to update the files array\n */\nexport type FileUploadContextType = {\n disabled: boolean;\n files: FileResource[];\n onDrop?: (acceptedFiles: File[], rejectedFiles: FileRejection[]) => void;\n onDropAccepted?: (files: File[]) => void;\n onDropRejected?: (rejectedFiles: FileRejection[]) => void;\n onFileDelete?: (fileResource: FileResource) => void;\n setFiles: (files: FileResource[] | ((prev: FileResource[]) => FileResource[])) => void;\n};\n\n/**\n * React context for file upload state and operations\n * Used by the useFileUploadContext hook\n */\nexport const FileUploadContext = createContext<FileUploadContextType | undefined>(undefined);\n\n/**\n * Configuration props for the FileUploadProvider\n * These props control both file upload behavior and validation rules.\n * Many of these properties are passed to the underlying ValidationProvider.\n */\nexport type FileUploadProviderConfigProps = {\n /**\n * Allowed file types - either preset categories ('images', 'pdfs', 'documents')\n * or an array of MIME types/extensions (e.g., ['image/jpeg', '.png'])\n */\n accept?: CommonFileTypes | string[];\n\n /**\n * Whether the upload is disabled\n * When true, prevents any interaction with the upload components\n */\n disabled?: boolean;\n\n /**\n * Error object to display custom validation errors\n * Overrides any validation errors with this custom error\n */\n error?: FileError;\n\n /**\n * Initial files to populate the uploader with\n * These files will be present when the component first mounts\n */\n initialFiles?: FileResource[];\n\n /**\n * Maximum number of files allowed\n * Set to 1 for single file upload, undefined for unlimited\n */\n maxFiles?: number;\n\n /**\n * Maximum allowed file size in bytes\n * Example: 5 * 1024 * 1024 for 5MB\n */\n maxSize?: number;\n\n /**\n * Callback when files are dropped (regardless of validation result)\n * Provides both accepted and rejected files for handling\n */\n onDrop?: (acceptedFiles: File[], rejectedFiles: FileRejection[]) => void;\n\n /**\n * Callback when files pass validation and are accepted\n * Useful for immediately processing valid files\n */\n onDropAccepted?: (files: File[]) => void;\n\n /**\n * Callback when files fail validation\n * Provides detailed rejection reasons for each file\n */\n onDropRejected?: (rejectedFiles: FileRejection[]) => void;\n\n /**\n * Callback when user clicks delete button on a file preview\n * Used to remove files from state or external storage\n */\n onFileDelete?: (fileResource: FileResource) => void;\n\n /**\n * When true, if any file fails validation, all files are rejected\n * When false (default), valid files are accepted even if others are rejected\n */\n strictValidation?: boolean;\n\n /**\n * Custom validator function for additional validation rules\n * Allows you to implement validation beyond the built-in type/size checks\n */\n validator?: FileValidator;\n};\n\n/**\n * Props for the FileUploadProvider component\n * Extends the config props with React children\n */\ntype FileUploadProviderProps = FileUploadProviderConfigProps & {\n /** React children */\n children: React.ReactNode;\n};\n\n/**\n * Provider component for file upload functionality\n *\n * This provider manages both file state and validation rules:\n * 1. Maintains file state (selected/uploaded files)\n * 2. Provides context for drag/drop operations and file management\n * 3. Wraps children with validation context for enforcing file rules\n *\n * While FileDropzone and FilePreviewList can function as standalone components,\n * using this provider offers coordinated state management when using multiple\n * file upload components together.\n *\n * @example\n * ```tsx\n * <FileUploadProvider\n * accept=\"images\"\n * maxFiles={5}\n * maxSize={2 * 1024 * 1024}\n * onDropAccepted={(files) => console.log('Accepted:', files)}\n * >\n * <FileDropzone />\n * <FilePreviewList />\n * </FileUploadProvider>\n * ```\n */\nexport const FileUploadProvider = ({\n accept,\n children,\n disabled = false,\n error,\n initialFiles = [],\n maxFiles,\n maxSize,\n onDrop,\n onDropAccepted,\n onDropRejected,\n onFileDelete,\n strictValidation,\n validator,\n}: FileUploadProviderProps) => {\n const [files, setFiles] = useState<FileResource[]>(initialFiles);\n\n const value = {\n accept,\n disabled,\n files,\n onDrop,\n onDropAccepted,\n onDropRejected,\n onFileDelete,\n setFiles,\n };\n\n return (\n <UploadValidationProvider\n accept={accept}\n error={error}\n maxFiles={maxFiles}\n maxSize={maxSize}\n strictValidation={strictValidation}\n validator={validator}\n >\n <FileUploadContext.Provider value={value}>{children}</FileUploadContext.Provider>\n </UploadValidationProvider>\n );\n};\n\nFileUploadProvider.displayName = 'FileUploadProvider';\n\n/**\n * Hook to access the file upload context\n *\n * Provides access to the current files array and operations for\n * managing file uploads within the FileUploadProvider.\n *\n * @throws Error if used outside of a FileUploadProvider\n * @returns The FileUploadContextType object with files array and handlers\n *\n * @example\n * ```tsx\n * const { files, setFiles, onFileDelete } = useFileUploadContext();\n *\n * // Remove a file\n * const handleDelete = (fileToDelete) => {\n * onFileDelete?.(fileToDelete);\n * setFiles(files.filter(file => file.name !== fileToDelete.name));\n * };\n * ```\n */\nexport const useFileUploadContext = () => {\n const context = useContext<FileUploadContextType | undefined>(FileUploadContext);\n if (!context) {\n throw new Error('useFileUploadContext must be used within FileUploadProvider');\n }\n return context;\n};\n","import { useCallback } from 'react';\n\nimport { UploadValidationContextType } from '../../../providers/UploadValidationProvider';\nimport { FileResource, FileValidator } from '../../../types/commonTypes';\nimport { createMessageContext } from '../../../utils/createMessageContext';\nimport { resolveContextAwareMessage } from '../../../utils/messageUtils';\n\n/**\n * Hook that handles file validation during drag events over a drop zone\n * @param props Object containing:\n * - files: Currently selected files in the uploader\n * - mimeTypes: Optional mapping of accepted file types to their MIME type arrays\n * - validation: Validation context (from either UploadValidationProvider\n * or local useFileValidationLogic hook)\n * - validator: Optional custom validation function to perform additional checks\n * @returns Callback function for handling dragenter events with early validation feedback\n * @remarks\n * - Provides immediate validation feedback while files are being dragged over the drop zone\n * - File size validation is not possible during drag events as file data is not yet available\n * - Validates in a specific priority order: custom validator → file count → file type\n * - Clears all validation state when drag starts\n * - Sets appropriate validation error messages for display in the UI\n * - Works with the ValidationContext to maintain validation state\n */\n\ntype UseHandleDragEnterProps = {\n /** Current files in the upload area */\n files: FileResource[];\n /** MIME types to accept */\n mimeTypes?: Record<string, string[]>;\n /** Validation context */\n validation: UploadValidationContextType;\n /** Custom validator function */\n validator?: FileValidator;\n};\n\n// Fires when a user drags files over the upload zone - provides early feedback on file type and max file limit\n// Note: We cannot early-validate file size here since we don't have access to the file content during drag events, only after drop.\nexport const useHandleDragEnter = ({ files, mimeTypes, validation, validator }: UseHandleDragEnterProps) => {\n const {\n accept,\n clearAllValidation,\n formattedMaxSize,\n getValidationMessage,\n maxFiles,\n maxSize,\n setDragValidationError,\n validateCustomRules,\n validateFileCount,\n validateFileType,\n } = validation;\n\n return useCallback(\n (event: React.DragEvent<HTMLElement>) => {\n // Clear all previous validation errors when a new drag event occurs\n clearAllValidation();\n\n const items = event.dataTransfer.items;\n if (items.length === 0) {\n return;\n }\n\n // Validation priority follows a specific order with early returns:\n // 1. Custom validator (highest priority)\n if (validator) {\n // Drag validation for custom validator uses the first dragged item\n const file = items[0];\n const validationResult = validateCustomRules(file);\n if (validationResult) {\n // Use the first error in the array\n const result = validationResult[0];\n\n // Create context with all necessary data for the error message\n const messageContext = createMessageContext({\n accept,\n code: result.code,\n count: items.length,\n dragItems: items,\n formattedMaxSize,\n maxFiles,\n maxSize,\n messageType: 'drag',\n });\n\n // Set the error with a properly formatted message\n setDragValidationError({\n code: result.code,\n message: resolveContextAwareMessage(result.message, messageContext),\n });\n return;\n }\n }\n\n // 2. File count validation (second priority)\n if (!validateFileCount(files.length, items.length)) {\n const overflowCount = files.length + items.length - (maxFiles ?? Infinity);\n\n const errorCode = 'too-many-files';\n const errorMessage = getValidationMessage({\n code: errorCode,\n count: overflowCount,\n messageType: 'drag',\n });\n\n setDragValidationError({\n code: errorCode,\n message: errorMessage,\n });\n return;\n }\n\n // 3. File type validation (lowest priority)\n const invalidTypeFiles = Array.from(items).filter((item) => {\n // Skip directories in validation (no type or kind is 'directory')\n if (!item.type || item.kind === 'directory') {\n return false;\n }\n return !validateFileType(item.type, mimeTypes);\n });\n\n if (invalidTypeFiles.length > 0) {\n const errorCode = 'file-invalid-type';\n const errorMessage = getValidationMessage({\n code: errorCode,\n count: invalidTypeFiles.length,\n messageType: 'drag',\n });\n\n setDragValidationError({\n code: errorCode,\n message: errorMessage,\n });\n return;\n }\n\n // If we reach here, all validation passed - no error is set\n },\n [\n files.length,\n mimeTypes,\n clearAllValidation,\n setDragValidationError,\n getValidationMessage,\n validateFileCount,\n maxFiles,\n validateFileType,\n validateCustomRules,\n validator,\n accept,\n formattedMaxSize,\n maxSize,\n ]\n );\n};\n","import { UploadValidationContextType } from '../../../providers/UploadValidationProvider';\nimport {\n ContextAwareMessage,\n DynamicMessageContext,\n FileError,\n FileRejection,\n FileResource,\n ValidationError,\n} from '../../../types/commonTypes';\nimport { builtInErrorCodes } from '../../../utils/constants';\nimport { createMessageContext } from '../../../utils/createMessageContext';\nimport { resolveContextAwareMessage } from '../../../utils/messageUtils';\n\n// Type for tracking error groups\nexport type ErrorGroup = {\n count: number;\n files: File[];\n message: ContextAwareMessage<DynamicMessageContext>;\n};\n\n/**\n * Creates helper functions for processing file rejections and formatting error messages\n * @param validation Validation context containing message formatters and validation rules\n * @returns Object with helper functions for processing file rejections\n */\nexport const createRejectionHelpers = (validation: UploadValidationContextType) => {\n const { accept, formattedMaxSize, getValidationMessage, maxFiles, maxSize, strictValidation, validateFileCount } =\n validation;\n\n /**\n * Ensures an error group exists for the given code, creating one if necessary\n *\n * @param errorGroups - Record of existing error groups indexed by error code\n * @param code - The error code to get or create a group for\n * @param message - Optional error message to use when creating a new group\n * @returns The existing or newly created error group for the specified code\n * @remarks\n * - Error groups track files that failed with the same error code\n * - Each group maintains a count of files, file references, and a shared message\n * - New groups are initialized with empty arrays and zero counts\n */\n const getOrCreateErrorGroup = (\n errorGroups: Record<string, ErrorGroup>,\n code: string,\n message?: ContextAwareMessage<DynamicMessageContext>\n ): ErrorGroup => {\n if (!(code in errorGroups)) {\n errorGroups[code] = {\n count: 0,\n files: [],\n message: message ?? '',\n };\n }\n return errorGroups[code];\n };\n\n return {\n /**\n * Formats a human-readable error message for display based on error code and grouped files\n *\n * This function handles two types of validation errors:\n *\n * 1. System errors (built-in): For standard error codes like 'file-too-large' or 'too-many-files',\n * it uses the built-in message system with appropriate pluralization and formatting.\n *\n * 2. Custom validator errors: For custom error codes from user-defined validators,\n * it enriches the message with context about the rejected files (count, names, etc.).\n *\n * Used in two key scenarios:\n * - Creating consolidated error messages for the UI (one message per error type)\n * - Formatting individual file rejection messages for callbacks\n *\n * @param code - The error code identifying the validation failure\n * @param error - The error object containing the message (string or function)\n * @param errorGroups - Record of grouped errors with counts and file references\n * @returns A formatted, human-readable error message ready for display\n */\n getFormattedErrorGroupMessage: (\n code: string,\n error: ValidationError,\n errorGroups: Record<string, ErrorGroup>\n ) => {\n const isSystemError = builtInErrorCodes.includes(code);\n const errorGroup = errorGroups[code];\n\n // For system errors, use getValidationMessage directly\n if (isSystemError) {\n return getValidationMessage({\n code,\n count: errorGroup.count,\n messageType: 'drop',\n });\n }\n\n // For custom errors, we need to provide context about the rejected files\n const messageContext = createMessageContext({\n accept,\n code,\n count: errorGroup.count,\n dropFiles: errorGroup.files,\n formattedMaxSize,\n maxFiles,\n maxSize,\n messageType: 'drop',\n });\n\n // Resolve the message function with proper context containing all grouped files\n return resolveContextAwareMessage(error.message, messageContext);\n },\n\n getOrCreateErrorGroup,\n\n /**\n * Handles file count limits and returns updated accepted/rejected files\n *\n * This function enforces the maxFiles constraint by calculating whether adding\n * new files would exceed the configured limit.\n *\n * @param currentFiles - Existing files already uploaded or selected\n * @param droppedAcceptedFiles - New files that passed initial type/size validation\n * @param droppedRejectedFiles - New files that already failed validation for other reasons\n * @returns Object containing the final accepted and rejected files after limit checks\n * @remarks\n * - Considers both existing files and newly dropped files when checking limits\n * - Handles two validation modes:\n * 1. Strict validation (strictValidation: true):\n * If adding any files would exceed the limit, ALL files are rejected\n * 2. Partial upload (strictValidation: false):\n * Accepts files up to the remaining limit, rejecting only overflow files\n * - Calculates remaining slots as (maxFiles - currentFiles.length)\n * - When no maxFiles is defined, accepts all files (Infinity limit)\n * - Adds appropriate error metadata to the rejected files for UI feedback\n */\n handleFileCountLimits: (\n currentFiles: FileResource[],\n droppedAcceptedFiles: File[],\n droppedRejectedFiles: FileRejection[]\n ) => {\n let acceptedResult = droppedAcceptedFiles;\n let rejectionsResult = [...droppedRejectedFiles];\n\n // Check if the total number of files (including both accepted and rejected) would exceed the limit\n // This ensures users see the maxFiles error even if some files are rejected for other reasons\n const totalDroppedFiles = droppedAcceptedFiles.length + droppedRejectedFiles.length;\n const wouldExceedLimit = !validateFileCount(currentFiles.length, totalDroppedFiles);\n const remainingSlots = maxFiles ? maxFiles - currentFiles.length : Infinity;\n\n if (wouldExceedLimit) {\n // Calculate how many files exceed the limit, considering all dropped files\n const overflowCount = currentFiles.length + totalDroppedFiles - (maxFiles ?? Infinity);\n const errorCode = 'too-many-files';\n const errorMessage = getValidationMessage({\n code: errorCode,\n count: overflowCount,\n messageType: 'drop',\n });\n\n const maxFilesError: FileError = {\n code: errorCode,\n message: errorMessage,\n };\n\n // Add the error to all files that exceed the limit\n // Start with files that were already accepted (they passed other validations)\n const fileCountRejections = acceptedResult.slice(remainingSlots).map((file) => ({\n errors: [maxFilesError],\n file,\n }));\n\n // Add these new rejections to the existing ones\n rejectionsResult = [...rejectionsResult, ...fileCountRejections];\n\n if (!strictValidation) {\n // In partial upload mode, only accept files up to the max file limit\n acceptedResult = acceptedResult.slice(0, remainingSlots);\n } else {\n // In strict mode, reject all files if the total count exceeds the limit\n acceptedResult = [];\n }\n }\n\n return { allAcceptedFiles: acceptedResult, allRejections: rejectionsResult };\n },\n\n /**\n * Handles file size validation and returns updated accepted/rejected files\n *\n * This function checks if files exceed the maximum allowed size (maxSize)\n * and updates accept/reject lists accordingly.\n *\n * @param acceptedFiles - Files that have passed previous validation steps\n * @returns Object containing validated files and size-related rejections\n * @remarks\n * - Files exceeding maxSize are identified and grouped with a 'file-too-large' error\n * - Handles two validation modes:\n * 1. Strict validation (strictValidation: true):\n * If ANY file exceeds the size limit, ALL files are rejected\n * 2. Partial upload (strictValidation: false):\n * Only oversized files are rejected, others proceed normally\n * - When maxSize is undefined, all files pass size validation\n * - Adds appropriate error metadata to rejected files for UI feedback\n * - The returned object has separate lists for valid files and size rejections\n */\n handleFileSizeValidation: (acceptedFiles: File[]) => {\n let validFiles = [...acceptedFiles];\n let sizeRejections: FileRejection[] = [];\n\n // Check for oversized files\n const oversizedFiles = acceptedFiles.filter((file) => maxSize && file.size > maxSize);\n\n if (oversizedFiles.length > 0) {\n const errorCode = 'file-too-large';\n const errorMessage = getValidationMessage({\n code: errorCode,\n count: oversizedFiles.length,\n messageType: 'drop',\n });\n\n const fileSizeError: FileError = {\n code: errorCode,\n message: errorMessage,\n };\n\n // Add to rejections\n sizeRejections = oversizedFiles.map((file) => ({\n errors: [fileSizeError],\n file,\n }));\n\n if (!strictValidation) {\n // In partial upload mode, filter out oversized files\n validFiles = acceptedFiles.filter((file) => !maxSize || file.size <= maxSize);\n } else {\n // In strict mode, reject all files if any are oversized\n validFiles = [];\n }\n }\n\n return { sizeRejections, validFiles };\n },\n\n /**\n * Processes file rejections and groups them by error code\n *\n * This function takes an array of file rejections and organizes them into\n * error groups based on the error codes. Each group tracks a count of affected\n * files and the file references.\n *\n * @param rejections - Array of file rejections to process\n * @returns A record of error groups indexed by error code\n * @remarks\n * - Multiple files with the same error code are consolidated into a single group\n * - A file can appear in multiple groups if it has multiple error codes\n * - Each group tracks:\n * - count: Number of files affected by this error\n * - files: References to the affected files\n * - message: The error message (shared across the group)\n * - Used for generating consolidated error messages and UI summaries\n */\n processRejections: (rejections: FileRejection[]): Record<string, ErrorGroup> => {\n const groups: Record<string, ErrorGroup> = {};\n rejections.forEach((rejection) => {\n rejection.errors.forEach((error) => {\n const group = getOrCreateErrorGroup(groups, error.code, error.message);\n group.count++;\n group.files.push(rejection.file);\n });\n });\n\n return groups;\n },\n };\n};\n","import { useCallback } from 'react';\n\nimport { UploadValidationContextType } from '../../../providers/UploadValidationProvider';\nimport { FileRejection, FileResource } from '../../../types/commonTypes';\nimport { createRejectionHelpers } from './createFileRejectionHelpers';\n\n/**\n * Hook that handles file validation and processing when files are dropped\n * @param props Object containing:\n * - files: Currently selected files in the uploader\n * - onDrop: Optional callback triggered for both accepted and rejected files\n * - onDropAccepted: Optional callback triggered only for accepted files\n * - onDropRejected: Optional callback triggered only for rejected files\n * - setFiles: Function to update the files state with newly accepted files\n * - validation: Validation context (from either provider or local validation)\n * @returns Callback function for handling file drop events from react-dropzone\n * @remarks\n * - Performs validation in a specific sequence: file types → file sizes → file count\n * - Groups and formats error messages for consistent UI display\n * - Handles strict vs. partial validation modes differently:\n * - Strict: Rejects all files if any would be invalid\n * - Partial: Accepts valid files while rejecting invalid ones\n * - Updates file state only for valid files\n * - Clears validation state on completely successful drops\n * - Calls appropriate callbacks with processed files\n * - Sets validation errors in the validation context for UI display\n */\n\nexport type UseHandleDropProps = {\n /** Current files in the upload area */\n files: FileResource[];\n /** Callback when files are dropped */\n onDrop?: (acceptedFiles: File[], rejectedFiles: FileRejection[]) => void;\n /** Callback when files are accepted */\n onDropAccepted?: (acceptedFiles: File[]) => void;\n /** Callback when files are rejected */\n onDropRejected?: (rejectedFiles: FileRejection[]) => void;\n /** Function to update the files state */\n setFiles: (files: FileResource[]) => void;\n /** Validation context */\n validation: UploadValidationContextType;\n};\n\nexport const useHandleDrop = ({\n files,\n onDrop,\n onDropAccepted,\n onDropRejected,\n setFiles,\n validation,\n}: UseHandleDropProps) => {\n const { clearAllValidation, setDropValidationErrors, setFileRejections, strictValidation } = validation;\n\n return useCallback(\n (acceptedFiles: File[], rejectedFiles: FileRejection[]) => {\n const {\n getFormattedErrorGroupMessage,\n handleFileCountLimits,\n handleFileSizeValidation,\n processRejections,\n } = createRejectionHelpers(validation);\n\n // Step 1: Validate file sizes\n // Note: acceptedFiles have already passed type validation by react-dropzone\n const { sizeRejections, validFiles } = handleFileSizeValidation(acceptedFiles);\n\n // Filter out only File objects from current files for validation\n // This is needed because FileResource can include RemoteFile objects\n const currentFileObjects = files.filter((file): file is File => file instanceof File);\n\n // Step 2: Handle file count limits with all validated files\n // This combines all rejections from previous validation steps, including custom validator errors\n const { allAcceptedFiles, allRejections } = handleFileCountLimits(currentFileObjects, validFiles, [\n ...rejectedFiles, // Already includes custom validation errors\n ...sizeRejections,\n ]);\n\n // Step 3: Process all rejections and group by error code\n // This creates a dictionary of error groups for better UI presentation\n // Message functions are preserved at this stage for proper grouping\n const errorGroups = processRejections(allRejections);\n\n // Step 4: Extract errors for UI display, now resolving messages with proper context\n // We need one error message per error type for the UI\n const errors = Object.entries(errorGroups).map(([code]) => ({\n code,\n message: getFormattedErrorGroupMessage(code, { code, message: errorGroups[code].message }, errorGroups),\n }));\n\n // Step 5: Format rejections for callbacks - maintain file-to-errors relationship\n // These preserve the connection between each file and its specific rejection reasons\n const processedRejections = allRejections.map((rejection) => ({\n errors: rejection.errors.map((error) => ({\n code: error.code,\n message: getFormattedErrorGroupMessage(error.code, error, errorGroups),\n })),\n file: rejection.file,\n }));\n\n const hasRejections = processedRejections.length > 0;\n\n // Step 6: Handle strict validation - reject all files if there are any rejections\n if (strictValidation && hasRejections) {\n // In strict mode, even valid files are rejected if any file has issues\n const strictRejections = [\n ...processedRejections,\n ...allAcceptedFiles.map((file) => ({\n errors,\n file,\n })),\n ];\n\n setFileRejections(strictRejections);\n setDropValidationErrors(errors);\n onDropRejected?.(strictRejections);\n onDrop?.([], strictRejections);\n return;\n }\n\n // Step 7: Handle partial upload mode (OR no rejections)\n setFileRejections(processedRejections);\n setDropValidationErrors(errors);\n onDropRejected?.(processedRejections);\n\n // Step 8: Handle successful file uploads\n if (allAcceptedFiles.length > 0) {\n if (!hasRejections) {\n // Clear validation only if there are no rejections\n clearAllValidation();\n }\n // Update file state with new files (as FileResource[])\n const newFileResources: FileResource[] = [...files, ...allAcceptedFiles];\n setFiles(newFileResources);\n onDropAccepted?.(allAcceptedFiles);\n }\n\n // Always call onDrop with both sets of files\n onDrop?.(allAcceptedFiles, processedRejections);\n },\n [\n files,\n clearAllValidation,\n setDropValidationErrors,\n setFiles,\n onDrop,\n onDropAccepted,\n onDropRejected,\n setFileRejections,\n strictValidation,\n validation,\n ]\n );\n};\n","import { FileResource } from '../../../types/commonTypes';\n\n/**\n * Hook that determines if file uploads are currently available/disabled\n * @param props Object containing:\n * - disabled: Optional flag to manually disable uploads\n * - files: Currently selected files\n * - maxFiles: Optional maximum number of files allowed\n * @returns Object containing:\n * - hasReachedFileLimit: Whether max file count has been reached\n * - isDisabled: Whether uploads are currently disabled\n * @remarks\n * - Combines both manual disable state and file limit restrictions\n * - Used to prevent uploads when either condition is met\n */\nexport type UploadAvailabilityParams = {\n /** Whether the upload is disabled */\n disabled?: boolean;\n /** Current files in the upload area */\n files: FileResource[];\n /** Maximum number of files allowed */\n maxFiles?: number;\n};\n\ntype UploadAvailability = {\n hasReachedFileLimit: boolean;\n isDisabled: boolean;\n};\n\nexport const useUploadAvailability = ({\n disabled = false,\n files,\n maxFiles,\n}: UploadAvailabilityParams): UploadAvailability => {\n // Calculate if we've reached the file limit\n const hasReachedFileLimit = maxFiles !== undefined && files.length >= maxFiles;\n // Consider both local and provider disabled states\n const isDisabled = disabled || hasReachedFileLimit;\n\n return {\n hasReachedFileLimit,\n isDisabled,\n };\n};\n","import { UploadValidationContextType } from '../../providers/UploadValidationProvider';\n\n/**\n * Creates an optimized validator function for React-Dropzone that preserves\n * function-based validation messages for later resolution\n *\n * @param validationContext - The validation context containing the custom validator\n * @returns A validator function compatible with React-Dropzone\n */\nexport const createDropzoneValidator = (validationContext: UploadValidationContextType) => {\n // Extract the custom validator function\n const { validateCustomRules } = validationContext;\n\n // Return undefined if no custom validator exists\n if (typeof validateCustomRules !== 'function') {\n return undefined;\n }\n\n // Return the actual validator function\n return (file: File) => {\n // Run the custom validator\n const validationResult = validateCustomRules(file);\n\n // If no errors, return null (valid)\n if (!validationResult) {\n return null;\n }\n\n // If no errors in array, return null\n if (validationResult.length === 0) {\n return null;\n }\n\n // Return errors with message functions preserved\n // This allows for proper error grouping before message resolution\n return validationResult.map((error) => ({\n code: error.code,\n message: error.message,\n }));\n };\n};\n","import { CommonFileTypes } from '../types/commonTypes';\nimport { ACCEPTED_MIME_TYPES } from './constants';\n\n/**\n * Utility function that converts file type restrictions into MIME type format for react-dropzone\n * @param accept - Optional file type restrictions, can be either:\n * - A preset category from CommonFileTypes (e.g., 'images', 'pdfs', 'documents')\n * - An array of specific MIME types (e.g., ['image/jpeg', 'image/png'])\n * @returns Object mapping MIME types to empty arrays for react-dropzone's accept prop\n * @remarks\n * - Returns undefined when no restrictions are provided (accepts all file types)\n * - Handles both preset categories and custom MIME type arrays\n * - Formats MIME types to match react-dropzone's expected structure\n */\n\nexport const getMimeTypes = (accept?: CommonFileTypes | string[]) => {\n if (!accept) {\n return undefined; // No restrictions\n }\n\n if (Array.isArray(accept)) {\n return accept.reduce((acc, curr) => ({ ...acc, [curr]: [] }), {}); // Custom MIME types\n }\n\n return ACCEPTED_MIME_TYPES[accept].reduce((acc, curr) => ({ ...acc, [curr]: [] }), {}); // Preset category\n};\n","import { cn } from '@evolve.ui/theme-system';\n\nimport { FileError } from '../types';\n\ntype DropzoneState = {\n disableDragValidation: boolean;\n disabled: boolean;\n isDragActive: boolean;\n validationError?: FileError | null;\n};\n\nexport const getUploadZoneStyles = ({\n disabled,\n disableDragValidation,\n isDragActive,\n validationError,\n}: DropzoneState) => {\n const isInvalid = Boolean(validationError);\n const isErrorState = disableDragValidation ? false : isInvalid;\n const isDefaultState = !isDragActive && !isErrorState;\n const isDraggedOver = isDragActive && (disableDragValidation || !isInvalid);\n const isDefaultAppearance = isDefaultState && !disabled;\n\n return cn(\n // Layout & Container\n [\n 'relative',\n 'flex flex-col',\n 'h-full w-full',\n 'items-center justify-center',\n 'rounded-container',\n 'outline-dashed outline-1 -outline-offset-1',\n 'p-sm',\n 'transition-colors',\n 'hover:bg-background-hover hover:outline-border-hover', // Hover (when not dragging)\n ],\n\n // Focus & Interactive Base\n ['hui-focus-visible-outline'],\n\n // Interactive States\n {\n // Disabled\n 'cursor-not-allowed bg-background-disabled outline-border-disabled hover:bg-background-disabled hover:outline-border-disabled':\n disabled,\n\n // Enabled\n 'cursor-pointer active:bg-background-pressed active:outline active:outline-4 active:outline-focus-primary':\n !disabled,\n\n // Drag Active (only when not disabled)\n 'outline outline-4 outline-offset-0 outline-focus-primary': isDragActive && !disabled,\n },\n\n // Visual States\n {\n // Error (only when not disabled)\n 'bg-background-critical-light outline-dashed outline-1 -outline-offset-1 outline-border-critical':\n isErrorState && !disabled,\n\n // Drag Over\n 'bg-background-hover': isDraggedOver && !isErrorState && !disabled,\n\n // Default\n 'bg-background-primary outline-border-secondary': isDefaultAppearance,\n }\n );\n};\n","import { useMemo } from 'react';\n\nimport { useWindowIsMobile } from '../../../../../providers';\nimport { SubtleLink } from '../../../../../Typography/Links/Links';\nimport { UploadValidationContextType } from '../../../../providers/UploadValidationProvider';\n\ntype DropzoneTextProps = {\n disableDragValidation: boolean;\n filePluralizationText: string;\n hasReachedFileLimit: boolean;\n isDisabled: boolean;\n isDragActive: boolean;\n isDragReject: boolean;\n maxFiles?: number;\n validation: UploadValidationContextType;\n};\n\nexport const DropzoneText = ({\n disableDragValidation,\n filePluralizationText,\n hasReachedFileLimit,\n isDisabled,\n isDragActive,\n isDragReject,\n maxFiles,\n validation,\n}: DropzoneTextProps) => {\n const isMobile = useWindowIsMobile();\n const { dragValidationError } = validation;\n\n const dropzoneText = useMemo(() => {\n // Static states (before any drag)\n if (hasReachedFileLimit) {\n return <>{`${maxFiles} file limit reached. Remove files to upload more.`}</>;\n }\n\n // Show validation messages during drag\n if (isDragActive && dragValidationError?.code) {\n return <>{dragValidationError.message}</>;\n }\n\n // Show \"Drop files here\" during valid drag\n if (isDragActive && (disableDragValidation || !isDragReject)) {\n return <>Drop files here to upload</>;\n }\n\n // Default states (no drag)\n if (isMobile) {\n return <>{`Click to browse and add ${filePluralizationText}`}</>;\n }\n\n // Desktop default\n return (\n <>\n <SubtleLink\n className=\"group-hover:underline\"\n disabled={isDisabled}\n href=\"#\"\n onClick={(e) => e.preventDefault()}\n >\n Browse\n </SubtleLink>{' '}\n or drag {filePluralizationText} here to upload\n </>\n );\n }, [\n filePluralizationText,\n hasReachedFileLimit,\n isDisabled,\n isDragActive,\n isDragReject,\n disableDragValidation,\n maxFiles,\n isMobile,\n dragValidationError,\n ]);\n\n return <>{dropzoneText}</>;\n};\n\nDropzoneText.displayName = 'DropzoneText';\n","import { TextColorAliases } from '@evolve.ui/theme-system';\n\nimport { UploadSimple } from '../../../../../Icons';\nimport { BodyPrimary } from '../../../../../Typography/Text/Text';\nimport { DropzoneText } from './DropzoneText';\n\ntype DropzoneContentProps = {\n dropzoneTextProps: React.ComponentProps<typeof DropzoneText>;\n isDisabled: boolean;\n};\n\nexport const DropzoneContent = ({ dropzoneTextProps, isDisabled }: DropzoneContentProps) => {\n const dropzoneTextColor: TextColorAliases = isDisabled ? 'disabled' : 'primary';\n\n return (\n <div className=\"flex w-full flex-col items-center gap-xs\">\n <UploadSimple color={dropzoneTextColor} />\n <BodyPrimary\n className=\"text-center\"\n color={dropzoneTextColor}\n >\n <DropzoneText {...dropzoneTextProps} />\n </BodyPrimary>\n </div>\n );\n};\n\nDropzoneContent.displayName = 'DropzoneContent';\n","import { Badge } from '../../../../../Badge/Badge';\nimport { ColumnType, Table } from '../../../../../Table';\nimport { BodyPrimary, H4 } from '../../../../../Typography/Text/Text';\nimport { FileErrorCode, FileRejection } from '../../../../types';\nimport { builtInErrorCodes } from '../../../../utils/constants';\n\ntype DisplayMode = 'by-error' | 'by-file';\n\ntype Props = {\n displayMode: DisplayMode;\n fileRejections: FileRejection[];\n};\n\ntype TableData = {\n col1: string;\n col2: string | string[];\n col3: string | string[];\n key: string;\n};\n\nconst BadgeCell = ({ codes }: { codes: string | string[] }) => {\n const codeArray = Array.isArray(codes) ? codes : [codes];\n\n return (\n <div className=\"flex flex-col justify-start gap-[4px]\">\n {codeArray.map((code, index) => (\n <Badge\n className=\"my-[2px]\"\n color=\"critical\"\n data-testid={`badge-${code}`}\n emphasis={builtInErrorCodes.includes(code as FileErrorCode) ? 'subtle' : 'bold'}\n key={`${code}-${index}`}\n size=\"xs\"\n >\n {code}\n </Badge>\n ))}\n </div>\n );\n};\n\nexport const FileRejectionsDisplay = ({ displayMode, fileRejections = [] }: Props) => {\n const totalErrors = fileRejections.reduce((sum, rejection) => sum + rejection.errors.length, 0);\n\n const tableData =\n displayMode === 'by-error'\n ? fileRejections.flatMap((rejection, fileIndex) =>\n rejection.errors.map((error, errorIndex) => ({\n col1: rejection.file.name,\n col2: error.code,\n col3: error.message,\n key: `${rejection.file.name}-${fileIndex}-${errorIndex}`,\n }))\n )\n : fileRejections.map((rejection, index) => ({\n col1: rejection.file.name,\n col2: rejection.errors.map((error) => error.code),\n col3: rejection.errors.map((error) => error.message),\n key: `${rejection.file.name}-${index}`,\n }));\n\n const columns: ColumnType<TableData>[] = [\n {\n align: 'left',\n header: 'File Name',\n key: 'col1',\n },\n {\n header: displayMode === 'by-error' ? 'Error Code' : 'Error Codes',\n key: 'col2',\n renderItem: (data: TableData) => <BadgeCell codes={data.col2} />,\n },\n {\n header: displayMode === 'by-error' ? 'Message' : 'Messages',\n key: 'col3',\n renderItem:\n displayMode === 'by-file'\n ? (data: TableData) => (\n <div className=\"flex flex-col gap-[2px]\">\n {(data.col3 as string[]).map((message, index) => (\n <span key={index}>{message}</span>\n ))}\n </div>\n )\n : undefined,\n },\n ];\n\n return (\n <>\n <div className=\"mb-xs mt-sm flex items-center justify-between px-[2px]\">\n <H4>File Rejections {displayMode === 'by-error' ? '(by Error)' : '(by File)'}</H4>\n <BodyPrimary>\n {fileRejections.length} files ({totalErrors} errors)\n </BodyPrimary>\n </div>\n <Table\n columns={columns}\n data={tableData}\n emptyStateHeaderText=\"No files rejected\"\n emptyStateSupportingText=\"Upload files to monitor rejections\"\n fillHorizontal\n hideBorder\n rowDensity=\"sm\"\n />\n </>\n );\n};\n\nFileRejectionsDisplay.displayName = 'FileRejectionsDisplay';\n","import { Tabs } from '../../../../../Tabs/Tabs';\nimport { FileRejection } from '../../../../types/commonTypes';\nimport { FileRejectionsDisplay } from './FileRejectionsDisplay';\n\ntype Props = {\n fileRejections: FileRejection[];\n};\n\nexport const FileDropzoneDebugger = ({ fileRejections = [] }: Props) => {\n return (\n <div className=\"mt-md rounded-container p-sm outline-dashed outline-1 -outline-offset-1 outline-border-secondary\">\n <Tabs\n tabs={[\n {\n content: (\n <FileRejectionsDisplay\n displayMode=\"by-error\"\n fileRejections={fileRejections}\n />\n ),\n contentId: 'rejections-by-error',\n label: 'Errors',\n },\n {\n content: (\n <FileRejectionsDisplay\n displayMode=\"by-file\"\n fileRejections={fileRejections}\n />\n ),\n contentId: 'rejections-by-file',\n label: 'Files',\n },\n ]}\n />\n </div>\n );\n};\n\nFileDropzoneDebugger.displayName = 'FileDropzoneDebugger';\n","import { cn } from '@evolve.ui/theme-system';\nimport { useContext } from 'react';\nimport { useDropzone } from 'react-dropzone';\n\nimport { Caption, LabelMini } from '../../../Typography/Text/Text';\nimport { formatFileSize } from '../../../utils/formatFileSize';\nimport { useFileValidation } from '../../hooks';\nimport { useHandleDragEnter } from '../../hooks/upload/useHandleDragEnter/useHandleDragEnter';\nimport { useHandleDrop } from '../../hooks/upload/useHandleDrop/useHandleDrop';\nimport { useUploadAvailability } from '../../hooks/upload/useUploadAvailability/useUploadAvailability';\nimport { createDropzoneValidator } from '../../hooks/validation/createDropzoneValidator';\nimport { FileUploadContext, FileUploadContextType } from '../../providers/FileUploadProvider';\nimport { FileDropzoneProps } from '../../types/sharedTypes';\nimport { getMimeTypes } from '../../utils/getMimeTypes';\nimport { getUploadZoneStyles } from '../../utils/styles';\nimport { DropzoneContent } from './components/DropzoneContent/DropzoneContent';\nimport { FileDropzoneDebugger } from './components/FileDropzoneDebugger/FileDropzoneDebugger';\n\n/**\n * FileDropzone component for handling file uploads with drag and drop support.\n * This is a versatile file input component that can work both as a standalone\n * component or as part of the FileUpload system.\n */\n\n/**\n * Handles the dual-mode functionality of the FileDropzone component, supporting both standalone usage\n * and provider-wrapped usage.\n *\n * ## Validation Modes\n * - **Provider Mode**: Uses validation context from FileUploadProvider for coordinated validation across components\n * - **Standalone Mode**: Creates local validation instance for independent operation\n *\n * ## Props & Context Resolution\n * The component follows a specific precedence order for each property:\n * 1. Direct props take highest priority (for granular control)\n * 2. Context values serve as fallbacks (for coordinated state)\n * 3. Default values as final fallbacks (for safety)\n *\n * This enables two key use cases:\n * 1. Standalone Usage: <FileDropzone maxFiles={5} onDrop={handleDrop} />\n * 2. Provider Usage:\n * <FileUploadProvider maxFiles={5}>\n * <FileDropzone /> // Inherits provider config\n * <FileDropzone maxFiles={1} /> // Overrides specific provider values\n * </FileUploadProvider>\n */\nexport const FileDropzone = ({\n accept: acceptProp,\n ariaLabel = 'Browse or drag files here to upload.',\n className,\n 'data-testid': dataTestId = 'file-dropzone',\n disabled: disabledProp = false,\n disableDragValidation = false,\n error,\n files: filesProp,\n helpText,\n helpTextAlignCenter,\n hideErrors = false,\n hideHelpText = false,\n labelText,\n maxFiles: maxFilesProp,\n maxSize: maxSizeProp,\n onDrop: onDropProp,\n onDropAccepted: onDropAcceptedProp,\n onDropRejected: onDropRejectedProp,\n onFilesChange: onFilesChangeProp,\n showDebugger,\n strictValidation,\n validator,\n}: FileDropzoneProps) => {\n const uploadContext = useContext<FileUploadContextType | undefined>(FileUploadContext);\n\n const validationConfig = {\n accept: acceptProp,\n error,\n maxFiles: maxFilesProp,\n maxSize: maxSizeProp,\n strictValidation,\n validator,\n };\n\n /* IMPORTANT: This component supports both standalone usage and provider usage */\n // useFileValidation automatically detects if we're in a provider context\n // If not in provider, create local validation for standalone usage\n const validation = useFileValidation(validationConfig);\n\n // Determine whether to use context or local state for files and setFiles\n const files = filesProp ?? uploadContext?.files ?? [];\n const setFiles = onFilesChangeProp ?? uploadContext?.setFiles ?? (() => {});\n\n // Intentionally check both props and context with precedence order\n const disabled = disabledProp || uploadContext?.disabled;\n const onDrop = onDropProp ?? uploadContext?.onDrop;\n const onDropAccepted = onDropAcceptedProp ?? uploadContext?.onDropAccepted;\n const onDropRejected = onDropRejectedProp ?? uploadContext?.onDropRejected;\n const maxFiles = maxFilesProp ?? validation.maxFiles;\n const maxSize = maxSizeProp ?? validation.maxSize;\n const accept = acceptProp ?? validation.accept;\n /* END IMPORTANT */\n\n // Check if upload is disabled based on current state\n const { hasReachedFileLimit, isDisabled } = useUploadAvailability({\n disabled,\n files,\n maxFiles,\n });\n\n const formattedMaxSize = maxSize ? formatFileSize(maxSize) : undefined;\n\n const defaultHelpText = formattedMaxSize ? `File size must be smaller than ${formattedMaxSize}` : undefined;\n\n // If custom help text is provided, use it. Otherwise, use the default help text, or hide it.\n const helpTextToDisplay = hideHelpText ? undefined : (helpText ?? defaultHelpText);\n\n // Configure text based on multiple vs single file mode\n const allowMultipleFiles = maxFiles === undefined || maxFiles > 1;\n const filePluralizationText = allowMultipleFiles ? 'files' : 'a file';\n const mimeTypes = getMimeTypes(accept);\n\n // Set up drag and drop handlers\n const handleDrop = useHandleDrop({\n files,\n onDrop,\n onDropAccepted,\n onDropRejected,\n setFiles,\n validation,\n });\n\n const handleDragEnter = useHandleDragEnter({\n files,\n mimeTypes,\n validation,\n validator,\n });\n\n // Configure the dropzone\n const { getInputProps, getRootProps, isDragActive, isDragReject } = useDropzone({\n accept: mimeTypes,\n disabled: isDisabled,\n maxSize,\n multiple: allowMultipleFiles,\n onDragEnter: disableDragValidation ? validation.clearAllValidation : handleDragEnter,\n onDragLeave: validation.clearAllValidation,\n onDrop: handleDrop,\n // @ts-expect-error Our validator returns potentially function-based messages, React-Dropzone expects strings.\n // This is intentional and allows us to resolve dynamic messages later with proper file counts.\n validator: createDropzoneValidator(validation),\n });\n\n // Determine Dropzone styles based on interaction state\n const activeCode = isDragActive ? validation.dragValidationError : validation.dropValidationErrors[0];\n const uploadZoneStyles = getUploadZoneStyles({\n disabled: isDisabled,\n disableDragValidation,\n isDragActive,\n validationError: activeCode,\n });\n\n return (\n <div\n aria-label={ariaLabel}\n className={cn('flex h-full w-full flex-col gap-[4px]', className)}\n role=\"region\"\n >\n {labelText && <LabelMini color={isDisabled ? 'disabled' : 'secondary'}>{labelText}</LabelMini>}\n <div\n {...getRootProps({\n 'aria-disabled': isDisabled,\n className: cn('group min-h-[88px] w-full', uploadZoneStyles),\n 'data-testid': `${dataTestId}-container`,\n onClick: validation.clearAllValidation,\n role: 'button',\n })}\n >\n <input\n {...getInputProps({\n 'aria-label': `Upload ${filePluralizationText}`,\n 'data-testid': `${dataTestId}-input`,\n })}\n />\n <DropzoneContent\n dropzoneTextProps={{\n disableDragValidation,\n filePluralizationText,\n hasReachedFileLimit,\n isDisabled,\n isDragActive,\n isDragReject,\n maxFiles,\n validation,\n }}\n isDisabled={isDisabled}\n />\n </div>\n <div\n className={cn('relative flex flex-col gap-[4px]', {\n 'items-center': helpTextAlignCenter,\n })}\n >\n {helpTextToDisplay && (\n <Caption color={isDisabled ? 'disabled' : 'secondary'}>{helpTextToDisplay}</Caption>\n )}\n {!hideErrors &&\n validation.dropValidationErrors.map((error, index) => (\n <Caption\n color=\"critical\"\n key={`${error.code}-${index}`}\n role=\"alert\"\n >\n {error.message}\n </Caption>\n ))}\n </div>\n {/* Display debug information around fileRejections when showDebugger is true */}\n {showDebugger && <FileDropzoneDebugger fileRejections={validation.fileRejections} />}\n </div>\n );\n};\n\nFileDropzone.displayName = 'FileDropzone';\n","import { BaseFileCardProps } from '../../../components/types';\n\n/**\n * Helper function to check if an element or its parents have the data-no-drag attribute\n * Exported for testing, you should probably be using the `dataNoDragSortable` function instead\n * @param element - The element to check\n * @returns Whether the element or any of its parents have the data-no-drag attribute\n */\nexport const hasDataNoDragOrParent = (element: HTMLElement | null): boolean => {\n if (!element) {\n return false;\n }\n if (element.hasAttribute('data-no-drag')) {\n return true;\n }\n if (element.parentElement) {\n return hasDataNoDragOrParent(element.parentElement);\n }\n return false;\n};\n\n/**\n * Modified sortable object that stops propagation if the parent element has the data-no-drag attribute\n * @param sortable - The sortable object to modify\n * @returns The modified sortable object\n */\nexport const dataNoDragSortable = (sortable: BaseFileCardProps['sortable'] | undefined | null) => {\n if (!sortable) {\n return null;\n }\n return {\n ...sortable,\n attributes: {\n ...sortable.attributes,\n },\n listeners: {\n ...sortable.listeners,\n onPointerDown: (e: React.PointerEvent) => {\n if (hasDataNoDragOrParent(e.target as HTMLElement)) {\n e.stopPropagation();\n return;\n }\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n sortable.listeners?.onPointerDown?.(e);\n },\n },\n };\n};\n","import { cn } from '@evolve.ui/theme-system';\n\nimport { Badge } from '../../../Badge/Badge';\nimport { Checkbox } from '../../../ChoiceListItem';\nimport { IconButton } from '../../../IconButton/IconButton';\nimport { DotsSixVertical, DotsThreeOutlineVertical, Paperclip, Trash } from '../../../Icons';\nimport { Menu, MenuItem } from '../../../Menu';\nimport { ProgressCircle } from '../../../ProgressCircle/ProgressCircle';\nimport { BodyPrimary, BodySecondary } from '../../../Typography/Text/Text';\nimport { formatFileSize } from '../../../utils/formatFileSize';\nimport { dataNoDragSortable } from '../../components/GridFileCard/utils/sortable';\nimport { useImageFilePreviewUrl } from '../../hooks/filePreview/useImageFilePreviewUrl';\nimport { FileResource } from '../../types';\nimport { BaseFileCardProps } from '../types';\n\ntype GridViewProps = BaseFileCardProps & {\n badge?: string;\n 'data-testid'?: string;\n statusText?: string;\n};\n\n/**\n * Actions to render. First 3 actions will be visible buttons,\n * remaining will appear in overflow menu.\n */\nconst MAX_VISIBLE_ACTIONS = 3;\n\nexport const GridFileCard = ({\n actions = [],\n badge,\n className,\n 'data-testid': dataTestId = 'grid-file-card',\n draggable,\n errorMessage,\n fileName,\n hideFileName = false,\n hideFileSize = false,\n hideFileStatus = false,\n imageSource,\n isSelected,\n onDelete,\n onImageError,\n onSelect,\n progress,\n selectable,\n sortable,\n status = 'default',\n statusIcon,\n statusText,\n}: GridViewProps) => {\n const previewUrl = useImageFilePreviewUrl(imageSource);\n\n const isRemoteFile = 'url' in imageSource;\n const fileSize = isRemoteFile ? '' : formatFileSize(imageSource.size);\n\n // Automatically hide file size for URLs, respect the prop for Files\n const shouldHideFileSize = hideFileSize || isRemoteFile;\n\n const defaultFileName = isRemoteFile ? (imageSource.url.split('/').pop() ?? 'image') : imageSource.name;\n const fileDisplayName = fileName ?? defaultFileName;\n\n // Status checks\n const isError = status === 'error';\n const isPending = status === 'pending';\n const isProgressing = status === 'progressing';\n const isComplete = status === 'complete';\n const isDragging = sortable?.isDragging ?? false;\n\n // Determine when to auto-render ProgressCircle\n // Only when statusIcon is not provided AND status is pending/progressing/complete\n const shouldShowProgressCircle = !statusIcon && (isPending || isProgressing || isComplete);\n\n // Determine what to show below the file name (priority: error > progressing > size)\n let fileStatusText = null;\n\n if (isError && errorMessage && !hideFileStatus) {\n fileStatusText = (\n <BodySecondary\n className=\"text-text-critical\"\n data-no-drag\n >\n {errorMessage}\n </BodySecondary>\n );\n } else if ((isProgressing || isPending) && !hideFileStatus) {\n // Use custom statusText if provided, otherwise use default\n const defaultStatusText = isPending ? 'Pending' : 'Uploading';\n const displayStatusText = statusText ?? defaultStatusText;\n fileStatusText = (\n <BodySecondary\n color=\"secondary\"\n data-no-drag\n >\n {displayStatusText}\n </BodySecondary>\n );\n } else if (!shouldHideFileSize) {\n fileStatusText = (\n <BodySecondary\n color={isError ? 'critical' : 'secondary'}\n data-no-drag\n >\n {fileSize}\n </BodySecondary>\n );\n }\n\n const actionsWithDelete = [\n ...actions,\n ...(onDelete\n ? [\n {\n icon: Trash,\n iconStyle: 'regular',\n name: 'Delete',\n onClick: (_: React.MouseEvent<HTMLElement>, fileResource: FileResource) => onDelete(fileResource),\n },\n ]\n : []),\n ];\n\n // Modified sortable object that prevents drag events if the parent element has the data-no-drag attribute\n const modifiedSortable = dataNoDragSortable(sortable);\n\n // Handle visible actions\n const visibleActions = actionsWithDelete.slice(0, MAX_VISIBLE_ACTIONS);\n\n // Handle overflow actions - only used when we have 4+ actions\n const overflowActions = actionsWithDelete.slice(MAX_VISIBLE_ACTIONS);\n\n // Map status to ProgressCircle-compatible status (only needed when shouldShowProgressCircle is true)\n let progressCircleStatus: 'pending' | 'progressing' | 'complete';\n if (isPending) {\n progressCircleStatus = 'pending';\n } else if (isProgressing) {\n progressCircleStatus = 'progressing';\n } else {\n progressCircleStatus = 'complete';\n }\n\n const isProcessing = isPending || isProgressing;\n\n return (\n <div\n aria-busy={isProcessing || undefined}\n className={cn(\n 'group/grid-file-card relative flex w-full min-w-0 cursor-pointer flex-col gap-xs',\n 'rounded-container p-xs',\n 'ring-1',\n 'transition-all duration-200',\n 'hover:z-10',\n 'focus-within:z-10',\n {\n // Error state\n 'bg-background-critical-light ring-border-critical focus-within:bg-background-critical-light focus-within:ring-border-critical hover:bg-background-critical-light hover:ring-border-critical':\n isError && !isDragging,\n // Default state\n 'bg-background-primary ring-transparent focus-within:bg-background-subdued focus-within:ring-border-secondary hover:bg-background-subdued hover:ring-border-secondary':\n !isError && !isDragging,\n // Drag state\n 'z-50 scale-105 border-border-selected bg-background-secondary shadow-01': isDragging,\n },\n className\n )}\n data-testid={dataTestId}\n ref={modifiedSortable?.setNodeRef}\n style={modifiedSortable?.styles}\n {...modifiedSortable?.attributes}\n {...modifiedSortable?.listeners}\n >\n <div className=\"relative aspect-square min-w-0 items-center justify-center rounded-container bg-background-subdued\">\n <div className=\"absolute left-0 top-0 z-10 flex items-center gap-[2px] p-xs\">\n {selectable && (\n <div data-no-drag>\n <Checkbox.Option\n checked={isSelected}\n className=\"![grid-template-columns:24px_0px_1fr]\"\n onChange={(e: React.ChangeEvent<HTMLInputElement>) => {\n e.stopPropagation();\n onSelect?.(imageSource, e.target.checked);\n }}\n />\n </div>\n )}\n {badge && (\n <Badge\n className=\"mt-[3px]\"\n color=\"neutral\"\n emphasis=\"bold\"\n round\n size=\"xs\"\n >\n {badge}\n </Badge>\n )}\n </div>\n {draggable && (\n <div className=\"absolute right-[4.4px] top-[8px] z-10 p-[2px]\">\n <DotsSixVertical\n className=\"flex-shrink-0 cursor-grab\"\n color=\"inverse\"\n size=\"sm\"\n style=\"bold\"\n />\n </div>\n )}\n {previewUrl ? (\n <img\n alt={fileDisplayName}\n className=\"absolute inset-0 h-full w-full rounded-container object-cover\"\n onError={() => onImageError?.(imageSource)}\n src={previewUrl}\n />\n ) : (\n <div className=\"absolute inset-0 flex items-center justify-center\">\n <Paperclip\n color=\"primary\"\n size=\"md\"\n />\n </div>\n )}\n <div\n className={cn(\n // positioning\n 'absolute inset-0',\n // children element positioning\n 'flex items-end justify-center',\n // styling\n 'rounded-container bg-background-overlay/20 p-xs',\n // transitions\n 'opacity-0 transition-opacity duration-200',\n // group focus/hover states\n 'group-focus-within/grid-file-card:opacity-100 group-hover/grid-file-card:opacity-100',\n // mouse pointer\n 'cursor-pointer',\n {\n 'cursor-grab': draggable,\n }\n )}\n >\n <div className=\"flex items-center gap-xs\">\n {/* Visible Actions (max of 4) */}\n {visibleActions.map((action, index) => (\n <IconButton\n aria-label={action.name}\n data-no-drag\n disabled={isProcessing}\n hideTooltip\n icon={action.icon}\n // @ts-expect-error - Look into this\n iconStyle={action.iconStyle}\n key={`${action.name}-${index}`}\n onClick={(e) => {\n e.stopPropagation();\n action.onClick(e, imageSource);\n }}\n shape=\"circle\"\n size=\"xs\"\n style=\"inverse\"\n type=\"button\"\n variant=\"transparent\"\n />\n ))}\n\n {/* Overflow Menu */}\n {overflowActions.length > 0 && (\n <Menu\n data-no-drag\n hasRoundedBorders\n menuPlacement=\"bottom-start\"\n menuSize=\"sm\"\n numberOfColumns={3}\n trigger={\n <IconButton\n data-no-drag\n disabled={isProcessing}\n hideTooltip\n icon={DotsThreeOutlineVertical}\n iconStyle=\"fill\"\n onClick={() => {}}\n shape=\"circle\"\n size=\"xs\"\n style=\"inverse\"\n type=\"button\"\n variant=\"transparent\"\n />\n }\n >\n {overflowActions.map((action, index) => (\n <MenuItem\n color={action.name === 'Delete' ? 'critical' : undefined}\n data-no-drag\n id={`${action.name}-${fileDisplayName}`}\n key={`${action.name}-${index}`}\n leftIcon={action.icon}\n onClick={() => {\n action.onClick({} as React.MouseEvent<HTMLDivElement>, imageSource);\n }}\n primaryLabel={action.name}\n />\n ))}\n </Menu>\n )}\n </div>\n </div>\n </div>\n <div className=\"flex items-center gap-[2px]\">\n <div className=\"flex min-w-0 flex-1 cursor-auto flex-col gap-[2px]\">\n {!hideFileName && (\n <BodyPrimary\n className=\"truncate\"\n color={isError ? 'critical' : 'primary'}\n data-no-drag\n >\n {fileDisplayName}\n </BodyPrimary>\n )}\n {fileStatusText}\n </div>\n {shouldShowProgressCircle ? (\n <div\n className=\"flex items-center\"\n data-testid=\"grid-file-card-progress-circle\"\n >\n <ProgressCircle\n progress={progress}\n size=\"sm\"\n status={progressCircleStatus}\n />\n </div>\n ) : statusIcon ? (\n statusIcon.type === 'progressCircle' ? (\n <div\n className=\"flex items-center\"\n data-testid=\"grid-file-card-progress-circle\"\n >\n <ProgressCircle\n centerIcon={statusIcon.centerIcon}\n color={statusIcon.color}\n indeterminateAnimation={statusIcon.indeterminateAnimation}\n progress={progress}\n size=\"sm\"\n status={progressCircleStatus}\n />\n </div>\n ) : (\n <div\n className=\"flex items-center\"\n data-testid=\"grid-file-card-status-icon\"\n >\n <statusIcon.icon\n color={statusIcon.color}\n size=\"sm\"\n style={statusIcon.style}\n />\n </div>\n )\n ) : null}\n </div>\n </div>\n );\n};\n\nGridFileCard.displayName = 'GridFileCard';\n","import { cn } from '@evolve.ui/theme-system';\nimport { ChangeEvent } from 'react';\n\nimport { Checkbox } from '../../../ChoiceListItem';\nimport { IconButton } from '../../../IconButton/IconButton';\nimport { DotsSixVertical, Paperclip, Trash } from '../../../Icons';\nimport { ProgressCircle } from '../../../ProgressCircle/ProgressCircle';\nimport { BodyPrimary, BodySecondary } from '../../../Typography/Text/Text';\nimport { formatFileSize } from '../../../utils/formatFileSize';\nimport { useImageFilePreviewUrl } from '../../hooks/filePreview/useImageFilePreviewUrl';\nimport { BaseFileCardProps, ListFileCardStyle } from '../types';\n\nexport type ListFileCardProps = BaseFileCardProps & {\n cardStyle?: ListFileCardStyle;\n 'data-testid'?: string;\n showActionsOnHover?: boolean;\n statusText?: string;\n};\n\nexport const ListFileCard = ({\n actions,\n cardStyle,\n className,\n 'data-testid': dataTestId = 'list-file-card',\n draggable,\n errorMessage,\n fileName,\n hideFileName = false,\n hideFileSize = false,\n hideFileStatus = false,\n imageSource,\n isSelected,\n onDelete,\n onImageError,\n onSelect,\n progress,\n selectable,\n showActionsOnHover,\n status = 'default',\n statusIcon,\n statusText,\n}: ListFileCardProps) => {\n const previewUrl = useImageFilePreviewUrl(imageSource);\n\n const isRemoteFile = 'url' in imageSource;\n const fileSize = isRemoteFile ? '' : formatFileSize(imageSource.size);\n\n // Automatically hide file size for URLs, respect the prop for Files\n const shouldHideFileSize = hideFileSize || isRemoteFile;\n\n const defaultFileName = isRemoteFile ? (imageSource.url.split('/').pop() ?? 'image') : imageSource.name;\n const fileDisplayName = fileName ?? defaultFileName;\n\n // Status checks\n const isError = status === 'error';\n const isPending = status === 'pending';\n const isProgressing = status === 'progressing';\n const isComplete = status === 'complete';\n const isDragging = false; // ListFileCard doesn't currently support sortable YET, but adding for consistency with GridFileCard\n\n // Determine when to auto-render ProgressCircle\n // Only when statusIcon is not provided AND status is pending/progressing/complete\n const shouldShowProgressCircle = !statusIcon && (isPending || isProgressing || isComplete);\n\n // Determine what to show below the file name (priority: error > progressing > size)\n let fileStatusText = null;\n\n if (isError && errorMessage && !hideFileStatus) {\n fileStatusText = <BodySecondary className=\"text-text-critical\">{errorMessage}</BodySecondary>;\n } else if ((isProgressing || isPending) && !hideFileStatus) {\n // Use custom statusText if provided, otherwise use default\n const defaultStatusText = isPending ? 'Pending' : 'Uploading';\n const displayStatusText = statusText ?? defaultStatusText;\n fileStatusText = <BodySecondary color=\"secondary\">{displayStatusText}</BodySecondary>;\n } else if (!shouldHideFileSize) {\n fileStatusText = <BodySecondary color={isError ? 'critical' : 'secondary'}>{fileSize}</BodySecondary>;\n }\n\n const actionBtnClasses = showActionsOnHover\n ? cn(\n 'opacity-0 group-focus-within/list-file-card:opacity-100 group-hover/list-file-card:opacity-100',\n 'focus:opacity-100',\n 'transition-opacity duration-200'\n )\n : '';\n\n const isProcessing = isPending || isProgressing;\n\n // Map status to ProgressCircle-compatible status (only needed when shouldShowProgressCircle is true)\n let progressCircleStatus: 'pending' | 'progressing' | 'complete';\n if (isPending) {\n progressCircleStatus = 'pending';\n } else if (isProgressing) {\n progressCircleStatus = 'progressing';\n } else {\n progressCircleStatus = 'complete';\n }\n\n return (\n <div\n aria-busy={isProcessing || undefined}\n className={cn(\n 'group/list-file-card flex w-full min-w-0 cursor-pointer items-center justify-between p-xs',\n 'transition-all duration-200',\n {\n // Error state\n 'bg-background-critical-light': isError && !isDragging,\n // Default state\n 'bg-background-primary': !isError && !isDragging,\n // Drag state\n 'z-50 scale-105 border-border-selected bg-background-secondary shadow-01': isDragging,\n },\n // List View (BorderContained) vs Table View (Single Border)\n cardStyle === 'contained'\n ? cn('rounded-container border', {\n // Error state\n 'border-border-critical hover:border-border-critical hover:bg-background-critical-light':\n isError && !isDragging,\n // Default state\n 'border-border-secondary hover:border-border-secondary hover:bg-background-hover':\n !isError && !isDragging,\n })\n : cn('rounded-b-none border-b', {\n // Error state\n 'border-b-border-critical focus-within:border-b-border-critical hover:bg-background-critical-light':\n isError && !isDragging,\n // Default state\n 'border-b-border-secondary hover:bg-background-hover': !isError && !isDragging,\n }),\n className\n )}\n data-testid={dataTestId}\n >\n <div className=\"flex min-w-0 flex-1 items-center gap-xs\">\n <div className=\"flex items-center gap-[4px]\">\n {/* Show either Checkbox or DragHandle, not both */}\n {selectable ? (\n <Checkbox.Option\n checked={isSelected}\n className=\"![grid-template-columns:24px_0px_1fr]\"\n data-testid=\"list-file-card-select-checkbox\"\n onChange={(e: ChangeEvent<HTMLInputElement>) => {\n e.stopPropagation();\n onSelect?.(imageSource, e.target.checked);\n }}\n />\n ) : draggable ? (\n <DotsSixVertical\n color=\"primary\"\n size=\"sm\"\n style=\"bold\"\n />\n ) : null}\n {previewUrl ? (\n <div className=\"relative h-xl w-xl items-center justify-center overflow-hidden rounded-container bg-background-subdued\">\n <img\n alt={fileDisplayName}\n className=\"absolute inset-0 h-full w-full object-cover\"\n onError={() => {\n onImageError?.(imageSource);\n }}\n src={previewUrl}\n />\n </div>\n ) : (\n <div className=\"flex aspect-square min-w-xl items-center justify-center rounded-container bg-background-subdued\">\n <Paperclip\n color=\"primary\"\n size=\"sm\"\n />\n </div>\n )}\n </div>\n <div className=\"flex min-w-0 flex-1 flex-col gap-[2px]\">\n {!hideFileName && (\n <BodyPrimary\n className=\"truncate\"\n color={isError ? 'critical' : 'primary'}\n >\n {fileDisplayName}\n </BodyPrimary>\n )}\n {fileStatusText}\n </div>\n </div>\n {/* Actions */}\n <div className=\"flex items-center gap-[4px]\">\n {actions?.map((action, index) => (\n <IconButton\n aria-label={action.name}\n className={actionBtnClasses}\n disabled={isProcessing}\n icon={action.icon}\n key={`${action.name}-${index}`}\n onClick={(e) => {\n e.stopPropagation();\n action.onClick(e, imageSource);\n }}\n size=\"sm\"\n type=\"button\"\n />\n ))}\n {onDelete && (\n <IconButton\n aria-label=\"Remove file\"\n className={actionBtnClasses}\n data-testid=\"remove-file-button\"\n disabled={isProcessing}\n icon={Trash}\n onClick={() => onDelete(imageSource)}\n size=\"sm\"\n type=\"button\"\n />\n )}\n {shouldShowProgressCircle ? (\n <div\n className=\"flex items-center\"\n data-testid=\"list-file-card-progress-circle\"\n >\n <ProgressCircle\n progress={progress}\n size=\"sm\"\n status={progressCircleStatus}\n />\n </div>\n ) : statusIcon ? (\n statusIcon.type === 'progressCircle' ? (\n <div\n className=\"flex items-center\"\n data-testid=\"list-file-card-progress-circle\"\n >\n <ProgressCircle\n centerIcon={statusIcon.centerIcon}\n color={statusIcon.color}\n indeterminateAnimation={statusIcon.indeterminateAnimation}\n progress={progress}\n size=\"sm\"\n status={progressCircleStatus}\n />\n </div>\n ) : (\n <div\n className=\"flex items-center\"\n data-testid=\"list-file-card-status-icon\"\n >\n <statusIcon.icon\n color={statusIcon.color}\n size=\"md\"\n style={statusIcon.style}\n />\n </div>\n )\n ) : null}\n </div>\n </div>\n );\n};\n\nListFileCard.displayName = 'ListFileCard';\n","import { GridFileCard } from '../GridFileCard/GridFileCard';\nimport { ListFileCard } from '../ListFileCard/ListFileCard';\nimport { BaseFileCardProps, BaseFileCardStyle } from '../types';\n\nexport type FileCardProps = BaseFileCardProps & {\n badge?: string;\n cardStyle?: BaseFileCardStyle;\n 'data-testid'?: string;\n showActionsOnHover?: boolean;\n statusText?: string;\n};\n\nexport const FileCard = ({\n badge,\n cardStyle = 'contained',\n 'data-testid': dataTestId,\n errorMessage,\n progress,\n showActionsOnHover = false,\n status,\n statusIcon,\n statusText,\n ...props\n}: FileCardProps) =>\n cardStyle === 'card' ? (\n <GridFileCard\n {...props}\n badge={badge}\n data-testid={dataTestId}\n errorMessage={errorMessage}\n progress={progress}\n status={status}\n statusIcon={statusIcon}\n statusText={statusText}\n />\n ) : (\n <ListFileCard\n {...props}\n cardStyle={cardStyle}\n data-testid={dataTestId}\n errorMessage={errorMessage}\n progress={progress}\n showActionsOnHover={showActionsOnHover}\n status={status}\n statusIcon={statusIcon}\n statusText={statusText}\n />\n );\n\nFileCard.displayName = 'FileCard';\n","import { cn } from '@evolve.ui/theme-system';\nimport { useVirtualizer, VirtualItem } from '@tanstack/react-virtual';\nimport { useRef } from 'react';\n\nimport { FileCard, FileCardProps } from '../../../../components/FileCard/FileCard';\nimport { PreviewStyle } from '../../../../components/types';\nimport { FileResource } from '../../../../types';\n\n/**\n * Props for the virtualized list component\n */\ntype VirtualizedListProps = {\n // Common props passed from parent\n bulkSelectionEnabled?: boolean;\n createFileCardProps: (fileResource: FileResource, index: number) => FileCardProps;\n draggable?: boolean;\n files: FileResource[];\n hideDeleteAction?: boolean;\n hideFileNames?: boolean;\n hideFileSizes?: boolean;\n previewStyle: PreviewStyle;\n selectedFiles: string[];\n showActionsOnHover?: boolean;\n};\n\n/**\n * A virtualized list component for efficiently rendering large lists of file previews\n * Only renders items that are currently visible in the viewport\n */\nexport const FilePreviewVirtualizedList = ({ createFileCardProps, files, previewStyle }: VirtualizedListProps) => {\n const scrollRef = useRef<HTMLDivElement>(null);\n\n const listItemHeight = previewStyle === 'list' ? 66 : 65;\n const listItemGap = previewStyle === 'list' ? 8 : 0;\n\n const virtualizer = useVirtualizer({\n count: files.length,\n estimateSize: () => listItemHeight,\n gap: listItemGap,\n getScrollElement: () => scrollRef.current,\n overscan: 5,\n });\n\n const virtualItems = virtualizer.getVirtualItems();\n return (\n <div\n className=\"relative h-full overflow-y-auto\"\n ref={scrollRef}\n >\n <ul\n className={cn('flex flex-col', previewStyle === 'list' && 'gap-xs')}\n data-testid=\"file-preview-virtualized-list-element\"\n style={{\n height: `${virtualizer.getTotalSize()}px`,\n position: 'relative',\n width: '100%',\n }}\n >\n {virtualItems.map((virtualItem: VirtualItem) => {\n const file = files[virtualItem.index];\n\n return (\n <li\n data-index={virtualItem.index}\n data-testid={`file-preview-virtualized-list-item-${virtualItem.index}`}\n key={virtualItem.key}\n style={{\n height: `${virtualItem.size}px`,\n left: 0,\n position: 'absolute',\n top: 0,\n transform: `translateY(${virtualItem.start}px)`,\n width: '100%',\n }}\n >\n <FileCard\n data-testid={`file-preview-virtualized-list-card-${virtualItem.index}`}\n {...createFileCardProps(file, virtualItem.index)}\n />\n </li>\n );\n })}\n </ul>\n </div>\n );\n};\n\nFilePreviewVirtualizedList.displayName = 'FilePreviewVirtualizedList';\n","import { cn } from '@evolve.ui/theme-system';\nimport { breakpoints } from '@evolve.ui/theme-system/themes/common';\nimport { useCallback, useContext, useMemo, useState } from 'react';\n\nimport { useWindowWidth } from '../../../providers';\nimport { FileUploadContext, FileUploadContextType } from '../../providers/FileUploadProvider';\nimport { FileResource } from '../../types/commonTypes';\nimport { FileCard, FileCardProps } from '../FileCard/FileCard';\n/* eslint-disable curly */\nimport { BaseFileCardStyle, FileStatusConfig, PreviewStyle } from '../types';\nimport { FilePreviewVirtualizedList } from './virtualizerComponents/FilePreviewVirtualizedList/FilePreviewVirtualizedList';\n\ntype ColsByBreakpoint = {\n xs: number;\n} & { [key in 'sm' | 'md' | 'lg' | 'xl']?: number };\n\nexport type FilePreviewListProps = {\n /** Whether files in the list can be selected (or checked) */\n bulkSelectionEnabled?: boolean;\n /** Additional CSS classes */\n className?: string;\n /** Number of columns to display at each breakpoint, allowing you to create a custom grid layout. (grid view only) */\n colsByBreakpoint?: ColsByBreakpoint;\n /** Test ID for the component */\n 'data-testid'?: string;\n /** Whether files can be dragged and sorted */\n draggable?: boolean;\n /** Array of Files or RemoteFile Objects (typically with URLs) to display in the preview list */\n files?: FileResource[];\n /** Callback to configure status display (status, progress, error, icon, text) for each file */\n getFileStatusConfig?: (file: FileResource, index: number) => FileStatusConfig | undefined;\n /** Whether to hide the delete action on the file cards */\n hideDeleteAction?: boolean;\n /** Whether to hide the file names on the file cards */\n hideFileNames?: boolean;\n /** Whether to hide the file sizes on the file cards */\n hideFileSizes?: boolean;\n /** Whether to hide status messages on the file cards (error messages, \"Pending\", \"Uploading\", and custom statusText) */\n hideFileStatuses?: boolean;\n /** Called when user clicks delete button on a file preview */\n onDelete?: (fileResource: FileResource) => void;\n /** Called when user selects or deselects a file */\n onSelect?: (fileResource: FileResource, isSelected: boolean) => void;\n /** Determines the view style for the file preview list */\n previewStyle?: PreviewStyle;\n /** Whether to show delete button or other actions on hover (list view only) */\n showActionsOnHover?: boolean;\n /** Whether to use a virtualized list (Only used if previewStyle is list or compactList) */\n virtualized?: boolean;\n};\n\nconst VIEW_TO_CARD_STYLE: Record<PreviewStyle, BaseFileCardStyle> = {\n compactList: 'compact',\n grid: 'card',\n list: 'contained',\n};\n\nexport const FilePreviewList = ({\n bulkSelectionEnabled = false,\n className,\n colsByBreakpoint = { lg: 5, md: 4, sm: 3, xl: 5, xs: 3 },\n 'data-testid': dataTestId = 'file-preview-list',\n draggable = false,\n files: filesProp,\n getFileStatusConfig,\n hideDeleteAction = false,\n hideFileNames = false,\n hideFileSizes = false,\n hideFileStatuses = false,\n onDelete,\n onSelect,\n previewStyle = 'list',\n showActionsOnHover = false,\n virtualized = false,\n}: FilePreviewListProps) => {\n const uploadContext = useContext<FileUploadContextType | undefined>(FileUploadContext);\n // Check if we're in a provider by checking if files exist in context\n\n // Props should take precedence over context values (consistent with FileDropzone)\n // If files are provided as props, use those. Otherwise, fallback to context if available.\n const files = filesProp ?? uploadContext?.files ?? [];\n\n const handleDeleteFile = useCallback(\n (fileToDelete: FileResource) => {\n if (uploadContext && !onDelete) {\n // No onDelete handler, use automatic deletion from context state\n const fileToDeleteId = getItemIdentifier(fileToDelete);\n uploadContext.setFiles((prevFiles) =>\n prevFiles.filter((file) => getItemIdentifier(file) !== fileToDeleteId)\n );\n }\n onDelete?.(fileToDelete);\n },\n [uploadContext, onDelete]\n );\n\n const width = useWindowWidth();\n const [selectedFiles, setSelectedFiles] = useState<string[]>([]);\n\n const { lgMinValue, mdMinValue, smMinValue, xlMinValue } = breakpoints;\n\n const gridColumns = useMemo(() => {\n let columns = colsByBreakpoint.xs;\n // Start with mobile (xs) as default\n // Override with larger breakpoints if they exist and width matches\n if (width >= smMinValue && colsByBreakpoint.sm) columns = colsByBreakpoint.sm;\n if (width >= mdMinValue && colsByBreakpoint.md) columns = colsByBreakpoint.md;\n if (width >= lgMinValue && colsByBreakpoint.lg) columns = colsByBreakpoint.lg;\n if (width >= xlMinValue && colsByBreakpoint.xl) columns = colsByBreakpoint.xl;\n return columns;\n }, [width, colsByBreakpoint, lgMinValue, mdMinValue, smMinValue, xlMinValue]);\n\n const handleSelect = useCallback(\n (file: FileResource, isSelected: boolean) => {\n setSelectedFiles((prev) => {\n const name = file.name; // Both File and RemoteFile have name property\n\n if (isSelected) {\n return [...prev, name];\n }\n return prev.filter((n) => n !== name);\n });\n onSelect?.(file, isSelected);\n },\n [onSelect]\n );\n\n const containerClasses = cn(\n // Grid layout\n previewStyle === 'grid' && ['grid', gridColumns && `grid-cols-${gridColumns}`],\n // List/Table layout - only include gap-xs if viewStyle is list\n previewStyle !== 'grid' && ['flex flex-col', previewStyle === 'list' && 'gap-xs']\n );\n\n const cardStyle = VIEW_TO_CARD_STYLE[previewStyle];\n\n // Determine if we should use the virtualized list based on previewStyle and virtualized prop\n const shouldUseVirtualizedList = virtualized && (previewStyle === 'list' || previewStyle === 'compactList');\n\n // Common props used by both rendering paths\n const commonProps = {\n bulkSelectionEnabled,\n draggable,\n hideDeleteAction,\n hideFileNames,\n hideFileSizes,\n hideFileStatuses,\n showActionsOnHover,\n };\n\n // Helper to get a unique identifier for a file or URL\n const getItemIdentifier = (item: FileResource): string => {\n if ('url' in item) {\n // RemoteFile: id should be unique if provided, otherwise use url as fallback\n return item.id ?? item.url;\n }\n // File: use traditional properties for uniqueness\n return `${item.name}-${item.size}-${item.lastModified}`;\n };\n\n // Create shared FileCard props with common conditional logic\n const createFileCardProps = useCallback(\n (fileResource: FileResource, index: number): FileCardProps => {\n const name = fileResource.name;\n\n const isSelected = selectedFiles.includes(name);\n\n // FileCards hide the delete button when onDelete is not provided,\n // so we pass undefined when hideDeleteAction is true,\n // otherwise we pass the handleDeleteFile function\n const deleteHandler = hideDeleteAction ? undefined : handleDeleteFile;\n\n // Get status configuration from callback if provided\n const statusConfig = getFileStatusConfig?.(fileResource, index);\n\n return {\n cardStyle,\n draggable,\n errorMessage: statusConfig?.errorMessage,\n hideFileName: hideFileNames,\n hideFileSize: hideFileSizes,\n hideFileStatus: hideFileStatuses,\n imageSource: fileResource,\n onDelete: deleteHandler,\n onSelect: bulkSelectionEnabled ? handleSelect : undefined,\n ...(bulkSelectionEnabled ? { isSelected, selectable: true } : { selectable: false }),\n progress: statusConfig?.progress,\n showActionsOnHover,\n status: statusConfig?.status,\n statusIcon: statusConfig?.statusIcon,\n statusText: statusConfig?.statusText,\n };\n },\n [\n bulkSelectionEnabled,\n cardStyle,\n draggable,\n getFileStatusConfig,\n handleDeleteFile,\n handleSelect,\n hideDeleteAction,\n hideFileNames,\n hideFileSizes,\n hideFileStatuses,\n selectedFiles,\n showActionsOnHover,\n ]\n );\n\n return (\n <section\n aria-label=\"File preview list\"\n className={cn(\n 'flex w-full flex-col',\n {\n 'h-full': previewStyle !== 'grid',\n },\n className\n )}\n >\n {shouldUseVirtualizedList ? (\n <FilePreviewVirtualizedList\n {...commonProps}\n createFileCardProps={createFileCardProps}\n files={files}\n previewStyle={previewStyle}\n selectedFiles={selectedFiles}\n />\n ) : (\n <ul\n className={containerClasses}\n data-testid={dataTestId}\n >\n {files.map((fileResource, index) => (\n <li\n data-testid={`${dataTestId}-item-${index}`}\n key={`${getItemIdentifier(fileResource)}-${index}`}\n >\n <FileCard\n data-testid={`${dataTestId}-card-${index}`}\n {...createFileCardProps(fileResource, index)}\n />\n </li>\n ))}\n </ul>\n )}\n </section>\n );\n};\n\nFilePreviewList.displayName = 'FilePreviewList';\n","import { FileUploadProvider, FileUploadProviderConfigProps } from '../../providers/FileUploadProvider';\nimport { FileUploadProps } from '../../types/sharedTypes';\n/* eslint-disable curly */\nimport { FileDropzone } from '../FileDropzone/FileDropzone';\nimport { FilePreviewList } from '../FilePreviewList/FilePreviewList';\n\n/**\n * FileUpload component for handling single or multiple file uploads\n * with built-in validation and preview capabilities.\n *\n * This is the main container component that combines the drag-and-drop area (FileDropzone)\n * and the file preview list (FilePreviewList) into a single, cohesive interface.\n * It handles the file validation, upload state management, and preview display through\n * the FileUploadProvider context.\n *\n */\nexport const FileUpload = ({\n disabled,\n error,\n hideFilePreview = false,\n initialFiles,\n maxFiles,\n maxSize,\n onDrop,\n onDropAccepted,\n onDropRejected,\n onFileDelete,\n previewConfig,\n previewStyle = 'list',\n ...dropzoneProps\n}: FileUploadProps) => {\n const providerProps: FileUploadProviderConfigProps = {\n accept: dropzoneProps.accept,\n disabled,\n error,\n initialFiles,\n maxFiles,\n maxSize,\n onDrop,\n onDropAccepted,\n onDropRejected,\n onFileDelete,\n strictValidation: dropzoneProps.strictValidation,\n validator: dropzoneProps.validator,\n };\n\n return (\n <FileUploadProvider {...providerProps}>\n <div className=\"flex flex-col gap-md\">\n <FileDropzone {...dropzoneProps} />\n {!hideFilePreview && (\n <FilePreviewList\n {...previewConfig}\n onDelete={onFileDelete}\n previewStyle={previewStyle}\n />\n )}\n </div>\n </FileUploadProvider>\n );\n};\n\nFileUpload.displayName = 'FileUpload';\n","import { cn } from '@evolve.ui/theme-system';\nimport { useMemo } from 'react';\n\nimport { UploadValidationContextType } from '../../../providers/UploadValidationProvider';\n\ntype OverlayDropzoneDragTextProps = {\n dragText: string;\n isDragActive: boolean;\n validation: UploadValidationContextType;\n};\n\nexport const OverlayDropzoneDragText = ({ dragText, isDragActive, validation }: OverlayDropzoneDragTextProps) => {\n // Determine overlay text based on drag state and validation\n const overlayText = useMemo(() => {\n if (!isDragActive) {\n return null;\n }\n\n // Show validation error if present\n if (validation.dragValidationError?.message) {\n return validation.dragValidationError.message;\n }\n\n // Show success message for valid drag\n return dragText;\n }, [isDragActive, validation.dragValidationError, dragText]);\n\n if (!overlayText) {\n return null;\n }\n\n return (\n <div\n className={cn(\n 'text-xl font-medium',\n validation.dragValidationError ? 'text-text-critical' : 'text-blue-600'\n )}\n >\n {overlayText}\n </div>\n );\n};\n","import { useMemo } from 'react';\n\nimport { FileArchive, FileCsv, FilePdf, Files, FileText, ImageSquare, ImagesSquare } from '../../../../Icons';\nimport { UploadValidationContextType } from '../../../providers/UploadValidationProvider';\nimport { CommonFileTypes } from '../../../types/commonTypes';\nimport { OverlayDropzoneDragText } from './OverlayDropzoneDragText';\n\ntype OverlayContentProps = {\n accept?: CommonFileTypes | string[];\n customIcon?: React.ReactNode;\n dragText: string;\n isDragActive: boolean;\n maxFiles?: number;\n validation: UploadValidationContextType;\n};\n\nexport const OverlayDropzoneContent = ({\n accept,\n customIcon,\n dragText,\n isDragActive,\n maxFiles,\n validation,\n}: OverlayContentProps) => {\n // Determine icon color based on validation state\n const iconColor = validation.dragValidationError ? 'critical' : 'secondary';\n\n // Determine which icon to show based on accept and maxFiles\n const icon = useMemo(() => {\n // 1. Custom icon takes precedence\n if (customIcon) {\n return customIcon;\n }\n\n const isSingleFile = maxFiles === 1;\n\n // 2. Images\n if (accept === 'images' || (Array.isArray(accept) && accept.some((type) => type.startsWith('image/')))) {\n if (isSingleFile) {\n return (\n <ImageSquare\n color={iconColor}\n size=\"lg\"\n style=\"duotone\"\n />\n );\n }\n return (\n <ImagesSquare\n color={iconColor}\n size=\"lg\"\n style=\"duotone\"\n />\n );\n }\n\n // 3. Documents\n if (accept === 'documents') {\n if (isSingleFile) {\n return (\n <FileText\n color={iconColor}\n size=\"lg\"\n style=\"duotone\"\n />\n );\n }\n return (\n <Files\n color={iconColor}\n size=\"lg\"\n style=\"duotone\"\n />\n );\n }\n\n // 4. PDFs\n if (accept === 'pdfs' || (Array.isArray(accept) && accept.some((type) => type === 'application/pdf'))) {\n return (\n <FilePdf\n color={iconColor}\n size=\"lg\"\n style=\"duotone\"\n />\n );\n }\n\n // 5. CSV files\n if (\n Array.isArray(accept) &&\n accept.some((type) => type === 'text/csv' || type === '.csv' || type.includes('csv'))\n ) {\n return (\n <FileCsv\n color={iconColor}\n size=\"lg\"\n style=\"duotone\"\n />\n );\n }\n\n // 6. Archive files (zip, rar, 7z, tar, gz, etc.)\n if (\n Array.isArray(accept) &&\n accept.some(\n (type) =>\n type.includes('zip') ||\n type.includes('rar') ||\n type.includes('7z') ||\n type.includes('tar') ||\n type.includes('gzip') ||\n type === 'application/x-zip-compressed' ||\n type === 'application/x-rar-compressed' ||\n type === 'application/x-7z-compressed'\n )\n ) {\n return (\n <FileArchive\n color={iconColor}\n size=\"lg\"\n style=\"duotone\"\n />\n );\n }\n\n // 7. Default: general files icon\n return (\n <Files\n color={iconColor}\n size=\"lg\"\n style=\"duotone\"\n />\n );\n }, [customIcon, accept, maxFiles, iconColor]);\n\n return (\n <div className=\"text-center\">\n <div className=\"mb-xs flex justify-center\">{icon}</div>\n <OverlayDropzoneDragText\n dragText={dragText}\n isDragActive={isDragActive}\n validation={validation}\n />\n </div>\n );\n};\n","import { cn } from '@evolve.ui/theme-system';\n\nimport { FileError } from '../../types';\nimport { OverlayStyleOptions } from '../../types/sharedTypes';\n\ntype DropzoneState = {\n disableClickThrough: boolean;\n disableDragValidation: boolean;\n disabled: boolean;\n isDragActive: boolean;\n styleOptions?: OverlayStyleOptions;\n validationError?: FileError | null;\n};\n\nexport const getUploadOverlayStyles = ({\n disableClickThrough,\n disabled,\n disableDragValidation,\n isDragActive,\n styleOptions = {},\n validationError,\n}: DropzoneState) => {\n const { blurOnDrag = false, showDashedBorder = true } = styleOptions;\n\n const isInvalid = Boolean(validationError);\n const isErrorState = disableDragValidation ? false : isInvalid;\n const isDraggedOver = isDragActive && (disableDragValidation || !isInvalid);\n\n return cn(\n // Layout & Container\n [\n 'absolute inset-0',\n 'flex flex-col',\n 'h-full w-full',\n 'items-center justify-center',\n 'rounded-[var(--container-border-radius)]',\n showDashedBorder && 'outline-dashed outline-1 -outline-offset-1',\n 'transition-colors',\n disableClickThrough &&\n 'cursor-pointer group-hover/dropzone:bg-background-hover group-hover/dropzone:outline-border-hover',\n ],\n\n // Pointer Events Strategy:\n // - Only apply pointer-events-none when click-through is not disabled\n // - When disableClickThrough is true, the overlay captures all events\n // - The parent container (with getRootProps) captures drag events\n !disableClickThrough && 'pointer-events-none',\n\n // Z-Index: Always on top to be visible when drag is active\n 'z-10',\n\n // Focus & Interactive Base\n ['hui-focus-visible-outline'],\n\n // Interactive States\n {\n // Drag Active - thick blue outline when dragging\n 'outline outline-4 outline-offset-0 outline-focus-primary': isDragActive,\n },\n\n // Visual States\n {\n // Apply blur when enabled and dragging (success state)\n 'backdrop-blur-[2px]': blurOnDrag && isDraggedOver && !isErrorState && !disabled,\n\n // Apply blur when enabled and dragging (error state)\n 'backdrop-blur-sm': blurOnDrag && isDragActive && isErrorState,\n\n // Error (only when not disabled and dragging)\n 'bg-background-critical-light/50 outline-border-critical': isErrorState && !disabled && isDragActive,\n\n // Drag Over - show background when dragging\n 'bg-background-hover bg-background-secondary/90': isDraggedOver && !isErrorState && !disabled,\n\n // Default - transparent when not dragging\n 'bg-transparent outline-border-secondary': !isDragActive,\n }\n );\n};\n","import { cn } from '@evolve.ui/theme-system';\nimport { useContext } from 'react';\nimport { useDropzone } from 'react-dropzone';\n\nimport { useFileValidation } from '../../hooks';\nimport { useHandleDragEnter } from '../../hooks/upload/useHandleDragEnter/useHandleDragEnter';\nimport { useHandleDrop } from '../../hooks/upload/useHandleDrop/useHandleDrop';\nimport { useUploadAvailability } from '../../hooks/upload/useUploadAvailability/useUploadAvailability';\nimport { createDropzoneValidator } from '../../hooks/validation/createDropzoneValidator';\nimport { FileUploadContext, FileUploadContextType } from '../../providers/FileUploadProvider';\nimport { FileDropzoneOverlayProps } from '../../types/sharedTypes';\nimport { getMimeTypes } from '../../utils/getMimeTypes';\nimport { FileDropzoneDebugger } from '../FileDropzone/components/FileDropzoneDebugger/FileDropzoneDebugger';\nimport { OverlayDropzoneContent } from './components/OverlayDropzoneContent';\nimport { getUploadOverlayStyles } from './styles';\n\nexport const FileDropzoneOverlay = ({\n accept: acceptProp,\n ariaLabel,\n children,\n className,\n 'data-testid': dataTestId = 'file-dropzone-overlay',\n disableClickThrough = false,\n disabled: disabledProp = false,\n disableDragValidation = false,\n dragText = 'Drop files to upload',\n error,\n files: filesProp,\n icon,\n maxFiles: maxFilesProp,\n maxSize: maxSizeProp,\n onDrop: onDropProp,\n onDropAccepted: onDropAcceptedProp,\n onDropRejected: onDropRejectedProp,\n onFilesChange: onFilesChangeProp,\n showDebugger,\n strictValidation,\n styleOptions,\n validator,\n}: FileDropzoneOverlayProps) => {\n const uploadContext = useContext<FileUploadContextType | undefined>(FileUploadContext);\n\n const validationConfig = {\n accept: acceptProp,\n error,\n maxFiles: maxFilesProp,\n maxSize: maxSizeProp,\n strictValidation,\n validator,\n };\n\n /* IMPORTANT: This component supports both standalone usage and provider usage */\n // useFileValidation automatically detects if we're in a provider context\n // If not in provider, create local validation for standalone usage\n const validation = useFileValidation(validationConfig);\n\n // Determine whether to use context or local state for files and setFiles\n const files = filesProp ?? uploadContext?.files ?? [];\n const setFiles = onFilesChangeProp ?? uploadContext?.setFiles ?? (() => {});\n\n // Intentionally check both props and context with precedence order\n const disabled = disabledProp || uploadContext?.disabled;\n const onDrop = onDropProp ?? uploadContext?.onDrop;\n const onDropAccepted = onDropAcceptedProp ?? uploadContext?.onDropAccepted;\n const onDropRejected = onDropRejectedProp ?? uploadContext?.onDropRejected;\n const maxFiles = maxFilesProp ?? validation.maxFiles;\n const maxSize = maxSizeProp ?? validation.maxSize;\n const accept = acceptProp ?? validation.accept;\n /* END IMPORTANT */\n\n // Check if upload is disabled based on current state\n const { isDisabled } = useUploadAvailability({\n disabled,\n files,\n maxFiles,\n });\n\n // Configure text based on multiple vs single file mode\n const allowMultipleFiles = maxFiles === undefined || maxFiles > 1;\n const filePluralizationText = allowMultipleFiles ? 'files' : 'a file';\n const mimeTypes = getMimeTypes(accept);\n\n // Set up drag and drop handlers\n const handleDrop = useHandleDrop({\n files,\n onDrop,\n onDropAccepted,\n onDropRejected,\n setFiles,\n validation,\n });\n\n const handleDragEnter = useHandleDragEnter({\n files,\n mimeTypes,\n validation,\n validator,\n });\n\n // Configure the dropzone\n const { getInputProps, getRootProps, isDragActive } = useDropzone({\n accept: mimeTypes,\n disabled: isDisabled,\n maxSize,\n multiple: allowMultipleFiles,\n noClick: !disableClickThrough, // When clickThrough is not disabled, prevent file picker dialog\n noKeyboard: !disableClickThrough, // When clickThrough is not disabled, prevent keyboard interactions\n onDragEnter: disableDragValidation ? validation.clearAllValidation : handleDragEnter,\n onDragLeave: validation.clearAllValidation,\n onDrop: handleDrop,\n // @ts-expect-error Our validator returns potentially function-based messages, React-Dropzone expects strings.\n // This is intentional and allows us to resolve dynamic messages later with proper file counts.\n validator: createDropzoneValidator(validation),\n });\n\n // Determine Dropzone styles based on interaction state\n const activeCode = isDragActive ? validation.dragValidationError : validation.dropValidationErrors[0];\n const uploadZoneStyles = getUploadOverlayStyles({\n disableClickThrough,\n disabled: isDisabled,\n disableDragValidation,\n isDragActive,\n styleOptions,\n validationError: activeCode,\n });\n\n // Map innerPadding to Tailwind padding classes\n const paddingMap = {\n '2xl': 'p-2xl',\n lg: 'p-lg',\n md: 'p-md',\n sm: 'p-sm',\n xl: 'p-xl',\n xs: 'p-xs',\n } as const;\n const innerPaddingClass = styleOptions?.innerPadding ? paddingMap[styleOptions.innerPadding] : undefined;\n const fillParentClass = styleOptions?.fillParent ? 'h-full' : 'relative';\n\n return (\n <>\n <div\n {...getRootProps({\n 'aria-disabled': isDisabled,\n 'aria-label': ariaLabel ?? (isDragActive ? dragText : undefined),\n className: cn('group/dropzone', fillParentClass, className),\n 'data-testid': `${dataTestId}-root`,\n })}\n >\n <input\n {...getInputProps({\n 'aria-label': `Upload ${filePluralizationText}`,\n 'data-testid': `${dataTestId}-input`,\n })}\n />\n\n {/* Child content - isolation-isolate scopes children's z-indices so the overlay can sit above them */}\n <div className={cn('isolate', fillParentClass, innerPaddingClass)}>{children}</div>\n\n {/* Visual overlay - only appears when dragging */}\n <div\n className={cn('w-full', uploadZoneStyles)}\n data-testid={`${dataTestId}-container`}\n >\n {/* Only show visual feedback when actively dragging */}\n {isDragActive && (\n <OverlayDropzoneContent\n accept={accept}\n customIcon={icon}\n dragText={dragText}\n isDragActive={isDragActive}\n maxFiles={maxFiles}\n validation={validation}\n />\n )}\n </div>\n </div>\n {/* Display debug information around fileRejections when showDebugger is true */}\n {showDebugger && <FileDropzoneDebugger fileRejections={validation.fileRejections} />}\n </>\n );\n};\n\nFileDropzoneOverlay.displayName = 'FileDropzoneOverlay';\n","import { cn } from '@evolve.ui/theme-system';\nimport { useContext } from 'react';\n\nimport { UploadSimple } from '../../../Icons';\n/* eslint-disable curly */\nimport { BodyPrimary } from '../../../Typography/Text/Text';\nimport {\n FileUploadContext,\n FileUploadProvider,\n FileUploadProviderConfigProps,\n} from '../../providers/FileUploadProvider';\nimport { FileUploadCanvasProps } from '../../types/sharedTypes';\nimport { FileDropzoneOverlay } from '../FileDropzoneOverlay/FileDropzoneOverlay';\nimport { FilePreviewList } from '../FilePreviewList/FilePreviewList';\n\n/**\n * Empty state component displayed when no files are present\n */\nconst EmptyState = () => {\n return (\n <div className={cn('flex h-full flex-col items-center justify-center gap-xs', 'bg-gray-50 px-md py-2xl')}>\n <UploadSimple color=\"secondary\" />\n <BodyPrimary\n className=\"text-center\"\n color=\"secondary\"\n >\n Drag files here to upload\n </BodyPrimary>\n </div>\n );\n};\n\n/**\n * Canvas content that shows either FilePreviewList or empty state\n */\nconst CanvasContent = ({\n onFileDelete,\n previewConfig,\n previewStyle,\n}: {\n onFileDelete?: FileUploadCanvasProps['onFileDelete'];\n previewConfig?: FileUploadCanvasProps['previewConfig'];\n previewStyle: FileUploadCanvasProps['previewStyle'];\n}) => {\n const uploadContext = useContext(FileUploadContext);\n const files = uploadContext?.files ?? [];\n\n // Show empty state when no files\n if (files.length === 0) {\n return <EmptyState />;\n }\n\n // Show file preview list when files exist\n return (\n <FilePreviewList\n {...previewConfig}\n onDelete={onFileDelete}\n previewStyle={previewStyle}\n />\n );\n};\n\n/**\n * FileUploadCanvas component - An out-of-the-box solution for drag-and-drop file uploads\n * with overlay-based interaction.\n *\n * This component wraps FilePreviewList with FileDropzoneOverlay, allowing users to drag\n * files over existing content. The overlay appears during drag operations and provides\n * visual feedback. It uses FileUploadProvider for state management.\n *\n * Key differences from FileUpload:\n * - Uses FileDropzoneOverlay (overlay-based) instead of FileDropzone (dedicated area)\n * - Supports disableClickThrough for interactive content underneath\n * - Always shows FilePreviewList (no hideFilePreview option)\n * - Ideal for gallery views and canvas-style interfaces\n */\nexport const FileUploadCanvas = ({\n className,\n disabled,\n error,\n initialFiles,\n maxFiles,\n maxSize,\n onDrop,\n onDropAccepted,\n onDropRejected,\n onFileDelete,\n previewConfig,\n previewStyle = 'list',\n ...dropzoneOverlayProps\n}: FileUploadCanvasProps) => {\n const providerProps: FileUploadProviderConfigProps = {\n accept: dropzoneOverlayProps.accept,\n disabled,\n error,\n initialFiles,\n maxFiles,\n maxSize,\n onDrop,\n onDropAccepted,\n onDropRejected,\n onFileDelete,\n strictValidation: dropzoneOverlayProps.strictValidation,\n validator: dropzoneOverlayProps.validator,\n };\n\n return (\n <FileUploadProvider {...providerProps}>\n <div className={cn('h-full w-full overflow-y-auto', className)}>\n <FileDropzoneOverlay\n {...dropzoneOverlayProps}\n styleOptions={{ ...dropzoneOverlayProps.styleOptions, fillParent: true }}\n >\n <CanvasContent\n onFileDelete={onFileDelete}\n previewConfig={previewConfig}\n previewStyle={previewStyle}\n />\n </FileDropzoneOverlay>\n </div>\n </FileUploadProvider>\n );\n};\n\nFileUploadCanvas.displayName = 'FileUploadCanvas';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAiCA,MAAa,qBAAA,GAAA,MAAA,cAAA,CAAqE,KAAA,CAAS;;;;;;;;;;;;;;;;;;;;;;;;;;AAmH3F,MAAa,sBAAsB,EAC/B,QACA,UACA,WAAW,OACX,OACA,eAAe,CAAC,GAChB,UACA,SACA,QACA,gBACA,gBACA,cACA,kBACA,gBAC2B;CAC3B,MAAM,CAAC,OAAO,aAAA,GAAA,MAAA,SAAA,CAAqC,YAAY;CAE/D,MAAM,QAAQ;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACJ;CAEA,OACI,iBAAA,GAAA,kBAAA,IAAA,CAACA,cAAAA,0BAAD;EACY;EACD;EACG;EACD;EACS;EACP;YAEX,iBAAA,GAAA,kBAAA,IAAA,CAAC,kBAAkB,UAAnB;GAAmC;GAAQ;EAAqC,CAAA;CAC1D,CAAA;AAElC;AAEA,mBAAmB,cAAc;;;;;;;;;;;;;;;;;;;;;AAsBjC,MAAa,6BAA6B;CACtC,MAAM,WAAA,GAAA,MAAA,WAAA,CAAwD,iBAAiB;CAC/E,IAAI,CAAC,SACD,MAAM,IAAI,MAAM,6DAA6D;CAEjF,OAAO;AACX;;;ACpLA,MAAa,sBAAsB,EAAE,OAAO,WAAW,YAAY,gBAAyC;CAC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