@alfalab/core-components-file-upload-item 8.1.2 → 8.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/actions-control/actions-control.css +8 -8
- package/components/actions-control/actions-control.module.css.js +1 -1
- package/components/content/components/content-error/content-error.css +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 +2 -2
- 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/content.css +7 -7
- package/components/content/content.module.css.js +1 -1
- package/components/status-control/extension-icon/index.css +6 -6
- package/components/status-control/extension-icon/index.module.css.js +1 -1
- package/components/status-control/index.css +8 -8
- package/components/status-control/index.module.css.js +1 -1
- package/context/file-upload-item-context.d.ts +1 -1
- package/context/file-upload-item-context.js.map +1 -1
- package/context/use-context-value.js +3 -1
- package/context/use-context-value.js.map +1 -1
- package/cssm/components/content/components/content-subtitle/content-subtitle.js +2 -2
- package/cssm/components/content/components/content-subtitle/content-subtitle.js.map +1 -1
- package/cssm/context/file-upload-item-context.d.ts +1 -1
- package/cssm/context/file-upload-item-context.js.map +1 -1
- package/cssm/context/use-context-value.js +3 -1
- package/cssm/context/use-context-value.js.map +1 -1
- package/cssm/types/file-upload-item-props.d.ts +6 -0
- 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/content/components/content-error/content-error.css +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 +2 -2
- 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/content.css +7 -7
- package/esm/components/content/content.module.css.js +1 -1
- package/esm/components/status-control/extension-icon/index.css +6 -6
- package/esm/components/status-control/extension-icon/index.module.css.js +1 -1
- package/esm/components/status-control/index.css +8 -8
- package/esm/components/status-control/index.module.css.js +1 -1
- package/esm/context/file-upload-item-context.d.ts +1 -1
- package/esm/context/file-upload-item-context.js.map +1 -1
- package/esm/context/use-context-value.js +3 -1
- package/esm/context/use-context-value.js.map +1 -1
- package/esm/index.css +2 -2
- package/esm/index.module.css.js +1 -1
- package/esm/types/file-upload-item-props.d.ts +6 -0
- package/index.css +2 -2
- package/index.module.css.js +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/content/components/content-error/content-error.css +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 +2 -2
- 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/content.css +7 -7
- package/modern/components/content/content.module.css.js +1 -1
- package/modern/components/status-control/extension-icon/index.css +6 -6
- package/modern/components/status-control/extension-icon/index.module.css.js +1 -1
- package/modern/components/status-control/index.css +8 -8
- package/modern/components/status-control/index.module.css.js +1 -1
- package/modern/context/file-upload-item-context.d.ts +1 -1
- package/modern/context/file-upload-item-context.js.map +1 -1
- package/modern/context/use-context-value.js +3 -1
- package/modern/context/use-context-value.js.map +1 -1
- package/modern/index.css +2 -2
- package/modern/index.module.css.js +1 -1
- package/modern/types/file-upload-item-props.d.ts +6 -0
- package/moderncssm/components/content/components/content-subtitle/content-subtitle.js +2 -2
- package/moderncssm/components/content/components/content-subtitle/content-subtitle.js.map +1 -1
- package/moderncssm/context/file-upload-item-context.d.ts +1 -1
- package/moderncssm/context/file-upload-item-context.js.map +1 -1
- package/moderncssm/context/use-context-value.js +3 -1
- package/moderncssm/context/use-context-value.js.map +1 -1
- package/moderncssm/types/file-upload-item-props.d.ts +6 -0
- package/package.json +1 -1
- package/src/components/content/components/content-subtitle/content-subtitle.tsx +12 -3
- package/src/context/file-upload-item-context.ts +1 -0
- package/src/context/use-context-value.ts +3 -0
- package/src/types/file-upload-item-props.ts +8 -0
- package/types/file-upload-item-props.d.ts +6 -0
|
@@ -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_1csd1 {
|
|
6
6
|
display: flex;
|
|
7
7
|
max-width: 144px;
|
|
8
8
|
}
|
|
9
|
-
.file-upload-
|
|
9
|
+
.file-upload-item__container_1csd1 .file-upload-item__icon_1csd1 {
|
|
10
10
|
width: 48px;
|
|
11
11
|
height: 48px;
|
|
12
12
|
}
|
|
13
|
-
.file-upload-
|
|
13
|
+
.file-upload-item__deleteIconColor_1csd1 {
|
|
14
14
|
fill: var(--color-light-text-tertiary);
|
|
15
15
|
}
|
|
16
|
-
.file-upload-
|
|
16
|
+
.file-upload-item__deleteIconColor_1csd1:hover {
|
|
17
17
|
fill: var(--color-light-text-tertiary-hover);
|
|
18
18
|
}
|
|
19
|
-
.file-upload-
|
|
19
|
+
.file-upload-item__downloadIconColor_1csd1 {
|
|
20
20
|
fill: var(--color-light-text-tertiary);
|
|
21
21
|
}
|
|
22
|
-
.file-upload-
|
|
22
|
+
.file-upload-item__downloadIconColor_1csd1:hover {
|
|
23
23
|
fill: var(--color-light-text-tertiary-hover);
|
|
24
24
|
}
|
|
25
|
-
.file-upload-
|
|
25
|
+
.file-upload-item__restoreIconColor_1csd1 {
|
|
26
26
|
fill: var(--color-light-text-tertiary);
|
|
27
27
|
}
|
|
28
|
-
.file-upload-
|
|
28
|
+
.file-upload-item__restoreIconColor_1csd1: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_1csd1","icon":"file-upload-item__icon_1csd1","deleteIconColor":"file-upload-item__deleteIconColor_1csd1","downloadIconColor":"file-upload-item__downloadIconColor_1csd1","restoreIconColor":"file-upload-item__restoreIconColor_1csd1"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=actions-control.module.css.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
--gap-8: 8px;
|
|
3
3
|
}
|
|
4
|
-
.file-upload-
|
|
4
|
+
.file-upload-item__subtitle_1k6jr {
|
|
5
5
|
display: block;
|
|
6
6
|
}
|
|
7
|
-
.file-upload-
|
|
7
|
+
.file-upload-item__subtitle_1k6jr.file-upload-item__truncate_1k6jr {
|
|
8
8
|
white-space: nowrap;
|
|
9
9
|
overflow: hidden;
|
|
10
10
|
text-overflow: ellipsis;
|
|
11
11
|
}
|
|
12
|
-
.file-upload-
|
|
12
|
+
.file-upload-item__size_1k6jr {
|
|
13
13
|
margin-right: var(--gap-8);
|
|
14
14
|
}
|
|
@@ -20,7 +20,7 @@ var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
|
20
20
|
|
|
21
21
|
var ContentSubtitle = function () {
|
|
22
22
|
var _a;
|
|
23
|
-
var _b = fileUploadItemContext.useFileUploadItemContext(), uploadStatus = _b.uploadStatus, subtitle = _b.subtitle, uploadDate = _b.uploadDate, size = _b.size, truncate = _b.truncate, showRestore = _b.showRestore, error = _b.error, progressBar$1 = _b.progressBar;
|
|
23
|
+
var _b = fileUploadItemContext.useFileUploadItemContext(), uploadStatus = _b.uploadStatus, subtitle = _b.subtitle, subtitleColor = _b.subtitleColor, uploadDate = _b.uploadDate, size = _b.size, truncate = _b.truncate, showRestore = _b.showRestore, error = _b.error, progressBar$1 = _b.progressBar;
|
|
24
24
|
var shouldShownError = utils.isErrorStatus(uploadStatus) || isError.isError(error);
|
|
25
25
|
var showMeta = !showRestore && (utils.isSuccessStatus(uploadStatus) || utils.isUploadedStatus(uploadStatus));
|
|
26
26
|
// валидация progressBar (не должен превышать 100 и быть меньше 0)
|
|
@@ -49,7 +49,7 @@ var ContentSubtitle = function () {
|
|
|
49
49
|
}
|
|
50
50
|
return (React__default.default.createElement(coreComponentsTypography.TypographyText, { className: cn__default.default(contentSubtitle_module.subtitle, (_a = {},
|
|
51
51
|
_a[contentSubtitle_module.truncate] = truncate,
|
|
52
|
-
_a)), view: 'primary-small', color:
|
|
52
|
+
_a)), view: 'primary-small', color: subtitleColor }, subtitle));
|
|
53
53
|
};
|
|
54
54
|
|
|
55
55
|
exports.ContentSubtitle = ContentSubtitle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-subtitle.js","sources":["../../../../src/components/content/components/content-subtitle/content-subtitle.tsx"],"sourcesContent":["import React 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 { useFileUploadItemContext } 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 {
|
|
1
|
+
{"version":3,"file":"content-subtitle.js","sources":["../../../../src/components/content/components/content-subtitle/content-subtitle.tsx"],"sourcesContent":["import React 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 { useFileUploadItemContext } 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 {\n uploadStatus,\n subtitle,\n subtitleColor,\n uploadDate,\n size,\n truncate,\n showRestore,\n error,\n progressBar,\n } = useFileUploadItemContext();\n\n const shouldShownError = isErrorStatus(uploadStatus) || isError(error);\n const showMeta =\n !showRestore && (isSuccessStatus(uploadStatus) || isUploadedStatus(uploadStatus));\n\n // валидация progressBar (не должен превышать 100 и быть меньше 0)\n const validProgressBar = Math.min(Math.max(progressBar ?? 0, 0), MAX_PROGRESS_BAR_VALUE);\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={subtitleColor}\n >\n {subtitle}\n </TypographyText>\n );\n};\n"],"names":["useFileUploadItemContext","progressBar","isErrorStatus","isError","isSuccessStatus","isUploadedStatus","MAX_PROGRESS_BAR_VALUE","isUploadingStatus","React","TypographyText","ContentError","styles","humanFileSize","cn"],"mappings":";;;;;;;;;;;;;;;;;;;;AAmBa,IAAA,eAAe,GAAG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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,EAAE,aAAa,EAEnB,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_1k6jr","truncate":"file-upload-item__truncate_1k6jr","size":"file-upload-item__size_1k6jr"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=content-subtitle.module.css.js.map
|
|
@@ -6,34 +6,34 @@
|
|
|
6
6
|
--gap-4: 4px;
|
|
7
7
|
--gap-16: 16px;
|
|
8
8
|
}
|
|
9
|
-
.file-upload-
|
|
9
|
+
.file-upload-item__container_1y7ts {
|
|
10
10
|
padding: var(--gap-2) 0 0 var(--gap-16);
|
|
11
11
|
flex-grow: 1;
|
|
12
12
|
min-width: 0;
|
|
13
13
|
}
|
|
14
|
-
.file-upload-
|
|
14
|
+
.file-upload-item__container_1y7ts.file-upload-item__clickable_1y7ts {
|
|
15
15
|
cursor: pointer;
|
|
16
16
|
}
|
|
17
|
-
.file-upload-
|
|
17
|
+
.file-upload-item__container_1y7ts.file-upload-item__single_1y7ts {
|
|
18
18
|
display: flex;
|
|
19
19
|
flex-direction: column;
|
|
20
20
|
justify-content: center;
|
|
21
21
|
padding-top: 0;
|
|
22
22
|
min-height: 48px;
|
|
23
23
|
}
|
|
24
|
-
.file-upload-
|
|
24
|
+
.file-upload-item__container_1y7ts.file-upload-item__single_1y7ts .file-upload-item__title_1y7ts {
|
|
25
25
|
margin-bottom: 0;
|
|
26
26
|
}
|
|
27
|
-
.file-upload-
|
|
27
|
+
.file-upload-item__container_1y7ts .file-upload-item__title_1y7ts {
|
|
28
28
|
margin-bottom: var(--gap-4);
|
|
29
29
|
display: block;
|
|
30
30
|
overflow-wrap: break-word;
|
|
31
31
|
}
|
|
32
|
-
.file-upload-
|
|
32
|
+
.file-upload-item__container_1y7ts .file-upload-item__title_1y7ts.file-upload-item__truncate_1y7ts {
|
|
33
33
|
white-space: nowrap;
|
|
34
34
|
overflow: hidden;
|
|
35
35
|
text-overflow: ellipsis;
|
|
36
36
|
}
|
|
37
|
-
.file-upload-
|
|
37
|
+
.file-upload-item__container_1y7ts .file-upload-item__title_1y7ts.file-upload-item__restore_1y7ts {
|
|
38
38
|
color: var(--color-light-text-tertiary);
|
|
39
39
|
}
|
|
@@ -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_1y7ts","clickable":"file-upload-item__clickable_1y7ts","single":"file-upload-item__single_1y7ts","title":"file-upload-item__title_1y7ts","truncate":"file-upload-item__truncate_1y7ts","restore":"file-upload-item__restore_1y7ts"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=content.module.css.js.map
|
|
@@ -8,21 +8,21 @@
|
|
|
8
8
|
--color-light-decorative-orange: #fa9313;
|
|
9
9
|
--color-light-decorative-red: #fe5e48;
|
|
10
10
|
}
|
|
11
|
-
.file-upload-
|
|
11
|
+
.file-upload-item__iconPDFColored_l5mye {
|
|
12
12
|
fill: var(--color-light-decorative-red);
|
|
13
13
|
}
|
|
14
|
-
.file-upload-
|
|
14
|
+
.file-upload-item__iconDOCColored_l5mye {
|
|
15
15
|
fill: var(--color-light-decorative-blue);
|
|
16
16
|
}
|
|
17
|
-
.file-upload-
|
|
17
|
+
.file-upload-item__iconExcelColored_l5mye {
|
|
18
18
|
fill: var(--color-light-decorative-green);
|
|
19
19
|
}
|
|
20
|
-
.file-upload-
|
|
20
|
+
.file-upload-item__icon1CColored_l5mye {
|
|
21
21
|
fill: var(--color-light-decorative-orange);
|
|
22
22
|
}
|
|
23
|
-
.file-upload-
|
|
23
|
+
.file-upload-item__iconDocumentColored_l5mye {
|
|
24
24
|
fill: var(--color-light-neutral-translucent-1300);
|
|
25
25
|
}
|
|
26
|
-
.file-upload-
|
|
26
|
+
.file-upload-item__iconArchiveColored_l5mye {
|
|
27
27
|
fill: var(--color-light-status-attention);
|
|
28
28
|
}
|
|
@@ -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_l5mye","iconDOCColored":"file-upload-item__iconDOCColored_l5mye","iconExcelColored":"file-upload-item__iconExcelColored_l5mye","icon1CColored":"file-upload-item__icon1CColored_l5mye","iconDocumentColored":"file-upload-item__iconDocumentColored_l5mye","iconArchiveColored":"file-upload-item__iconArchiveColored_l5mye"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -6,30 +6,30 @@
|
|
|
6
6
|
:root {
|
|
7
7
|
--gap-4-neg: -4px;
|
|
8
8
|
}
|
|
9
|
-
.file-upload-
|
|
9
|
+
.file-upload-item__container_htuju {
|
|
10
10
|
position: relative;
|
|
11
11
|
}
|
|
12
|
-
.file-upload-
|
|
12
|
+
.file-upload-item__container_htuju.file-upload-item__clickable_htuju {
|
|
13
13
|
cursor: pointer;
|
|
14
14
|
}
|
|
15
|
-
.file-upload-
|
|
15
|
+
.file-upload-item__container_htuju .file-upload-item__progress_htuju {
|
|
16
16
|
position: absolute;
|
|
17
17
|
top: var(--gap-4-neg);
|
|
18
18
|
left: var(--gap-4-neg);
|
|
19
19
|
z-index: 1;
|
|
20
20
|
will-change: opacity;
|
|
21
21
|
}
|
|
22
|
-
.file-upload-
|
|
23
|
-
.file-upload-
|
|
22
|
+
.file-upload-item__container_htuju .file-upload-item__progress_htuju.file-upload-item__success_htuju,
|
|
23
|
+
.file-upload-item__container_htuju .file-upload-item__progress_htuju.file-upload-item__error_htuju {
|
|
24
24
|
transition: opacity 400ms ease-in;
|
|
25
25
|
opacity: 0;
|
|
26
26
|
}
|
|
27
|
-
.file-upload-
|
|
27
|
+
.file-upload-item__container_htuju .file-upload-item__progress_htuju.file-upload-item__success_htuju path {
|
|
28
28
|
stroke: var(--color-light-status-positive);
|
|
29
29
|
}
|
|
30
|
-
.file-upload-
|
|
30
|
+
.file-upload-item__container_htuju .file-upload-item__progress_htuju.file-upload-item__loading_htuju {
|
|
31
31
|
color: var(--color-light-neutral-500);
|
|
32
32
|
}
|
|
33
|
-
.file-upload-
|
|
33
|
+
.file-upload-item__container_htuju .file-upload-item__progress_htuju.file-upload-item__error_htuju path {
|
|
34
34
|
stroke: var(--color-light-status-negative);
|
|
35
35
|
}
|
|
@@ -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_htuju","clickable":"file-upload-item__clickable_htuju","progress":"file-upload-item__progress_htuju","success":"file-upload-item__success_htuju","error":"file-upload-item__error_htuju","loading":"file-upload-item__loading_htuju"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type FileUploadItemProps } from '../types/file-upload-item-props';
|
|
2
|
-
interface ContextType extends Pick<FileUploadItemProps, 'showRestore' | 'uploadStatus' | 'error' | 'title' | 'subtitle' | 'uploadDate' | 'size' | 'id' | 'onDownload' | 'onDelete' | 'onRestore' | 'downloadLink' | 'download' | 'disableButtons' | 'isClickable' | 'target' | 'showDelete' | 'customIcon' | 'iconStyle' | 'progressBar' | 'progressBarAvailable' | 'customContent' | 'truncate' | 'imageUrl' | 'backgroundColor' | 'reupload'> {
|
|
2
|
+
interface ContextType extends Pick<FileUploadItemProps, 'showRestore' | 'uploadStatus' | 'error' | 'title' | 'subtitle' | 'subtitleColor' | 'uploadDate' | 'size' | 'id' | 'onDownload' | 'onDelete' | 'onRestore' | 'downloadLink' | 'download' | 'disableButtons' | 'isClickable' | 'target' | 'showDelete' | 'customIcon' | 'iconStyle' | 'progressBar' | 'progressBarAvailable' | 'customContent' | 'truncate' | 'imageUrl' | 'backgroundColor' | 'reupload'> {
|
|
3
3
|
actionsPresent?: boolean;
|
|
4
4
|
}
|
|
5
5
|
export declare const FileUploadItemContext: import("react").Context<ContextType>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-upload-item-context.js","sources":["../src/context/file-upload-item-context.ts"],"sourcesContent":["import { createContext, useContext } from 'react';\n\nimport { type FileUploadItemProps } from '../types/file-upload-item-props';\n\ninterface ContextType\n extends Pick<\n FileUploadItemProps,\n | 'showRestore'\n | 'uploadStatus'\n | 'error'\n | 'title'\n | 'subtitle'\n | 'uploadDate'\n | 'size'\n | 'id'\n | 'onDownload'\n | 'onDelete'\n | 'onRestore'\n | 'downloadLink'\n | 'download'\n | 'disableButtons'\n | 'isClickable'\n | 'target'\n | 'showDelete'\n | 'customIcon'\n | 'iconStyle'\n | 'progressBar'\n | 'progressBarAvailable'\n | 'customContent'\n | 'truncate'\n | 'imageUrl'\n | 'backgroundColor'\n | 'reupload'\n > {\n actionsPresent?: boolean;\n}\n\nexport const FileUploadItemContext = createContext<ContextType>({});\n\nexport const useFileUploadItemContext = (): ContextType => useContext(FileUploadItemContext);\n"],"names":["createContext","useContext"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"file-upload-item-context.js","sources":["../src/context/file-upload-item-context.ts"],"sourcesContent":["import { createContext, useContext } from 'react';\n\nimport { type FileUploadItemProps } from '../types/file-upload-item-props';\n\ninterface ContextType\n extends Pick<\n FileUploadItemProps,\n | 'showRestore'\n | 'uploadStatus'\n | 'error'\n | 'title'\n | 'subtitle'\n | 'subtitleColor'\n | 'uploadDate'\n | 'size'\n | 'id'\n | 'onDownload'\n | 'onDelete'\n | 'onRestore'\n | 'downloadLink'\n | 'download'\n | 'disableButtons'\n | 'isClickable'\n | 'target'\n | 'showDelete'\n | 'customIcon'\n | 'iconStyle'\n | 'progressBar'\n | 'progressBarAvailable'\n | 'customContent'\n | 'truncate'\n | 'imageUrl'\n | 'backgroundColor'\n | 'reupload'\n > {\n actionsPresent?: boolean;\n}\n\nexport const FileUploadItemContext = createContext<ContextType>({});\n\nexport const useFileUploadItemContext = (): ContextType => useContext(FileUploadItemContext);\n"],"names":["createContext","useContext"],"mappings":";;;;;;IAsCa,qBAAqB,GAAGA,mBAAa,CAAc,EAAE;AAE3D,IAAM,wBAAwB,GAAG,YAAmB,EAAA,OAAAC,gBAAU,CAAC,qBAAqB,CAAC,CAAjC;;;;;"}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
|
|
7
7
|
var useContextValue = function (props) {
|
|
8
|
-
var _a = props.id, id = _a === void 0 ? '0' : _a, _b = props.title, title = _b === void 0 ? '' : _b, _c = props.isClickable, isClickable = _c === void 0 ? true : _c, _d = props.iconStyle, iconStyle = _d === void 0 ? 'gray' : _d, _e = props.progressBar, progressBar = _e === void 0 ? 0 : _e, _f = props.progressBarAvailable, progressBarAvailable = _f === void 0 ? true : _f, showRestore = props.showRestore, uploadStatus = props.uploadStatus, error = props.error, subtitle = props.subtitle, uploadDate = props.uploadDate, size = props.size, onDownload = props.onDownload, onDelete = props.onDelete, onRestore = props.onRestore, downloadLink = props.downloadLink, download = props.download, disableButtons = props.disableButtons, target = props.target, showDelete = props.showDelete, customIcon = props.customIcon, customContent = props.customContent, truncate = props.truncate, imageUrl = props.imageUrl, backgroundColor = props.backgroundColor, reupload = props.reupload;
|
|
8
|
+
var _a = props.id, id = _a === void 0 ? '0' : _a, _b = props.title, title = _b === void 0 ? '' : _b, _c = props.isClickable, isClickable = _c === void 0 ? true : _c, _d = props.iconStyle, iconStyle = _d === void 0 ? 'gray' : _d, _e = props.progressBar, progressBar = _e === void 0 ? 0 : _e, _f = props.progressBarAvailable, progressBarAvailable = _f === void 0 ? true : _f, showRestore = props.showRestore, uploadStatus = props.uploadStatus, error = props.error, subtitle = props.subtitle, _g = props.subtitleColor, subtitleColor = _g === void 0 ? 'secondary' : _g, uploadDate = props.uploadDate, size = props.size, onDownload = props.onDownload, onDelete = props.onDelete, onRestore = props.onRestore, downloadLink = props.downloadLink, download = props.download, disableButtons = props.disableButtons, target = props.target, showDelete = props.showDelete, customIcon = props.customIcon, customContent = props.customContent, truncate = props.truncate, imageUrl = props.imageUrl, backgroundColor = props.backgroundColor, reupload = props.reupload;
|
|
9
9
|
var actionsPresent = Boolean(showRestore || downloadLink || showDelete || onDownload || reupload);
|
|
10
10
|
return React.useMemo(function () { return ({
|
|
11
11
|
showRestore: showRestore,
|
|
@@ -13,6 +13,7 @@ var useContextValue = function (props) {
|
|
|
13
13
|
error: error,
|
|
14
14
|
title: title,
|
|
15
15
|
subtitle: subtitle,
|
|
16
|
+
subtitleColor: subtitleColor,
|
|
16
17
|
uploadDate: uploadDate,
|
|
17
18
|
size: size,
|
|
18
19
|
id: id,
|
|
@@ -41,6 +42,7 @@ var useContextValue = function (props) {
|
|
|
41
42
|
error,
|
|
42
43
|
title,
|
|
43
44
|
subtitle,
|
|
45
|
+
subtitleColor,
|
|
44
46
|
uploadDate,
|
|
45
47
|
size,
|
|
46
48
|
id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-context-value.js","sources":["../src/context/use-context-value.ts"],"sourcesContent":["import { type ContextType, useMemo } from 'react';\n\nimport { type FileUploadItemProps } from '../types/file-upload-item-props';\n\nimport { type FileUploadItemContext } from './file-upload-item-context';\n\ntype UseContextValueProps = Omit<FileUploadItemProps, 'className' | 'dataTestId' | 'children'>;\n\nexport const useContextValue = (\n props: UseContextValueProps,\n): ContextType<typeof FileUploadItemContext> => {\n const {\n id = '0',\n title = '',\n isClickable = true,\n iconStyle = 'gray',\n progressBar = 0,\n progressBarAvailable = true,\n showRestore,\n uploadStatus,\n error,\n subtitle,\n uploadDate,\n size,\n onDownload,\n onDelete,\n onRestore,\n downloadLink,\n download,\n disableButtons,\n target,\n showDelete,\n customIcon,\n customContent,\n truncate,\n imageUrl,\n backgroundColor,\n reupload,\n } = props;\n\n const actionsPresent = Boolean(\n showRestore || downloadLink || showDelete || onDownload || reupload,\n );\n\n return useMemo(\n () => ({\n showRestore,\n uploadStatus,\n error,\n title,\n subtitle,\n uploadDate,\n size,\n id,\n onDownload,\n onDelete,\n onRestore,\n downloadLink,\n download,\n disableButtons,\n isClickable,\n target,\n showDelete,\n customIcon,\n iconStyle,\n progressBar,\n progressBarAvailable,\n customContent,\n truncate,\n imageUrl,\n backgroundColor,\n actionsPresent,\n reupload,\n }),\n [\n showRestore,\n uploadStatus,\n error,\n title,\n subtitle,\n uploadDate,\n size,\n id,\n onDownload,\n onDelete,\n onRestore,\n downloadLink,\n download,\n disableButtons,\n isClickable,\n target,\n showDelete,\n customIcon,\n iconStyle,\n progressBar,\n progressBarAvailable,\n customContent,\n truncate,\n imageUrl,\n backgroundColor,\n actionsPresent,\n reupload,\n ],\n );\n};\n"],"names":["useMemo"],"mappings":";;;;;;AAQO,IAAM,eAAe,GAAG,UAC3B,KAA2B,EAAA;AAGvB,IAAA,IAAA,
|
|
1
|
+
{"version":3,"file":"use-context-value.js","sources":["../src/context/use-context-value.ts"],"sourcesContent":["import { type ContextType, useMemo } from 'react';\n\nimport { type FileUploadItemProps } from '../types/file-upload-item-props';\n\nimport { type FileUploadItemContext } from './file-upload-item-context';\n\ntype UseContextValueProps = Omit<FileUploadItemProps, 'className' | 'dataTestId' | 'children'>;\n\nexport const useContextValue = (\n props: UseContextValueProps,\n): ContextType<typeof FileUploadItemContext> => {\n const {\n id = '0',\n title = '',\n isClickable = true,\n iconStyle = 'gray',\n progressBar = 0,\n progressBarAvailable = true,\n showRestore,\n uploadStatus,\n error,\n subtitle,\n subtitleColor = 'secondary',\n uploadDate,\n size,\n onDownload,\n onDelete,\n onRestore,\n downloadLink,\n download,\n disableButtons,\n target,\n showDelete,\n customIcon,\n customContent,\n truncate,\n imageUrl,\n backgroundColor,\n reupload,\n } = props;\n\n const actionsPresent = Boolean(\n showRestore || downloadLink || showDelete || onDownload || reupload,\n );\n\n return useMemo(\n () => ({\n showRestore,\n uploadStatus,\n error,\n title,\n subtitle,\n subtitleColor,\n uploadDate,\n size,\n id,\n onDownload,\n onDelete,\n onRestore,\n downloadLink,\n download,\n disableButtons,\n isClickable,\n target,\n showDelete,\n customIcon,\n iconStyle,\n progressBar,\n progressBarAvailable,\n customContent,\n truncate,\n imageUrl,\n backgroundColor,\n actionsPresent,\n reupload,\n }),\n [\n showRestore,\n uploadStatus,\n error,\n title,\n subtitle,\n subtitleColor,\n uploadDate,\n size,\n id,\n onDownload,\n onDelete,\n onRestore,\n downloadLink,\n download,\n disableButtons,\n isClickable,\n target,\n showDelete,\n customIcon,\n iconStyle,\n progressBar,\n progressBarAvailable,\n custom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AAW;QACX,YAAY;QACZ,KAAK;QACL,KAAK;QACL,QAAQ;QACR,aAAa;QACb,UAAU;QACV,IAAI;QACJ,EAAE;QACF,UAAU;QACV,QAAQ;QACR,SAAS;QACT,YAAY;QACZ,QAAQ;QACR,cAAc;QACd,WAAW;QACX,MAAM;QACN,UAAU;QACV,UAAU;QACV,SAAS;QACT,WAAW;QACX,oBAAoB;QACpB,aAAa;QACb,QAAQ;QACR,QAAQ;QACR,eAAe;QACf,cAAc;QACd,QAAQ;AACX,KAAA,CACJ;AACL;;;;"}
|
|
@@ -21,7 +21,7 @@ var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
|
|
|
21
21
|
|
|
22
22
|
var ContentSubtitle = function () {
|
|
23
23
|
var _a;
|
|
24
|
-
var _b = fileUploadItemContext.useFileUploadItemContext(), uploadStatus = _b.uploadStatus, subtitle = _b.subtitle, uploadDate = _b.uploadDate, size = _b.size, truncate = _b.truncate, showRestore = _b.showRestore, error = _b.error, progressBar$1 = _b.progressBar;
|
|
24
|
+
var _b = fileUploadItemContext.useFileUploadItemContext(), uploadStatus = _b.uploadStatus, subtitle = _b.subtitle, subtitleColor = _b.subtitleColor, uploadDate = _b.uploadDate, size = _b.size, truncate = _b.truncate, showRestore = _b.showRestore, error = _b.error, progressBar$1 = _b.progressBar;
|
|
25
25
|
var shouldShownError = utils.isErrorStatus(uploadStatus) || isError.isError(error);
|
|
26
26
|
var showMeta = !showRestore && (utils.isSuccessStatus(uploadStatus) || utils.isUploadedStatus(uploadStatus));
|
|
27
27
|
// валидация progressBar (не должен превышать 100 и быть меньше 0)
|
|
@@ -50,7 +50,7 @@ var ContentSubtitle = function () {
|
|
|
50
50
|
}
|
|
51
51
|
return (React__default.default.createElement(cssm.TypographyText, { className: cn__default.default(styles__default.default.subtitle, (_a = {},
|
|
52
52
|
_a[styles__default.default.truncate] = truncate,
|
|
53
|
-
_a)), view: 'primary-small', color:
|
|
53
|
+
_a)), view: 'primary-small', color: subtitleColor }, subtitle));
|
|
54
54
|
};
|
|
55
55
|
|
|
56
56
|
exports.ContentSubtitle = ContentSubtitle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-subtitle.js","sources":["../../../../../src/components/content/components/content-subtitle/content-subtitle.tsx"],"sourcesContent":["import React 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 { useFileUploadItemContext } 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 {
|
|
1
|
+
{"version":3,"file":"content-subtitle.js","sources":["../../../../../src/components/content/components/content-subtitle/content-subtitle.tsx"],"sourcesContent":["import React 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 { useFileUploadItemContext } 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 {\n uploadStatus,\n subtitle,\n subtitleColor,\n uploadDate,\n size,\n truncate,\n showRestore,\n error,\n progressBar,\n } = useFileUploadItemContext();\n\n const shouldShownError = isErrorStatus(uploadStatus) || isError(error);\n const showMeta =\n !showRestore && (isSuccessStatus(uploadStatus) || isUploadedStatus(uploadStatus));\n\n // валидация progressBar (не должен превышать 100 и быть меньше 0)\n const validProgressBar = Math.min(Math.max(progressBar ?? 0, 0), MAX_PROGRESS_BAR_VALUE);\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={subtitleColor}\n >\n {subtitle}\n </TypographyText>\n );\n};\n"],"names":["useFileUploadItemContext","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,EAUF,GAAAA,8CAAwB,EAAE,EAT1B,YAAY,GAAA,EAAA,CAAA,YAAA,EACZ,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,aAAa,GAAA,EAAA,CAAA,aAAA,EACb,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,IAAI,GAAA,EAAA,CAAA,IAAA,EACJ,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,WAAW,GAAA,EAAA,CAAA,WAAA,EACX,KAAK,GAAA,EAAA,CAAA,KAAA,EACLC,aAAW,iBACe;IAE9B,IAAM,gBAAgB,GAAGC,mBAAa,CAAC,YAAY,CAAC,IAAIC,eAAO,CAAC,KAAK,CAAC;AACtE,IAAA,IAAM,QAAQ,GACV,CAAC,W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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,EAAE,aAAa,EAEnB,EAAA,QAAQ,CACI;AAEzB;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type FileUploadItemProps } from '../types/file-upload-item-props';
|
|
2
|
-
interface ContextType extends Pick<FileUploadItemProps, 'showRestore' | 'uploadStatus' | 'error' | 'title' | 'subtitle' | 'uploadDate' | 'size' | 'id' | 'onDownload' | 'onDelete' | 'onRestore' | 'downloadLink' | 'download' | 'disableButtons' | 'isClickable' | 'target' | 'showDelete' | 'customIcon' | 'iconStyle' | 'progressBar' | 'progressBarAvailable' | 'customContent' | 'truncate' | 'imageUrl' | 'backgroundColor' | 'reupload'> {
|
|
2
|
+
interface ContextType extends Pick<FileUploadItemProps, 'showRestore' | 'uploadStatus' | 'error' | 'title' | 'subtitle' | 'subtitleColor' | 'uploadDate' | 'size' | 'id' | 'onDownload' | 'onDelete' | 'onRestore' | 'downloadLink' | 'download' | 'disableButtons' | 'isClickable' | 'target' | 'showDelete' | 'customIcon' | 'iconStyle' | 'progressBar' | 'progressBarAvailable' | 'customContent' | 'truncate' | 'imageUrl' | 'backgroundColor' | 'reupload'> {
|
|
3
3
|
actionsPresent?: boolean;
|
|
4
4
|
}
|
|
5
5
|
export declare const FileUploadItemContext: import("react").Context<ContextType>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-upload-item-context.js","sources":["../../src/context/file-upload-item-context.ts"],"sourcesContent":["import { createContext, useContext } from 'react';\n\nimport { type FileUploadItemProps } from '../types/file-upload-item-props';\n\ninterface ContextType\n extends Pick<\n FileUploadItemProps,\n | 'showRestore'\n | 'uploadStatus'\n | 'error'\n | 'title'\n | 'subtitle'\n | 'uploadDate'\n | 'size'\n | 'id'\n | 'onDownload'\n | 'onDelete'\n | 'onRestore'\n | 'downloadLink'\n | 'download'\n | 'disableButtons'\n | 'isClickable'\n | 'target'\n | 'showDelete'\n | 'customIcon'\n | 'iconStyle'\n | 'progressBar'\n | 'progressBarAvailable'\n | 'customContent'\n | 'truncate'\n | 'imageUrl'\n | 'backgroundColor'\n | 'reupload'\n > {\n actionsPresent?: boolean;\n}\n\nexport const FileUploadItemContext = createContext<ContextType>({});\n\nexport const useFileUploadItemContext = (): ContextType => useContext(FileUploadItemContext);\n"],"names":["createContext","useContext"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"file-upload-item-context.js","sources":["../../src/context/file-upload-item-context.ts"],"sourcesContent":["import { createContext, useContext } from 'react';\n\nimport { type FileUploadItemProps } from '../types/file-upload-item-props';\n\ninterface ContextType\n extends Pick<\n FileUploadItemProps,\n | 'showRestore'\n | 'uploadStatus'\n | 'error'\n | 'title'\n | 'subtitle'\n | 'subtitleColor'\n | 'uploadDate'\n | 'size'\n | 'id'\n | 'onDownload'\n | 'onDelete'\n | 'onRestore'\n | 'downloadLink'\n | 'download'\n | 'disableButtons'\n | 'isClickable'\n | 'target'\n | 'showDelete'\n | 'customIcon'\n | 'iconStyle'\n | 'progressBar'\n | 'progressBarAvailable'\n | 'customContent'\n | 'truncate'\n | 'imageUrl'\n | 'backgroundColor'\n | 'reupload'\n > {\n actionsPresent?: boolean;\n}\n\nexport const FileUploadItemContext = createContext<ContextType>({});\n\nexport const useFileUploadItemContext = (): ContextType => useContext(FileUploadItemContext);\n"],"names":["createContext","useContext"],"mappings":";;;;;;IAsCa,qBAAqB,GAAGA,mBAAa,CAAc,EAAE;AAE3D,IAAM,wBAAwB,GAAG,YAAmB,EAAA,OAAAC,gBAAU,CAAC,qBAAqB,CAAC,CAAjC;;;;;"}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
|
|
7
7
|
var useContextValue = function (props) {
|
|
8
|
-
var _a = props.id, id = _a === void 0 ? '0' : _a, _b = props.title, title = _b === void 0 ? '' : _b, _c = props.isClickable, isClickable = _c === void 0 ? true : _c, _d = props.iconStyle, iconStyle = _d === void 0 ? 'gray' : _d, _e = props.progressBar, progressBar = _e === void 0 ? 0 : _e, _f = props.progressBarAvailable, progressBarAvailable = _f === void 0 ? true : _f, showRestore = props.showRestore, uploadStatus = props.uploadStatus, error = props.error, subtitle = props.subtitle, uploadDate = props.uploadDate, size = props.size, onDownload = props.onDownload, onDelete = props.onDelete, onRestore = props.onRestore, downloadLink = props.downloadLink, download = props.download, disableButtons = props.disableButtons, target = props.target, showDelete = props.showDelete, customIcon = props.customIcon, customContent = props.customContent, truncate = props.truncate, imageUrl = props.imageUrl, backgroundColor = props.backgroundColor, reupload = props.reupload;
|
|
8
|
+
var _a = props.id, id = _a === void 0 ? '0' : _a, _b = props.title, title = _b === void 0 ? '' : _b, _c = props.isClickable, isClickable = _c === void 0 ? true : _c, _d = props.iconStyle, iconStyle = _d === void 0 ? 'gray' : _d, _e = props.progressBar, progressBar = _e === void 0 ? 0 : _e, _f = props.progressBarAvailable, progressBarAvailable = _f === void 0 ? true : _f, showRestore = props.showRestore, uploadStatus = props.uploadStatus, error = props.error, subtitle = props.subtitle, _g = props.subtitleColor, subtitleColor = _g === void 0 ? 'secondary' : _g, uploadDate = props.uploadDate, size = props.size, onDownload = props.onDownload, onDelete = props.onDelete, onRestore = props.onRestore, downloadLink = props.downloadLink, download = props.download, disableButtons = props.disableButtons, target = props.target, showDelete = props.showDelete, customIcon = props.customIcon, customContent = props.customContent, truncate = props.truncate, imageUrl = props.imageUrl, backgroundColor = props.backgroundColor, reupload = props.reupload;
|
|
9
9
|
var actionsPresent = Boolean(showRestore || downloadLink || showDelete || onDownload || reupload);
|
|
10
10
|
return React.useMemo(function () { return ({
|
|
11
11
|
showRestore: showRestore,
|
|
@@ -13,6 +13,7 @@ var useContextValue = function (props) {
|
|
|
13
13
|
error: error,
|
|
14
14
|
title: title,
|
|
15
15
|
subtitle: subtitle,
|
|
16
|
+
subtitleColor: subtitleColor,
|
|
16
17
|
uploadDate: uploadDate,
|
|
17
18
|
size: size,
|
|
18
19
|
id: id,
|
|
@@ -41,6 +42,7 @@ var useContextValue = function (props) {
|
|
|
41
42
|
error,
|
|
42
43
|
title,
|
|
43
44
|
subtitle,
|
|
45
|
+
subtitleColor,
|
|
44
46
|
uploadDate,
|
|
45
47
|
size,
|
|
46
48
|
id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-context-value.js","sources":["../../src/context/use-context-value.ts"],"sourcesContent":["import { type ContextType, useMemo } from 'react';\n\nimport { type FileUploadItemProps } from '../types/file-upload-item-props';\n\nimport { type FileUploadItemContext } from './file-upload-item-context';\n\ntype UseContextValueProps = Omit<FileUploadItemProps, 'className' | 'dataTestId' | 'children'>;\n\nexport const useContextValue = (\n props: UseContextValueProps,\n): ContextType<typeof FileUploadItemContext> => {\n const {\n id = '0',\n title = '',\n isClickable = true,\n iconStyle = 'gray',\n progressBar = 0,\n progressBarAvailable = true,\n showRestore,\n uploadStatus,\n error,\n subtitle,\n uploadDate,\n size,\n onDownload,\n onDelete,\n onRestore,\n downloadLink,\n download,\n disableButtons,\n target,\n showDelete,\n customIcon,\n customContent,\n truncate,\n imageUrl,\n backgroundColor,\n reupload,\n } = props;\n\n const actionsPresent = Boolean(\n showRestore || downloadLink || showDelete || onDownload || reupload,\n );\n\n return useMemo(\n () => ({\n showRestore,\n uploadStatus,\n error,\n title,\n subtitle,\n uploadDate,\n size,\n id,\n onDownload,\n onDelete,\n onRestore,\n downloadLink,\n download,\n disableButtons,\n isClickable,\n target,\n showDelete,\n customIcon,\n iconStyle,\n progressBar,\n progressBarAvailable,\n customContent,\n truncate,\n imageUrl,\n backgroundColor,\n actionsPresent,\n reupload,\n }),\n [\n showRestore,\n uploadStatus,\n error,\n title,\n subtitle,\n uploadDate,\n size,\n id,\n onDownload,\n onDelete,\n onRestore,\n downloadLink,\n download,\n disableButtons,\n isClickable,\n target,\n showDelete,\n customIcon,\n iconStyle,\n progressBar,\n progressBarAvailable,\n customContent,\n truncate,\n imageUrl,\n backgroundColor,\n actionsPresent,\n reupload,\n ],\n );\n};\n"],"names":["useMemo"],"mappings":";;;;;;AAQO,IAAM,eAAe,GAAG,UAC3B,KAA2B,EAAA;AAGvB,IAAA,IAAA,
|
|
1
|
+
{"version":3,"file":"use-context-value.js","sources":["../../src/context/use-context-value.ts"],"sourcesContent":["import { type ContextType, useMemo } from 'react';\n\nimport { type FileUploadItemProps } from '../types/file-upload-item-props';\n\nimport { type FileUploadItemContext } from './file-upload-item-context';\n\ntype UseContextValueProps = Omit<FileUploadItemProps, 'className' | 'dataTestId' | 'children'>;\n\nexport const useContextValue = (\n props: UseContextValueProps,\n): ContextType<typeof FileUploadItemContext> => {\n const {\n id = '0',\n title = '',\n isClickable = true,\n iconStyle = 'gray',\n progressBar = 0,\n progressBarAvailable = true,\n showRestore,\n uploadStatus,\n error,\n subtitle,\n subtitleColor = 'secondary',\n uploadDate,\n size,\n onDownload,\n onDelete,\n onRestore,\n downloadLink,\n download,\n disableButtons,\n target,\n showDelete,\n customIcon,\n customContent,\n truncate,\n imageUrl,\n backgroundColor,\n reupload,\n } = props;\n\n const actionsPresent = Boolean(\n showRestore || downloadLink || showDelete || onDownload || reupload,\n );\n\n return useMemo(\n () => ({\n showRestore,\n uploadStatus,\n error,\n title,\n subtitle,\n subtitleColor,\n uploadDate,\n size,\n id,\n onDownload,\n onDelete,\n onRestore,\n downloadLink,\n download,\n disableButtons,\n isClickable,\n target,\n showDelete,\n customIcon,\n iconStyle,\n progressBar,\n progressBarAvailable,\n customContent,\n truncate,\n imageUrl,\n backgroundColor,\n actionsPresent,\n reupload,\n }),\n [\n showRestore,\n uploadStatus,\n error,\n title,\n subtitle,\n subtitleColor,\n uploadDate,\n size,\n id,\n onDownload,\n onDelete,\n onRestore,\n downloadLink,\n download,\n disableButtons,\n isClickable,\n target,\n showDelete,\n customIcon,\n iconStyle,\n progressBar,\n progressBarAvailable,\n customContent,\n truncate,\n imageUrl,\n backgroundColor,\n actionsPresent,\n reupload,\n ],\n );\n};\n"],"names":["useMemo"],"mappings":";;;;;;AAQO,IAAM,eAAe,GAAG,UAC3B,KAA2B,EAAA;AAGvB,IAAA,IAAA,KA2BA,KAAK,CAAA,EA3BG,EAAR,EAAE,mBAAG,GAAG,GAAA,EAAA,EACR,EAAA,GA0BA,KAAK,CA1BK,KAAA,EAAV,KAAK,GAAA,EAAA,KAAA,MAAA,GAAG,EAAE,GAAA,EAAA,EACV,EAyBA,GAAA,KAAK,YAzBa,EAAlB,WAAW,GAAG,EAAA,KAAA,MAAA,GAAA,IAAI,KAAA,EAClB,EAAA,GAwBA,KAAK,CAAA,SAxBa,EAAlB,SAAS,GAAA,EAAA,KAAA,MAAA,GAAG,MAAM,GAAA,EAAA,EAClB,KAuBA,KAAK,CAAA,WAvBU,EAAf,WAAW,mBAAG,CAAC,GAAA,EAAA,EACf,EAAA,GAsBA,KAAK,CAtBsB,oBAAA,EAA3B,oBAAoB,GAAA,EAAA,KAAA,MAAA,GAAG,IAAI,GAAA,EAAA,EAC3B,WAAW,GAqBX,KAAK,YArBM,EACX,YAAY,GAoBZ,KAAK,aApBO,EACZ,KAAK,GAmBL,KAAK,MAnBA,EACL,QAAQ,GAkBR,KAAK,SAlBG,EACR,EAAA,GAiBA,KAAK,CAjBsB,aAAA,EAA3B,aAAa,GAAG,EAAA,KAAA,MAAA,GAAA,WAAW,GAAA,EAAA,EAC3B,UAAU,GAgBV,KAAK,CAhBK,UAAA,EACV,IAAI,GAeJ,KAAK,CAfD,IAAA,EACJ,UAAU,GAcV,KAAK,CAdK,UAAA,EACV,QAAQ,GAaR,KAAK,CAbG,QAAA,EACR,SAAS,GAYT,KAAK,CAZI,SAAA,EACT,YAAY,GAWZ,KAAK,CAXO,YAAA,EACZ,QAAQ,GAUR,KAAK,SAVG,EACR,cAAc,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A,cAAA;AACd,QAAA,QAAQ,EAAA,QAAA;KACX,EAAC,EAAA,EACF;QACI,WAAW;QACX,YAAY;QACZ,KAAK;QACL,KAAK;QACL,QAAQ;QACR,aAAa;QACb,UAAU;QACV,IAAI;QACJ,EAAE;QACF,UAAU;QACV,QAAQ;QACR,SAAS;QACT,YAAY;QACZ,QAAQ;QACR,cAAc;QACd,WAAW;QACX,MAAM;QACN,UAAU;QACV,UAAU;QACV,SAAS;QACT,WAAW;QACX,oBAAoB;QACpB,aAAa;QACb,QAAQ;QACR,QAAQ;QACR,eAAe;QACf,cAAc;QACd,QAAQ;AACX,KAAA,CACJ;AACL;;;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ElementType, type HTMLAttributeAnchorTarget, type MouseEvent, type ReactNode } from 'react';
|
|
2
|
+
import { type Color } from '@alfalab/core-components-typography/cssm';
|
|
2
3
|
import { type FileUploadItemStatus } from './status';
|
|
3
4
|
export interface FileUploadItemProps {
|
|
4
5
|
/**
|
|
@@ -17,6 +18,11 @@ export interface FileUploadItemProps {
|
|
|
17
18
|
* Подзаголовок файла
|
|
18
19
|
*/
|
|
19
20
|
subtitle?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Цвет подзаголовка (Typography Color)
|
|
23
|
+
* @default secondary
|
|
24
|
+
*/
|
|
25
|
+
subtitleColor?: Color;
|
|
20
26
|
/**
|
|
21
27
|
* Размер файла
|
|
22
28
|
*/
|
|
@@ -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_1csd1 {
|
|
6
6
|
display: flex;
|
|
7
7
|
max-width: 144px;
|
|
8
8
|
}
|
|
9
|
-
.file-upload-
|
|
9
|
+
.file-upload-item__container_1csd1 .file-upload-item__icon_1csd1 {
|
|
10
10
|
width: 48px;
|
|
11
11
|
height: 48px;
|
|
12
12
|
}
|
|
13
|
-
.file-upload-
|
|
13
|
+
.file-upload-item__deleteIconColor_1csd1 {
|
|
14
14
|
fill: var(--color-light-text-tertiary);
|
|
15
15
|
}
|
|
16
|
-
.file-upload-
|
|
16
|
+
.file-upload-item__deleteIconColor_1csd1:hover {
|
|
17
17
|
fill: var(--color-light-text-tertiary-hover);
|
|
18
18
|
}
|
|
19
|
-
.file-upload-
|
|
19
|
+
.file-upload-item__downloadIconColor_1csd1 {
|
|
20
20
|
fill: var(--color-light-text-tertiary);
|
|
21
21
|
}
|
|
22
|
-
.file-upload-
|
|
22
|
+
.file-upload-item__downloadIconColor_1csd1:hover {
|
|
23
23
|
fill: var(--color-light-text-tertiary-hover);
|
|
24
24
|
}
|
|
25
|
-
.file-upload-
|
|
25
|
+
.file-upload-item__restoreIconColor_1csd1 {
|
|
26
26
|
fill: var(--color-light-text-tertiary);
|
|
27
27
|
}
|
|
28
|
-
.file-upload-
|
|
28
|
+
.file-upload-item__restoreIconColor_1csd1:hover {
|
|
29
29
|
fill: var(--color-light-text-tertiary-hover);
|
|
30
30
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './actions-control.css';
|
|
2
2
|
|
|
3
|
-
var styles = {"container":"file-upload-
|
|
3
|
+
var styles = {"container":"file-upload-item__container_1csd1","icon":"file-upload-item__icon_1csd1","deleteIconColor":"file-upload-item__deleteIconColor_1csd1","downloadIconColor":"file-upload-item__downloadIconColor_1csd1","restoreIconColor":"file-upload-item__restoreIconColor_1csd1"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
6
6
|
//# sourceMappingURL=actions-control.module.css.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
--gap-8: 8px;
|
|
3
3
|
}
|
|
4
|
-
.file-upload-
|
|
4
|
+
.file-upload-item__subtitle_1k6jr {
|
|
5
5
|
display: block;
|
|
6
6
|
}
|
|
7
|
-
.file-upload-
|
|
7
|
+
.file-upload-item__subtitle_1k6jr.file-upload-item__truncate_1k6jr {
|
|
8
8
|
white-space: nowrap;
|
|
9
9
|
overflow: hidden;
|
|
10
10
|
text-overflow: ellipsis;
|
|
11
11
|
}
|
|
12
|
-
.file-upload-
|
|
12
|
+
.file-upload-item__size_1k6jr {
|
|
13
13
|
margin-right: var(--gap-8);
|
|
14
14
|
}
|