@hh.ru/magritte-ui-upload 3.2.17 → 3.3.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.
package/FileName.js CHANGED
@@ -2,7 +2,7 @@ import './index.css';
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
3
  import classnames from 'classnames';
4
4
 
5
- var styles = {"file-name-body":"magritte-file-name-body___PTTMc_3-2-17","fileNameBody":"magritte-file-name-body___PTTMc_3-2-17","file-name-body_medium":"magritte-file-name-body_medium___sfmmq_3-2-17","fileNameBodyMedium":"magritte-file-name-body_medium___sfmmq_3-2-17","file-name":"magritte-file-name___ZSL2g_3-2-17","fileName":"magritte-file-name___ZSL2g_3-2-17"};
5
+ var styles = {"file-name-body":"magritte-file-name-body___PTTMc_3-3-0","fileNameBody":"magritte-file-name-body___PTTMc_3-3-0","file-name-body_medium":"magritte-file-name-body_medium___sfmmq_3-3-0","fileNameBodyMedium":"magritte-file-name-body_medium___sfmmq_3-3-0","file-name":"magritte-file-name___ZSL2g_3-3-0","fileName":"magritte-file-name___ZSL2g_3-3-0"};
6
6
 
7
7
  const parse = (file) => {
8
8
  const name = file.name;
package/FileView.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import './index.css';
2
2
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
3
- import { Action } from '@hh.ru/magritte-ui-action';
4
3
  import { Avatar } from '@hh.ru/magritte-ui-avatar';
5
4
  import { Divider } from '@hh.ru/magritte-ui-divider';
6
5
  import { ExclamationTriangleOutlinedSize16, CheckCircleOutlinedSize16, CrossOutlinedSize24, TrashOutlinedSize24 } from '@hh.ru/magritte-ui-icon/icon';
@@ -10,7 +9,7 @@ import { FileName } from './FileName.js';
10
9
  import { getUploadIcon, bytes2mb } from './utils.js';
11
10
  import 'classnames';
12
11
 
13
- var styles = {"file-info-body":"magritte-file-info-body___HmfXd_3-2-17","fileInfoBody":"magritte-file-info-body___HmfXd_3-2-17","file-info-and-controls":"magritte-file-info-and-controls___61iyY_3-2-17","fileInfoAndControls":"magritte-file-info-and-controls___61iyY_3-2-17","file-info-container":"magritte-file-info-container___WFab8_3-2-17","fileInfoContainer":"magritte-file-info-container___WFab8_3-2-17","file-info":"magritte-file-info___HrqiB_3-2-17","fileInfo":"magritte-file-info___HrqiB_3-2-17","controls":"magritte-controls___WdH7A_3-2-17"};
12
+ var styles = {"file-info-body":"magritte-file-info-body___HmfXd_3-3-0","fileInfoBody":"magritte-file-info-body___HmfXd_3-3-0","file-info-and-controls":"magritte-file-info-and-controls___61iyY_3-3-0","fileInfoAndControls":"magritte-file-info-and-controls___61iyY_3-3-0","file-info-container":"magritte-file-info-container___WFab8_3-3-0","fileInfoContainer":"magritte-file-info-container___WFab8_3-3-0","file-info":"magritte-file-info___HrqiB_3-3-0","fileInfo":"magritte-file-info___HrqiB_3-3-0","controls":"magritte-controls___WdH7A_3-3-0"};
14
13
 
15
14
  const FileView = ({ uploadType, loadedFile, preview, renderFileInfo, onFileDelete, 'aria-label': ariaLabel, isLast = false, }) => {
16
15
  const isLoading = Boolean(loadedFile?.loading);
@@ -19,7 +18,7 @@ const FileView = ({ uploadType, loadedFile, preview, renderFileInfo, onFileDelet
19
18
  return (jsxs(Fragment, { children: [jsx(Avatar, { mode: isImageType && !isLoading && !isInvalid ? 'image' : 'icon', style: "secondary", image: preview, size: 48, icon: getUploadIcon(uploadType, loadedFile, true), "aria-label": ariaLabel }), jsxs("div", { className: styles.fileInfoBody, children: [jsxs("div", { className: styles.fileInfoAndControls, children: [jsxs("div", { className: styles.fileInfoContainer, children: [jsx(FileName, { file: loadedFile.data }), jsx(VSpacing, { default: 4 }), jsxs("div", { className: styles.fileInfo, children: [isInvalid && jsx(ExclamationTriangleOutlinedSize16, { initialColor: "negative" }), isLoading && jsx(Loader, { size: 16 }), !isInvalid && !isLoading && jsx(CheckCircleOutlinedSize16, { initialColor: "positive" }), renderFileInfo({
20
19
  ...loadedFile,
21
20
  fileSizeMB: bytes2mb(loadedFile.data.size),
22
- })] })] }), jsxs("div", { className: styles.controls, children: [isLoading && jsx(Action, { icon: CrossOutlinedSize24, mode: "secondary", onClick: onFileDelete }), !isLoading && (jsx(Action, { icon: TrashOutlinedSize24, mode: "secondary", onClick: onFileDelete, "data-qa": "magritte-upload-delete-file-action" }))] })] }), !isLast && (jsxs("div", { children: [jsx(VSpacing, { default: 16 }), jsx(Divider, {}), jsx(VSpacing, { default: 16 })] }))] })] }));
21
+ })] })] }), jsxs("div", { className: styles.controls, children: [isLoading && (jsx(CrossOutlinedSize24, { padding: 8, borderRadius: "halfHeight", initialColor: "secondary", onClick: onFileDelete })), !isLoading && (jsx(TrashOutlinedSize24, { padding: 8, borderRadius: "halfHeight", onClick: onFileDelete, "data-qa": "magritte-upload-delete-file-action", initialColor: "secondary" }))] })] }), !isLast && (jsxs("div", { children: [jsx(VSpacing, { default: 16 }), jsx(Divider, {}), jsx(VSpacing, { default: 16 })] }))] })] }));
23
22
  };
24
23
 
25
24
  export { FileView };
