@hh.ru/magritte-ui-upload 3.2.1 → 3.2.3
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 +1 -1
- package/FileView.js +1 -1
- package/FileViewWithPreview.js +1 -1
- package/MultiUpload.js +1 -1
- package/Placeholder.d.ts +2 -1
- package/Placeholder.js.map +1 -1
- package/SingleUpload.js +1 -1
- package/Upload.js +1 -1
- package/index.css +113 -2217
- package/index.d.ts +1 -0
- package/index.js +2 -1
- package/index.js.map +1 -1
- package/index.mock.d.ts +5 -0
- package/index.mock.js +11 -0
- package/index.mock.js.map +1 -0
- package/package.json +13 -10
- package/types.d.ts +2 -3
- package/upload-hvS74IxN.js +5 -0
- package/upload-hvS74IxN.js.map +1 -0
- package/useDropButtons.d.ts +1 -1
- package/useDropButtons.js.map +1 -1
- package/useFilePreview.js +1 -1
- package/useFilePreview.js.map +1 -1
- package/upload-Vizzz8BL.js +0 -5
- package/upload-Vizzz8BL.js.map +0 -1
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-
|
|
5
|
+
var styles = {"file-name-body":"magritte-file-name-body___PTTMc_3-2-3","fileNameBody":"magritte-file-name-body___PTTMc_3-2-3","file-name-body_medium":"magritte-file-name-body_medium___sfmmq_3-2-3","fileNameBodyMedium":"magritte-file-name-body_medium___sfmmq_3-2-3","file-name":"magritte-file-name___ZSL2g_3-2-3","fileName":"magritte-file-name___ZSL2g_3-2-3"};
|
|
6
6
|
|
|
7
7
|
const parse = (file) => {
|
|
8
8
|
const name = file.name;
|
package/FileView.js
CHANGED
|
@@ -10,7 +10,7 @@ import { FileName } from './FileName.js';
|
|
|
10
10
|
import { getUploadIcon, bytes2mb } from './utils.js';
|
|
11
11
|
import 'classnames';
|
|
12
12
|
|
|
13
|
-
var styles = {"file-info-body":"magritte-file-info-body___HmfXd_3-2-
|
|
13
|
+
var styles = {"file-info-body":"magritte-file-info-body___HmfXd_3-2-3","fileInfoBody":"magritte-file-info-body___HmfXd_3-2-3","file-info-and-controls":"magritte-file-info-and-controls___61iyY_3-2-3","fileInfoAndControls":"magritte-file-info-and-controls___61iyY_3-2-3","file-info-container":"magritte-file-info-container___WFab8_3-2-3","fileInfoContainer":"magritte-file-info-container___WFab8_3-2-3","file-info":"magritte-file-info___HrqiB_3-2-3","fileInfo":"magritte-file-info___HrqiB_3-2-3","controls":"magritte-controls___WdH7A_3-2-3"};
|
|
14
14
|
|
|
15
15
|
const FileView = ({ uploadType, loadedFile, preview, renderFileInfo, onFileDelete, 'aria-label': ariaLabel, isLast = false, }) => {
|
|
16
16
|
const isLoading = Boolean(loadedFile?.loading);
|
package/FileViewWithPreview.js
CHANGED
|
@@ -13,7 +13,7 @@ import './FileName.js';
|
|
|
13
13
|
import 'classnames';
|
|
14
14
|
import 'react';
|
|
15
15
|
|
|
16
|
-
var styles = {"item":"magritte-item___vVDG-_3-2-
|
|
16
|
+
var styles = {"item":"magritte-item___vVDG-_3-2-3"};
|
|
17
17
|
|
|
18
18
|
const FileViewWithPreview = ({ loadedFile, ...otherProps }) => {
|
|
19
19
|
const uploadType = getFileType(loadedFile.data.type);
|
package/MultiUpload.js
CHANGED
|
@@ -8,7 +8,7 @@ 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-
|
|
11
|
+
import { s as styles } from './upload-hvS74IxN.js';
|
|
12
12
|
import './FileView.js';
|
|
13
13
|
import '@hh.ru/magritte-ui-action';
|
|
14
14
|
import '@hh.ru/magritte-ui-avatar';
|
package/Placeholder.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import { ButtonElement
|
|
2
|
+
import { ButtonElement } from '@hh.ru/magritte-ui-button-stack';
|
|
3
|
+
import { UploadTrls } from '@hh.ru/magritte-ui-upload/types';
|
|
3
4
|
interface PlaceholderProps {
|
|
4
5
|
trls: UploadTrls;
|
|
5
6
|
selectFileButton?: ButtonElement;
|
package/Placeholder.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Placeholder.js","sources":["../src/Placeholder.tsx"],"sourcesContent":["import { ReactElement } from 'react';\n\nimport { useBreakpoint } from '@hh.ru/magritte-ui-breakpoint';\nimport { VSpacing } from '@hh.ru/magritte-ui-spacing';\nimport { Text } from '@hh.ru/magritte-ui-typography';\nimport {
|
|
1
|
+
{"version":3,"file":"Placeholder.js","sources":["../src/Placeholder.tsx"],"sourcesContent":["import { ReactElement } from 'react';\n\nimport { useBreakpoint } from '@hh.ru/magritte-ui-breakpoint';\nimport { ButtonElement } from '@hh.ru/magritte-ui-button-stack';\nimport { VSpacing } from '@hh.ru/magritte-ui-spacing';\nimport { Text } from '@hh.ru/magritte-ui-typography';\nimport { UploadTrls } from '@hh.ru/magritte-ui-upload/types';\n\ninterface PlaceholderProps {\n trls: UploadTrls;\n selectFileButton?: ButtonElement;\n}\n\nconst Placeholder = ({ trls, selectFileButton }: PlaceholderProps): ReactElement => {\n const { isMobile } = useBreakpoint();\n const { title, titleMobile, subTitle } = trls;\n return (\n <>\n <Text typography=\"label-2-regular\">{isMobile ? titleMobile || title : title}</Text>\n <VSpacing default={6} />\n <Text typography=\"label-4-regular\" style=\"secondary\">\n {subTitle}\n </Text>\n {selectFileButton && (\n <>\n <VSpacing default={16} />\n {selectFileButton}\n </>\n )}\n </>\n );\n};\n\nexport { Placeholder };\n"],"names":["_jsxs","_Fragment","_jsx"],"mappings":";;;;;AAaM,MAAA,WAAW,GAAG,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAoB,KAAkB;AAC/E,IAAA,MAAM,EAAE,QAAQ,EAAE,GAAG,aAAa,EAAE,CAAC;IACrC,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;AAC9C,IAAA,QACIA,IAAA,CAAAC,QAAA,EAAA,EAAA,QAAA,EAAA,CACIC,GAAC,CAAA,IAAI,EAAC,EAAA,UAAU,EAAC,iBAAiB,EAAE,QAAA,EAAA,QAAQ,GAAG,WAAW,IAAI,KAAK,GAAG,KAAK,EAAQ,CAAA,EACnFA,GAAC,CAAA,QAAQ,EAAC,EAAA,OAAO,EAAE,CAAC,EAAI,CAAA,EACxBA,GAAC,CAAA,IAAI,EAAC,EAAA,UAAU,EAAC,iBAAiB,EAAC,KAAK,EAAC,WAAW,EAC/C,QAAA,EAAA,QAAQ,EACN,CAAA,EACN,gBAAgB,KACbF,IAAA,CAAAC,QAAA,EAAA,EAAA,QAAA,EAAA,CACIC,GAAC,CAAA,QAAQ,EAAC,EAAA,OAAO,EAAE,EAAE,EAAI,CAAA,EACxB,gBAAgB,CAAA,EAAA,CAClB,CACN,CAAA,EAAA,CACF,EACL;AACN;;;;"}
|
package/SingleUpload.js
CHANGED
|
@@ -15,7 +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-
|
|
18
|
+
import { s as styles } from './upload-hvS74IxN.js';
|
|
19
19
|
import '@hh.ru/magritte-ui-action';
|
|
20
20
|
import '@hh.ru/magritte-ui-divider';
|
|
21
21
|
import '@hh.ru/magritte-ui-breakpoint';
|
package/Upload.js
CHANGED
|
@@ -21,7 +21,7 @@ import '@hh.ru/magritte-ui-breakpoint';
|
|
|
21
21
|
import '@hh.ru/magritte-ui-typography';
|
|
22
22
|
import './useDropActions.js';
|
|
23
23
|
import './useDropButtons.js';
|
|
24
|
-
import './upload-
|
|
24
|
+
import './upload-hvS74IxN.js';
|
|
25
25
|
|
|
26
26
|
const Upload = ({ multiple, noDragEventsBubbling = true, ...uploadProps }) => {
|
|
27
27
|
if (multiple) {
|