@alfalab/core-components-file-upload-item 8.0.3 → 8.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/actions-control/actions-control.css +8 -8
- package/components/actions-control/actions-control.module.css.js +1 -1
- package/components/actions-control/actions-control.module.css.js.map +1 -1
- package/components/actions-control/actions.js.map +1 -1
- package/components/actions-control/components/delete-button/delete-button.js.map +1 -1
- package/components/actions-control/components/download-button/download-button.js.map +1 -1
- package/components/actions-control/components/restore-button/restore-button.js.map +1 -1
- package/components/content/components/content-error/content-error.css +1 -1
- package/components/content/components/content-error/content-error.js.map +1 -1
- package/components/content/components/content-error/content-error.module.css.js +1 -1
- package/components/content/components/content-subtitle/content-subtitle.css +3 -3
- package/components/content/components/content-subtitle/content-subtitle.js.map +1 -1
- package/components/content/components/content-subtitle/content-subtitle.module.css.js +1 -1
- package/components/content/components/content-subtitle/content-subtitle.module.css.js.map +1 -1
- package/components/content/content.css +7 -7
- package/components/content/content.js.map +1 -1
- package/components/content/content.module.css.js +1 -1
- package/components/content/content.module.css.js.map +1 -1
- package/components/content/utils/isError.js.map +1 -1
- package/components/status-control/extension-icon/index.css +5 -5
- package/components/status-control/extension-icon/index.js.map +1 -1
- package/components/status-control/extension-icon/index.module.css.js +1 -1
- package/components/status-control/extension-icon/index.module.css.js.map +1 -1
- package/components/status-control/index.css +8 -8
- package/components/status-control/index.module.css.js +1 -1
- package/components/status-control/index.module.css.js.map +1 -1
- package/context/file-upload-item-context.d.ts +1 -1
- package/cssm/components/actions-control/actions.js.map +1 -1
- package/cssm/components/actions-control/components/delete-button/delete-button.js.map +1 -1
- package/cssm/components/actions-control/components/download-button/download-button.js.map +1 -1
- package/cssm/components/actions-control/components/restore-button/restore-button.js.map +1 -1
- package/cssm/components/content/components/content-error/content-error.js.map +1 -1
- package/cssm/components/content/components/content-subtitle/content-subtitle.js.map +1 -1
- package/cssm/components/content/content.js.map +1 -1
- package/cssm/components/content/utils/isError.js.map +1 -1
- package/cssm/components/status-control/extension-icon/index.js.map +1 -1
- package/cssm/context/file-upload-item-context.d.ts +1 -1
- package/cssm/types/status.d.ts +1 -1
- package/cssm/utils.d.ts +6 -6
- package/esm/components/actions-control/actions-control.css +8 -8
- package/esm/components/actions-control/actions-control.module.css.js +1 -1
- package/esm/components/actions-control/actions-control.module.css.js.map +1 -1
- package/esm/components/actions-control/actions.js.map +1 -1
- package/esm/components/actions-control/components/delete-button/delete-button.js.map +1 -1
- package/esm/components/actions-control/components/download-button/download-button.js.map +1 -1
- package/esm/components/actions-control/components/restore-button/restore-button.js.map +1 -1
- package/esm/components/content/components/content-error/content-error.css +1 -1
- package/esm/components/content/components/content-error/content-error.js.map +1 -1
- package/esm/components/content/components/content-error/content-error.module.css.js +1 -1
- package/esm/components/content/components/content-subtitle/content-subtitle.css +3 -3
- package/esm/components/content/components/content-subtitle/content-subtitle.js.map +1 -1
- package/esm/components/content/components/content-subtitle/content-subtitle.module.css.js +1 -1
- package/esm/components/content/components/content-subtitle/content-subtitle.module.css.js.map +1 -1
- package/esm/components/content/content.css +7 -7
- package/esm/components/content/content.js.map +1 -1
- package/esm/components/content/content.module.css.js +1 -1
- package/esm/components/content/content.module.css.js.map +1 -1
- package/esm/components/content/utils/isError.js.map +1 -1
- package/esm/components/status-control/extension-icon/index.css +5 -5
- package/esm/components/status-control/extension-icon/index.js.map +1 -1
- package/esm/components/status-control/extension-icon/index.module.css.js +1 -1
- package/esm/components/status-control/extension-icon/index.module.css.js.map +1 -1
- package/esm/components/status-control/index.css +8 -8
- package/esm/components/status-control/index.module.css.js +1 -1
- package/esm/components/status-control/index.module.css.js.map +1 -1
- package/esm/context/file-upload-item-context.d.ts +1 -1
- package/esm/index.css +2 -2
- package/esm/index.module.css.js +1 -1
- package/esm/index.module.css.js.map +1 -1
- package/esm/types/status.d.ts +1 -1
- package/esm/utils.d.ts +6 -6
- package/index.css +2 -2
- package/index.module.css.js +1 -1
- package/index.module.css.js.map +1 -1
- package/modern/components/actions-control/actions-control.css +8 -8
- package/modern/components/actions-control/actions-control.module.css.js +1 -1
- package/modern/components/actions-control/actions-control.module.css.js.map +1 -1
- package/modern/components/actions-control/actions.js.map +1 -1
- package/modern/components/actions-control/components/delete-button/delete-button.js.map +1 -1
- package/modern/components/actions-control/components/download-button/download-button.js.map +1 -1
- package/modern/components/actions-control/components/restore-button/restore-button.js.map +1 -1
- package/modern/components/content/components/content-error/content-error.css +1 -1
- package/modern/components/content/components/content-error/content-error.js.map +1 -1
- package/modern/components/content/components/content-error/content-error.module.css.js +1 -1
- package/modern/components/content/components/content-subtitle/content-subtitle.css +3 -3
- package/modern/components/content/components/content-subtitle/content-subtitle.js.map +1 -1
- package/modern/components/content/components/content-subtitle/content-subtitle.module.css.js +1 -1
- package/modern/components/content/components/content-subtitle/content-subtitle.module.css.js.map +1 -1
- package/modern/components/content/content.css +7 -7
- package/modern/components/content/content.js.map +1 -1
- package/modern/components/content/content.module.css.js +1 -1
- package/modern/components/content/content.module.css.js.map +1 -1
- package/modern/components/content/utils/isError.js.map +1 -1
- package/modern/components/status-control/extension-icon/index.css +5 -5
- package/modern/components/status-control/extension-icon/index.js.map +1 -1
- package/modern/components/status-control/extension-icon/index.module.css.js +1 -1
- package/modern/components/status-control/extension-icon/index.module.css.js.map +1 -1
- package/modern/components/status-control/index.css +8 -8
- package/modern/components/status-control/index.module.css.js +1 -1
- package/modern/components/status-control/index.module.css.js.map +1 -1
- package/modern/context/file-upload-item-context.d.ts +1 -1
- package/modern/index.css +2 -2
- package/modern/index.module.css.js +1 -1
- package/modern/index.module.css.js.map +1 -1
- package/modern/types/status.d.ts +1 -1
- package/modern/utils.d.ts +6 -6
- package/moderncssm/components/actions-control/actions.js.map +1 -1
- package/moderncssm/components/actions-control/components/delete-button/delete-button.js.map +1 -1
- package/moderncssm/components/actions-control/components/download-button/download-button.js.map +1 -1
- package/moderncssm/components/actions-control/components/restore-button/restore-button.js.map +1 -1
- package/moderncssm/components/content/components/content-error/content-error.js.map +1 -1
- package/moderncssm/components/content/components/content-subtitle/content-subtitle.js.map +1 -1
- package/moderncssm/components/content/content.js.map +1 -1
- package/moderncssm/components/content/utils/isError.js.map +1 -1
- package/moderncssm/components/status-control/extension-icon/index.js.map +1 -1
- package/moderncssm/context/file-upload-item-context.d.ts +1 -1
- package/moderncssm/types/status.d.ts +1 -1
- package/moderncssm/utils.d.ts +6 -6
- package/package.json +6 -6
- package/src/components/actions-control/actions-control.module.css +1 -1
- package/src/components/content/components/content-subtitle/content-subtitle.module.css +1 -1
- package/src/components/content/content.module.css +1 -1
- package/src/components/status-control/extension-icon/index.module.css +1 -1
- package/src/components/status-control/index.module.css +1 -1
- package/src/index.module.css +1 -1
- package/types/status.d.ts +1 -1
- package/utils.d.ts +6 -6
|
@@ -2,29 +2,29 @@
|
|
|
2
2
|
--color-light-text-tertiary: rgba(5, 8, 29, 0.38);
|
|
3
3
|
--color-light-text-tertiary-hover: rgba(4, 4, 21, 0.47);
|
|
4
4
|
}
|
|
5
|
-
.file-upload-
|
|
5
|
+
.file-upload-item__container_1aco4 {
|
|
6
6
|
display: flex;
|
|
7
7
|
max-width: 144px;
|
|
8
8
|
}
|
|
9
|
-
.file-upload-
|
|
9
|
+
.file-upload-item__container_1aco4 .file-upload-item__icon_1aco4 {
|
|
10
10
|
width: 48px;
|
|
11
11
|
height: 48px;
|
|
12
12
|
}
|
|
13
|
-
.file-upload-
|
|
13
|
+
.file-upload-item__deleteIconColor_1aco4 {
|
|
14
14
|
fill: var(--color-light-text-tertiary);
|
|
15
15
|
}
|
|
16
|
-
.file-upload-
|
|
16
|
+
.file-upload-item__deleteIconColor_1aco4:hover {
|
|
17
17
|
fill: var(--color-light-text-tertiary-hover);
|
|
18
18
|
}
|
|
19
|
-
.file-upload-
|
|
19
|
+
.file-upload-item__downloadIconColor_1aco4 {
|
|
20
20
|
fill: var(--color-light-text-tertiary);
|
|
21
21
|
}
|
|
22
|
-
.file-upload-
|
|
22
|
+
.file-upload-item__downloadIconColor_1aco4:hover {
|
|
23
23
|
fill: var(--color-light-text-tertiary-hover);
|
|
24
24
|
}
|
|
25
|
-
.file-upload-
|
|
25
|
+
.file-upload-item__restoreIconColor_1aco4 {
|
|
26
26
|
fill: var(--color-light-text-tertiary);
|
|
27
27
|
}
|
|
28
|
-
.file-upload-
|
|
28
|
+
.file-upload-item__restoreIconColor_1aco4:hover {
|
|
29
29
|
fill: var(--color-light-text-tertiary-hover);
|
|
30
30
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./actions-control.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"container":"file-upload-
|
|
5
|
+
var styles = {"container":"file-upload-item__container_1aco4","icon":"file-upload-item__icon_1aco4","deleteIconColor":"file-upload-item__deleteIconColor_1aco4","downloadIconColor":"file-upload-item__downloadIconColor_1aco4","restoreIconColor":"file-upload-item__restoreIconColor_1aco4"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=actions-control.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions-control.module.css.js","sources":["../../src/components/actions-control/actions-control.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/
|
|
1
|
+
{"version":3,"file":"actions-control.module.css.js","sources":["../../src/components/actions-control/actions-control.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.container {\n display: flex;\n max-width: 144px;\n\n & .icon {\n width: 48px;\n height: 48px;\n }\n}\n\n.deleteIconColor {\n fill: var(--color-light-text-tertiary);\n\n &:hover {\n fill: var(--color-light-text-tertiary-hover);\n }\n}\n\n.downloadIconColor {\n fill: var(--color-light-text-tertiary);\n\n &:hover {\n fill: var(--color-light-text-tertiary-hover);\n }\n}\n\n.restoreIconColor {\n fill: var(--color-light-text-tertiary);\n\n &:hover {\n fill: var(--color-light-text-tertiary-hover);\n }\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,mCAAmC,CAAC,MAAM,CAAC,8BAA8B,CAAC,iBAAiB,CAAC,yCAAyC,CAAC,mBAAmB,CAAC,2CAA2C,CAAC,kBAAkB,CAAC,0CAA0C,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.js","sources":["../../src/components/actions-control/actions.tsx"],"sourcesContent":["import React, { useContext, useEffect } from 'react';\n\nimport { FileUploadItemContext } from '../../context/file-upload-item-context';\n\nimport { DeleteButton } from './components/delete-button';\nimport { DownloadButton } from './components/download-button';\nimport { RestoreButton } from './components/restore-button';\n\nimport styles from './actions-control.module.css';\n\nexport const Actions = () => {\n const { showRestore, downloadLink, showDelete, setActionsPresent, onDownload } =\n useContext(FileUploadItemContext);\n\n useEffect(() => {\n if (setActionsPresent) {\n setActionsPresent(!!(showRestore || downloadLink || showDelete || onDownload));\n }\n }, [showRestore, downloadLink, showDelete, setActionsPresent, onDownload]);\n\n return (\n <div className={styles.container}>\n {showRestore && <RestoreButton />}\n\n {(downloadLink || onDownload) && !showRestore && <DownloadButton />}\n\n {showDelete && !showRestore && <DeleteButton />}\n </div>\n );\n};\n"],"names":["useContext","FileUploadItemContext","useEffect","React","styles","RestoreButton","DownloadButton","DeleteButton"],"mappings":";;;;;;;;;;;;;;;AAUa,IAAA,OAAO,GAAG,YAAA;IACb,IAAA,EAAA,GACFA,gBAAU,CAACC,2CAAqB,CAAC,EAD7B,WAAW,iBAAA,EAAE,YAAY,kBAAA,EAAE,UAAU,gBAAA,EAAE,iBAAiB,uBAAA,EAAE,UAAU,gBACvC;AAErC,IAAAC,eAAS,CAAC,YAAA;
|
|
1
|
+
{"version":3,"file":"actions.js","sources":["../../src/components/actions-control/actions.tsx"],"sourcesContent":["import React, { useContext, useEffect } from 'react';\n\nimport { FileUploadItemContext } from '../../context/file-upload-item-context';\n\nimport { DeleteButton } from './components/delete-button';\nimport { DownloadButton } from './components/download-button';\nimport { RestoreButton } from './components/restore-button';\n\nimport styles from './actions-control.module.css';\n\nexport const Actions = () => {\n const { showRestore, downloadLink, showDelete, setActionsPresent, onDownload } =\n useContext(FileUploadItemContext);\n\n useEffect(() => {\n if (setActionsPresent) {\n setActionsPresent(!!(showRestore || downloadLink || showDelete || onDownload));\n }\n }, [showRestore, downloadLink, showDelete, setActionsPresent, onDownload]);\n\n return (\n <div className={styles.container}>\n {showRestore && <RestoreButton />}\n\n {(downloadLink || onDownload) && !showRestore && <DownloadButton />}\n\n {showDelete && !showRestore && <DeleteButton />}\n </div>\n );\n};\n"],"names":["useContext","FileUploadItemContext","useEffect","React","styles","RestoreButton","DownloadButton","DeleteButton"],"mappings":";;;;;;;;;;;;;;;AAUa,IAAA,OAAO,GAAG,YAAA;IACb,IAAA,EAAA,GACFA,gBAAU,CAACC,2CAAqB,CAAC,EAD7B,WAAW,iBAAA,EAAE,YAAY,kBAAA,EAAE,UAAU,gBAAA,EAAE,iBAAiB,uBAAA,EAAE,UAAU,gBACvC;AAErC,IAAAC,eAAS,CAAC,YAAA;QACN,IAAI,iBAAiB,EAAE;AACnB,YAAA,iBAAiB,CAAC,CAAC,EAAE,WAAW,IAAI,YAAY,IAAI,UAAU,IAAI,UAAU,CAAC,CAAC;;AAEtF,KAAC,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,iBAAiB,EAAE,UAAU,CAAC,CAAC;AAE1E,IAAA,QACIC,sBAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAEC,qBAAM,CAAC,SAAS,EAAA;QAC3B,WAAW,IAAID,sBAAC,CAAA,aAAA,CAAAE,2BAAa,EAAG,IAAA,CAAA;QAEhC,CAAC,YAAY,IAAI,UAAU,KAAK,CAAC,WAAW,IAAIF,sBAAC,CAAA,aAAA,CAAAG,6BAAc,EAAG,IAAA,CAAA;QAElE,UAAU,IAAI,CAAC,WAAW,IAAIH,qCAACI,yBAAY,EAAA,IAAA,CAAG,CAC7C;AAEd;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-button.js","sources":["../../../../src/components/actions-control/components/delete-button/delete-button.tsx"],"sourcesContent":["import React, { type MouseEvent, useContext } from 'react';\n\nimport { IconButton } from '@alfalab/core-components-icon-button';\nimport CrossMIcon from '@alfalab/icons-glyph/CrossMIcon';\n\nimport { FileUploadItemContext } from '../../../../context/file-upload-item-context';\n\nimport styles from '../../actions-control.module.css';\n\nexport const DeleteButton = () => {\n const { id = '0', disableButtons, onDelete } = useContext(FileUploadItemContext);\n\n const handleDelete = (e: MouseEvent<HTMLElement>) => {\n if (onDelete) {\n onDelete(id, e);\n }\n };\n\n return (\n <IconButton\n className={styles.icon}\n size={24}\n aria-label='удалить'\n icon={<CrossMIcon className={styles.deleteIconColor} />}\n disabled={disableButtons}\n onClick={handleDelete}\n />\n );\n};\n"],"names":["useContext","FileUploadItemContext","React","IconButton","styles","CrossMIcon"],"mappings":";;;;;;;;;;;;;;;AASa,IAAA,YAAY,GAAG,YAAA;AAClB,IAAA,IAAA,KAAyCA,gBAAU,CAACC,2CAAqB,CAAC,EAAxE,UAAQ,EAAR,EAAE,GAAG,EAAA,KAAA,MAAA,GAAA,GAAG,KAAA,EAAE,cAAc,oBAAA,EAAE,QAAQ,cAAsC;IAEhF,IAAM,YAAY,GAAG,UAAC,CAA0B,EAAA;
|
|
1
|
+
{"version":3,"file":"delete-button.js","sources":["../../../../src/components/actions-control/components/delete-button/delete-button.tsx"],"sourcesContent":["import React, { type MouseEvent, useContext } from 'react';\n\nimport { IconButton } from '@alfalab/core-components-icon-button';\nimport CrossMIcon from '@alfalab/icons-glyph/CrossMIcon';\n\nimport { FileUploadItemContext } from '../../../../context/file-upload-item-context';\n\nimport styles from '../../actions-control.module.css';\n\nexport const DeleteButton = () => {\n const { id = '0', disableButtons, onDelete } = useContext(FileUploadItemContext);\n\n const handleDelete = (e: MouseEvent<HTMLElement>) => {\n if (onDelete) {\n onDelete(id, e);\n }\n };\n\n return (\n <IconButton\n className={styles.icon}\n size={24}\n aria-label='удалить'\n icon={<CrossMIcon className={styles.deleteIconColor} />}\n disabled={disableButtons}\n onClick={handleDelete}\n />\n );\n};\n"],"names":["useContext","FileUploadItemContext","React","IconButton","styles","CrossMIcon"],"mappings":";;;;;;;;;;;;;;;AASa,IAAA,YAAY,GAAG,YAAA;AAClB,IAAA,IAAA,KAAyCA,gBAAU,CAACC,2CAAqB,CAAC,EAAxE,UAAQ,EAAR,EAAE,GAAG,EAAA,KAAA,MAAA,GAAA,GAAG,KAAA,EAAE,cAAc,oBAAA,EAAE,QAAQ,cAAsC;IAEhF,IAAM,YAAY,GAAG,UAAC,CAA0B,EAAA;QAC5C,IAAI,QAAQ,EAAE;AACV,YAAA,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC;;AAEvB,KAAC;AAED,IAAA,QACIC,sBAAC,CAAA,aAAA,CAAAC,mCAAU,EACP,EAAA,SAAS,EAAEC,qBAAM,CAAC,IAAI,EACtB,IAAI,EAAE,EAAE,EACG,YAAA,EAAA,4CAAS,EACpB,IAAI,EAAEF,sBAAC,CAAA,aAAA,CAAAG,2BAAU,IAAC,SAAS,EAAED,qBAAM,CAAC,eAAe,EAAI,CAAA,EACvD,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE,YAAY,EAAA,CACvB;AAEV;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"download-button.js","sources":["../../../../src/components/actions-control/components/download-button/download-button.tsx"],"sourcesContent":["import React, { type MouseEvent, useContext } from 'react';\n\nimport { IconButton } from '@alfalab/core-components-icon-button';\nimport ArrowDownLineDownCompactMIcon from '@alfalab/icons-glyph/ArrowDownLineDownCompactMIcon';\n\nimport { FileUploadItemContext } from '../../../../context/file-upload-item-context';\n\nimport styles from '../../actions-control.module.css';\n\nexport const DownloadButton = () => {\n const {\n id = '0',\n downloadLink,\n download,\n disableButtons,\n target,\n onDownload,\n } = useContext(FileUploadItemContext);\n\n const handleDownload = (e: MouseEvent<HTMLElement>) => {\n if (onDownload) {\n e.preventDefault();\n onDownload(id);\n }\n };\n\n return (\n <IconButton\n className={styles.icon}\n size={24}\n aria-label='скачать'\n icon={<ArrowDownLineDownCompactMIcon className={styles.downloadIconColor} />}\n disabled={disableButtons}\n href={downloadLink}\n download={download}\n target={target}\n onClick={handleDownload}\n />\n );\n};\n"],"names":["useContext","FileUploadItemContext","React","IconButton","styles","ArrowDownLineDownCompactMIcon"],"mappings":";;;;;;;;;;;;;;;AASa,IAAA,cAAc,GAAG,YAAA;IACpB,IAAA,EAAA,GAOFA,gBAAU,CAACC,2CAAqB,CAAC,EANjC,EAAA,GAAA,EAAA,CAAA,EAAQ,EAAR,EAAE,GAAG,EAAA,KAAA,MAAA,GAAA,GAAG,GAAA,EAAA,EACR,YAAY,GAAA,EAAA,CAAA,YAAA,EACZ,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,cAAc,GAAA,EAAA,CAAA,cAAA,EACd,MAAM,GAAA,EAAA,CAAA,MAAA,EACN,UAAU,GAAA,EAAA,CAAA,UACuB;IAErC,IAAM,cAAc,GAAG,UAAC,CAA0B,EAAA;
|
|
1
|
+
{"version":3,"file":"download-button.js","sources":["../../../../src/components/actions-control/components/download-button/download-button.tsx"],"sourcesContent":["import React, { type MouseEvent, useContext } from 'react';\n\nimport { IconButton } from '@alfalab/core-components-icon-button';\nimport ArrowDownLineDownCompactMIcon from '@alfalab/icons-glyph/ArrowDownLineDownCompactMIcon';\n\nimport { FileUploadItemContext } from '../../../../context/file-upload-item-context';\n\nimport styles from '../../actions-control.module.css';\n\nexport const DownloadButton = () => {\n const {\n id = '0',\n downloadLink,\n download,\n disableButtons,\n target,\n onDownload,\n } = useContext(FileUploadItemContext);\n\n const handleDownload = (e: MouseEvent<HTMLElement>) => {\n if (onDownload) {\n e.preventDefault();\n onDownload(id);\n }\n };\n\n return (\n <IconButton\n className={styles.icon}\n size={24}\n aria-label='скачать'\n icon={<ArrowDownLineDownCompactMIcon className={styles.downloadIconColor} />}\n disabled={disableButtons}\n href={downloadLink}\n download={download}\n target={target}\n onClick={handleDownload}\n />\n );\n};\n"],"names":["useContext","FileUploadItemContext","React","IconButton","styles","ArrowDownLineDownCompactMIcon"],"mappings":";;;;;;;;;;;;;;;AASa,IAAA,cAAc,GAAG,YAAA;IACpB,IAAA,EAAA,GAOFA,gBAAU,CAACC,2CAAqB,CAAC,EANjC,EAAA,GAAA,EAAA,CAAA,EAAQ,EAAR,EAAE,GAAG,EAAA,KAAA,MAAA,GAAA,GAAG,GAAA,EAAA,EACR,YAAY,GAAA,EAAA,CAAA,YAAA,EACZ,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,cAAc,GAAA,EAAA,CAAA,cAAA,EACd,MAAM,GAAA,EAAA,CAAA,MAAA,EACN,UAAU,GAAA,EAAA,CAAA,UACuB;IAErC,IAAM,cAAc,GAAG,UAAC,CAA0B,EAAA;QAC9C,IAAI,UAAU,EAAE;YACZ,CAAC,CAAC,cAAc,EAAE;YAClB,UAAU,CAAC,EAAE,CAAC;;AAEtB,KAAC;IAED,QACIC,qCAACC,mCAAU,EAAA,EACP,SAAS,EAAEC,qBAAM,CAAC,IAAI,EACtB,IAAI,EAAE,EAAE,EAAA,YAAA,EACG,4CAAS,EACpB,IAAI,EAAEF,sBAAC,CAAA,aAAA,CAAAG,8CAA6B,EAAC,EAAA,SAAS,EAAED,qBAAM,CAAC,iBAAiB,EAAA,CAAI,EAC5E,QAAQ,EAAE,cAAc,EACxB,IAAI,EAAE,YAAY,EAClB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,cAAc,EACzB,CAAA;AAEV;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restore-button.js","sources":["../../../../src/components/actions-control/components/restore-button/restore-button.tsx"],"sourcesContent":["import React, { useContext } from 'react';\n\nimport { IconButton } from '@alfalab/core-components-icon-button';\nimport ArrowsCwCompactMIcon from '@alfalab/icons-glyph/ArrowsCwCompactMIcon';\n\nimport { FileUploadItemContext } from '../../../../context/file-upload-item-context';\n\nimport styles from '../../actions-control.module.css';\n\nexport const RestoreButton = () => {\n const { id = '0', disableButtons, onRestore } = useContext(FileUploadItemContext);\n\n const handleRestore = () => {\n if (onRestore) {\n onRestore(id);\n }\n };\n\n return (\n <IconButton\n className={styles.icon}\n size={24}\n aria-label='восстановить'\n icon={<ArrowsCwCompactMIcon className={styles.restoreIconColor} />}\n disabled={disableButtons}\n onClick={handleRestore}\n />\n );\n};\n"],"names":["useContext","FileUploadItemContext","React","IconButton","styles","ArrowsCwCompactMIcon"],"mappings":";;;;;;;;;;;;;;;AASa,IAAA,aAAa,GAAG,YAAA;AACnB,IAAA,IAAA,KAA0CA,gBAAU,CAACC,2CAAqB,CAAC,EAAzE,UAAQ,EAAR,EAAE,GAAG,EAAA,KAAA,MAAA,GAAA,GAAG,KAAA,EAAE,cAAc,oBAAA,EAAE,SAAS,eAAsC;AAEjF,IAAA,IAAM,aAAa,GAAG,YAAA;
|
|
1
|
+
{"version":3,"file":"restore-button.js","sources":["../../../../src/components/actions-control/components/restore-button/restore-button.tsx"],"sourcesContent":["import React, { useContext } from 'react';\n\nimport { IconButton } from '@alfalab/core-components-icon-button';\nimport ArrowsCwCompactMIcon from '@alfalab/icons-glyph/ArrowsCwCompactMIcon';\n\nimport { FileUploadItemContext } from '../../../../context/file-upload-item-context';\n\nimport styles from '../../actions-control.module.css';\n\nexport const RestoreButton = () => {\n const { id = '0', disableButtons, onRestore } = useContext(FileUploadItemContext);\n\n const handleRestore = () => {\n if (onRestore) {\n onRestore(id);\n }\n };\n\n return (\n <IconButton\n className={styles.icon}\n size={24}\n aria-label='восстановить'\n icon={<ArrowsCwCompactMIcon className={styles.restoreIconColor} />}\n disabled={disableButtons}\n onClick={handleRestore}\n />\n );\n};\n"],"names":["useContext","FileUploadItemContext","React","IconButton","styles","ArrowsCwCompactMIcon"],"mappings":";;;;;;;;;;;;;;;AASa,IAAA,aAAa,GAAG,YAAA;AACnB,IAAA,IAAA,KAA0CA,gBAAU,CAACC,2CAAqB,CAAC,EAAzE,UAAQ,EAAR,EAAE,GAAG,EAAA,KAAA,MAAA,GAAA,GAAG,KAAA,EAAE,cAAc,oBAAA,EAAE,SAAS,eAAsC;AAEjF,IAAA,IAAM,aAAa,GAAG,YAAA;QAClB,IAAI,SAAS,EAAE;YACX,SAAS,CAAC,EAAE,CAAC;;AAErB,KAAC;AAED,IAAA,QACIC,sBAAC,CAAA,aAAA,CAAAC,mCAAU,EACP,EAAA,SAAS,EAAEC,qBAAM,CAAC,IAAI,EACtB,IAAI,EAAE,EAAE,EACG,YAAA,EAAA,0EAAc,EACzB,IAAI,EAAEF,sBAAC,CAAA,aAAA,CAAAG,qCAAoB,IAAC,SAAS,EAAED,qBAAM,CAAC,gBAAgB,EAAI,CAAA,EAClE,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE,aAAa,EAAA,CACxB;AAEV;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-error.js","sources":["../../../../src/components/content/components/content-error/content-error.tsx"],"sourcesContent":["import React, { useContext } from 'react';\n\nimport { TypographyText } from '@alfalab/core-components-typography';\n\nimport { FileUploadItemContext } from '../../../../context/file-upload-item-context';\n\nimport styles from './content-error.module.css';\n\nexport const ContentError = () => {\n const { error } = useContext(FileUploadItemContext);\n\n if (typeof error === 'string' && error.length > 0) {\n return (\n <TypographyText className={styles.errorItem} view='primary-small' color='negative'>\n {error}\n </TypographyText>\n );\n }\n\n if (Array.isArray(error) && error.length > 0) {\n return (\n <div>\n {error.map((item) => (\n <TypographyText\n key={item}\n className={styles.errorItem}\n view='primary-small'\n color='negative'\n >\n {item}\n </TypographyText>\n ))}\n </div>\n );\n }\n\n return (\n <TypographyText className={styles.errorItem} view='primary-small' color='negative'>\n Не удалось загрузить файл\n </TypographyText>\n );\n};\n"],"names":["useContext","FileUploadItemContext","React","TypographyText","styles"],"mappings":";;;;;;;;;;;;;AAQa,IAAA,YAAY,GAAG,YAAA;AAChB,IAAA,IAAA,KAAK,GAAKA,gBAAU,CAACC,2CAAqB,CAAC,MAAtC;IAEb,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;QAC/C,QACIC,qCAACC,uCAAc,EAAA,EAAC,SAAS,EAAEC,mBAAM,CAAC,SAAS,EAAE,IAAI,EAAC,eAAe,EAAC,KAAK,EAAC,UAAU,EAC7E,EAAA,KAAK,CACO
|
|
1
|
+
{"version":3,"file":"content-error.js","sources":["../../../../src/components/content/components/content-error/content-error.tsx"],"sourcesContent":["import React, { useContext } from 'react';\n\nimport { TypographyText } from '@alfalab/core-components-typography';\n\nimport { FileUploadItemContext } from '../../../../context/file-upload-item-context';\n\nimport styles from './content-error.module.css';\n\nexport const ContentError = () => {\n const { error } = useContext(FileUploadItemContext);\n\n if (typeof error === 'string' && error.length > 0) {\n return (\n <TypographyText className={styles.errorItem} view='primary-small' color='negative'>\n {error}\n </TypographyText>\n );\n }\n\n if (Array.isArray(error) && error.length > 0) {\n return (\n <div>\n {error.map((item) => (\n <TypographyText\n key={item}\n className={styles.errorItem}\n view='primary-small'\n color='negative'\n >\n {item}\n </TypographyText>\n ))}\n </div>\n );\n }\n\n return (\n <TypographyText className={styles.errorItem} view='primary-small' color='negative'>\n Не удалось загрузить файл\n </TypographyText>\n );\n};\n"],"names":["useContext","FileUploadItemContext","React","TypographyText","styles"],"mappings":";;;;;;;;;;;;;AAQa,IAAA,YAAY,GAAG,YAAA;AAChB,IAAA,IAAA,KAAK,GAAKA,gBAAU,CAACC,2CAAqB,CAAC,MAAtC;IAEb,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;QAC/C,QACIC,qCAACC,uCAAc,EAAA,EAAC,SAAS,EAAEC,mBAAM,CAAC,SAAS,EAAE,IAAI,EAAC,eAAe,EAAC,KAAK,EAAC,UAAU,EAC7E,EAAA,KAAK,CACO;;AAIzB,IAAA,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;AAC1C,QAAA,QACIF,sBACK,CAAA,aAAA,CAAA,KAAA,EAAA,IAAA,EAAA,KAAK,CAAC,GAAG,CAAC,UAAC,IAAI,EAAA,EAAK,QACjBA,qCAACC,uCAAc,EAAA,EACX,GAAG,EAAE,IAAI,EACT,SAAS,EAAEC,mBAAM,CAAC,SAAS,EAC3B,IAAI,EAAC,eAAe,EACpB,KAAK,EAAC,UAAU,EAEf,EAAA,IAAI,CACQ,EACpB,EAAA,CAAC,CACA;;AAId,IAAA,QACIF,sBAAC,CAAA,aAAA,CAAAC,uCAAc,IAAC,SAAS,EAAEC,mBAAM,CAAC,SAAS,EAAE,IAAI,EAAC,eAAe,EAAC,KAAK,EAAC,UAAU,EAAA,EAAA,yIAAA,CAEjE;AAEzB;;;;"}
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
--gap-xs: 8px;
|
|
3
3
|
--gap-8: var(--gap-xs);
|
|
4
4
|
}
|
|
5
|
-
.file-upload-
|
|
5
|
+
.file-upload-item__subtitle_1svbn {
|
|
6
6
|
display: block;
|
|
7
7
|
}
|
|
8
|
-
.file-upload-
|
|
8
|
+
.file-upload-item__subtitle_1svbn.file-upload-item__truncate_1svbn {
|
|
9
9
|
white-space: nowrap;
|
|
10
10
|
overflow: hidden;
|
|
11
11
|
text-overflow: ellipsis;
|
|
12
12
|
}
|
|
13
|
-
.file-upload-
|
|
13
|
+
.file-upload-item__size_1svbn {
|
|
14
14
|
margin-right: var(--gap-8);
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-subtitle.js","sources":["../../../../src/components/content/components/content-subtitle/content-subtitle.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport cn from 'classnames';\n\nimport { humanFileSize } from '@alfalab/core-components-shared';\nimport { TypographyText } from '@alfalab/core-components-typography';\n\nimport { MAX_PROGRESS_BAR_VALUE } from '../../../../const/progress-bar';\nimport { FileUploadItemContext } from '../../../../context/file-upload-item-context';\nimport {\n isErrorStatus,\n isSuccessStatus,\n isUploadedStatus,\n isUploadingStatus,\n} from '../../../../utils';\nimport { isError } from '../../utils/isError';\nimport { ContentError } from '../content-error';\n\nimport styles from './content-subtitle.module.css';\n\nexport const ContentSubtitle = () => {\n const { uploadStatus, subtitle, uploadDate, size, truncate, showRestore, error, progressBar } =\n useContext(FileUploadItemContext);\n\n const shouldShownError = isErrorStatus(uploadStatus) || isError(error);\n const showMeta =\n !showRestore && (isSuccessStatus(uploadStatus) || isUploadedStatus(uploadStatus));\n\n // валидация progressBar (не должен превышать 100 и быть меньше 0)\n const validateProgressBarValue = (progressValue: number | undefined) => {\n if (progressValue === undefined) {\n return 0;\n }\n\n return Math.min(Math.max(progressValue, 0), MAX_PROGRESS_BAR_VALUE);\n };\n\n const validProgressBar = validateProgressBarValue(progressBar);\n\n // uploading status\n if (isUploadingStatus(uploadStatus)) {\n return (\n <TypographyText view='primary-small' color='secondary'>\n Загружено{'\\u00A0'}\n {Math.floor(validProgressBar)}%\n </TypographyText>\n );\n }\n\n // error status\n if (shouldShownError) {\n return <ContentError />;\n }\n\n // success status\n if (showMeta) {\n return (\n <div>\n {size && (\n <TypographyText className={styles.size} view='primary-small' color='secondary'>\n {humanFileSize(size)}\n </TypographyText>\n )}\n {uploadDate && (\n <TypographyText view='primary-small' color='secondary'>\n {uploadDate}\n </TypographyText>\n )}\n </div>\n );\n }\n\n // restore status\n if (showRestore) {\n return (\n <TypographyText view='primary-small' color='tertiary'>\n Файл удален\n </TypographyText>\n );\n }\n\n return (\n <TypographyText\n className={cn(styles.subtitle, {\n [styles.truncate]: truncate,\n })}\n view='primary-small'\n color='secondary'\n >\n {subtitle}\n </TypographyText>\n );\n};\n"],"names":["useContext","FileUploadItemContext","progressBar","isErrorStatus","isError","isSuccessStatus","isUploadedStatus","MAX_PROGRESS_BAR_VALUE","isUploadingStatus","React","TypographyText","ContentError","styles","humanFileSize","cn"],"mappings":";;;;;;;;;;;;;;;;;;;;AAmBa,IAAA,eAAe,GAAG,YAAA;;AACrB,IAAA,IAAA,EACF,GAAAA,gBAAU,CAACC,2CAAqB,CAAC,EAD7B,YAAY,GAAA,EAAA,CAAA,YAAA,EAAE,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,UAAU,GAAA,EAAA,CAAA,UAAA,EAAE,IAAI,GAAA,EAAA,CAAA,IAAA,EAAE,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,WAAW,GAAA,EAAA,CAAA,WAAA,EAAE,KAAK,GAAA,EAAA,CAAA,KAAA,EAAEC,aAAW,iBACtD;IAErC,IAAM,gBAAgB,GAAGC,mBAAa,CAAC,YAAY,CAAC,IAAIC,eAAO,CAAC,KAAK,CAAC;AACtE,IAAA,IAAM,QAAQ,GACV,CAAC,WAAW,KAAKC,qBAAe,CAAC,YAAY,CAAC,IAAIC,sBAAgB,CAAC,YAAY,CAAC,CAAC;;IAGrF,IAAM,wBAAwB,GAAG,UAAC,aAAiC,EAAA;
|
|
1
|
+
{"version":3,"file":"content-subtitle.js","sources":["../../../../src/components/content/components/content-subtitle/content-subtitle.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport cn from 'classnames';\n\nimport { humanFileSize } from '@alfalab/core-components-shared';\nimport { TypographyText } from '@alfalab/core-components-typography';\n\nimport { MAX_PROGRESS_BAR_VALUE } from '../../../../const/progress-bar';\nimport { FileUploadItemContext } from '../../../../context/file-upload-item-context';\nimport {\n isErrorStatus,\n isSuccessStatus,\n isUploadedStatus,\n isUploadingStatus,\n} from '../../../../utils';\nimport { isError } from '../../utils/isError';\nimport { ContentError } from '../content-error';\n\nimport styles from './content-subtitle.module.css';\n\nexport const ContentSubtitle = () => {\n const { uploadStatus, subtitle, uploadDate, size, truncate, showRestore, error, progressBar } =\n useContext(FileUploadItemContext);\n\n const shouldShownError = isErrorStatus(uploadStatus) || isError(error);\n const showMeta =\n !showRestore && (isSuccessStatus(uploadStatus) || isUploadedStatus(uploadStatus));\n\n // валидация progressBar (не должен превышать 100 и быть меньше 0)\n const validateProgressBarValue = (progressValue: number | undefined) => {\n if (progressValue === undefined) {\n return 0;\n }\n\n return Math.min(Math.max(progressValue, 0), MAX_PROGRESS_BAR_VALUE);\n };\n\n const validProgressBar = validateProgressBarValue(progressBar);\n\n // uploading status\n if (isUploadingStatus(uploadStatus)) {\n return (\n <TypographyText view='primary-small' color='secondary'>\n Загружено{'\\u00A0'}\n {Math.floor(validProgressBar)}%\n </TypographyText>\n );\n }\n\n // error status\n if (shouldShownError) {\n return <ContentError />;\n }\n\n // success status\n if (showMeta) {\n return (\n <div>\n {size && (\n <TypographyText className={styles.size} view='primary-small' color='secondary'>\n {humanFileSize(size)}\n </TypographyText>\n )}\n {uploadDate && (\n <TypographyText view='primary-small' color='secondary'>\n {uploadDate}\n </TypographyText>\n )}\n </div>\n );\n }\n\n // restore status\n if (showRestore) {\n return (\n <TypographyText view='primary-small' color='tertiary'>\n Файл удален\n </TypographyText>\n );\n }\n\n return (\n <TypographyText\n className={cn(styles.subtitle, {\n [styles.truncate]: truncate,\n })}\n view='primary-small'\n color='secondary'\n >\n {subtitle}\n </TypographyText>\n );\n};\n"],"names":["useContext","FileUploadItemContext","progressBar","isErrorStatus","isError","isSuccessStatus","isUploadedStatus","MAX_PROGRESS_BAR_VALUE","isUploadingStatus","React","TypographyText","ContentError","styles","humanFileSize","cn"],"mappings":";;;;;;;;;;;;;;;;;;;;AAmBa,IAAA,eAAe,GAAG,YAAA;;AACrB,IAAA,IAAA,EACF,GAAAA,gBAAU,CAACC,2CAAqB,CAAC,EAD7B,YAAY,GAAA,EAAA,CAAA,YAAA,EAAE,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,UAAU,GAAA,EAAA,CAAA,UAAA,EAAE,IAAI,GAAA,EAAA,CAAA,IAAA,EAAE,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,WAAW,GAAA,EAAA,CAAA,WAAA,EAAE,KAAK,GAAA,EAAA,CAAA,KAAA,EAAEC,aAAW,iBACtD;IAErC,IAAM,gBAAgB,GAAGC,mBAAa,CAAC,YAAY,CAAC,IAAIC,eAAO,CAAC,KAAK,CAAC;AACtE,IAAA,IAAM,QAAQ,GACV,CAAC,WAAW,KAAKC,qBAAe,CAAC,YAAY,CAAC,IAAIC,sBAAgB,CAAC,YAAY,CAAC,CAAC;;IAGrF,IAAM,wBAAwB,GAAG,UAAC,aAAiC,EAAA;AAC/D,QAAA,IAAI,aAAa,KAAK,SAAS,EAAE;AAC7B,YAAA,OAAO,CAAC;;AAGZ,QAAA,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC,CAAC,EAAEC,kCAAsB,CAAC;AACvE,KAAC;AAED,IAAA,IAAM,gBAAgB,GAAG,wBAAwB,CAACL,aAAW,CAAC;;AAG9D,IAAA,IAAIM,uBAAiB,CAAC,YAAY,CAAC,EAAE;QACjC,QACIC,sBAAC,CAAA,aAAA,CAAAC,uCAAc,EAAC,EAAA,IAAI,EAAC,eAAe,EAAC,KAAK,EAAC,WAAW,EAAA;;YACxC,QAAQ;AACjB,YAAA,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC;AAChB,YAAA,GAAA,CAAA;;;IAKzB,IAAI,gBAAgB,EAAE;QAClB,OAAOD,sBAAA,CAAA,aAAA,CAACE,yBAAY,EAAA,IAAA,CAAG;;;IAI3B,IAAI,QAAQ,EAAE;AACV,QAAA,QACIF,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAA,IAAA;YACK,IAAI,KACDA,sBAAA,CAAA,aAAA,CAACC,uCAAc,EAAA,EAAC,SAAS,EAAEE,sBAAM,CAAC,IAAI,EAAE,IAAI,EAAC,eAAe,EAAC,KAAK,EAAC,WAAW,EAAA,EACzEC,kCAAa,CAAC,IAAI,CAAC,CACP,CACpB;AACA,YAAA,UAAU,KACPJ,sBAAA,CAAA,aAAA,CAACC,uCAAc,EAAC,EAAA,IAAI,EAAC,eAAe,EAAC,KAAK,EAAC,WAAW,EACjD,EAAA,UAAU,CACE,CACpB,CACC;;;IAKd,IAAI,WAAW,EAAE;AACb,QAAA,QACID,sBAAA,CAAA,aAAA,CAACC,uCAAc,EAAA,EAAC,IAAI,EAAC,eAAe,EAAC,KAAK,EAAC,UAAU,EAAA,EAAA,+DAAA,CAEpC;;IAIzB,QACID,sBAAC,CAAA,aAAA,CAAAC,uCAAc,EACX,EAAA,SAAS,EAAEI,mBAAE,CAACF,sBAAM,CAAC,QAAQ,GAAA,EAAA,GAAA,EAAA;AACzB,YAAA,EAAA,CAACA,sBAAM,CAAC,QAAQ,CAAA,GAAG,QAAQ;gBAC7B,EACF,IAAI,EAAC,eAAe,EACpB,KAAK,EAAC,WAAW,EAEhB,EAAA,QAAQ,CACI;AAEzB;;;;"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./content-subtitle.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"subtitle":"file-upload-
|
|
5
|
+
var styles = {"subtitle":"file-upload-item__subtitle_1svbn","truncate":"file-upload-item__truncate_1svbn","size":"file-upload-item__size_1svbn"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=content-subtitle.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-subtitle.module.css.js","sources":["../../../../src/components/content/components/content-subtitle/content-subtitle.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/
|
|
1
|
+
{"version":3,"file":"content-subtitle.module.css.js","sources":["../../../../src/components/content/components/content-subtitle/content-subtitle.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.subtitle {\n display: block;\n\n &.truncate {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n}\n\n.size {\n margin-right: var(--gap-8);\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,UAAU,CAAC,kCAAkC,CAAC,UAAU,CAAC,kCAAkC,CAAC,MAAM,CAAC,8BAA8B,CAAC;;;;"}
|
|
@@ -9,34 +9,34 @@
|
|
|
9
9
|
--gap-4: var(--gap-2xs);
|
|
10
10
|
--gap-16: var(--gap-m);
|
|
11
11
|
}
|
|
12
|
-
.file-upload-
|
|
12
|
+
.file-upload-item__container_1vs4w {
|
|
13
13
|
padding: var(--gap-2) 0 0 var(--gap-16);
|
|
14
14
|
flex-grow: 1;
|
|
15
15
|
min-width: 0;
|
|
16
16
|
}
|
|
17
|
-
.file-upload-
|
|
17
|
+
.file-upload-item__container_1vs4w.file-upload-item__clickable_1vs4w {
|
|
18
18
|
cursor: pointer;
|
|
19
19
|
}
|
|
20
|
-
.file-upload-
|
|
20
|
+
.file-upload-item__container_1vs4w.file-upload-item__single_1vs4w {
|
|
21
21
|
display: flex;
|
|
22
22
|
flex-direction: column;
|
|
23
23
|
justify-content: center;
|
|
24
24
|
padding-top: 0;
|
|
25
25
|
min-height: 48px;
|
|
26
26
|
}
|
|
27
|
-
.file-upload-
|
|
27
|
+
.file-upload-item__container_1vs4w.file-upload-item__single_1vs4w .file-upload-item__title_1vs4w {
|
|
28
28
|
margin-bottom: 0;
|
|
29
29
|
}
|
|
30
|
-
.file-upload-
|
|
30
|
+
.file-upload-item__container_1vs4w .file-upload-item__title_1vs4w {
|
|
31
31
|
margin-bottom: var(--gap-4);
|
|
32
32
|
display: block;
|
|
33
33
|
overflow-wrap: break-word;
|
|
34
34
|
}
|
|
35
|
-
.file-upload-
|
|
35
|
+
.file-upload-item__container_1vs4w .file-upload-item__title_1vs4w.file-upload-item__truncate_1vs4w {
|
|
36
36
|
white-space: nowrap;
|
|
37
37
|
overflow: hidden;
|
|
38
38
|
text-overflow: ellipsis;
|
|
39
39
|
}
|
|
40
|
-
.file-upload-
|
|
40
|
+
.file-upload-item__container_1vs4w .file-upload-item__title_1vs4w.file-upload-item__restore_1vs4w {
|
|
41
41
|
color: var(--color-light-text-tertiary);
|
|
42
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.js","sources":["../../src/components/content/content.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport cn from 'classnames';\n\nimport { TypographyText } from '@alfalab/core-components-typography';\n\nimport { FileUploadItemContext } from '../../context/file-upload-item-context';\n\nimport { ContentSubtitle } from './components/content-subtitle/content-subtitle';\n\nimport styles from './content.module.css';\n\nexport const Content = () => {\n const {\n title,\n customContent: CustomContent,\n truncate,\n subtitle,\n showRestore,\n actionsPresent,\n isClickable,\n } = useContext(FileUploadItemContext);\n\n if (CustomContent) {\n return <CustomContent />;\n }\n\n return (\n <div\n className={cn(styles.container, {\n [styles.single]: !subtitle,\n [styles.clickable]: !actionsPresent && isClickable,\n })}\n >\n {title && (\n <TypographyText\n className={cn(styles.title, {\n [styles.truncate]: truncate,\n [styles.restore]: showRestore,\n })}\n view='component-primary'\n color='primary'\n >\n {title}\n </TypographyText>\n )}\n <ContentSubtitle />\n </div>\n );\n};\n"],"names":["useContext","FileUploadItemContext","React","cn","styles","TypographyText","ContentSubtitle"],"mappings":";;;;;;;;;;;;;;;;AAWa,IAAA,OAAO,GAAG,YAAA;;IACb,IAAA,EAAA,GAQFA,gBAAU,CAACC,2CAAqB,CAAC,EAPjC,KAAK,GAAA,EAAA,CAAA,KAAA,EACU,aAAa,GAAA,EAAA,CAAA,aAAA,EAC5B,QAAQ,cAAA,EACR,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,WAAW,GAAA,EAAA,CAAA,WAAA,EACX,cAAc,GAAA,EAAA,CAAA,cAAA,EACd,WAAW,GAAA,EAAA,CAAA,WACsB;
|
|
1
|
+
{"version":3,"file":"content.js","sources":["../../src/components/content/content.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport cn from 'classnames';\n\nimport { TypographyText } from '@alfalab/core-components-typography';\n\nimport { FileUploadItemContext } from '../../context/file-upload-item-context';\n\nimport { ContentSubtitle } from './components/content-subtitle/content-subtitle';\n\nimport styles from './content.module.css';\n\nexport const Content = () => {\n const {\n title,\n customContent: CustomContent,\n truncate,\n subtitle,\n showRestore,\n actionsPresent,\n isClickable,\n } = useContext(FileUploadItemContext);\n\n if (CustomContent) {\n return <CustomContent />;\n }\n\n return (\n <div\n className={cn(styles.container, {\n [styles.single]: !subtitle,\n [styles.clickable]: !actionsPresent && isClickable,\n })}\n >\n {title && (\n <TypographyText\n className={cn(styles.title, {\n [styles.truncate]: truncate,\n [styles.restore]: showRestore,\n })}\n view='component-primary'\n color='primary'\n >\n {title}\n </TypographyText>\n )}\n <ContentSubtitle />\n </div>\n );\n};\n"],"names":["useContext","FileUploadItemContext","React","cn","styles","TypographyText","ContentSubtitle"],"mappings":";;;;;;;;;;;;;;;;AAWa,IAAA,OAAO,GAAG,YAAA;;IACb,IAAA,EAAA,GAQFA,gBAAU,CAACC,2CAAqB,CAAC,EAPjC,KAAK,GAAA,EAAA,CAAA,KAAA,EACU,aAAa,GAAA,EAAA,CAAA,aAAA,EAC5B,QAAQ,cAAA,EACR,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,WAAW,GAAA,EAAA,CAAA,WAAA,EACX,cAAc,GAAA,EAAA,CAAA,cAAA,EACd,WAAW,GAAA,EAAA,CAAA,WACsB;IAErC,IAAI,aAAa,EAAE;QACf,OAAOC,sBAAA,CAAA,aAAA,CAAC,aAAa,EAAA,IAAA,CAAG;;IAG5B,QACIA,8CACI,SAAS,EAAEC,mBAAE,CAACC,cAAM,CAAC,SAAS,GAAA,EAAA,GAAA,EAAA;AAC1B,YAAA,EAAA,CAACA,cAAM,CAAC,MAAM,CAAA,GAAG,CAAC,QAAQ;AAC1B,YAAA,EAAA,CAACA,cAAM,CAAC,SAAS,IAAG,CAAC,cAAc,IAAI,WAAW;AACpD,YAAA,EAAA,EAAA,EAAA;QAED,KAAK,KACFF,sBAAA,CAAA,aAAA,CAACG,uCAAc,EAAA,EACX,SAAS,EAAEF,mBAAE,CAACC,cAAM,CAAC,KAAK,GAAA,EAAA,GAAA,EAAA;AACtB,gBAAA,EAAA,CAACA,cAAM,CAAC,QAAQ,CAAA,GAAG,QAAQ;AAC3B,gBAAA,EAAA,CAACA,cAAM,CAAC,OAAO,CAAA,GAAG,WAAW;oBAC/B,EACF,IAAI,EAAC,mBAAmB,EACxB,KAAK,EAAC,SAAS,EAAA,EAEd,KAAK,CACO,CACpB;AACD,QAAAF,sBAAA,CAAA,aAAA,CAACI,+BAAe,EAAA,IAAA,CAAG,CACjB;AAEd;;;;"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./content.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"container":"file-upload-
|
|
5
|
+
var styles = {"container":"file-upload-item__container_1vs4w","clickable":"file-upload-item__clickable_1vs4w","single":"file-upload-item__single_1vs4w","title":"file-upload-item__title_1vs4w","truncate":"file-upload-item__truncate_1vs4w","restore":"file-upload-item__restore_1vs4w"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=content.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.module.css.js","sources":["../../src/components/content/content.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/
|
|
1
|
+
{"version":3,"file":"content.module.css.js","sources":["../../src/components/content/content.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.container {\n padding: var(--gap-2) 0 0 var(--gap-16);\n flex-grow: 1;\n min-width: 0;\n\n &.clickable {\n cursor: pointer;\n }\n\n &.single {\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding-top: 0;\n min-height: 48px;\n\n & .title {\n margin-bottom: 0;\n }\n }\n\n & .title {\n margin-bottom: var(--gap-4);\n display: block;\n overflow-wrap: break-word;\n\n &.truncate {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n &.restore {\n color: var(--color-light-text-tertiary);\n }\n }\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,mCAAmC,CAAC,WAAW,CAAC,mCAAmC,CAAC,QAAQ,CAAC,gCAAgC,CAAC,OAAO,CAAC,+BAA+B,CAAC,UAAU,CAAC,kCAAkC,CAAC,SAAS,CAAC,iCAAiC,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isError.js","sources":["../../../src/components/content/utils/isError.ts"],"sourcesContent":["export const isError = (error?: string | string[]) => {\n if (typeof error === 'string' && error.length > 0) {\n return true;\n }\n\n if (Array.isArray(error) && error.length > 0) {\n return true;\n }\n\n return false;\n};\n"],"names":[],"mappings":";;;;AAAO,IAAM,OAAO,GAAG,UAAC,KAAyB,EAAA;IAC7C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;AAC/C,QAAA,OAAO,IAAI
|
|
1
|
+
{"version":3,"file":"isError.js","sources":["../../../src/components/content/utils/isError.ts"],"sourcesContent":["export const isError = (error?: string | string[]) => {\n if (typeof error === 'string' && error.length > 0) {\n return true;\n }\n\n if (Array.isArray(error) && error.length > 0) {\n return true;\n }\n\n return false;\n};\n"],"names":[],"mappings":";;;;AAAO,IAAM,OAAO,GAAG,UAAC,KAAyB,EAAA;IAC7C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;AAC/C,QAAA,OAAO,IAAI;;AAGf,IAAA,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;AAC1C,QAAA,OAAO,IAAI;;AAGf,IAAA,OAAO,KAAK;AAChB;;;;"}
|
|
@@ -7,18 +7,18 @@
|
|
|
7
7
|
--color-light-decorative-orange: #fa9313;
|
|
8
8
|
--color-light-decorative-red: #fe5e48;
|
|
9
9
|
}
|
|
10
|
-
.file-upload-
|
|
10
|
+
.file-upload-item__iconPDFColored_18nhj {
|
|
11
11
|
fill: var(--color-light-decorative-red);
|
|
12
12
|
}
|
|
13
|
-
.file-upload-
|
|
13
|
+
.file-upload-item__iconDOCColored_18nhj {
|
|
14
14
|
fill: var(--color-light-decorative-blue);
|
|
15
15
|
}
|
|
16
|
-
.file-upload-
|
|
16
|
+
.file-upload-item__iconExcelColored_18nhj {
|
|
17
17
|
fill: var(--color-light-decorative-green);
|
|
18
18
|
}
|
|
19
|
-
.file-upload-
|
|
19
|
+
.file-upload-item__icon1CColored_18nhj {
|
|
20
20
|
fill: var(--color-light-decorative-orange);
|
|
21
21
|
}
|
|
22
|
-
.file-upload-
|
|
22
|
+
.file-upload-item__iconDocumentColored_18nhj {
|
|
23
23
|
fill: var(--color-light-neutral-translucent-1300);
|
|
24
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/status-control/extension-icon/index.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport cn from 'classnames';\n\nimport { Document1CMIcon } from '@alfalab/icons-glyph/Document1CMIcon';\nimport { DocumentDocMIcon } from '@alfalab/icons-glyph/DocumentDocMIcon';\nimport { DocumentExcelMIcon } from '@alfalab/icons-glyph/DocumentExcelMIcon';\nimport { DocumentImageMIcon } from '@alfalab/icons-glyph/DocumentImageMIcon';\nimport { DocumentMIcon } from '@alfalab/icons-glyph/DocumentMIcon';\nimport { DocumentOffMIcon } from '@alfalab/icons-glyph/DocumentOffMIcon';\nimport { DocumentPdfMIcon } from '@alfalab/icons-glyph/DocumentPdfMIcon';\nimport { PaperclipMIcon } from '@alfalab/icons-glyph/PaperclipMIcon';\n\nimport { FileUploadItemContext } from '../../../context/file-upload-item-context';\nimport { getExtension, isInitialStatus } from '../../../utils';\n\nimport styles from './index.module.css';\n\nexport const ExtensionIcon = () => {\n const {\n title = '',\n uploadStatus,\n iconStyle,\n customIcon: CustomIcon,\n imageUrl,\n showRestore,\n } = useContext(FileUploadItemContext);\n\n if (imageUrl) {\n return null;\n }\n\n if (CustomIcon) {\n return <CustomIcon />;\n }\n\n if (isInitialStatus(uploadStatus)) {\n return <PaperclipMIcon />;\n }\n\n if (showRestore) {\n return <DocumentOffMIcon />;\n }\n\n const isColoredIcon = iconStyle === 'colored';\n const fileType = getExtension(title);\n\n switch (fileType) {\n case 'pdf':\n case 'ppt':\n case 'pptx':\n return <DocumentPdfMIcon className={cn({ [styles.iconPDFColored]: isColoredIcon })} />;\n case 'doc':\n case 'docx':\n return <DocumentDocMIcon className={cn({ [styles.iconDOCColored]: isColoredIcon })} />;\n case 'xls':\n case 'xlsx':\n return (\n <DocumentExcelMIcon className={cn({ [styles.iconExcelColored]: isColoredIcon })} />\n );\n case '1c':\n return <Document1CMIcon className={cn({ [styles.icon1CColored]: isColoredIcon })} />;\n case 'png':\n case 'jpg':\n case 'jpeg':\n case 'svg':\n case 'tif':\n case 'tiff':\n return <DocumentImageMIcon />;\n default:\n return (\n <DocumentMIcon className={cn({ [styles.iconDocumentColored]: isColoredIcon })} />\n );\n }\n};\n"],"names":["useContext","FileUploadItemContext","React","isInitialStatus","PaperclipMIcon","DocumentOffMIcon","getExtension","DocumentPdfMIcon","cn","styles","DocumentDocMIcon","DocumentExcelMIcon","Document1CMIcon","DocumentImageMIcon","DocumentMIcon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAiBa,IAAA,aAAa,GAAG,YAAA;;IACnB,IAAA,EAAA,GAOFA,gBAAU,CAACC,2CAAqB,CAAC,EANjC,EAAA,GAAA,EAAA,CAAA,KAAU,EAAV,KAAK,GAAG,EAAA,KAAA,MAAA,GAAA,EAAE,GAAA,EAAA,EACV,YAAY,GAAA,EAAA,CAAA,YAAA,EACZ,SAAS,GAAA,EAAA,CAAA,SAAA,EACG,UAAU,GAAA,EAAA,CAAA,UAAA,EACtB,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,WAAW,GAAA,EAAA,CAAA,WACsB;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/status-control/extension-icon/index.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport cn from 'classnames';\n\nimport { Document1CMIcon } from '@alfalab/icons-glyph/Document1CMIcon';\nimport { DocumentDocMIcon } from '@alfalab/icons-glyph/DocumentDocMIcon';\nimport { DocumentExcelMIcon } from '@alfalab/icons-glyph/DocumentExcelMIcon';\nimport { DocumentImageMIcon } from '@alfalab/icons-glyph/DocumentImageMIcon';\nimport { DocumentMIcon } from '@alfalab/icons-glyph/DocumentMIcon';\nimport { DocumentOffMIcon } from '@alfalab/icons-glyph/DocumentOffMIcon';\nimport { DocumentPdfMIcon } from '@alfalab/icons-glyph/DocumentPdfMIcon';\nimport { PaperclipMIcon } from '@alfalab/icons-glyph/PaperclipMIcon';\n\nimport { FileUploadItemContext } from '../../../context/file-upload-item-context';\nimport { getExtension, isInitialStatus } from '../../../utils';\n\nimport styles from './index.module.css';\n\nexport const ExtensionIcon = () => {\n const {\n title = '',\n uploadStatus,\n iconStyle,\n customIcon: CustomIcon,\n imageUrl,\n showRestore,\n } = useContext(FileUploadItemContext);\n\n if (imageUrl) {\n return null;\n }\n\n if (CustomIcon) {\n return <CustomIcon />;\n }\n\n if (isInitialStatus(uploadStatus)) {\n return <PaperclipMIcon />;\n }\n\n if (showRestore) {\n return <DocumentOffMIcon />;\n }\n\n const isColoredIcon = iconStyle === 'colored';\n const fileType = getExtension(title);\n\n switch (fileType) {\n case 'pdf':\n case 'ppt':\n case 'pptx':\n return <DocumentPdfMIcon className={cn({ [styles.iconPDFColored]: isColoredIcon })} />;\n case 'doc':\n case 'docx':\n return <DocumentDocMIcon className={cn({ [styles.iconDOCColored]: isColoredIcon })} />;\n case 'xls':\n case 'xlsx':\n return (\n <DocumentExcelMIcon className={cn({ [styles.iconExcelColored]: isColoredIcon })} />\n );\n case '1c':\n return <Document1CMIcon className={cn({ [styles.icon1CColored]: isColoredIcon })} />;\n case 'png':\n case 'jpg':\n case 'jpeg':\n case 'svg':\n case 'tif':\n case 'tiff':\n return <DocumentImageMIcon />;\n default:\n return (\n <DocumentMIcon className={cn({ [styles.iconDocumentColored]: isColoredIcon })} />\n );\n }\n};\n"],"names":["useContext","FileUploadItemContext","React","isInitialStatus","PaperclipMIcon","DocumentOffMIcon","getExtension","DocumentPdfMIcon","cn","styles","DocumentDocMIcon","DocumentExcelMIcon","Document1CMIcon","DocumentImageMIcon","DocumentMIcon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAiBa,IAAA,aAAa,GAAG,YAAA;;IACnB,IAAA,EAAA,GAOFA,gBAAU,CAACC,2CAAqB,CAAC,EANjC,EAAA,GAAA,EAAA,CAAA,KAAU,EAAV,KAAK,GAAG,EAAA,KAAA,MAAA,GAAA,EAAE,GAAA,EAAA,EACV,YAAY,GAAA,EAAA,CAAA,YAAA,EACZ,SAAS,GAAA,EAAA,CAAA,SAAA,EACG,UAAU,GAAA,EAAA,CAAA,UAAA,EACtB,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,WAAW,GAAA,EAAA,CAAA,WACsB;IAErC,IAAI,QAAQ,EAAE;AACV,QAAA,OAAO,IAAI;;IAGf,IAAI,UAAU,EAAE;QACZ,OAAOC,sBAAA,CAAA,aAAA,CAAC,UAAU,EAAA,IAAA,CAAG;;AAGzB,IAAA,IAAIC,qBAAe,CAAC,YAAY,CAAC,EAAE;QAC/B,OAAOD,sBAAA,CAAA,aAAA,CAACE,6BAAc,EAAA,IAAA,CAAG;;IAG7B,IAAI,WAAW,EAAE;QACb,OAAOF,sBAAA,CAAA,aAAA,CAACG,iCAAgB,EAAA,IAAA,CAAG;;AAG/B,IAAA,IAAM,aAAa,GAAG,SAAS,KAAK,SAAS;AAC7C,IAAA,IAAM,QAAQ,GAAGC,kBAAY,CAAC,KAAK,CAAC;IAEpC,QAAQ,QAAQ;AACZ,QAAA,KAAK,KAAK;AACV,QAAA,KAAK,KAAK;AACV,QAAA,KAAK,MAAM;AACP,YAAA,OAAOJ,sBAAC,CAAA,aAAA,CAAAK,iCAAgB,EAAC,EAAA,SAAS,EAAEC,mBAAE,EAAA,EAAA,GAAA,EAAA,EAAG,EAAC,CAAAC,YAAM,CAAC,cAAc,CAAA,GAAG,aAAa,EAAA,EAAA,EAAG,GAAI;AAC1F,QAAA,KAAK,KAAK;AACV,QAAA,KAAK,MAAM;AACP,YAAA,OAAOP,sBAAC,CAAA,aAAA,CAAAQ,iCAAgB,EAAC,EAAA,SAAS,EAAEF,mBAAE,EAAA,EAAA,GAAA,EAAA,EAAG,EAAC,CAAAC,YAAM,CAAC,cAAc,CAAA,GAAG,aAAa,EAAA,EAAA,EAAG,GAAI;AAC1F,QAAA,KAAK,KAAK;AACV,QAAA,KAAK,MAAM;AACP,YAAA,QACIP,sBAAC,CAAA,aAAA,CAAAS,qCAAkB,EAAC,EAAA,SAAS,EAAEH,mBAAE,EAAA,EAAA,GAAA,EAAA,EAAG,EAAC,CAAAC,YAAM,CAAC,gBAAgB,CAAA,GAAG,aAAa,EAAG,EAAA,EAAA,EAAA,CAAI;AAE3F,QAAA,KAAK,IAAI;AACL,YAAA,OAAOP,sBAAC,CAAA,aAAA,CAAAU,+BAAe,EAAC,EAAA,SAAS,EAAEJ,mBAAE,EAAA,EAAA,GAAA,EAAA,EAAG,EAAC,CAAAC,YAAM,CAAC,aAAa,CAAA,GAAG,aAAa,EAAA,EAAA,EAAG,GAAI;AACxF,QAAA,KAAK,KAAK;AACV,QAAA,KAAK,KAAK;AACV,QAAA,KAAK,MAAM;AACX,QAAA,KAAK,KAAK;AACV,QAAA,KAAK,KAAK;AACV,QAAA,KAAK,MAAM;YACP,OAAOP,sBAAA,CAAA,aAAA,CAACW,qCAAkB,EAAA,IAAA,CAAG;AACjC,QAAA;AACI,YAAA,QACIX,sBAAC,CAAA,aAAA,CAAAY,2BAAa,EAAC,EAAA,SAAS,EAAEN,mBAAE,EAAA,EAAA,GAAA,EAAA,EAAG,EAAC,CAAAC,YAAM,CAAC,mBAAmB,CAAA,GAAG,aAAa,EAAG,EAAA,EAAA,EAAA,CAAI;;AAGjG;;;;"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"iconPDFColored":"file-upload-
|
|
5
|
+
var styles = {"iconPDFColored":"file-upload-item__iconPDFColored_18nhj","iconDOCColored":"file-upload-item__iconDOCColored_18nhj","iconExcelColored":"file-upload-item__iconExcelColored_18nhj","icon1CColored":"file-upload-item__icon1CColored_18nhj","iconDocumentColored":"file-upload-item__iconDocumentColored_18nhj"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["../../../src/components/status-control/extension-icon/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["../../../src/components/status-control/extension-icon/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n@import '@alfalab/core-components-vars/src/colors-decorative.css';\n\n.iconPDFColored {\n fill: var(--color-light-decorative-red);\n}\n\n.iconDOCColored {\n fill: var(--color-light-decorative-blue);\n}\n\n.iconExcelColored {\n fill: var(--color-light-decorative-green);\n}\n\n.icon1CColored {\n fill: var(--color-light-decorative-orange);\n}\n\n.iconDocumentColored {\n fill: var(--color-light-neutral-translucent-1300);\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,gBAAgB,CAAC,wCAAwC,CAAC,gBAAgB,CAAC,wCAAwC,CAAC,kBAAkB,CAAC,0CAA0C,CAAC,eAAe,CAAC,uCAAuC,CAAC,qBAAqB,CAAC,6CAA6C,CAAC;;;;"}
|
|
@@ -7,30 +7,30 @@
|
|
|
7
7
|
--gap-2xs-neg: -4px;
|
|
8
8
|
--gap-4-neg: var(--gap-2xs-neg);
|
|
9
9
|
}
|
|
10
|
-
.file-upload-
|
|
10
|
+
.file-upload-item__container_15bp4 {
|
|
11
11
|
position: relative;
|
|
12
12
|
}
|
|
13
|
-
.file-upload-
|
|
13
|
+
.file-upload-item__container_15bp4.file-upload-item__clickable_15bp4 {
|
|
14
14
|
cursor: pointer;
|
|
15
15
|
}
|
|
16
|
-
.file-upload-
|
|
16
|
+
.file-upload-item__container_15bp4 .file-upload-item__progress_15bp4 {
|
|
17
17
|
position: absolute;
|
|
18
18
|
top: var(--gap-4-neg);
|
|
19
19
|
left: var(--gap-4-neg);
|
|
20
20
|
z-index: 1;
|
|
21
21
|
will-change: opacity;
|
|
22
22
|
}
|
|
23
|
-
.file-upload-
|
|
24
|
-
.file-upload-
|
|
23
|
+
.file-upload-item__container_15bp4 .file-upload-item__progress_15bp4.file-upload-item__success_15bp4,
|
|
24
|
+
.file-upload-item__container_15bp4 .file-upload-item__progress_15bp4.file-upload-item__error_15bp4 {
|
|
25
25
|
transition: opacity 400ms ease-in;
|
|
26
26
|
opacity: 0;
|
|
27
27
|
}
|
|
28
|
-
.file-upload-
|
|
28
|
+
.file-upload-item__container_15bp4 .file-upload-item__progress_15bp4.file-upload-item__success_15bp4 path {
|
|
29
29
|
stroke: var(--color-light-status-positive);
|
|
30
30
|
}
|
|
31
|
-
.file-upload-
|
|
31
|
+
.file-upload-item__container_15bp4 .file-upload-item__progress_15bp4.file-upload-item__loading_15bp4 {
|
|
32
32
|
color: var(--color-light-neutral-500);
|
|
33
33
|
}
|
|
34
|
-
.file-upload-
|
|
34
|
+
.file-upload-item__container_15bp4 .file-upload-item__progress_15bp4.file-upload-item__error_15bp4 path {
|
|
35
35
|
stroke: var(--color-light-status-negative);
|
|
36
36
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"container":"file-upload-
|
|
5
|
+
var styles = {"container":"file-upload-item__container_15bp4","clickable":"file-upload-item__clickable_15bp4","progress":"file-upload-item__progress_15bp4","success":"file-upload-item__success_15bp4","error":"file-upload-item__error_15bp4","loading":"file-upload-item__loading_15bp4"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["../../src/components/status-control/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["../../src/components/status-control/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.container {\n position: relative;\n\n &.clickable {\n cursor: pointer;\n }\n\n & .progress {\n position: absolute;\n top: var(--gap-4-neg);\n left: var(--gap-4-neg);\n z-index: 1;\n will-change: opacity;\n\n &.success,\n &.error {\n transition: opacity 400ms ease-in;\n opacity: 0;\n }\n\n &.success {\n & path {\n stroke: var(--color-light-status-positive);\n }\n }\n\n &.loading {\n color: var(--color-light-neutral-500);\n }\n\n &.error {\n & path {\n stroke: var(--color-light-status-negative);\n }\n }\n }\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,mCAAmC,CAAC,WAAW,CAAC,mCAAmC,CAAC,UAAU,CAAC,kCAAkC,CAAC,SAAS,CAAC,iCAAiC,CAAC,OAAO,CAAC,+BAA+B,CAAC,SAAS,CAAC,iCAAiC,CAAC;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ElementType, type HTMLAttributeAnchorTarget, type MouseEvent } from 'react';
|
|
2
2
|
import { type SuperEllipseProps } from '@alfalab/core-components-icon-view/super-ellipse';
|
|
3
3
|
import { type FileUploadItemStatus } from '../types/status';
|
|
4
|
-
|
|
4
|
+
type TFileUploadItemContext = {
|
|
5
5
|
showRestore?: boolean;
|
|
6
6
|
uploadStatus?: FileUploadItemStatus;
|
|
7
7
|
error?: string | string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.js","sources":["../../../src/components/actions-control/actions.tsx"],"sourcesContent":["import React, { useContext, useEffect } from 'react';\n\nimport { FileUploadItemContext } from '../../context/file-upload-item-context';\n\nimport { DeleteButton } from './components/delete-button';\nimport { DownloadButton } from './components/download-button';\nimport { RestoreButton } from './components/restore-button';\n\nimport styles from './actions-control.module.css';\n\nexport const Actions = () => {\n const { showRestore, downloadLink, showDelete, setActionsPresent, onDownload } =\n useContext(FileUploadItemContext);\n\n useEffect(() => {\n if (setActionsPresent) {\n setActionsPresent(!!(showRestore || downloadLink || showDelete || onDownload));\n }\n }, [showRestore, downloadLink, showDelete, setActionsPresent, onDownload]);\n\n return (\n <div className={styles.container}>\n {showRestore && <RestoreButton />}\n\n {(downloadLink || onDownload) && !showRestore && <DownloadButton />}\n\n {showDelete && !showRestore && <DeleteButton />}\n </div>\n );\n};\n"],"names":["useContext","FileUploadItemContext","useEffect","React","styles","RestoreButton","DownloadButton","DeleteButton"],"mappings":";;;;;;;;;;;;;;;;AAUa,IAAA,OAAO,GAAG,YAAA;IACb,IAAA,EAAA,GACFA,gBAAU,CAACC,2CAAqB,CAAC,EAD7B,WAAW,iBAAA,EAAE,YAAY,kBAAA,EAAE,UAAU,gBAAA,EAAE,iBAAiB,uBAAA,EAAE,UAAU,gBACvC;AAErC,IAAAC,eAAS,CAAC,YAAA;
|
|
1
|
+
{"version":3,"file":"actions.js","sources":["../../../src/components/actions-control/actions.tsx"],"sourcesContent":["import React, { useContext, useEffect } from 'react';\n\nimport { FileUploadItemContext } from '../../context/file-upload-item-context';\n\nimport { DeleteButton } from './components/delete-button';\nimport { DownloadButton } from './components/download-button';\nimport { RestoreButton } from './components/restore-button';\n\nimport styles from './actions-control.module.css';\n\nexport const Actions = () => {\n const { showRestore, downloadLink, showDelete, setActionsPresent, onDownload } =\n useContext(FileUploadItemContext);\n\n useEffect(() => {\n if (setActionsPresent) {\n setActionsPresent(!!(showRestore || downloadLink || showDelete || onDownload));\n }\n }, [showRestore, downloadLink, showDelete, setActionsPresent, onDownload]);\n\n return (\n <div className={styles.container}>\n {showRestore && <RestoreButton />}\n\n {(downloadLink || onDownload) && !showRestore && <DownloadButton />}\n\n {showDelete && !showRestore && <DeleteButton />}\n </div>\n );\n};\n"],"names":["useContext","FileUploadItemContext","useEffect","React","styles","RestoreButton","DownloadButton","DeleteButton"],"mappings":";;;;;;;;;;;;;;;;AAUa,IAAA,OAAO,GAAG,YAAA;IACb,IAAA,EAAA,GACFA,gBAAU,CAACC,2CAAqB,CAAC,EAD7B,WAAW,iBAAA,EAAE,YAAY,kBAAA,EAAE,UAAU,gBAAA,EAAE,iBAAiB,uBAAA,EAAE,UAAU,gBACvC;AAErC,IAAAC,eAAS,CAAC,YAAA;QACN,IAAI,iBAAiB,EAAE;AACnB,YAAA,iBAAiB,CAAC,CAAC,EAAE,WAAW,IAAI,YAAY,IAAI,UAAU,IAAI,UAAU,CAAC,CAAC;;AAEtF,KAAC,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,iBAAiB,EAAE,UAAU,CAAC,CAAC;AAE1E,IAAA,QACIC,sBAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAEC,uBAAM,CAAC,SAAS,EAAA;QAC3B,WAAW,IAAID,sBAAC,CAAA,aAAA,CAAAE,2BAAa,EAAG,IAAA,CAAA;QAEhC,CAAC,YAAY,IAAI,UAAU,KAAK,CAAC,WAAW,IAAIF,sBAAC,CAAA,aAAA,CAAAG,6BAAc,EAAG,IAAA,CAAA;QAElE,UAAU,IAAI,CAAC,WAAW,IAAIH,qCAACI,yBAAY,EAAA,IAAA,CAAG,CAC7C;AAEd;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-button.js","sources":["../../../../../src/components/actions-control/components/delete-button/delete-button.tsx"],"sourcesContent":["import React, { type MouseEvent, useContext } from 'react';\n\nimport { IconButton } from '@alfalab/core-components-icon-button';\nimport CrossMIcon from '@alfalab/icons-glyph/CrossMIcon';\n\nimport { FileUploadItemContext } from '../../../../context/file-upload-item-context';\n\nimport styles from '../../actions-control.module.css';\n\nexport const DeleteButton = () => {\n const { id = '0', disableButtons, onDelete } = useContext(FileUploadItemContext);\n\n const handleDelete = (e: MouseEvent<HTMLElement>) => {\n if (onDelete) {\n onDelete(id, e);\n }\n };\n\n return (\n <IconButton\n className={styles.icon}\n size={24}\n aria-label='удалить'\n icon={<CrossMIcon className={styles.deleteIconColor} />}\n disabled={disableButtons}\n onClick={handleDelete}\n />\n );\n};\n"],"names":["useContext","FileUploadItemContext","React","IconButton","styles","CrossMIcon"],"mappings":";;;;;;;;;;;;;;;;AASa,IAAA,YAAY,GAAG,YAAA;AAClB,IAAA,IAAA,KAAyCA,gBAAU,CAACC,2CAAqB,CAAC,EAAxE,UAAQ,EAAR,EAAE,GAAG,EAAA,KAAA,MAAA,GAAA,GAAG,KAAA,EAAE,cAAc,oBAAA,EAAE,QAAQ,cAAsC;IAEhF,IAAM,YAAY,GAAG,UAAC,CAA0B,EAAA;
|
|
1
|
+
{"version":3,"file":"delete-button.js","sources":["../../../../../src/components/actions-control/components/delete-button/delete-button.tsx"],"sourcesContent":["import React, { type MouseEvent, useContext } from 'react';\n\nimport { IconButton } from '@alfalab/core-components-icon-button';\nimport CrossMIcon from '@alfalab/icons-glyph/CrossMIcon';\n\nimport { FileUploadItemContext } from '../../../../context/file-upload-item-context';\n\nimport styles from '../../actions-control.module.css';\n\nexport const DeleteButton = () => {\n const { id = '0', disableButtons, onDelete } = useContext(FileUploadItemContext);\n\n const handleDelete = (e: MouseEvent<HTMLElement>) => {\n if (onDelete) {\n onDelete(id, e);\n }\n };\n\n return (\n <IconButton\n className={styles.icon}\n size={24}\n aria-label='удалить'\n icon={<CrossMIcon className={styles.deleteIconColor} />}\n disabled={disableButtons}\n onClick={handleDelete}\n />\n );\n};\n"],"names":["useContext","FileUploadItemContext","React","IconButton","styles","CrossMIcon"],"mappings":";;;;;;;;;;;;;;;;AASa,IAAA,YAAY,GAAG,YAAA;AAClB,IAAA,IAAA,KAAyCA,gBAAU,CAACC,2CAAqB,CAAC,EAAxE,UAAQ,EAAR,EAAE,GAAG,EAAA,KAAA,MAAA,GAAA,GAAG,KAAA,EAAE,cAAc,oBAAA,EAAE,QAAQ,cAAsC;IAEhF,IAAM,YAAY,GAAG,UAAC,CAA0B,EAAA;QAC5C,IAAI,QAAQ,EAAE;AACV,YAAA,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC;;AAEvB,KAAC;AAED,IAAA,QACIC,sBAAC,CAAA,aAAA,CAAAC,eAAU,EACP,EAAA,SAAS,EAAEC,uBAAM,CAAC,IAAI,EACtB,IAAI,EAAE,EAAE,EACG,YAAA,EAAA,4CAAS,EACpB,IAAI,EAAEF,sBAAC,CAAA,aAAA,CAAAG,2BAAU,IAAC,SAAS,EAAED,uBAAM,CAAC,eAAe,EAAI,CAAA,EACvD,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE,YAAY,EAAA,CACvB;AAEV;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"download-button.js","sources":["../../../../../src/components/actions-control/components/download-button/download-button.tsx"],"sourcesContent":["import React, { type MouseEvent, useContext } from 'react';\n\nimport { IconButton } from '@alfalab/core-components-icon-button';\nimport ArrowDownLineDownCompactMIcon from '@alfalab/icons-glyph/ArrowDownLineDownCompactMIcon';\n\nimport { FileUploadItemContext } from '../../../../context/file-upload-item-context';\n\nimport styles from '../../actions-control.module.css';\n\nexport const DownloadButton = () => {\n const {\n id = '0',\n downloadLink,\n download,\n disableButtons,\n target,\n onDownload,\n } = useContext(FileUploadItemContext);\n\n const handleDownload = (e: MouseEvent<HTMLElement>) => {\n if (onDownload) {\n e.preventDefault();\n onDownload(id);\n }\n };\n\n return (\n <IconButton\n className={styles.icon}\n size={24}\n aria-label='скачать'\n icon={<ArrowDownLineDownCompactMIcon className={styles.downloadIconColor} />}\n disabled={disableButtons}\n href={downloadLink}\n download={download}\n target={target}\n onClick={handleDownload}\n />\n );\n};\n"],"names":["useContext","FileUploadItemContext","React","IconButton","styles","ArrowDownLineDownCompactMIcon"],"mappings":";;;;;;;;;;;;;;;;AASa,IAAA,cAAc,GAAG,YAAA;IACpB,IAAA,EAAA,GAOFA,gBAAU,CAACC,2CAAqB,CAAC,EANjC,EAAA,GAAA,EAAA,CAAA,EAAQ,EAAR,EAAE,GAAG,EAAA,KAAA,MAAA,GAAA,GAAG,GAAA,EAAA,EACR,YAAY,GAAA,EAAA,CAAA,YAAA,EACZ,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,cAAc,GAAA,EAAA,CAAA,cAAA,EACd,MAAM,GAAA,EAAA,CAAA,MAAA,EACN,UAAU,GAAA,EAAA,CAAA,UACuB;IAErC,IAAM,cAAc,GAAG,UAAC,CAA0B,EAAA;
|
|
1
|
+
{"version":3,"file":"download-button.js","sources":["../../../../../src/components/actions-control/components/download-button/download-button.tsx"],"sourcesContent":["import React, { type MouseEvent, useContext } from 'react';\n\nimport { IconButton } from '@alfalab/core-components-icon-button';\nimport ArrowDownLineDownCompactMIcon from '@alfalab/icons-glyph/ArrowDownLineDownCompactMIcon';\n\nimport { FileUploadItemContext } from '../../../../context/file-upload-item-context';\n\nimport styles from '../../actions-control.module.css';\n\nexport const DownloadButton = () => {\n const {\n id = '0',\n downloadLink,\n download,\n disableButtons,\n target,\n onDownload,\n } = useContext(FileUploadItemContext);\n\n const handleDownload = (e: MouseEvent<HTMLElement>) => {\n if (onDownload) {\n e.preventDefault();\n onDownload(id);\n }\n };\n\n return (\n <IconButton\n className={styles.icon}\n size={24}\n aria-label='скачать'\n icon={<ArrowDownLineDownCompactMIcon className={styles.downloadIconColor} />}\n disabled={disableButtons}\n href={downloadLink}\n download={download}\n target={target}\n onClick={handleDownload}\n />\n );\n};\n"],"names":["useContext","FileUploadItemContext","React","IconButton","styles","ArrowDownLineDownCompactMIcon"],"mappings":";;;;;;;;;;;;;;;;AASa,IAAA,cAAc,GAAG,YAAA;IACpB,IAAA,EAAA,GAOFA,gBAAU,CAACC,2CAAqB,CAAC,EANjC,EAAA,GAAA,EAAA,CAAA,EAAQ,EAAR,EAAE,GAAG,EAAA,KAAA,MAAA,GAAA,GAAG,GAAA,EAAA,EACR,YAAY,GAAA,EAAA,CAAA,YAAA,EACZ,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,cAAc,GAAA,EAAA,CAAA,cAAA,EACd,MAAM,GAAA,EAAA,CAAA,MAAA,EACN,UAAU,GAAA,EAAA,CAAA,UACuB;IAErC,IAAM,cAAc,GAAG,UAAC,CAA0B,EAAA;QAC9C,IAAI,UAAU,EAAE;YACZ,CAAC,CAAC,cAAc,EAAE;YAClB,UAAU,CAAC,EAAE,CAAC;;AAEtB,KAAC;IAED,QACIC,qCAACC,eAAU,EAAA,EACP,SAAS,EAAEC,uBAAM,CAAC,IAAI,EACtB,IAAI,EAAE,EAAE,EAAA,YAAA,EACG,4CAAS,EACpB,IAAI,EAAEF,sBAAC,CAAA,aAAA,CAAAG,8CAA6B,EAAC,EAAA,SAAS,EAAED,uBAAM,CAAC,iBAAiB,EAAA,CAAI,EAC5E,QAAQ,EAAE,cAAc,EACxB,IAAI,EAAE,YAAY,EAClB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,cAAc,EACzB,CAAA;AAEV;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restore-button.js","sources":["../../../../../src/components/actions-control/components/restore-button/restore-button.tsx"],"sourcesContent":["import React, { useContext } from 'react';\n\nimport { IconButton } from '@alfalab/core-components-icon-button';\nimport ArrowsCwCompactMIcon from '@alfalab/icons-glyph/ArrowsCwCompactMIcon';\n\nimport { FileUploadItemContext } from '../../../../context/file-upload-item-context';\n\nimport styles from '../../actions-control.module.css';\n\nexport const RestoreButton = () => {\n const { id = '0', disableButtons, onRestore } = useContext(FileUploadItemContext);\n\n const handleRestore = () => {\n if (onRestore) {\n onRestore(id);\n }\n };\n\n return (\n <IconButton\n className={styles.icon}\n size={24}\n aria-label='восстановить'\n icon={<ArrowsCwCompactMIcon className={styles.restoreIconColor} />}\n disabled={disableButtons}\n onClick={handleRestore}\n />\n );\n};\n"],"names":["useContext","FileUploadItemContext","React","IconButton","styles","ArrowsCwCompactMIcon"],"mappings":";;;;;;;;;;;;;;;;AASa,IAAA,aAAa,GAAG,YAAA;AACnB,IAAA,IAAA,KAA0CA,gBAAU,CAACC,2CAAqB,CAAC,EAAzE,UAAQ,EAAR,EAAE,GAAG,EAAA,KAAA,MAAA,GAAA,GAAG,KAAA,EAAE,cAAc,oBAAA,EAAE,SAAS,eAAsC;AAEjF,IAAA,IAAM,aAAa,GAAG,YAAA;
|
|
1
|
+
{"version":3,"file":"restore-button.js","sources":["../../../../../src/components/actions-control/components/restore-button/restore-button.tsx"],"sourcesContent":["import React, { useContext } from 'react';\n\nimport { IconButton } from '@alfalab/core-components-icon-button';\nimport ArrowsCwCompactMIcon from '@alfalab/icons-glyph/ArrowsCwCompactMIcon';\n\nimport { FileUploadItemContext } from '../../../../context/file-upload-item-context';\n\nimport styles from '../../actions-control.module.css';\n\nexport const RestoreButton = () => {\n const { id = '0', disableButtons, onRestore } = useContext(FileUploadItemContext);\n\n const handleRestore = () => {\n if (onRestore) {\n onRestore(id);\n }\n };\n\n return (\n <IconButton\n className={styles.icon}\n size={24}\n aria-label='восстановить'\n icon={<ArrowsCwCompactMIcon className={styles.restoreIconColor} />}\n disabled={disableButtons}\n onClick={handleRestore}\n />\n );\n};\n"],"names":["useContext","FileUploadItemContext","React","IconButton","styles","ArrowsCwCompactMIcon"],"mappings":";;;;;;;;;;;;;;;;AASa,IAAA,aAAa,GAAG,YAAA;AACnB,IAAA,IAAA,KAA0CA,gBAAU,CAACC,2CAAqB,CAAC,EAAzE,UAAQ,EAAR,EAAE,GAAG,EAAA,KAAA,MAAA,GAAA,GAAG,KAAA,EAAE,cAAc,oBAAA,EAAE,SAAS,eAAsC;AAEjF,IAAA,IAAM,aAAa,GAAG,YAAA;QAClB,IAAI,SAAS,EAAE;YACX,SAAS,CAAC,EAAE,CAAC;;AAErB,KAAC;AAED,IAAA,QACIC,sBAAC,CAAA,aAAA,CAAAC,eAAU,EACP,EAAA,SAAS,EAAEC,uBAAM,CAAC,IAAI,EACtB,IAAI,EAAE,EAAE,EACG,YAAA,EAAA,0EAAc,EACzB,IAAI,EAAEF,sBAAC,CAAA,aAAA,CAAAG,qCAAoB,IAAC,SAAS,EAAED,uBAAM,CAAC,gBAAgB,EAAI,CAAA,EAClE,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE,aAAa,EAAA,CACxB;AAEV;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-error.js","sources":["../../../../../src/components/content/components/content-error/content-error.tsx"],"sourcesContent":["import React, { useContext } from 'react';\n\nimport { TypographyText } from '@alfalab/core-components-typography';\n\nimport { FileUploadItemContext } from '../../../../context/file-upload-item-context';\n\nimport styles from './content-error.module.css';\n\nexport const ContentError = () => {\n const { error } = useContext(FileUploadItemContext);\n\n if (typeof error === 'string' && error.length > 0) {\n return (\n <TypographyText className={styles.errorItem} view='primary-small' color='negative'>\n {error}\n </TypographyText>\n );\n }\n\n if (Array.isArray(error) && error.length > 0) {\n return (\n <div>\n {error.map((item) => (\n <TypographyText\n key={item}\n className={styles.errorItem}\n view='primary-small'\n color='negative'\n >\n {item}\n </TypographyText>\n ))}\n </div>\n );\n }\n\n return (\n <TypographyText className={styles.errorItem} view='primary-small' color='negative'>\n Не удалось загрузить файл\n </TypographyText>\n );\n};\n"],"names":["useContext","FileUploadItemContext","React","TypographyText","styles"],"mappings":";;;;;;;;;;;;;;AAQa,IAAA,YAAY,GAAG,YAAA;AAChB,IAAA,IAAA,KAAK,GAAKA,gBAAU,CAACC,2CAAqB,CAAC,MAAtC;IAEb,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;QAC/C,QACIC,qCAACC,mBAAc,EAAA,EAAC,SAAS,EAAEC,uBAAM,CAAC,SAAS,EAAE,IAAI,EAAC,eAAe,EAAC,KAAK,EAAC,UAAU,EAC7E,EAAA,KAAK,CACO
|
|
1
|
+
{"version":3,"file":"content-error.js","sources":["../../../../../src/components/content/components/content-error/content-error.tsx"],"sourcesContent":["import React, { useContext } from 'react';\n\nimport { TypographyText } from '@alfalab/core-components-typography';\n\nimport { FileUploadItemContext } from '../../../../context/file-upload-item-context';\n\nimport styles from './content-error.module.css';\n\nexport const ContentError = () => {\n const { error } = useContext(FileUploadItemContext);\n\n if (typeof error === 'string' && error.length > 0) {\n return (\n <TypographyText className={styles.errorItem} view='primary-small' color='negative'>\n {error}\n </TypographyText>\n );\n }\n\n if (Array.isArray(error) && error.length > 0) {\n return (\n <div>\n {error.map((item) => (\n <TypographyText\n key={item}\n className={styles.errorItem}\n view='primary-small'\n color='negative'\n >\n {item}\n </TypographyText>\n ))}\n </div>\n );\n }\n\n return (\n <TypographyText className={styles.errorItem} view='primary-small' color='negative'>\n Не удалось загрузить файл\n </TypographyText>\n );\n};\n"],"names":["useContext","FileUploadItemContext","React","TypographyText","styles"],"mappings":";;;;;;;;;;;;;;AAQa,IAAA,YAAY,GAAG,YAAA;AAChB,IAAA,IAAA,KAAK,GAAKA,gBAAU,CAACC,2CAAqB,CAAC,MAAtC;IAEb,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;QAC/C,QACIC,qCAACC,mBAAc,EAAA,EAAC,SAAS,EAAEC,uBAAM,CAAC,SAAS,EAAE,IAAI,EAAC,eAAe,EAAC,KAAK,EAAC,UAAU,EAC7E,EAAA,KAAK,CACO;;AAIzB,IAAA,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;AAC1C,QAAA,QACIF,sBACK,CAAA,aAAA,CAAA,KAAA,EAAA,IAAA,EAAA,KAAK,CAAC,GAAG,CAAC,UAAC,IAAI,EAAA,EAAK,QACjBA,qCAACC,mBAAc,EAAA,EACX,GAAG,EAAE,IAAI,EACT,SAAS,EAAEC,uBAAM,CAAC,SAAS,EAC3B,IAAI,EAAC,eAAe,EACpB,KAAK,EAAC,UAAU,EAEf,EAAA,IAAI,CACQ,EACpB,EAAA,CAAC,CACA;;AAId,IAAA,QACIF,sBAAC,CAAA,aAAA,CAAAC,mBAAc,IAAC,SAAS,EAAEC,uBAAM,CAAC,SAAS,EAAE,IAAI,EAAC,eAAe,EAAC,KAAK,EAAC,UAAU,EAAA,EAAA,yIAAA,CAEjE;AAEzB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-subtitle.js","sources":["../../../../../src/components/content/components/content-subtitle/content-subtitle.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport cn from 'classnames';\n\nimport { humanFileSize } from '@alfalab/core-components-shared';\nimport { TypographyText } from '@alfalab/core-components-typography';\n\nimport { MAX_PROGRESS_BAR_VALUE } from '../../../../const/progress-bar';\nimport { FileUploadItemContext } from '../../../../context/file-upload-item-context';\nimport {\n isErrorStatus,\n isSuccessStatus,\n isUploadedStatus,\n isUploadingStatus,\n} from '../../../../utils';\nimport { isError } from '../../utils/isError';\nimport { ContentError } from '../content-error';\n\nimport styles from './content-subtitle.module.css';\n\nexport const ContentSubtitle = () => {\n const { uploadStatus, subtitle, uploadDate, size, truncate, showRestore, error, progressBar } =\n useContext(FileUploadItemContext);\n\n const shouldShownError = isErrorStatus(uploadStatus) || isError(error);\n const showMeta =\n !showRestore && (isSuccessStatus(uploadStatus) || isUploadedStatus(uploadStatus));\n\n // валидация progressBar (не должен превышать 100 и быть меньше 0)\n const validateProgressBarValue = (progressValue: number | undefined) => {\n if (progressValue === undefined) {\n return 0;\n }\n\n return Math.min(Math.max(progressValue, 0), MAX_PROGRESS_BAR_VALUE);\n };\n\n const validProgressBar = validateProgressBarValue(progressBar);\n\n // uploading status\n if (isUploadingStatus(uploadStatus)) {\n return (\n <TypographyText view='primary-small' color='secondary'>\n Загружено{'\\u00A0'}\n {Math.floor(validProgressBar)}%\n </TypographyText>\n );\n }\n\n // error status\n if (shouldShownError) {\n return <ContentError />;\n }\n\n // success status\n if (showMeta) {\n return (\n <div>\n {size && (\n <TypographyText className={styles.size} view='primary-small' color='secondary'>\n {humanFileSize(size)}\n </TypographyText>\n )}\n {uploadDate && (\n <TypographyText view='primary-small' color='secondary'>\n {uploadDate}\n </TypographyText>\n )}\n </div>\n );\n }\n\n // restore status\n if (showRestore) {\n return (\n <TypographyText view='primary-small' color='tertiary'>\n Файл удален\n </TypographyText>\n );\n }\n\n return (\n <TypographyText\n className={cn(styles.subtitle, {\n [styles.truncate]: truncate,\n })}\n view='primary-small'\n color='secondary'\n >\n {subtitle}\n </TypographyText>\n );\n};\n"],"names":["useContext","FileUploadItemContext","progressBar","isErrorStatus","isError","isSuccessStatus","isUploadedStatus","MAX_PROGRESS_BAR_VALUE","isUploadingStatus","React","TypographyText","ContentError","styles","humanFileSize","cn"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAmBa,IAAA,eAAe,GAAG,YAAA;;AACrB,IAAA,IAAA,EACF,GAAAA,gBAAU,CAACC,2CAAqB,CAAC,EAD7B,YAAY,GAAA,EAAA,CAAA,YAAA,EAAE,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,UAAU,GAAA,EAAA,CAAA,UAAA,EAAE,IAAI,GAAA,EAAA,CAAA,IAAA,EAAE,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,WAAW,GAAA,EAAA,CAAA,WAAA,EAAE,KAAK,GAAA,EAAA,CAAA,KAAA,EAAEC,aAAW,iBACtD;IAErC,IAAM,gBAAgB,GAAGC,mBAAa,CAAC,YAAY,CAAC,IAAIC,eAAO,CAAC,KAAK,CAAC;AACtE,IAAA,IAAM,QAAQ,GACV,CAAC,WAAW,KAAKC,qBAAe,CAAC,YAAY,CAAC,IAAIC,sBAAgB,CAAC,YAAY,CAAC,CAAC;;IAGrF,IAAM,wBAAwB,GAAG,UAAC,aAAiC,EAAA;
|
|
1
|
+
{"version":3,"file":"content-subtitle.js","sources":["../../../../../src/components/content/components/content-subtitle/content-subtitle.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport cn from 'classnames';\n\nimport { humanFileSize } from '@alfalab/core-components-shared';\nimport { TypographyText } from '@alfalab/core-components-typography';\n\nimport { MAX_PROGRESS_BAR_VALUE } from '../../../../const/progress-bar';\nimport { FileUploadItemContext } from '../../../../context/file-upload-item-context';\nimport {\n isErrorStatus,\n isSuccessStatus,\n isUploadedStatus,\n isUploadingStatus,\n} from '../../../../utils';\nimport { isError } from '../../utils/isError';\nimport { ContentError } from '../content-error';\n\nimport styles from './content-subtitle.module.css';\n\nexport const ContentSubtitle = () => {\n const { uploadStatus, subtitle, uploadDate, size, truncate, showRestore, error, progressBar } =\n useContext(FileUploadItemContext);\n\n const shouldShownError = isErrorStatus(uploadStatus) || isError(error);\n const showMeta =\n !showRestore && (isSuccessStatus(uploadStatus) || isUploadedStatus(uploadStatus));\n\n // валидация progressBar (не должен превышать 100 и быть меньше 0)\n const validateProgressBarValue = (progressValue: number | undefined) => {\n if (progressValue === undefined) {\n return 0;\n }\n\n return Math.min(Math.max(progressValue, 0), MAX_PROGRESS_BAR_VALUE);\n };\n\n const validProgressBar = validateProgressBarValue(progressBar);\n\n // uploading status\n if (isUploadingStatus(uploadStatus)) {\n return (\n <TypographyText view='primary-small' color='secondary'>\n Загружено{'\\u00A0'}\n {Math.floor(validProgressBar)}%\n </TypographyText>\n );\n }\n\n // error status\n if (shouldShownError) {\n return <ContentError />;\n }\n\n // success status\n if (showMeta) {\n return (\n <div>\n {size && (\n <TypographyText className={styles.size} view='primary-small' color='secondary'>\n {humanFileSize(size)}\n </TypographyText>\n )}\n {uploadDate && (\n <TypographyText view='primary-small' color='secondary'>\n {uploadDate}\n </TypographyText>\n )}\n </div>\n );\n }\n\n // restore status\n if (showRestore) {\n return (\n <TypographyText view='primary-small' color='tertiary'>\n Файл удален\n </TypographyText>\n );\n }\n\n return (\n <TypographyText\n className={cn(styles.subtitle, {\n [styles.truncate]: truncate,\n })}\n view='primary-small'\n color='secondary'\n >\n {subtitle}\n </TypographyText>\n );\n};\n"],"names":["useContext","FileUploadItemContext","progressBar","isErrorStatus","isError","isSuccessStatus","isUploadedStatus","MAX_PROGRESS_BAR_VALUE","isUploadingStatus","React","TypographyText","ContentError","styles","humanFileSize","cn"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAmBa,IAAA,eAAe,GAAG,YAAA;;AACrB,IAAA,IAAA,EACF,GAAAA,gBAAU,CAACC,2CAAqB,CAAC,EAD7B,YAAY,GAAA,EAAA,CAAA,YAAA,EAAE,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,UAAU,GAAA,EAAA,CAAA,UAAA,EAAE,IAAI,GAAA,EAAA,CAAA,IAAA,EAAE,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,WAAW,GAAA,EAAA,CAAA,WAAA,EAAE,KAAK,GAAA,EAAA,CAAA,KAAA,EAAEC,aAAW,iBACtD;IAErC,IAAM,gBAAgB,GAAGC,mBAAa,CAAC,YAAY,CAAC,IAAIC,eAAO,CAAC,KAAK,CAAC;AACtE,IAAA,IAAM,QAAQ,GACV,CAAC,WAAW,KAAKC,qBAAe,CAAC,YAAY,CAAC,IAAIC,sBAAgB,CAAC,YAAY,CAAC,CAAC;;IAGrF,IAAM,wBAAwB,GAAG,UAAC,aAAiC,EAAA;AAC/D,QAAA,IAAI,aAAa,KAAK,SAAS,EAAE;AAC7B,YAAA,OAAO,CAAC;;AAGZ,QAAA,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC,CAAC,EAAEC,kCAAsB,CAAC;AACvE,KAAC;AAED,IAAA,IAAM,gBAAgB,GAAG,wBAAwB,CAACL,aAAW,CAAC;;AAG9D,IAAA,IAAIM,uBAAiB,CAAC,YAAY,CAAC,EAAE;QACjC,QACIC,sBAAC,CAAA,aAAA,CAAAC,mBAAc,EAAC,EAAA,IAAI,EAAC,eAAe,EAAC,KAAK,EAAC,WAAW,EAAA;;YACxC,QAAQ;AACjB,YAAA,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC;AAChB,YAAA,GAAA,CAAA;;;IAKzB,IAAI,gBAAgB,EAAE;QAClB,OAAOD,sBAAA,CAAA,aAAA,CAACE,yBAAY,EAAA,IAAA,CAAG;;;IAI3B,IAAI,QAAQ,EAAE;AACV,QAAA,QACIF,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAA,IAAA;YACK,IAAI,KACDA,sBAAA,CAAA,aAAA,CAACC,mBAAc,EAAA,EAAC,SAAS,EAAEE,uBAAM,CAAC,IAAI,EAAE,IAAI,EAAC,eAAe,EAAC,KAAK,EAAC,WAAW,EAAA,EACzEC,oBAAa,CAAC,IAAI,CAAC,CACP,CACpB;AACA,YAAA,UAAU,KACPJ,sBAAA,CAAA,aAAA,CAACC,mBAAc,EAAC,EAAA,IAAI,EAAC,eAAe,EAAC,KAAK,EAAC,WAAW,EACjD,EAAA,UAAU,CACE,CACpB,CACC;;;IAKd,IAAI,WAAW,EAAE;AACb,QAAA,QACID,sBAAA,CAAA,aAAA,CAACC,mBAAc,EAAA,EAAC,IAAI,EAAC,eAAe,EAAC,KAAK,EAAC,UAAU,EAAA,EAAA,+DAAA,CAEpC;;IAIzB,QACID,sBAAC,CAAA,aAAA,CAAAC,mBAAc,EACX,EAAA,SAAS,EAAEI,mBAAE,CAACF,uBAAM,CAAC,QAAQ,GAAA,EAAA,GAAA,EAAA;AACzB,YAAA,EAAA,CAACA,uBAAM,CAAC,QAAQ,CAAA,GAAG,QAAQ;gBAC7B,EACF,IAAI,EAAC,eAAe,EACpB,KAAK,EAAC,WAAW,EAEhB,EAAA,QAAQ,CACI;AAEzB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.js","sources":["../../../src/components/content/content.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport cn from 'classnames';\n\nimport { TypographyText } from '@alfalab/core-components-typography';\n\nimport { FileUploadItemContext } from '../../context/file-upload-item-context';\n\nimport { ContentSubtitle } from './components/content-subtitle/content-subtitle';\n\nimport styles from './content.module.css';\n\nexport const Content = () => {\n const {\n title,\n customContent: CustomContent,\n truncate,\n subtitle,\n showRestore,\n actionsPresent,\n isClickable,\n } = useContext(FileUploadItemContext);\n\n if (CustomContent) {\n return <CustomContent />;\n }\n\n return (\n <div\n className={cn(styles.container, {\n [styles.single]: !subtitle,\n [styles.clickable]: !actionsPresent && isClickable,\n })}\n >\n {title && (\n <TypographyText\n className={cn(styles.title, {\n [styles.truncate]: truncate,\n [styles.restore]: showRestore,\n })}\n view='component-primary'\n color='primary'\n >\n {title}\n </TypographyText>\n )}\n <ContentSubtitle />\n </div>\n );\n};\n"],"names":["useContext","FileUploadItemContext","React","cn","styles","TypographyText","ContentSubtitle"],"mappings":";;;;;;;;;;;;;;;;;AAWa,IAAA,OAAO,GAAG,YAAA;;IACb,IAAA,EAAA,GAQFA,gBAAU,CAACC,2CAAqB,CAAC,EAPjC,KAAK,GAAA,EAAA,CAAA,KAAA,EACU,aAAa,GAAA,EAAA,CAAA,aAAA,EAC5B,QAAQ,cAAA,EACR,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,WAAW,GAAA,EAAA,CAAA,WAAA,EACX,cAAc,GAAA,EAAA,CAAA,cAAA,EACd,WAAW,GAAA,EAAA,CAAA,WACsB;
|
|
1
|
+
{"version":3,"file":"content.js","sources":["../../../src/components/content/content.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport cn from 'classnames';\n\nimport { TypographyText } from '@alfalab/core-components-typography';\n\nimport { FileUploadItemContext } from '../../context/file-upload-item-context';\n\nimport { ContentSubtitle } from './components/content-subtitle/content-subtitle';\n\nimport styles from './content.module.css';\n\nexport const Content = () => {\n const {\n title,\n customContent: CustomContent,\n truncate,\n subtitle,\n showRestore,\n actionsPresent,\n isClickable,\n } = useContext(FileUploadItemContext);\n\n if (CustomContent) {\n return <CustomContent />;\n }\n\n return (\n <div\n className={cn(styles.container, {\n [styles.single]: !subtitle,\n [styles.clickable]: !actionsPresent && isClickable,\n })}\n >\n {title && (\n <TypographyText\n className={cn(styles.title, {\n [styles.truncate]: truncate,\n [styles.restore]: showRestore,\n })}\n view='component-primary'\n color='primary'\n >\n {title}\n </TypographyText>\n )}\n <ContentSubtitle />\n </div>\n );\n};\n"],"names":["useContext","FileUploadItemContext","React","cn","styles","TypographyText","ContentSubtitle"],"mappings":";;;;;;;;;;;;;;;;;AAWa,IAAA,OAAO,GAAG,YAAA;;IACb,IAAA,EAAA,GAQFA,gBAAU,CAACC,2CAAqB,CAAC,EAPjC,KAAK,GAAA,EAAA,CAAA,KAAA,EACU,aAAa,GAAA,EAAA,CAAA,aAAA,EAC5B,QAAQ,cAAA,EACR,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,WAAW,GAAA,EAAA,CAAA,WAAA,EACX,cAAc,GAAA,EAAA,CAAA,cAAA,EACd,WAAW,GAAA,EAAA,CAAA,WACsB;IAErC,IAAI,aAAa,EAAE;QACf,OAAOC,sBAAA,CAAA,aAAA,CAAC,aAAa,EAAA,IAAA,CAAG;;IAG5B,QACIA,8CACI,SAAS,EAAEC,mBAAE,CAACC,uBAAM,CAAC,SAAS,GAAA,EAAA,GAAA,EAAA;AAC1B,YAAA,EAAA,CAACA,uBAAM,CAAC,MAAM,CAAA,GAAG,CAAC,QAAQ;AAC1B,YAAA,EAAA,CAACA,uBAAM,CAAC,SAAS,IAAG,CAAC,cAAc,IAAI,WAAW;AACpD,YAAA,EAAA,EAAA,EAAA;QAED,KAAK,KACFF,sBAAA,CAAA,aAAA,CAACG,mBAAc,EAAA,EACX,SAAS,EAAEF,mBAAE,CAACC,uBAAM,CAAC,KAAK,GAAA,EAAA,GAAA,EAAA;AACtB,gBAAA,EAAA,CAACA,uBAAM,CAAC,QAAQ,CAAA,GAAG,QAAQ;AAC3B,gBAAA,EAAA,CAACA,uBAAM,CAAC,OAAO,CAAA,GAAG,WAAW;oBAC/B,EACF,IAAI,EAAC,mBAAmB,EACxB,KAAK,EAAC,SAAS,EAAA,EAEd,KAAK,CACO,CACpB;AACD,QAAAF,sBAAA,CAAA,aAAA,CAACI,+BAAe,EAAA,IAAA,CAAG,CACjB;AAEd;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isError.js","sources":["../../../../src/components/content/utils/isError.ts"],"sourcesContent":["export const isError = (error?: string | string[]) => {\n if (typeof error === 'string' && error.length > 0) {\n return true;\n }\n\n if (Array.isArray(error) && error.length > 0) {\n return true;\n }\n\n return false;\n};\n"],"names":[],"mappings":";;;;AAAO,IAAM,OAAO,GAAG,UAAC,KAAyB,EAAA;IAC7C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;AAC/C,QAAA,OAAO,IAAI
|
|
1
|
+
{"version":3,"file":"isError.js","sources":["../../../../src/components/content/utils/isError.ts"],"sourcesContent":["export const isError = (error?: string | string[]) => {\n if (typeof error === 'string' && error.length > 0) {\n return true;\n }\n\n if (Array.isArray(error) && error.length > 0) {\n return true;\n }\n\n return false;\n};\n"],"names":[],"mappings":";;;;AAAO,IAAM,OAAO,GAAG,UAAC,KAAyB,EAAA;IAC7C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;AAC/C,QAAA,OAAO,IAAI;;AAGf,IAAA,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;AAC1C,QAAA,OAAO,IAAI;;AAGf,IAAA,OAAO,KAAK;AAChB;;;;"}
|