package/FileView.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"FileView.js","sources":["../src/FileView.tsx"],"sourcesContent":["import { ReactElement, MouseEvent } from 'react';\n\nimport { Action } from '@hh.ru/magritte-ui-action';\nimport { Avatar } from '@hh.ru/magritte-ui-avatar';\nimport { Divider } from '@hh.ru/magritte-ui-divider';\nimport {\n CrossOutlinedSize24,\n CheckCircleOutlinedSize16,\n ExclamationTriangleOutlinedSize16,\n TrashOutlinedSize24,\n} from '@hh.ru/magritte-ui-icon/icon';\nimport { Loader } from '@hh.ru/magritte-ui-loader';\nimport { VSpacing } from '@hh.ru/magritte-ui-spacing';\nimport { FileName } from '@hh.ru/magritte-ui-upload/FileName';\nimport { UploadType, LoadedFile, RenderFileInfo } from '@hh.ru/magritte-ui-upload/types';\nimport { getUploadIcon, bytes2mb } from '@hh.ru/magritte-ui-upload/utils';\n\nimport styles from './file-view.less';\n\nexport interface FileViewProps {\n uploadType: UploadType;\n loadedFile: LoadedFile;\n renderFileInfo: RenderFileInfo;\n onFileDelete: (event: MouseEvent) => void;\n preview: string;\n 'aria-label': string;\n isLast?: boolean;\n}\n\nconst FileView = ({\n uploadType,\n loadedFile,\n preview,\n renderFileInfo,\n onFileDelete,\n 'aria-label': ariaLabel,\n isLast = false,\n}: FileViewProps): ReactElement => {\n const isLoading = Boolean(loadedFile?.loading);\n const isInvalid = Boolean(loadedFile?.error);\n const isImageType = uploadType === 'image';\n return (\n <>\n <Avatar\n mode={isImageType && !isLoading && !isInvalid ? 'image' : 'icon'}\n style=\"secondary\"\n image={preview}\n size={48}\n icon={getUploadIcon(uploadType, loadedFile, true)}\n aria-label={ariaLabel}\n />\n <div className={styles.fileInfoBody}>\n <div className={styles.fileInfoAndControls}>\n <div className={styles.fileInfoContainer}>\n <FileName file={loadedFile.data} />\n <VSpacing default={4} />\n <div className={styles.fileInfo}>\n {isInvalid && <ExclamationTriangleOutlinedSize16 initialColor=\"negative\" />}\n {isLoading && <Loader size={16} />}\n {!isInvalid && !isLoading && <CheckCircleOutlinedSize16 initialColor=\"positive\" />}\n {renderFileInfo({\n ...loadedFile,\n fileSizeMB: bytes2mb(loadedFile.data.size),\n })}\n </div>\n </div>\n <div className={styles.controls}>\n {isLoading && <Action icon={CrossOutlinedSize24} mode=\"secondary\" onClick={onFileDelete} />}\n {!isLoading && (\n <Action\n icon={TrashOutlinedSize24}\n mode=\"secondary\"\n onClick={onFileDelete}\n data-qa=\"magritte-upload-delete-file-action\"\n />\n )}\n </div>\n </div>\n {!isLast && (\n <div>\n <VSpacing default={16} />\n <Divider />\n <VSpacing default={16} />\n </div>\n )}\n </div>\n </>\n );\n};\n\nexport { FileView };\n"],"names":["_jsxs","_Fragment","_jsx"],"mappings":";;;;;;;;;;;;;AA6BM,MAAA,QAAQ,GAAG,CAAC,EACd,UAAU,EACV,UAAU,EACV,OAAO,EACP,cAAc,EACd,YAAY,EACZ,YAAY,EAAE,SAAS,EACvB,MAAM,GAAG,KAAK,GACF,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yBAAyB,EAAC,EAAA,YAAY,EAAC,UAAU,EAAG,CAAA,EACjF,cAAc,CAAC;AACZ,gDAAA,GAAG,UAAU;gDACb,UAAU,EAAE,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC;AAC7C,6CAAA,CAAC,IACA,CACJ,EAAA,CAAA,EACNF,IAAK,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,QAAQ,EAAA,QAAA,EAAA,CAC1B,SAAS,IAAIE,GAAA,CAAC,MAAM,EAAC,EAAA,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAC,WAAW,EAAC,OAAO,EAAE,YAAY,EAAA,CAAI,EAC1F,CAAC,SAAS,KACPA,IAAC,MAAM,EAAA,EACH,IAAI,EAAE,mBAAmB,EACzB,IAAI,EAAC,WAAW,EAChB,OAAO,EAAE,YAAY,EACb,SAAA,EAAA,oCAAoC,GAC9C,CACL,CAAA,EAAA,CACC,CACJ,EAAA,CAAA,EACL,CAAC,MAAM,KACJF,IACI,CAAA,KAAA,EAAA,EAAA,QAAA,EAAA,CAAAE,GAAA,CAAC,QAAQ,EAAC,EAAA,OAAO,EAAE,EAAE,GAAI,EACzBA,GAAA,CAAC,OAAO,EAAG,EAAA,CAAA,EACXA,IAAC,QAAQ,EAAA,EAAC,OAAO,EAAE,EAAE,EAAI,CAAA,CAAA,EAAA,CACvB,CACT,CACC,EAAA,CAAA,CAAA,EAAA,CACP,EACL;AACN;;;;"}
1
+ {"version":3,"file":"FileView.js","sources":["../src/FileView.tsx"],"sourcesContent":["import { ReactElement, MouseEvent } from 'react';\n\nimport { Avatar } from '@hh.ru/magritte-ui-avatar';\nimport { Divider } from '@hh.ru/magritte-ui-divider';\nimport {\n CrossOutlinedSize24,\n CheckCircleOutlinedSize16,\n ExclamationTriangleOutlinedSize16,\n TrashOutlinedSize24,\n} from '@hh.ru/magritte-ui-icon/icon';\nimport { Loader } from '@hh.ru/magritte-ui-loader';\nimport { VSpacing } from '@hh.ru/magritte-ui-spacing';\nimport { FileName } from '@hh.ru/magritte-ui-upload/FileName';\nimport { UploadType, LoadedFile, RenderFileInfo } from '@hh.ru/magritte-ui-upload/types';\nimport { getUploadIcon, bytes2mb } from '@hh.ru/magritte-ui-upload/utils';\n\nimport styles from './file-view.less';\n\nexport interface FileViewProps {\n uploadType: UploadType;\n loadedFile: LoadedFile;\n renderFileInfo: RenderFileInfo;\n onFileDelete: (event: MouseEvent) => void;\n preview: string;\n 'aria-label': string;\n isLast?: boolean;\n}\n\nconst FileView = ({\n uploadType,\n loadedFile,\n preview,\n renderFileInfo,\n onFileDelete,\n 'aria-label': ariaLabel,\n isLast = false,\n}: FileViewProps): ReactElement => {\n const isLoading = Boolean(loadedFile?.loading);\n const isInvalid = Boolean(loadedFile?.error);\n const isImageType = uploadType === 'image';\n return (\n <>\n <Avatar\n mode={isImageType && !isLoading && !isInvalid ? 'image' : 'icon'}\n style=\"secondary\"\n image={preview}\n size={48}\n icon={getUploadIcon(uploadType, loadedFile, true)}\n aria-label={ariaLabel}\n />\n <div className={styles.fileInfoBody}>\n <div className={styles.fileInfoAndControls}>\n <div className={styles.fileInfoContainer}>\n <FileName file={loadedFile.data} />\n <VSpacing default={4} />\n <div className={styles.fileInfo}>\n {isInvalid && <ExclamationTriangleOutlinedSize16 initialColor=\"negative\" />}\n {isLoading && <Loader size={16} />}\n {!isInvalid && !isLoading && <CheckCircleOutlinedSize16 initialColor=\"positive\" />}\n {renderFileInfo({\n ...loadedFile,\n fileSizeMB: bytes2mb(loadedFile.data.size),\n })}\n </div>\n </div>\n <div className={styles.controls}>\n {isLoading && (\n <CrossOutlinedSize24\n padding={8}\n borderRadius=\"halfHeight\"\n initialColor=\"secondary\"\n onClick={onFileDelete}\n />\n )}\n {!isLoading && (\n <TrashOutlinedSize24\n padding={8}\n borderRadius=\"halfHeight\"\n onClick={onFileDelete}\n data-qa=\"magritte-upload-delete-file-action\"\n initialColor=\"secondary\"\n />\n )}\n </div>\n </div>\n {!isLast && (\n <div>\n <VSpacing default={16} />\n <Divider />\n <VSpacing default={16} />\n </div>\n )}\n </div>\n </>\n );\n};\n\nexport { FileView };\n"],"names":["_jsxs","_Fragment","_jsx"],"mappings":";;;;;;;;;;;;AA4BM,MAAA,QAAQ,GAAG,CAAC,EACd,UAAU,EACV,UAAU,EACV,OAAO,EACP,cAAc,EACd,YAAY,EACZ,YAAY,EAAE,SAAS,EACvB,MAAM,GAAG,KAAK,GACF,KAAkB;IAC9B,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAC/C,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;AAC7C,IAAA,MAAM,WAAW,GAAG,UAAU,KAAK,OAAO,CAAC;AAC3C,IAAA,QACIA,IAAA,CAAAC,QAAA,EAAA,EAAA,QAAA,EAAA,CACIC,GAAC,CAAA,MAAM,EACH,EAAA,IAAI,EAAE,WAAW,IAAI,CAAC,SAAS,IAAI,CAAC,SAAS,GAAG,OAAO,GAAG,MAAM,EAChE,KAAK,EAAC,WAAW,EACjB,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,EAAE,EACR,IAAI,EAAE,aAAa,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,CAAC,gBACrC,SAAS,EAAA,CACvB,EACFF,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,MAAM,CAAC,YAAY,EAAA,QAAA,EAAA,CAC/BA,IAAK,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,mBAAmB,aACtCA,IAAK,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,iBAAiB,EACpC,QAAA,EAAA,CAAAE,GAAA,CAAC,QAAQ,EAAA,EAAC,IAAI,EAAE,UAAU,CAAC,IAAI,EAAA,CAAI,EACnCA,GAAA,CAAC,QAAQ,EAAA,EAAC,OAAO,EAAE,CAAC,EAAA,CAAI,EACxBF,IAAA,CAAA,K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  import { useFilePreview } from './useFilePreview.js';
5
5
  import { getFileType } from './utils.js';
6
- import '@hh.ru/magritte-ui-action';
7
6
  import '@hh.ru/magritte-ui-avatar';
8
7
  import '@hh.ru/magritte-ui-divider';
9
8
  import '@hh.ru/magritte-ui-icon/icon';
@@ -13,7 +12,7 @@ import './FileName.js';
13
12
  import 'classnames';
14
13
  import 'react';
15
14
 
16
- var styles = {"item":"magritte-item___vVDG-_3-2-17"};
15
+ var styles = {"item":"magritte-item___vVDG-_3-3-0"};
17
16
 
18
17
  const FileViewWithPreview = ({ loadedFile, ...otherProps }) => {
19
18
  const uploadType = getFileType(loadedFile.data.type);
@@ -1 +1 @@
1
- {"version":3,"file":"FileViewWithPreview.js","sources":["../src/FileViewWithPreview.tsx"],"sourcesContent":["import { ReactElement } from 'react';\n\nimport { FileView, FileViewProps } from '@hh.ru/magritte-ui-upload/FileView';\nimport { useFilePreview } from '@hh.ru/magritte-ui-upload/useFilePreview';\nimport { getFileType } from '@hh.ru/magritte-ui-upload/utils';\n\nimport styles from './file-viev-with-preview.less';\n\ntype FileViewWithPreviewProps = Omit<FileViewProps, 'preview' | 'uploadType'>;\n\nconst FileViewWithPreview = ({ loadedFile, ...otherProps }: FileViewWithPreviewProps): ReactElement => {\n const uploadType = getFileType(loadedFile.data.type);\n const preview = useFilePreview({ loadedFile, isImageType: uploadType === 'image' });\n return (\n <div className={styles.item}>\n <FileView uploadType={uploadType} loadedFile={loadedFile} preview={preview} {...otherProps} />\n </div>\n );\n};\n\nexport { FileViewWithPreview };\n"],"names":["_jsx"],"mappings":";;;;;;;;;;;;;;;;AAUM,MAAA,mBAAmB,GAAG,CAAC,EAAE,UAAU,EAAE,GAAG,UAAU,EAA4B,KAAkB;IAClG,MAAM,UAAU,GAAG,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACrD,IAAA,MAAM,OAAO,GAAG,cAAc,CAAC,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,KAAK,OAAO,EAAE,CAAC,CAAC;IACpF,QACIA,GAAK,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,IAAI,EACvB,QAAA,EAAAA,GAAA,CAAC,QAAQ,EAAA,EAAC,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAA,GAAM,UAAU,EAAA,CAAI,EAC5F,CAAA,EACR;AACN;;;;"}
1
+ {"version":3,"file":"FileViewWithPreview.js","sources":["../src/FileViewWithPreview.tsx"],"sourcesContent":["import { ReactElement } from 'react';\n\nimport { FileView, FileViewProps } from '@hh.ru/magritte-ui-upload/FileView';\nimport { useFilePreview } from '@hh.ru/magritte-ui-upload/useFilePreview';\nimport { getFileType } from '@hh.ru/magritte-ui-upload/utils';\n\nimport styles from './file-viev-with-preview.less';\n\ntype FileViewWithPreviewProps = Omit<FileViewProps, 'preview' | 'uploadType'>;\n\nconst FileViewWithPreview = ({ loadedFile, ...otherProps }: FileViewWithPreviewProps): ReactElement => {\n const uploadType = getFileType(loadedFile.data.type);\n const preview = useFilePreview({ loadedFile, isImageType: uploadType === 'image' });\n return (\n <div className={styles.item}>\n <FileView uploadType={uploadType} loadedFile={loadedFile} preview={preview} {...otherProps} />\n </div>\n );\n};\n\nexport { FileViewWithPreview };\n"],"names":["_jsx"],"mappings":";;;;;;;;;;;;;;;AAUM,MAAA,mBAAmB,GAAG,CAAC,EAAE,UAAU,EAAE,GAAG,UAAU,EAA4B,KAAkB;IAClG,MAAM,UAAU,GAAG,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACrD,IAAA,MAAM,OAAO,GAAG,cAAc,CAAC,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,KAAK,OAAO,EAAE,CAAC,CAAC;IACpF,QACIA,GAAK,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,IAAI,EACvB,QAAA,EAAAA,GAAA,CAAC,QAAQ,EAAA,EAAC,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAA,GAAM,UAAU,EAAA,CAAI,EAC5F,CAAA,EACR;AACN;;;;"}
package/MultiUpload.js CHANGED
@@ -8,9 +8,8 @@ import { Placeholder } from './Placeholder.js';
8
8
  import { useDropActions } from './useDropActions.js';
9
9
  import { useDropButtons } from './useDropButtons.js';
10
10
  import { getAvaliableFileTypes, getUploadIcon, DEFAULT_ACCEPT, RenderFileInfoDefault } from './utils.js';
11
- import { s as styles } from './upload-CHF-Lmcl.js';
11
+ import { s as styles } from './upload-DiGhpkLd.js';
12
12
  import './FileView.js';
13
- import '@hh.ru/magritte-ui-action';
14
13
  import '@hh.ru/magritte-ui-avatar';
15
14
  import '@hh.ru/magritte-ui-divider';
16
15
  import '@hh.ru/magritte-ui-icon/icon';
@@ -1 +1 @@
1
- {"version":3,"file":"MultiUpload.js","sources":["../src/MultiUpload.tsx"],"sourcesContent":["import { ReactElement } from 'react';\nimport { useDropzone } from 'react-dropzone';\nimport classnames from 'classnames';\n\nimport { VSpacing } from '@hh.ru/magritte-ui-spacing';\nimport { FileViewWithPreview } from '@hh.ru/magritte-ui-upload/FileViewWithPreview';\nimport { Placeholder } from '@hh.ru/magritte-ui-upload/Placeholder';\nimport { UploadProps } from '@hh.ru/magritte-ui-upload/types';\nimport { useDropActions } from '@hh.ru/magritte-ui-upload/useDropActions';\nimport { useDropButtons } from '@hh.ru/magritte-ui-upload/useDropButtons';\nimport {\n getUploadIcon,\n getAvaliableFileTypes,\n RenderFileInfoDefault,\n DEFAULT_ACCEPT,\n} from '@hh.ru/magritte-ui-upload/utils';\n\nimport styles from './upload.less';\n\nconst MultiUpload = ({\n files,\n trls,\n size,\n accept = DEFAULT_ACCEPT,\n selectFileButton: _selectFileButton,\n renderFileInfo = RenderFileInfoDefault,\n onDropAccepted: onDropAcceptedExternal,\n onDropRejected: onDropRejectedExternal,\n onFileDelete: onFileDeleteExternal,\n 'aria-label': ariaLabel,\n ...dropzoneProps\n}: Omit<UploadProps, 'multiple'>): ReactElement => {\n const uploadType = getAvaliableFileTypes(accept);\n const { onDropAccepted, onDropRejected, onFileDelete } = useDropActions({\n onDropAccepted: onDropAcceptedExternal,\n onDropRejected: onDropRejectedExternal,\n onFileDelete: onFileDeleteExternal,\n });\n const { getRootProps, getInputProps, isDragActive } = useDropzone({\n ...dropzoneProps,\n accept,\n onDropAccepted,\n onDropRejected,\n multiple: true,\n });\n const { selectFileButton } = useDropButtons({ selectFileButton: _selectFileButton });\n return (\n <>\n <div\n className={classnames(styles.root, styles[`root_${size}`], { [styles.dragActive]: isDragActive })}\n {...getRootProps()}\n data-qa=\"magritte-multiple-upload\"\n >\n <input {...getInputProps()} data-qa=\"magritte-multiple-upload-input\" />\n <div className={styles.background} />\n <div className={styles.body}>\n {getUploadIcon(uploadType, undefined, false)}\n <VSpacing default={16} />\n <Placeholder trls={trls} selectFileButton={selectFileButton} />\n </div>\n </div>\n {files.length > 0 && (\n <div className={styles.fileList}>\n {files.map((loadedFile, indexFile) => {\n return (\n <FileViewWithPreview\n key={loadedFile.data.name}\n loadedFile={loadedFile}\n renderFileInfo={renderFileInfo}\n onFileDelete={(event) => {\n onFileDelete(event, loadedFile, indexFile);\n }}\n aria-label={ariaLabel || ''}\n isLast={files.length - 1 === indexFile}\n />\n );\n })}\n </div>\n )}\n </>\n );\n};\n\nexport { MultiUpload };\n"],"names":["_jsxs","_Fragment","_jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAmBA,MAAM,WAAW,GAAG,CAAC,EACjB,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,MAAM,GAAG,cAAc,EACvB,gBAAgB,EAAE,iBAAiB,EACnC,cAAc,GAAG,qBAAqB,EACtC,cAAc,EAAE,sBAAsB,EACtC,cAAc,EAAE,sBAAsB,EACtC,YAAY,EAAE,oBAAoB,EAClC,YAAY,EAAE,SAAS,EACvB,GAAG,aAAa,EACY,KAAkB;AAC9C,IAAA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EAAC,IAAI,EAAE,IAAI,EAAE,gBAAgB,EAAE,gBAAgB,GAAI,CAC7D,EAAA,CAAA,CAAA,EAAA,CACJ,EACL,KAAK,CAAC,MAAM,GAAG,CAAC,KACbA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,MAAM,CAAC,QAAQ,EAC1B,QAAA,EAAA,KAAK,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,SAAS,KAAI;AACjC,oBAAA,QACIA,GAAC,CAAA,mBAAmB,EAEhB,EAAA,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,CAAC,KAAK,KAAI;AACpB,4BAAA,YAAY,CAAC,KAAK,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;yBAC9C,EAAA,YAAA,EACW,SAAS,IAAI,EAAE,EAC3B,MAAM,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,KAAK,SAAS,IAPjC,UAAU,CAAC,IAAI,CAAC,IAAI,CAQ3B,EACJ;AACN,iBAAC,CAAC,EAAA,CACA,CACT,CAAA,EAAA,CACF,EACL;AACN;;;;"}
1
+ {"version":3,"file":"MultiUpload.js","sources":["../src/MultiUpload.tsx"],"sourcesContent":["import { ReactElement } from 'react';\nimport { useDropzone } from 'react-dropzone';\nimport classnames from 'classnames';\n\nimport { VSpacing } from '@hh.ru/magritte-ui-spacing';\nimport { FileViewWithPreview } from '@hh.ru/magritte-ui-upload/FileViewWithPreview';\nimport { Placeholder } from '@hh.ru/magritte-ui-upload/Placeholder';\nimport { UploadProps } from '@hh.ru/magritte-ui-upload/types';\nimport { useDropActions } from '@hh.ru/magritte-ui-upload/useDropActions';\nimport { useDropButtons } from '@hh.ru/magritte-ui-upload/useDropButtons';\nimport {\n getUploadIcon,\n getAvaliableFileTypes,\n RenderFileInfoDefault,\n DEFAULT_ACCEPT,\n} from '@hh.ru/magritte-ui-upload/utils';\n\nimport styles from './upload.less';\n\nconst MultiUpload = ({\n files,\n trls,\n size,\n accept = DEFAULT_ACCEPT,\n selectFileButton: _selectFileButton,\n renderFileInfo = RenderFileInfoDefault,\n onDropAccepted: onDropAcceptedExternal,\n onDropRejected: onDropRejectedExternal,\n onFileDelete: onFileDeleteExternal,\n 'aria-label': ariaLabel,\n ...dropzoneProps\n}: Omit<UploadProps, 'multiple'>): ReactElement => {\n const uploadType = getAvaliableFileTypes(accept);\n const { onDropAccepted, onDropRejected, onFileDelete } = useDropActions({\n onDropAccepted: onDropAcceptedExternal,\n onDropRejected: onDropRejectedExternal,\n onFileDelete: onFileDeleteExternal,\n });\n const { getRootProps, getInputProps, isDragActive } = useDropzone({\n ...dropzoneProps,\n accept,\n onDropAccepted,\n onDropRejected,\n multiple: true,\n });\n const { selectFileButton } = useDropButtons({ selectFileButton: _selectFileButton });\n return (\n <>\n <div\n className={classnames(styles.root, styles[`root_${size}`], { [styles.dragActive]: isDragActive })}\n {...getRootProps()}\n data-qa=\"magritte-multiple-upload\"\n >\n <input {...getInputProps()} data-qa=\"magritte-multiple-upload-input\" />\n <div className={styles.background} />\n <div className={styles.body}>\n {getUploadIcon(uploadType, undefined, false)}\n <VSpacing default={16} />\n <Placeholder trls={trls} selectFileButton={selectFileButton} />\n </div>\n </div>\n {files.length > 0 && (\n <div className={styles.fileList}>\n {files.map((loadedFile, indexFile) => {\n return (\n <FileViewWithPreview\n key={loadedFile.data.name}\n loadedFile={loadedFile}\n renderFileInfo={renderFileInfo}\n onFileDelete={(event) => {\n onFileDelete(event, loadedFile, indexFile);\n }}\n aria-label={ariaLabel || ''}\n isLast={files.length - 1 === indexFile}\n />\n );\n })}\n </div>\n )}\n </>\n );\n};\n\nexport { MultiUpload };\n"],"names":["_jsxs","_Fragment","_jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAmBA,MAAM,WAAW,GAAG,CAAC,EACjB,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,MAAM,GAAG,cAAc,EACvB,gBAAgB,EAAE,iBAAiB,EACnC,cAAc,GAAG,q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tB,aAAa,CAAC,UAAU,EAAE,SAAS,EAAE,KAAK,CAAC,EAC5CE,GAAC,CAAA,QAAQ,EAAC,EAAA,OAAO,EAAE,EAAE,EAAA,CAAI,EACzBA,GAAA,CAAC,WAAW,EAAA,EAAC,IAAI,EAAE,IAAI,EAAE,gBAAgB,EAAE,gBAAgB,GAAI,CAC7D,EAAA,CAAA,CAAA,EAAA,CACJ,EACL,KAAK,CAAC,MAAM,GAAG,CAAC,KACbA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,MAAM,CAAC,QAAQ,EAC1B,QAAA,EAAA,KAAK,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,SAAS,KAAI;AACjC,oBAAA,QACIA,GAAC,CAAA,mBAAmB,EAEhB,EAAA,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,CAAC,KAAK,KAAI;AACpB,4BAAA,YAAY,CAAC,KAAK,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;yBAC9C,EAAA,YAAA,EACW,SAAS,IAAI,EAAE,EAC3B,MAAM,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,KAAK,SAAS,IAPjC,UAAU,CAAC,IAAI,CAAC,IAAI,CAQ3B,EACJ;AACN,iBAAC,CAAC,EAAA,CACA,CACT,CAAA,EAAA,CACF,EACL;AACN;;;;"}
package/SingleUpload.js CHANGED
@@ -15,8 +15,7 @@ import { useDropActions } from './useDropActions.js';
15
15
  import { useDropButtons } from './useDropButtons.js';
16
16
  import { useFilePreview } from './useFilePreview.js';
17
17
  import { getAvaliableFileTypes, getUploadIcon, bytes2mb, DEFAULT_ACCEPT, RenderFileInfoDefault } from './utils.js';
18
- import { s as styles } from './upload-CHF-Lmcl.js';
19
- import '@hh.ru/magritte-ui-action';
18
+ import { s as styles } from './upload-DiGhpkLd.js';
20
19
  import '@hh.ru/magritte-ui-divider';
21
20
  import '@hh.ru/magritte-ui-breakpoint';
22
21
 
@@ -1 +1 @@
1
- {"version":3,"file":"SingleUpload.js","sources":["../src/SingleUpload.tsx"],"sourcesContent":["import { ReactElement, useRef, useEffect, MouseEvent } from 'react';\nimport { useDropzone } from 'react-dropzone';\nimport classnames from 'classnames';\n\nimport { Avatar } from '@hh.ru/magritte-ui-avatar';\nimport { CrossOutlinedSize24, ExclamationTriangleOutlinedSize32 } from '@hh.ru/magritte-ui-icon/icon';\nimport { Loader } from '@hh.ru/magritte-ui-loader';\nimport { VSpacing } from '@hh.ru/magritte-ui-spacing';\nimport { Text } from '@hh.ru/magritte-ui-typography';\nimport { FileName } from '@hh.ru/magritte-ui-upload/FileName';\nimport { FileView } from '@hh.ru/magritte-ui-upload/FileView';\nimport { Placeholder } from '@hh.ru/magritte-ui-upload/Placeholder';\nimport { UploadProps } from '@hh.ru/magritte-ui-upload/types';\nimport { useDropActions } from '@hh.ru/magritte-ui-upload/useDropActions';\nimport { useDropButtons } from '@hh.ru/magritte-ui-upload/useDropButtons';\nimport { useFilePreview } from '@hh.ru/magritte-ui-upload/useFilePreview';\nimport {\n getUploadIcon,\n bytes2mb,\n getAvaliableFileTypes,\n RenderFileInfoDefault,\n DEFAULT_ACCEPT,\n} from '@hh.ru/magritte-ui-upload/utils';\n\nimport styles from './upload.less';\n\nconst SingleUpload = ({\n files,\n trls,\n size = 'medium',\n accept = DEFAULT_ACCEPT,\n selectFileButton: _selectFileButton,\n deleteFileButton: _deleteFileButton,\n replaceImageButton: _replaceImageButton,\n renderFileInfo = RenderFileInfoDefault,\n onDropAccepted: onDropAcceptedExternal,\n onDropRejected: onDropRejectedExternal,\n onFileDelete: onFileDeleteExternal,\n 'aria-label': ariaLabel,\n ...dropzoneProps\n}: UploadProps): ReactElement => {\n const bodyUploadRef = useRef<HTMLDivElement>(null);\n const uploadType = getAvaliableFileTypes(accept);\n const loadedFile = files.length > 0 ? files[0] : undefined;\n const isLoad = Boolean(loadedFile);\n const isLoading = Boolean(loadedFile?.loading);\n const isInvalid = Boolean(loadedFile?.error);\n const isSizeSmall = size === 'small';\n const isImageType = uploadType === 'image';\n const preview = useFilePreview({ loadedFile, isImageType });\n const usePreview = preview !== 'none';\n\n useEffect(() => {\n if (!bodyUploadRef.current) {\n return void 0;\n }\n if (isSizeSmall) {\n return void 0;\n }\n // фиксируем ширину, так как после выбора контент поменяется\n const currentElement = bodyUploadRef.current;\n currentElement.style.minHeight = `${bodyUploadRef.current.offsetHeight}px`;\n return () => {\n currentElement.style.minHeight = 'auto';\n };\n }, [isSizeSmall]);\n\n const { onDropAccepted, onDropRejected, onFileDelete } = useDropActions({\n onDropAccepted: onDropAcceptedExternal,\n onDropRejected: onDropRejectedExternal,\n onFileDelete: onFileDeleteExternal,\n });\n const { getRootProps, getInputProps, isDragActive } = useDropzone({\n ...dropzoneProps,\n accept,\n onDropAccepted,\n onDropRejected,\n multiple: false,\n });\n\n const { selectFileButton, deleteFileButton, replaceImageButton } = useDropButtons({\n selectFileButton: _selectFileButton,\n deleteFileButton: _deleteFileButton,\n replaceImageButton: _replaceImageButton,\n onFileDelete: (event: MouseEvent) => {\n onFileDelete(event, loadedFile, 0);\n },\n });\n\n const backgroundStyles = !isSizeSmall\n ? { backgroundImage: preview !== 'none' ? `url('${preview}')` : preview }\n : {};\n return (\n <div\n className={classnames(\n styles.root,\n styles[`root_${size}`],\n { [styles.dragActive]: isDragActive },\n { [styles.loading]: isLoading },\n { [styles.load]: isLoad },\n { [styles.invalid]: isInvalid }\n )}\n {...getRootProps()}\n data-qa=\"magritte-single-upload\"\n >\n <input {...getInputProps()} data-qa=\"magritte-single-upload-input\" />\n <div className={styles.background} style={backgroundStyles} data-qa=\"magritte-single-upload-background\" />\n <div className={styles.body} ref={bodyUploadRef}>\n {isSizeSmall && (\n <>\n {loadedFile && (\n <FileView\n uploadType={uploadType}\n loadedFile={loadedFile}\n renderFileInfo={renderFileInfo}\n onFileDelete={(event) => {\n onFileDelete(event, loadedFile, 0);\n }}\n preview={preview}\n aria-label={ariaLabel || ''}\n isLast\n />\n )}\n {!loadedFile && (\n <>\n <Avatar\n mode=\"icon\"\n style=\"secondary\"\n size={48}\n icon={getUploadIcon(uploadType, loadedFile, true)}\n aria-label={ariaLabel || ''}\n />\n <div>\n <Text typography=\"label-2-regular\">{trls.title}</Text>\n <VSpacing default={4} />\n <Text typography=\"label-4-regular\" style=\"secondary\">\n {trls.subTitle}\n </Text>\n </div>\n {selectFileButton && <div className={styles.smallControls}>{selectFileButton}</div>}\n </>\n )}\n </>\n )}\n {!isSizeSmall && (\n <>\n {isLoading && (\n <div className={styles.loader}>\n <Loader size={64} />\n <div className={styles.cancel}>\n <CrossOutlinedSize24\n initialColor=\"accent\"\n onClick={(event) => {\n onFileDelete(event, loadedFile, 0);\n }}\n />\n </div>\n </div>\n )}\n {isInvalid ? (\n <ExclamationTriangleOutlinedSize32 initialColor=\"negative\" />\n ) : (\n !usePreview && getUploadIcon(uploadType, loadedFile, false)\n )}\n <VSpacing default={16} />\n {loadedFile && (\n <>\n {!usePreview && (\n <>\n <FileName file={loadedFile.data} isSizeMedium />\n <VSpacing default={6} />\n <Text typography=\"label-4-regular\" style=\"secondary\">\n {renderFileInfo({\n ...loadedFile,\n fileSizeMB: bytes2mb(loadedFile.data.size),\n })}\n </Text>\n </>\n )}\n {!isLoading && (!isImageType || isInvalid) && deleteFileButton && (\n <>\n <VSpacing default={16} />\n {deleteFileButton}\n </>\n )}\n {!isLoading &&\n isImageType &&\n !isInvalid &&\n (replaceImageButton || deleteFileButton) && (\n <div className={styles.imageControls}>\n {replaceImageButton}\n {deleteFileButton}\n </div>\n )}\n </>\n )}\n {!loadedFile && <Placeholder trls={trls} selectFileButton={selectFileButton} />}\n </>\n )}\n </div>\n </div>\n );\n};\n\nexport { SingleUpload };\n"],"names":["_jsxs","_jsx","_Fragment"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA0BM,MAAA,YAAY,GAAG,CAAC,EAClB,KAAK,EACL,IAAI,EACJ,IAAI,GAAG,QAAQ,EACf,MAAM,GAAG,cAAc,EAC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"file":"SingleUpload.js","sources":["../src/SingleUpload.tsx"],"sourcesContent":["import { ReactElement, useRef, useEffect, MouseEvent } from 'react';\nimport { useDropzone } from 'react-dropzone';\nimport classnames from 'classnames';\n\nimport { Avatar } from '@hh.ru/magritte-ui-avatar';\nimport { CrossOutlinedSize24, ExclamationTriangleOutlinedSize32 } from '@hh.ru/magritte-ui-icon/icon';\nimport { Loader } from '@hh.ru/magritte-ui-loader';\nimport { VSpacing } from '@hh.ru/magritte-ui-spacing';\nimport { Text } from '@hh.ru/magritte-ui-typography';\nimport { FileName } from '@hh.ru/magritte-ui-upload/FileName';\nimport { FileView } from '@hh.ru/magritte-ui-upload/FileView';\nimport { Placeholder } from '@hh.ru/magritte-ui-upload/Placeholder';\nimport { UploadProps } from '@hh.ru/magritte-ui-upload/types';\nimport { useDropActions } from '@hh.ru/magritte-ui-upload/useDropActions';\nimport { useDropButtons } from '@hh.ru/magritte-ui-upload/useDropButtons';\nimport { useFilePreview } from '@hh.ru/magritte-ui-upload/useFilePreview';\nimport {\n getUploadIcon,\n bytes2mb,\n getAvaliableFileTypes,\n RenderFileInfoDefault,\n DEFAULT_ACCEPT,\n} from '@hh.ru/magritte-ui-upload/utils';\n\nimport styles from './upload.less';\n\nconst SingleUpload = ({\n files,\n trls,\n size = 'medium',\n accept = DEFAULT_ACCEPT,\n selectFileButton: _selectFileButton,\n deleteFileButton: _deleteFileButton,\n replaceImageButton: _replaceImageButton,\n renderFileInfo = RenderFileInfoDefault,\n onDropAccepted: onDropAcceptedExternal,\n onDropRejected: onDropRejectedExternal,\n onFileDelete: onFileDeleteExternal,\n 'aria-label': ariaLabel,\n ...dropzoneProps\n}: UploadProps): ReactElement => {\n const bodyUploadRef = useRef<HTMLDivElement>(null);\n const uploadType = getAvaliableFileTypes(accept);\n const loadedFile = files.length > 0 ? files[0] : undefined;\n const isLoad = Boolean(loadedFile);\n const isLoading = Boolean(loadedFile?.loading);\n const isInvalid = Boolean(loadedFile?.error);\n const isSizeSmall = size === 'small';\n const isImageType = uploadType === 'image';\n const preview = useFilePreview({ loadedFile, isImageType });\n const usePreview = preview !== 'none';\n\n useEffect(() => {\n if (!bodyUploadRef.current) {\n return void 0;\n }\n if (isSizeSmall) {\n return void 0;\n }\n // фиксируем ширину, так как после выбора контент поменяется\n const currentElement = bodyUploadRef.current;\n currentElement.style.minHeight = `${bodyUploadRef.current.offsetHeight}px`;\n return () => {\n currentElement.style.minHeight = 'auto';\n };\n }, [isSizeSmall]);\n\n const { onDropAccepted, onDropRejected, onFileDelete } = useDropActions({\n onDropAccepted: onDropAcceptedExternal,\n onDropRejected: onDropRejectedExternal,\n onFileDelete: onFileDeleteExternal,\n });\n const { getRootProps, getInputProps, isDragActive } = useDropzone({\n ...dropzoneProps,\n accept,\n onDropAccepted,\n onDropRejected,\n multiple: false,\n });\n\n const { selectFileButton, deleteFileButton, replaceImageButton } = useDropButtons({\n selectFileButton: _selectFileButton,\n deleteFileButton: _deleteFileButton,\n replaceImageButton: _replaceImageButton,\n onFileDelete: (event: MouseEvent) => {\n onFileDelete(event, loadedFile, 0);\n },\n });\n\n const backgroundStyles = !isSizeSmall\n ? { backgroundImage: preview !== 'none' ? `url('${preview}')` : preview }\n : {};\n return (\n <div\n className={classnames(\n styles.root,\n styles[`root_${size}`],\n { [styles.dragActive]: isDragActive },\n { [styles.loading]: isLoading },\n { [styles.load]: isLoad },\n { [styles.invalid]: isInvalid }\n )}\n {...getRootProps()}\n data-qa=\"magritte-single-upload\"\n >\n <input {...getInputProps()} data-qa=\"magritte-single-upload-input\" />\n <div className={styles.background} style={backgroundStyles} data-qa=\"magritte-single-upload-background\" />\n <div className={styles.body} ref={bodyUploadRef}>\n {isSizeSmall && (\n <>\n {loadedFile && (\n <FileView\n uploadType={uploadType}\n loadedFile={loadedFile}\n renderFileInfo={renderFileInfo}\n onFileDelete={(event) => {\n onFileDelete(event, loadedFile, 0);\n }}\n preview={preview}\n aria-label={ariaLabel || ''}\n isLast\n />\n )}\n {!loadedFile && (\n <>\n <Avatar\n mode=\"icon\"\n style=\"secondary\"\n size={48}\n icon={getUploadIcon(uploadType, loadedFile, true)}\n aria-label={ariaLabel || ''}\n />\n <div>\n <Text typography=\"label-2-regular\">{trls.title}</Text>\n <VSpacing default={4} />\n <Text typography=\"label-4-regular\" style=\"secondary\">\n {trls.subTitle}\n </Text>\n </div>\n {selectFileButton && <div className={styles.smallControls}>{selectFileButton}</div>}\n </>\n )}\n </>\n )}\n {!isSizeSmall && (\n <>\n {isLoading && (\n <div className={styles.loader}>\n <Loader size={64} />\n <div className={styles.cancel}>\n <CrossOutlinedSize24\n initialColor=\"accent\"\n onClick={(event) => {\n onFileDelete(event, loadedFile, 0);\n }}\n />\n </div>\n </div>\n )}\n {isInvalid ? (\n <ExclamationTriangleOutlinedSize32 initialColor=\"negative\" />\n ) : (\n !usePreview && getUploadIcon(uploadType, loadedFile, false)\n )}\n <VSpacing default={16} />\n {loadedFile && (\n <>\n {!usePreview && (\n <>\n <FileName file={loadedFile.data} isSizeMedium />\n <VSpacing default={6} />\n <Text typography=\"label-4-regular\" style=\"secondary\">\n {renderFileInfo({\n ...loadedFile,\n fileSizeMB: bytes2mb(loadedFile.data.size),\n })}\n </Text>\n </>\n )}\n {!isLoading && (!isImageType || isInvalid) && deleteFileButton && (\n <>\n <VSpacing default={16} />\n {deleteFileButton}\n </>\n )}\n {!isLoading &&\n isImageType &&\n !isInvalid &&\n (replaceImageButton || deleteFileButton) && (\n <div className={styles.imageControls}>\n {replaceImageButton}\n {deleteFileButton}\n </div>\n )}\n </>\n )}\n {!loadedFile && <Placeholder trls={trls} selectFileButton={selectFileButton} />}\n </>\n )}\n </div>\n </div>\n );\n};\n\nexport { SingleUpload };\n"],"names":["_jsxs","_jsx","_Fragment"],"mappings":";;;;;;;;;;;;;;;;;;;;AA0BM,MAAA,YAAY,GAAG,CAAC,EAClB,KAAK,EACL,IAAI,EACJ,IAAI,GAAG,QAAQ,EACf,MAAM,GAAG,cAAc,EACvB,gBAAgB,E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+7,6 @@ import 'classnames';
7
7
  import '@hh.ru/magritte-ui-spacing';
8
8
  import './FileViewWithPreview.js';
9
9
  import './FileView.js';
10
- import '@hh.ru/magritte-ui-action';
11
10
  import '@hh.ru/magritte-ui-avatar';
12
11
  import '@hh.ru/magritte-ui-divider';
13
12
  import '@hh.ru/magritte-ui-icon/icon';
@@ -21,7 +20,7 @@ import '@hh.ru/magritte-ui-breakpoint';
21
20
  import '@hh.ru/magritte-ui-typography';
22
21
  import './useDropActions.js';
23
22
  import './useDropButtons.js';
24
- import './upload-CHF-Lmcl.js';
23
+ import './upload-DiGhpkLd.js';
25
24
 
26
25
  const Upload = ({ multiple, noDragEventsBubbling = true, ...uploadProps }) => {
27
26
  if (multiple) {
package/Upload.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Upload.js","sources":["../src/Upload.tsx"],"sourcesContent":["import { ReactElement } from 'react';\n\nimport { MultiUpload } from '@hh.ru/magritte-ui-upload/MultiUpload';\nimport { SingleUpload } from '@hh.ru/magritte-ui-upload/SingleUpload';\nimport { UploadProps } from '@hh.ru/magritte-ui-upload/types';\n\nconst Upload = ({ multiple, noDragEventsBubbling = true, ...uploadProps }: UploadProps): ReactElement => {\n if (multiple) {\n return <MultiUpload noDragEventsBubbling={noDragEventsBubbling} {...uploadProps} />;\n }\n return <SingleUpload noDragEventsBubbling={noDragEventsBubbling} {...uploadProps} />;\n};\n\nexport { Upload };\n"],"names":["_jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAM,MAAM,GAAG,CAAC,EAAE,QAAQ,EAAE,oBAAoB,GAAG,IAAI,EAAE,GAAG,WAAW,EAAe,KAAkB;IACpG,IAAI,QAAQ,EAAE;QACV,OAAOA,GAAA,CAAC,WAAW,EAAC,EAAA,oBAAoB,EAAE,oBAAoB,EAAA,GAAM,WAAW,EAAA,CAAI,CAAC;KACvF;IACD,OAAOA,GAAA,CAAC,YAAY,EAAC,EAAA,oBAAoB,EAAE,oBAAoB,EAAA,GAAM,WAAW,EAAA,CAAI,CAAC;AACzF;;;;"}
1
+ {"version":3,"file":"Upload.js","sources":["../src/Upload.tsx"],"sourcesContent":["import { ReactElement } from 'react';\n\nimport { MultiUpload } from '@hh.ru/magritte-ui-upload/MultiUpload';\nimport { SingleUpload } from '@hh.ru/magritte-ui-upload/SingleUpload';\nimport { UploadProps } from '@hh.ru/magritte-ui-upload/types';\n\nconst Upload = ({ multiple, noDragEventsBubbling = true, ...uploadProps }: UploadProps): ReactElement => {\n if (multiple) {\n return <MultiUpload noDragEventsBubbling={noDragEventsBubbling} {...uploadProps} />;\n }\n return <SingleUpload noDragEventsBubbling={noDragEventsBubbling} {...uploadProps} />;\n};\n\nexport { Upload };\n"],"names":["_jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAM,MAAM,GAAG,CAAC,EAAE,QAAQ,EAAE,oBAAoB,GAAG,IAAI,EAAE,GAAG,WAAW,EAAe,KAAkB;IACpG,IAAI,QAAQ,EAAE;QACV,OAAOA,GAAA,CAAC,WAAW,EAAC,EAAA,oBAAoB,EAAE,oBAAoB,EAAA,GAAM,WAAW,EAAA,CAAI,CAAC;KACvF;IACD,OAAOA,GAAA,CAAC,YAAY,EAAC,EAAA,oBAAoB,EAAE,oBAAoB,EAAA,GAAM,WAAW,EAAA,CAAI,CAAC;AACzF;;;;"}
package/index.css CHANGED
@@ -8,7 +8,7 @@
8
8
  --magritte-typography-label-2-regular-text-transform-v21-3-2:none;
9
9
  --magritte-typography-label-2-regular-text-decoration-v21-3-2:none;
10
10
  }
11
- .magritte-file-name-body___PTTMc_3-2-17{
11
+ .magritte-file-name-body___PTTMc_3-3-0{
12
12
  display:flex;
13
13
  width:100%;
14
14
  overflow:hidden;
@@ -21,10 +21,10 @@
21
21
  text-transform:var(--magritte-typography-label-2-regular-text-transform-v21-3-2);
22
22
  text-decoration:var(--magritte-typography-label-2-regular-text-decoration-v21-3-2);
23
23
  }
24
- .magritte-file-name-body_medium___sfmmq_3-2-17{
24
+ .magritte-file-name-body_medium___sfmmq_3-3-0{
25
25
  justify-content:center;
26
26
  }
27
- .magritte-file-name___ZSL2g_3-2-17{
27
+ .magritte-file-name___ZSL2g_3-3-0{
28
28
  overflow:hidden;
29
29
  text-overflow:ellipsis;
30
30
  }
@@ -41,18 +41,18 @@
41
41
  --magritte-static-space-100-v21-3-2:4px;
42
42
  --magritte-static-space-400-v21-3-2:16px;
43
43
  }
44
- .magritte-file-info-body___HmfXd_3-2-17{
44
+ .magritte-file-info-body___HmfXd_3-3-0{
45
45
  flex-grow:1;
46
46
  }
47
- .magritte-file-info-and-controls___61iyY_3-2-17{
47
+ .magritte-file-info-and-controls___61iyY_3-3-0{
48
48
  display:flex;
49
49
  gap:var(--magritte-static-space-400-v21-3-2);
50
50
  }
51
- .magritte-file-info-container___WFab8_3-2-17{
51
+ .magritte-file-info-container___WFab8_3-3-0{
52
52
  flex-grow:1;
53
53
  width:50px;
54
54
  }
55
- .magritte-file-info___HrqiB_3-2-17{
55
+ .magritte-file-info___HrqiB_3-3-0{
56
56
  display:flex;
57
57
  gap:var(--magritte-static-space-100-v21-3-2);
58
58
  font-family:var(--magritte-typography-label-4-regular-font-family-v21-3-2);
@@ -64,7 +64,7 @@
64
64
  text-transform:var(--magritte-typography-label-4-regular-text-transform-v21-3-2);
65
65
  text-decoration:var(--magritte-typography-label-4-regular-text-decoration-v21-3-2);
66
66
  }
67
- .magritte-controls___WdH7A_3-2-17{
67
+ .magritte-controls___WdH7A_3-3-0{
68
68
  display:flex;
69
69
  align-items:center;
70
70
  margin-left:auto;
@@ -74,7 +74,7 @@
74
74
  :root{
75
75
  --magritte-static-space-400-v21-3-2:16px;
76
76
  }
77
- .magritte-item___vVDG-_3-2-17{
77
+ .magritte-item___vVDG-_3-3-0{
78
78
  display:flex;
79
79
  width:100%;
80
80
  gap:var(--magritte-static-space-400-v21-3-2);
@@ -101,57 +101,57 @@
101
101
  --magritte-color-stroke-state-focused-accessible-v21-3-2:#0070ff7a;
102
102
  --magritte-color-component-input-stroke-state-negative-focused-accessible-v21-3-2:#ff4d3a7a;
103
103
  }
104
- .magritte-root___FV1tC_3-2-17{
104
+ .magritte-root___FV1tC_3-3-0{
105
105
  position:relative;
106
106
  display:flex;
107
107
  overflow:hidden;
108
108
  border-radius:var(--magritte-static-border-radius-600-v21-3-2);
109
109
  background-color:var(--magritte-color-background-primary-v21-3-2);
110
110
  }
111
- .magritte-root___FV1tC_3-2-17:hover{
111
+ .magritte-root___FV1tC_3-3-0:hover{
112
112
  cursor:pointer;
113
113
  }
114
- .magritte-root___FV1tC_3-2-17:hover .magritte-background___RfZ0U_3-2-17{
114
+ .magritte-root___FV1tC_3-3-0:hover .magritte-background___RfZ0U_3-3-0{
115
115
  border-color:var(--magritte-color-stroke-accent-v21-3-2);
116
116
  }
117
- .magritte-root___FV1tC_3-2-17.magritte-drag-active___dihBL_3-2-17 .magritte-background___RfZ0U_3-2-17{
117
+ .magritte-root___FV1tC_3-3-0.magritte-drag-active___dihBL_3-3-0 .magritte-background___RfZ0U_3-3-0{
118
118
  border-color:var(--magritte-color-stroke-accent-v21-3-2);
119
119
  }
120
- .magritte-root___FV1tC_3-2-17.focus-visible{
120
+ .magritte-root___FV1tC_3-3-0.focus-visible{
121
121
  outline:var(--magritte-color-stroke-state-focused-accessible-v21-3-2) solid 4px;
122
122
  }
123
- .magritte-root___FV1tC_3-2-17.focus-visible .magritte-background___RfZ0U_3-2-17{
123
+ .magritte-root___FV1tC_3-3-0.focus-visible .magritte-background___RfZ0U_3-3-0{
124
124
  border-color:var(--magritte-color-stroke-accent-v21-3-2);
125
125
  }
126
- .magritte-root___FV1tC_3-2-17.magritte-load___MghDA_3-2-17 .magritte-background___RfZ0U_3-2-17,
127
- .magritte-root___FV1tC_3-2-17.magritte-loading___9E3p-_3-2-17 .magritte-background___RfZ0U_3-2-17{
126
+ .magritte-root___FV1tC_3-3-0.magritte-load___MghDA_3-3-0 .magritte-background___RfZ0U_3-3-0,
127
+ .magritte-root___FV1tC_3-3-0.magritte-loading___9E3p-_3-3-0 .magritte-background___RfZ0U_3-3-0{
128
128
  border-style:solid;
129
129
  border-width:7px;
130
130
  }
131
- .magritte-root___FV1tC_3-2-17.magritte-invalid___Rt10-_3-2-17.focus-visible{
131
+ .magritte-root___FV1tC_3-3-0.magritte-invalid___Rt10-_3-3-0.focus-visible{
132
132
  outline:var(--magritte-color-component-input-stroke-state-negative-focused-accessible-v21-3-2) solid 4px;
133
133
  }
134
- .magritte-root___FV1tC_3-2-17.magritte-invalid___Rt10-_3-2-17 .magritte-background___RfZ0U_3-2-17{
134
+ .magritte-root___FV1tC_3-3-0.magritte-invalid___Rt10-_3-3-0 .magritte-background___RfZ0U_3-3-0{
135
135
  border-color:var(--magritte-color-stroke-neutral-v21-3-2);
136
136
  }
137
- .magritte-root_medium___67WJa_3-2-17{
137
+ .magritte-root_medium___67WJa_3-3-0{
138
138
  justify-content:center;
139
139
  padding:var(--magritte-static-space-600-v21-3-2);
140
140
  }
141
- .magritte-root_medium___67WJa_3-2-17 .magritte-body___O7ROl_3-2-17{
141
+ .magritte-root_medium___67WJa_3-3-0 .magritte-body___O7ROl_3-3-0{
142
142
  flex-direction:column;
143
143
  align-items:center;
144
144
  justify-content:center;
145
145
  }
146
- .magritte-root_small___dkUYq_3-2-17{
146
+ .magritte-root_small___dkUYq_3-3-0{
147
147
  padding-top:var(--magritte-static-space-400-v21-3-2);
148
148
  padding-bottom:var(--magritte-static-space-400-v21-3-2);
149
149
  padding-left:var(--magritte-static-space-400-v21-3-2);
150
150
  }
151
- .magritte-root_small___dkUYq_3-2-17 .magritte-body___O7ROl_3-2-17{
151
+ .magritte-root_small___dkUYq_3-3-0 .magritte-body___O7ROl_3-3-0{
152
152
  gap:var(--magritte-static-space-400-v21-3-2);
153
153
  }
154
- .magritte-background___RfZ0U_3-2-17{
154
+ .magritte-background___RfZ0U_3-3-0{
155
155
  position:absolute;
156
156
  border-width:8px;
157
157
  border-style:dashed;
@@ -164,15 +164,15 @@
164
164
  background-position:center;
165
165
  background-size:100%;
166
166
  }
167
- .magritte-body___O7ROl_3-2-17{
167
+ .magritte-body___O7ROl_3-3-0{
168
168
  display:flex;
169
169
  width:100%;
170
170
  }
171
- .magritte-loader___XYpWg_3-2-17{
171
+ .magritte-loader___XYpWg_3-3-0{
172
172
  position:relative;
173
173
  display:flex;
174
174
  }
175
- .magritte-cancel___tQ-yX_3-2-17{
175
+ .magritte-cancel___tQ-yX_3-3-0{
176
176
  position:absolute;
177
177
  top:0;
178
178
  left:0;
@@ -182,20 +182,20 @@
182
182
  align-items:center;
183
183
  justify-content:center;
184
184
  }
185
- .magritte-image-controls___vLf94_3-2-17{
185
+ .magritte-image-controls___vLf94_3-3-0{
186
186
  display:flex;
187
187
  position:absolute;
188
188
  right:var(--magritte-static-space-300-v21-3-2);
189
189
  bottom:var(--magritte-static-space-300-v21-3-2);
190
190
  gap:var(--magritte-static-space-300-v21-3-2);
191
191
  }
192
- .magritte-small-controls___Qn9TP_3-2-17{
192
+ .magritte-small-controls___Qn9TP_3-3-0{
193
193
  display:flex;
194
194
  align-items:center;
195
195
  margin-left:auto;
196
196
  margin-right:var(--magritte-static-space-500-v21-3-2);
197
197
  }
198
- .magritte-file-list___L9uHt_3-2-17{
198
+ .magritte-file-list___L9uHt_3-3-0{
199
199
  margin-top:var(--magritte-static-space-300-v21-3-2);
200
200
  box-shadow:inset 0 0 0 1px var(--magritte-color-stroke-neutral-v21-3-2);
201
201
  border-radius:var(--magritte-static-border-radius-600-v21-3-2);
package/index.js CHANGED
@@ -8,7 +8,6 @@ import 'classnames';
8
8
  import '@hh.ru/magritte-ui-spacing';
9
9
  import './FileViewWithPreview.js';
10
10
  import './FileView.js';
11
- import '@hh.ru/magritte-ui-action';
12
11
  import '@hh.ru/magritte-ui-avatar';
13
12
  import '@hh.ru/magritte-ui-divider';
14
13
  import '@hh.ru/magritte-ui-icon/icon';
@@ -22,6 +21,6 @@ import '@hh.ru/magritte-ui-breakpoint';
22
21
  import '@hh.ru/magritte-ui-typography';
23
22
  import './useDropActions.js';
24
23
  import './useDropButtons.js';
25
- import './upload-CHF-Lmcl.js';
24
+ import './upload-DiGhpkLd.js';
26
25
  import './SingleUpload.js';
27
26
  //# sourceMappingURL=index.js.map
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hh.ru/magritte-ui-upload",
3
- "version": "3.2.17",
3
+ "version": "3.3.0",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -27,19 +27,18 @@
27
27
  "react": ">=18.2.0"
28
28
  },
29
29
  "dependencies": {
30
- "@hh.ru/magritte-ui-action": "4.4.34",
31
- "@hh.ru/magritte-ui-avatar": "5.1.7",
30
+ "@hh.ru/magritte-ui-avatar": "5.1.8",
32
31
  "@hh.ru/magritte-ui-breakpoint": "5.0.0",
33
- "@hh.ru/magritte-ui-button": "5.2.28",
34
- "@hh.ru/magritte-ui-button-stack": "2.1.48",
32
+ "@hh.ru/magritte-ui-button": "5.2.29",
33
+ "@hh.ru/magritte-ui-button-stack": "2.1.49",
35
34
  "@hh.ru/magritte-ui-divider": "1.1.45",
36
- "@hh.ru/magritte-ui-icon": "10.1.0",
37
- "@hh.ru/magritte-ui-loader": "1.3.26",
38
- "@hh.ru/magritte-ui-mock-component": "1.0.12",
39
- "@hh.ru/magritte-ui-spacing": "2.0.43",
35
+ "@hh.ru/magritte-ui-icon": "10.2.0",
36
+ "@hh.ru/magritte-ui-loader": "1.3.27",
37
+ "@hh.ru/magritte-ui-mock-component": "1.1.0",
38
+ "@hh.ru/magritte-ui-spacing": "2.0.44",
40
39
  "@hh.ru/magritte-ui-theme-provider": "1.1.41",
41
- "@hh.ru/magritte-ui-typography": "3.0.31",
40
+ "@hh.ru/magritte-ui-typography": "3.0.32",
42
41
  "react-dropzone": "14.3.5"
43
42
  },
44
- "gitHead": "cbe1fb9e87fc21a078105505992bf64d19e9b9b5"
43
+ "gitHead": "d12e0d9910ca5fb5323a5312386cb48255aa5ca6"
45
44
  }
@@ -0,0 +1,5 @@
1
+ import './index.css';
2
+ var styles = {"root":"magritte-root___FV1tC_3-3-0","background":"magritte-background___RfZ0U_3-3-0","drag-active":"magritte-drag-active___dihBL_3-3-0","dragActive":"magritte-drag-active___dihBL_3-3-0","load":"magritte-load___MghDA_3-3-0","loading":"magritte-loading___9E3p-_3-3-0","invalid":"magritte-invalid___Rt10-_3-3-0","root_medium":"magritte-root_medium___67WJa_3-3-0","rootMedium":"magritte-root_medium___67WJa_3-3-0","body":"magritte-body___O7ROl_3-3-0","root_small":"magritte-root_small___dkUYq_3-3-0","rootSmall":"magritte-root_small___dkUYq_3-3-0","loader":"magritte-loader___XYpWg_3-3-0","cancel":"magritte-cancel___tQ-yX_3-3-0","image-controls":"magritte-image-controls___vLf94_3-3-0","imageControls":"magritte-image-controls___vLf94_3-3-0","small-controls":"magritte-small-controls___Qn9TP_3-3-0","smallControls":"magritte-small-controls___Qn9TP_3-3-0","file-list":"magritte-file-list___L9uHt_3-3-0","fileList":"magritte-file-list___L9uHt_3-3-0"};
3
+
4
+ export { styles as s };
5
+ //# sourceMappingURL=upload-DiGhpkLd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upload-DiGhpkLd.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1,5 +0,0 @@
1
- import './index.css';
2
- var styles = {"root":"magritte-root___FV1tC_3-2-17","background":"magritte-background___RfZ0U_3-2-17","drag-active":"magritte-drag-active___dihBL_3-2-17","dragActive":"magritte-drag-active___dihBL_3-2-17","load":"magritte-load___MghDA_3-2-17","loading":"magritte-loading___9E3p-_3-2-17","invalid":"magritte-invalid___Rt10-_3-2-17","root_medium":"magritte-root_medium___67WJa_3-2-17","rootMedium":"magritte-root_medium___67WJa_3-2-17","body":"magritte-body___O7ROl_3-2-17","root_small":"magritte-root_small___dkUYq_3-2-17","rootSmall":"magritte-root_small___dkUYq_3-2-17","loader":"magritte-loader___XYpWg_3-2-17","cancel":"magritte-cancel___tQ-yX_3-2-17","image-controls":"magritte-image-controls___vLf94_3-2-17","imageControls":"magritte-image-controls___vLf94_3-2-17","small-controls":"magritte-small-controls___Qn9TP_3-2-17","smallControls":"magritte-small-controls___Qn9TP_3-2-17","file-list":"magritte-file-list___L9uHt_3-2-17","fileList":"magritte-file-list___L9uHt_3-2-17"};
3
-
4
- export { styles as s };
5
- //# sourceMappingURL=upload-CHF-Lmcl.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"upload-CHF-Lmcl.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}