@alfalab/core-components-file-upload-item 8.2.3 → 8.2.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.
Files changed (49) hide show
  1. package/components/actions-control/actions-control.css +8 -8
  2. package/components/actions-control/actions-control.module.css.js +1 -1
  3. package/components/content/components/content-error/content-error.css +1 -1
  4. package/components/content/components/content-error/content-error.module.css.js +1 -1
  5. package/components/content/components/content-subtitle/content-subtitle.css +3 -3
  6. package/components/content/components/content-subtitle/content-subtitle.module.css.js +1 -1
  7. package/components/content/content.css +7 -7
  8. package/components/content/content.module.css.js +1 -1
  9. package/components/status-control/extension-icon/index.css +6 -6
  10. package/components/status-control/extension-icon/index.module.css.js +1 -1
  11. package/components/status-control/index.css +8 -8
  12. package/components/status-control/index.module.css.js +1 -1
  13. package/cssm/types/file-upload-item-props.d.ts +7 -2
  14. package/esm/components/actions-control/actions-control.css +8 -8
  15. package/esm/components/actions-control/actions-control.module.css.js +1 -1
  16. package/esm/components/content/components/content-error/content-error.css +1 -1
  17. package/esm/components/content/components/content-error/content-error.module.css.js +1 -1
  18. package/esm/components/content/components/content-subtitle/content-subtitle.css +3 -3
  19. package/esm/components/content/components/content-subtitle/content-subtitle.module.css.js +1 -1
  20. package/esm/components/content/content.css +7 -7
  21. package/esm/components/content/content.module.css.js +1 -1
  22. package/esm/components/status-control/extension-icon/index.css +6 -6
  23. package/esm/components/status-control/extension-icon/index.module.css.js +1 -1
  24. package/esm/components/status-control/index.css +8 -8
  25. package/esm/components/status-control/index.module.css.js +1 -1
  26. package/esm/index.css +2 -2
  27. package/esm/index.module.css.js +1 -1
  28. package/esm/types/file-upload-item-props.d.ts +7 -2
  29. package/index.css +2 -2
  30. package/index.module.css.js +1 -1
  31. package/modern/components/actions-control/actions-control.css +8 -8
  32. package/modern/components/actions-control/actions-control.module.css.js +1 -1
  33. package/modern/components/content/components/content-error/content-error.css +1 -1
  34. package/modern/components/content/components/content-error/content-error.module.css.js +1 -1
  35. package/modern/components/content/components/content-subtitle/content-subtitle.css +3 -3
  36. package/modern/components/content/components/content-subtitle/content-subtitle.module.css.js +1 -1
  37. package/modern/components/content/content.css +7 -7
  38. package/modern/components/content/content.module.css.js +1 -1
  39. package/modern/components/status-control/extension-icon/index.css +6 -6
  40. package/modern/components/status-control/extension-icon/index.module.css.js +1 -1
  41. package/modern/components/status-control/index.css +8 -8
  42. package/modern/components/status-control/index.module.css.js +1 -1
  43. package/modern/index.css +2 -2
  44. package/modern/index.module.css.js +1 -1
  45. package/modern/types/file-upload-item-props.d.ts +7 -2
  46. package/moderncssm/types/file-upload-item-props.d.ts +7 -2
  47. package/package.json +2 -2
  48. package/src/types/file-upload-item-props.ts +7 -2
  49. package/types/file-upload-item-props.d.ts +7 -2
@@ -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-item__container_66jwx {
5
+ .file-upload-item__container_5bu57 {
6
6
  display: flex;
7
7
  max-width: 144px;
8
8
  }
9
- .file-upload-item__container_66jwx .file-upload-item__icon_66jwx {
9
+ .file-upload-item__container_5bu57 .file-upload-item__icon_5bu57 {
10
10
  width: 48px;
11
11
  height: 48px;
12
12
  }
13
- .file-upload-item__deleteIconColor_66jwx {
13
+ .file-upload-item__deleteIconColor_5bu57 {
14
14
  fill: var(--color-light-text-tertiary);
15
15
  }
16
- .file-upload-item__deleteIconColor_66jwx:hover {
16
+ .file-upload-item__deleteIconColor_5bu57:hover {
17
17
  fill: var(--color-light-text-tertiary-hover);
18
18
  }
19
- .file-upload-item__downloadIconColor_66jwx {
19
+ .file-upload-item__downloadIconColor_5bu57 {
20
20
  fill: var(--color-light-text-tertiary);
21
21
  }
22
- .file-upload-item__downloadIconColor_66jwx:hover {
22
+ .file-upload-item__downloadIconColor_5bu57:hover {
23
23
  fill: var(--color-light-text-tertiary-hover);
24
24
  }
25
- .file-upload-item__restoreIconColor_66jwx {
25
+ .file-upload-item__restoreIconColor_5bu57 {
26
26
  fill: var(--color-light-text-tertiary);
27
27
  }
28
- .file-upload-item__restoreIconColor_66jwx:hover {
28
+ .file-upload-item__restoreIconColor_5bu57: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-item__container_66jwx","icon":"file-upload-item__icon_66jwx","deleteIconColor":"file-upload-item__deleteIconColor_66jwx","downloadIconColor":"file-upload-item__downloadIconColor_66jwx","restoreIconColor":"file-upload-item__restoreIconColor_66jwx"};
5
+ var styles = {"container":"file-upload-item__container_5bu57","icon":"file-upload-item__icon_5bu57","deleteIconColor":"file-upload-item__deleteIconColor_5bu57","downloadIconColor":"file-upload-item__downloadIconColor_5bu57","restoreIconColor":"file-upload-item__restoreIconColor_5bu57"};
6
6
 
7
7
  module.exports = styles;
8
8
  //# sourceMappingURL=actions-control.module.css.js.map
@@ -1,3 +1,3 @@
1
- .file-upload-item__errorItem_6mn8k {
1
+ .file-upload-item__errorItem_1naqo {
2
2
  display: block;
3
3
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./content-error.css');
4
4
 
5
- var styles = {"errorItem":"file-upload-item__errorItem_6mn8k"};
5
+ var styles = {"errorItem":"file-upload-item__errorItem_1naqo"};
6
6
 
7
7
  module.exports = styles;
8
8
  //# sourceMappingURL=content-error.module.css.js.map
@@ -1,14 +1,14 @@
1
1
  :root {
2
2
  --gap-8: 8px;
3
3
  }
4
- .file-upload-item__subtitle_1u28c {
4
+ .file-upload-item__subtitle_slym2 {
5
5
  display: block;
6
6
  }
7
- .file-upload-item__subtitle_1u28c.file-upload-item__truncate_1u28c {
7
+ .file-upload-item__subtitle_slym2.file-upload-item__truncate_slym2 {
8
8
  white-space: nowrap;
9
9
  overflow: hidden;
10
10
  text-overflow: ellipsis;
11
11
  }
12
- .file-upload-item__size_1u28c {
12
+ .file-upload-item__size_slym2 {
13
13
  margin-right: var(--gap-8);
14
14
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./content-subtitle.css');
4
4
 
5
- var styles = {"subtitle":"file-upload-item__subtitle_1u28c","truncate":"file-upload-item__truncate_1u28c","size":"file-upload-item__size_1u28c"};
5
+ var styles = {"subtitle":"file-upload-item__subtitle_slym2","truncate":"file-upload-item__truncate_slym2","size":"file-upload-item__size_slym2"};
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-item__container_rm0od {
9
+ .file-upload-item__container_qrawo {
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-item__container_rm0od.file-upload-item__clickable_rm0od {
14
+ .file-upload-item__container_qrawo.file-upload-item__clickable_qrawo {
15
15
  cursor: pointer;
16
16
  }
17
- .file-upload-item__container_rm0od.file-upload-item__single_rm0od {
17
+ .file-upload-item__container_qrawo.file-upload-item__single_qrawo {
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-item__container_rm0od.file-upload-item__single_rm0od .file-upload-item__title_rm0od {
24
+ .file-upload-item__container_qrawo.file-upload-item__single_qrawo .file-upload-item__title_qrawo {
25
25
  margin-bottom: 0;
26
26
  }
27
- .file-upload-item__container_rm0od .file-upload-item__title_rm0od {
27
+ .file-upload-item__container_qrawo .file-upload-item__title_qrawo {
28
28
  margin-bottom: var(--gap-4);
29
29
  display: block;
30
30
  overflow-wrap: break-word;
31
31
  }
32
- .file-upload-item__container_rm0od .file-upload-item__title_rm0od.file-upload-item__truncate_rm0od {
32
+ .file-upload-item__container_qrawo .file-upload-item__title_qrawo.file-upload-item__truncate_qrawo {
33
33
  white-space: nowrap;
34
34
  overflow: hidden;
35
35
  text-overflow: ellipsis;
36
36
  }
37
- .file-upload-item__container_rm0od .file-upload-item__title_rm0od.file-upload-item__restore_rm0od {
37
+ .file-upload-item__container_qrawo .file-upload-item__title_qrawo.file-upload-item__restore_qrawo {
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-item__container_rm0od","clickable":"file-upload-item__clickable_rm0od","single":"file-upload-item__single_rm0od","title":"file-upload-item__title_rm0od","truncate":"file-upload-item__truncate_rm0od","restore":"file-upload-item__restore_rm0od"};
5
+ var styles = {"container":"file-upload-item__container_qrawo","clickable":"file-upload-item__clickable_qrawo","single":"file-upload-item__single_qrawo","title":"file-upload-item__title_qrawo","truncate":"file-upload-item__truncate_qrawo","restore":"file-upload-item__restore_qrawo"};
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-item__iconPDFColored_mfb2c {
11
+ .file-upload-item__iconPDFColored_1cq84 {
12
12
  fill: var(--color-light-decorative-red);
13
13
  }
14
- .file-upload-item__iconDOCColored_mfb2c {
14
+ .file-upload-item__iconDOCColored_1cq84 {
15
15
  fill: var(--color-light-decorative-blue);
16
16
  }
17
- .file-upload-item__iconExcelColored_mfb2c {
17
+ .file-upload-item__iconExcelColored_1cq84 {
18
18
  fill: var(--color-light-decorative-green);
19
19
  }
20
- .file-upload-item__icon1CColored_mfb2c {
20
+ .file-upload-item__icon1CColored_1cq84 {
21
21
  fill: var(--color-light-decorative-orange);
22
22
  }
23
- .file-upload-item__iconDocumentColored_mfb2c {
23
+ .file-upload-item__iconDocumentColored_1cq84 {
24
24
  fill: var(--color-light-neutral-translucent-1300);
25
25
  }
26
- .file-upload-item__iconArchiveColored_mfb2c {
26
+ .file-upload-item__iconArchiveColored_1cq84 {
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-item__iconPDFColored_mfb2c","iconDOCColored":"file-upload-item__iconDOCColored_mfb2c","iconExcelColored":"file-upload-item__iconExcelColored_mfb2c","icon1CColored":"file-upload-item__icon1CColored_mfb2c","iconDocumentColored":"file-upload-item__iconDocumentColored_mfb2c","iconArchiveColored":"file-upload-item__iconArchiveColored_mfb2c"};
5
+ var styles = {"iconPDFColored":"file-upload-item__iconPDFColored_1cq84","iconDOCColored":"file-upload-item__iconDOCColored_1cq84","iconExcelColored":"file-upload-item__iconExcelColored_1cq84","icon1CColored":"file-upload-item__icon1CColored_1cq84","iconDocumentColored":"file-upload-item__iconDocumentColored_1cq84","iconArchiveColored":"file-upload-item__iconArchiveColored_1cq84"};
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-item__container_j3int {
9
+ .file-upload-item__container_19efp {
10
10
  position: relative;
11
11
  }
12
- .file-upload-item__container_j3int.file-upload-item__clickable_j3int {
12
+ .file-upload-item__container_19efp.file-upload-item__clickable_19efp {
13
13
  cursor: pointer;
14
14
  }
15
- .file-upload-item__container_j3int .file-upload-item__progress_j3int {
15
+ .file-upload-item__container_19efp .file-upload-item__progress_19efp {
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-item__container_j3int .file-upload-item__progress_j3int.file-upload-item__success_j3int,
23
- .file-upload-item__container_j3int .file-upload-item__progress_j3int.file-upload-item__error_j3int {
22
+ .file-upload-item__container_19efp .file-upload-item__progress_19efp.file-upload-item__success_19efp,
23
+ .file-upload-item__container_19efp .file-upload-item__progress_19efp.file-upload-item__error_19efp {
24
24
  transition: opacity 400ms ease-in;
25
25
  opacity: 0;
26
26
  }
27
- .file-upload-item__container_j3int .file-upload-item__progress_j3int.file-upload-item__success_j3int path {
27
+ .file-upload-item__container_19efp .file-upload-item__progress_19efp.file-upload-item__success_19efp path {
28
28
  stroke: var(--color-light-status-positive);
29
29
  }
30
- .file-upload-item__container_j3int .file-upload-item__progress_j3int.file-upload-item__loading_j3int {
30
+ .file-upload-item__container_19efp .file-upload-item__progress_19efp.file-upload-item__loading_19efp {
31
31
  color: var(--color-light-neutral-500);
32
32
  }
33
- .file-upload-item__container_j3int .file-upload-item__progress_j3int.file-upload-item__error_j3int path {
33
+ .file-upload-item__container_19efp .file-upload-item__progress_19efp.file-upload-item__error_19efp 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-item__container_j3int","clickable":"file-upload-item__clickable_j3int","progress":"file-upload-item__progress_j3int","success":"file-upload-item__success_j3int","error":"file-upload-item__error_j3int","loading":"file-upload-item__loading_j3int"};
5
+ var styles = {"container":"file-upload-item__container_19efp","clickable":"file-upload-item__clickable_19efp","progress":"file-upload-item__progress_19efp","success":"file-upload-item__success_19efp","error":"file-upload-item__error_19efp","loading":"file-upload-item__loading_19efp"};
6
6
 
7
7
  module.exports = styles;
8
8
  //# sourceMappingURL=index.module.css.js.map
@@ -32,7 +32,10 @@ export interface FileUploadItemProps {
32
32
  */
33
33
  uploadDate?: string;
34
34
  /**
35
- * Ссылка на файл. Если прокидывается этот параметр, то появляется кнопка скачивания
35
+ * Ссылка на файл.
36
+ * Если передан `downloadLink` или `onDownload`, отображается кнопка скачивания.
37
+ * По клику на кнопку браузер переходит по ссылке (или скачивает файл, если передан `download`).
38
+ * Если вместе с `downloadLink` передан `onDownload`, переход по ссылке отменяется и вызывается только `onDownload`.
36
39
  */
37
40
  downloadLink?: string;
38
41
  /**
@@ -68,7 +71,9 @@ export interface FileUploadItemProps {
68
71
  */
69
72
  children?: ReactNode;
70
73
  /**
71
- * Обработчик загрузки файла
74
+ * Обработчик клика по кнопке скачивания файла.
75
+ * Если передан `onDownload` или `downloadLink`, отображается кнопка скачивания.
76
+ * Если вместе с `onDownload` передан `downloadLink`, переход по ссылке отменяется и вызывается только `onDownload`.
72
77
  */
73
78
  onDownload?: (id: string) => void;
74
79
  /**
@@ -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-item__container_66jwx {
5
+ .file-upload-item__container_5bu57 {
6
6
  display: flex;
7
7
  max-width: 144px;
8
8
  }
9
- .file-upload-item__container_66jwx .file-upload-item__icon_66jwx {
9
+ .file-upload-item__container_5bu57 .file-upload-item__icon_5bu57 {
10
10
  width: 48px;
11
11
  height: 48px;
12
12
  }
13
- .file-upload-item__deleteIconColor_66jwx {
13
+ .file-upload-item__deleteIconColor_5bu57 {
14
14
  fill: var(--color-light-text-tertiary);
15
15
  }
16
- .file-upload-item__deleteIconColor_66jwx:hover {
16
+ .file-upload-item__deleteIconColor_5bu57:hover {
17
17
  fill: var(--color-light-text-tertiary-hover);
18
18
  }
19
- .file-upload-item__downloadIconColor_66jwx {
19
+ .file-upload-item__downloadIconColor_5bu57 {
20
20
  fill: var(--color-light-text-tertiary);
21
21
  }
22
- .file-upload-item__downloadIconColor_66jwx:hover {
22
+ .file-upload-item__downloadIconColor_5bu57:hover {
23
23
  fill: var(--color-light-text-tertiary-hover);
24
24
  }
25
- .file-upload-item__restoreIconColor_66jwx {
25
+ .file-upload-item__restoreIconColor_5bu57 {
26
26
  fill: var(--color-light-text-tertiary);
27
27
  }
28
- .file-upload-item__restoreIconColor_66jwx:hover {
28
+ .file-upload-item__restoreIconColor_5bu57: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-item__container_66jwx","icon":"file-upload-item__icon_66jwx","deleteIconColor":"file-upload-item__deleteIconColor_66jwx","downloadIconColor":"file-upload-item__downloadIconColor_66jwx","restoreIconColor":"file-upload-item__restoreIconColor_66jwx"};
3
+ var styles = {"container":"file-upload-item__container_5bu57","icon":"file-upload-item__icon_5bu57","deleteIconColor":"file-upload-item__deleteIconColor_5bu57","downloadIconColor":"file-upload-item__downloadIconColor_5bu57","restoreIconColor":"file-upload-item__restoreIconColor_5bu57"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=actions-control.module.css.js.map
@@ -1,3 +1,3 @@
1
- .file-upload-item__errorItem_6mn8k {
1
+ .file-upload-item__errorItem_1naqo {
2
2
  display: block;
3
3
  }
@@ -1,6 +1,6 @@
1
1
  import './content-error.css';
2
2
 
3
- var styles = {"errorItem":"file-upload-item__errorItem_6mn8k"};
3
+ var styles = {"errorItem":"file-upload-item__errorItem_1naqo"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=content-error.module.css.js.map
@@ -1,14 +1,14 @@
1
1
  :root {
2
2
  --gap-8: 8px;
3
3
  }
4
- .file-upload-item__subtitle_1u28c {
4
+ .file-upload-item__subtitle_slym2 {
5
5
  display: block;
6
6
  }
7
- .file-upload-item__subtitle_1u28c.file-upload-item__truncate_1u28c {
7
+ .file-upload-item__subtitle_slym2.file-upload-item__truncate_slym2 {
8
8
  white-space: nowrap;
9
9
  overflow: hidden;
10
10
  text-overflow: ellipsis;
11
11
  }
12
- .file-upload-item__size_1u28c {
12
+ .file-upload-item__size_slym2 {
13
13
  margin-right: var(--gap-8);
14
14
  }
@@ -1,6 +1,6 @@
1
1
  import './content-subtitle.css';
2
2
 
3
- var styles = {"subtitle":"file-upload-item__subtitle_1u28c","truncate":"file-upload-item__truncate_1u28c","size":"file-upload-item__size_1u28c"};
3
+ var styles = {"subtitle":"file-upload-item__subtitle_slym2","truncate":"file-upload-item__truncate_slym2","size":"file-upload-item__size_slym2"};
4
4
 
5
5
  export { styles as default };
6
6
  //# 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-item__container_rm0od {
9
+ .file-upload-item__container_qrawo {
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-item__container_rm0od.file-upload-item__clickable_rm0od {
14
+ .file-upload-item__container_qrawo.file-upload-item__clickable_qrawo {
15
15
  cursor: pointer;
16
16
  }
17
- .file-upload-item__container_rm0od.file-upload-item__single_rm0od {
17
+ .file-upload-item__container_qrawo.file-upload-item__single_qrawo {
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-item__container_rm0od.file-upload-item__single_rm0od .file-upload-item__title_rm0od {
24
+ .file-upload-item__container_qrawo.file-upload-item__single_qrawo .file-upload-item__title_qrawo {
25
25
  margin-bottom: 0;
26
26
  }
27
- .file-upload-item__container_rm0od .file-upload-item__title_rm0od {
27
+ .file-upload-item__container_qrawo .file-upload-item__title_qrawo {
28
28
  margin-bottom: var(--gap-4);
29
29
  display: block;
30
30
  overflow-wrap: break-word;
31
31
  }
32
- .file-upload-item__container_rm0od .file-upload-item__title_rm0od.file-upload-item__truncate_rm0od {
32
+ .file-upload-item__container_qrawo .file-upload-item__title_qrawo.file-upload-item__truncate_qrawo {
33
33
  white-space: nowrap;
34
34
  overflow: hidden;
35
35
  text-overflow: ellipsis;
36
36
  }
37
- .file-upload-item__container_rm0od .file-upload-item__title_rm0od.file-upload-item__restore_rm0od {
37
+ .file-upload-item__container_qrawo .file-upload-item__title_qrawo.file-upload-item__restore_qrawo {
38
38
  color: var(--color-light-text-tertiary);
39
39
  }
@@ -1,6 +1,6 @@
1
1
  import './content.css';
2
2
 
3
- var styles = {"container":"file-upload-item__container_rm0od","clickable":"file-upload-item__clickable_rm0od","single":"file-upload-item__single_rm0od","title":"file-upload-item__title_rm0od","truncate":"file-upload-item__truncate_rm0od","restore":"file-upload-item__restore_rm0od"};
3
+ var styles = {"container":"file-upload-item__container_qrawo","clickable":"file-upload-item__clickable_qrawo","single":"file-upload-item__single_qrawo","title":"file-upload-item__title_qrawo","truncate":"file-upload-item__truncate_qrawo","restore":"file-upload-item__restore_qrawo"};
4
4
 
5
5
  export { styles as default };
6
6
  //# 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-item__iconPDFColored_mfb2c {
11
+ .file-upload-item__iconPDFColored_1cq84 {
12
12
  fill: var(--color-light-decorative-red);
13
13
  }
14
- .file-upload-item__iconDOCColored_mfb2c {
14
+ .file-upload-item__iconDOCColored_1cq84 {
15
15
  fill: var(--color-light-decorative-blue);
16
16
  }
17
- .file-upload-item__iconExcelColored_mfb2c {
17
+ .file-upload-item__iconExcelColored_1cq84 {
18
18
  fill: var(--color-light-decorative-green);
19
19
  }
20
- .file-upload-item__icon1CColored_mfb2c {
20
+ .file-upload-item__icon1CColored_1cq84 {
21
21
  fill: var(--color-light-decorative-orange);
22
22
  }
23
- .file-upload-item__iconDocumentColored_mfb2c {
23
+ .file-upload-item__iconDocumentColored_1cq84 {
24
24
  fill: var(--color-light-neutral-translucent-1300);
25
25
  }
26
- .file-upload-item__iconArchiveColored_mfb2c {
26
+ .file-upload-item__iconArchiveColored_1cq84 {
27
27
  fill: var(--color-light-status-attention);
28
28
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- var styles = {"iconPDFColored":"file-upload-item__iconPDFColored_mfb2c","iconDOCColored":"file-upload-item__iconDOCColored_mfb2c","iconExcelColored":"file-upload-item__iconExcelColored_mfb2c","icon1CColored":"file-upload-item__icon1CColored_mfb2c","iconDocumentColored":"file-upload-item__iconDocumentColored_mfb2c","iconArchiveColored":"file-upload-item__iconArchiveColored_mfb2c"};
3
+ var styles = {"iconPDFColored":"file-upload-item__iconPDFColored_1cq84","iconDOCColored":"file-upload-item__iconDOCColored_1cq84","iconExcelColored":"file-upload-item__iconExcelColored_1cq84","icon1CColored":"file-upload-item__icon1CColored_1cq84","iconDocumentColored":"file-upload-item__iconDocumentColored_1cq84","iconArchiveColored":"file-upload-item__iconArchiveColored_1cq84"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -6,30 +6,30 @@
6
6
  :root {
7
7
  --gap-4-neg: -4px;
8
8
  }
9
- .file-upload-item__container_j3int {
9
+ .file-upload-item__container_19efp {
10
10
  position: relative;
11
11
  }
12
- .file-upload-item__container_j3int.file-upload-item__clickable_j3int {
12
+ .file-upload-item__container_19efp.file-upload-item__clickable_19efp {
13
13
  cursor: pointer;
14
14
  }
15
- .file-upload-item__container_j3int .file-upload-item__progress_j3int {
15
+ .file-upload-item__container_19efp .file-upload-item__progress_19efp {
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-item__container_j3int .file-upload-item__progress_j3int.file-upload-item__success_j3int,
23
- .file-upload-item__container_j3int .file-upload-item__progress_j3int.file-upload-item__error_j3int {
22
+ .file-upload-item__container_19efp .file-upload-item__progress_19efp.file-upload-item__success_19efp,
23
+ .file-upload-item__container_19efp .file-upload-item__progress_19efp.file-upload-item__error_19efp {
24
24
  transition: opacity 400ms ease-in;
25
25
  opacity: 0;
26
26
  }
27
- .file-upload-item__container_j3int .file-upload-item__progress_j3int.file-upload-item__success_j3int path {
27
+ .file-upload-item__container_19efp .file-upload-item__progress_19efp.file-upload-item__success_19efp path {
28
28
  stroke: var(--color-light-status-positive);
29
29
  }
30
- .file-upload-item__container_j3int .file-upload-item__progress_j3int.file-upload-item__loading_j3int {
30
+ .file-upload-item__container_19efp .file-upload-item__progress_19efp.file-upload-item__loading_19efp {
31
31
  color: var(--color-light-neutral-500);
32
32
  }
33
- .file-upload-item__container_j3int .file-upload-item__progress_j3int.file-upload-item__error_j3int path {
33
+ .file-upload-item__container_19efp .file-upload-item__progress_19efp.file-upload-item__error_19efp path {
34
34
  stroke: var(--color-light-status-negative);
35
35
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- var styles = {"container":"file-upload-item__container_j3int","clickable":"file-upload-item__clickable_j3int","progress":"file-upload-item__progress_j3int","success":"file-upload-item__success_j3int","error":"file-upload-item__error_j3int","loading":"file-upload-item__loading_j3int"};
3
+ var styles = {"container":"file-upload-item__container_19efp","clickable":"file-upload-item__clickable_19efp","progress":"file-upload-item__progress_19efp","success":"file-upload-item__success_19efp","error":"file-upload-item__error_19efp","loading":"file-upload-item__loading_19efp"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
package/esm/index.css CHANGED
@@ -2,14 +2,14 @@
2
2
  --gap-2: 2px;
3
3
  --gap-12: 12px;
4
4
  }
5
- .file-upload-item__component_27zoh {
5
+ .file-upload-item__component_13o9f {
6
6
  box-sizing: border-box;
7
7
  display: flex;
8
8
  align-items: flex-start;
9
9
  width: 100%;
10
10
  min-height: 48px;
11
11
  }
12
- .file-upload-item__restore_27zoh {
12
+ .file-upload-item__restore_13o9f {
13
13
  margin-left: var(--gap-12);
14
14
  margin-top: var(--gap-2);
15
15
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- var styles = {"component":"file-upload-item__component_27zoh","restore":"file-upload-item__restore_27zoh"};
3
+ var styles = {"component":"file-upload-item__component_13o9f","restore":"file-upload-item__restore_13o9f"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -32,7 +32,10 @@ export interface FileUploadItemProps {
32
32
  */
33
33
  uploadDate?: string;
34
34
  /**
35
- * Ссылка на файл. Если прокидывается этот параметр, то появляется кнопка скачивания
35
+ * Ссылка на файл.
36
+ * Если передан `downloadLink` или `onDownload`, отображается кнопка скачивания.
37
+ * По клику на кнопку браузер переходит по ссылке (или скачивает файл, если передан `download`).
38
+ * Если вместе с `downloadLink` передан `onDownload`, переход по ссылке отменяется и вызывается только `onDownload`.
36
39
  */
37
40
  downloadLink?: string;
38
41
  /**
@@ -68,7 +71,9 @@ export interface FileUploadItemProps {
68
71
  */
69
72
  children?: ReactNode;
70
73
  /**
71
- * Обработчик загрузки файла
74
+ * Обработчик клика по кнопке скачивания файла.
75
+ * Если передан `onDownload` или `downloadLink`, отображается кнопка скачивания.
76
+ * Если вместе с `onDownload` передан `downloadLink`, переход по ссылке отменяется и вызывается только `onDownload`.
72
77
  */
73
78
  onDownload?: (id: string) => void;
74
79
  /**
package/index.css CHANGED
@@ -2,14 +2,14 @@
2
2
  --gap-2: 2px;
3
3
  --gap-12: 12px;
4
4
  }
5
- .file-upload-item__component_27zoh {
5
+ .file-upload-item__component_13o9f {
6
6
  box-sizing: border-box;
7
7
  display: flex;
8
8
  align-items: flex-start;
9
9
  width: 100%;
10
10
  min-height: 48px;
11
11
  }
12
- .file-upload-item__restore_27zoh {
12
+ .file-upload-item__restore_13o9f {
13
13
  margin-left: var(--gap-12);
14
14
  margin-top: var(--gap-2);
15
15
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./index.css');
4
4
 
5
- var styles = {"component":"file-upload-item__component_27zoh","restore":"file-upload-item__restore_27zoh"};
5
+ var styles = {"component":"file-upload-item__component_13o9f","restore":"file-upload-item__restore_13o9f"};
6
6
 
7
7
  module.exports = styles;
8
8
  //# sourceMappingURL=index.module.css.js.map
@@ -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-item__container_66jwx {
5
+ .file-upload-item__container_5bu57 {
6
6
  display: flex;
7
7
  max-width: 144px;
8
8
  }
9
- .file-upload-item__container_66jwx .file-upload-item__icon_66jwx {
9
+ .file-upload-item__container_5bu57 .file-upload-item__icon_5bu57 {
10
10
  width: 48px;
11
11
  height: 48px;
12
12
  }
13
- .file-upload-item__deleteIconColor_66jwx {
13
+ .file-upload-item__deleteIconColor_5bu57 {
14
14
  fill: var(--color-light-text-tertiary);
15
15
  }
16
- .file-upload-item__deleteIconColor_66jwx:hover {
16
+ .file-upload-item__deleteIconColor_5bu57:hover {
17
17
  fill: var(--color-light-text-tertiary-hover);
18
18
  }
19
- .file-upload-item__downloadIconColor_66jwx {
19
+ .file-upload-item__downloadIconColor_5bu57 {
20
20
  fill: var(--color-light-text-tertiary);
21
21
  }
22
- .file-upload-item__downloadIconColor_66jwx:hover {
22
+ .file-upload-item__downloadIconColor_5bu57:hover {
23
23
  fill: var(--color-light-text-tertiary-hover);
24
24
  }
25
- .file-upload-item__restoreIconColor_66jwx {
25
+ .file-upload-item__restoreIconColor_5bu57 {
26
26
  fill: var(--color-light-text-tertiary);
27
27
  }
28
- .file-upload-item__restoreIconColor_66jwx:hover {
28
+ .file-upload-item__restoreIconColor_5bu57: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
- const styles = {"container":"file-upload-item__container_66jwx","icon":"file-upload-item__icon_66jwx","deleteIconColor":"file-upload-item__deleteIconColor_66jwx","downloadIconColor":"file-upload-item__downloadIconColor_66jwx","restoreIconColor":"file-upload-item__restoreIconColor_66jwx"};
3
+ const styles = {"container":"file-upload-item__container_5bu57","icon":"file-upload-item__icon_5bu57","deleteIconColor":"file-upload-item__deleteIconColor_5bu57","downloadIconColor":"file-upload-item__downloadIconColor_5bu57","restoreIconColor":"file-upload-item__restoreIconColor_5bu57"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=actions-control.module.css.js.map
@@ -1,3 +1,3 @@
1
- .file-upload-item__errorItem_6mn8k {
1
+ .file-upload-item__errorItem_1naqo {
2
2
  display: block;
3
3
  }
@@ -1,6 +1,6 @@
1
1
  import './content-error.css';
2
2
 
3
- const styles = {"errorItem":"file-upload-item__errorItem_6mn8k"};
3
+ const styles = {"errorItem":"file-upload-item__errorItem_1naqo"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=content-error.module.css.js.map
@@ -1,14 +1,14 @@
1
1
  :root {
2
2
  --gap-8: 8px;
3
3
  }
4
- .file-upload-item__subtitle_1u28c {
4
+ .file-upload-item__subtitle_slym2 {
5
5
  display: block;
6
6
  }
7
- .file-upload-item__subtitle_1u28c.file-upload-item__truncate_1u28c {
7
+ .file-upload-item__subtitle_slym2.file-upload-item__truncate_slym2 {
8
8
  white-space: nowrap;
9
9
  overflow: hidden;
10
10
  text-overflow: ellipsis;
11
11
  }
12
- .file-upload-item__size_1u28c {
12
+ .file-upload-item__size_slym2 {
13
13
  margin-right: var(--gap-8);
14
14
  }
@@ -1,6 +1,6 @@
1
1
  import './content-subtitle.css';
2
2
 
3
- const styles = {"subtitle":"file-upload-item__subtitle_1u28c","truncate":"file-upload-item__truncate_1u28c","size":"file-upload-item__size_1u28c"};
3
+ const styles = {"subtitle":"file-upload-item__subtitle_slym2","truncate":"file-upload-item__truncate_slym2","size":"file-upload-item__size_slym2"};
4
4
 
5
5
  export { styles as default };
6
6
  //# 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-item__container_rm0od {
9
+ .file-upload-item__container_qrawo {
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-item__container_rm0od.file-upload-item__clickable_rm0od {
14
+ .file-upload-item__container_qrawo.file-upload-item__clickable_qrawo {
15
15
  cursor: pointer;
16
16
  }
17
- .file-upload-item__container_rm0od.file-upload-item__single_rm0od {
17
+ .file-upload-item__container_qrawo.file-upload-item__single_qrawo {
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-item__container_rm0od.file-upload-item__single_rm0od .file-upload-item__title_rm0od {
24
+ .file-upload-item__container_qrawo.file-upload-item__single_qrawo .file-upload-item__title_qrawo {
25
25
  margin-bottom: 0;
26
26
  }
27
- .file-upload-item__container_rm0od .file-upload-item__title_rm0od {
27
+ .file-upload-item__container_qrawo .file-upload-item__title_qrawo {
28
28
  margin-bottom: var(--gap-4);
29
29
  display: block;
30
30
  overflow-wrap: break-word;
31
31
  }
32
- .file-upload-item__container_rm0od .file-upload-item__title_rm0od.file-upload-item__truncate_rm0od {
32
+ .file-upload-item__container_qrawo .file-upload-item__title_qrawo.file-upload-item__truncate_qrawo {
33
33
  white-space: nowrap;
34
34
  overflow: hidden;
35
35
  text-overflow: ellipsis;
36
36
  }
37
- .file-upload-item__container_rm0od .file-upload-item__title_rm0od.file-upload-item__restore_rm0od {
37
+ .file-upload-item__container_qrawo .file-upload-item__title_qrawo.file-upload-item__restore_qrawo {
38
38
  color: var(--color-light-text-tertiary);
39
39
  }
@@ -1,6 +1,6 @@
1
1
  import './content.css';
2
2
 
3
- const styles = {"container":"file-upload-item__container_rm0od","clickable":"file-upload-item__clickable_rm0od","single":"file-upload-item__single_rm0od","title":"file-upload-item__title_rm0od","truncate":"file-upload-item__truncate_rm0od","restore":"file-upload-item__restore_rm0od"};
3
+ const styles = {"container":"file-upload-item__container_qrawo","clickable":"file-upload-item__clickable_qrawo","single":"file-upload-item__single_qrawo","title":"file-upload-item__title_qrawo","truncate":"file-upload-item__truncate_qrawo","restore":"file-upload-item__restore_qrawo"};
4
4
 
5
5
  export { styles as default };
6
6
  //# 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-item__iconPDFColored_mfb2c {
11
+ .file-upload-item__iconPDFColored_1cq84 {
12
12
  fill: var(--color-light-decorative-red);
13
13
  }
14
- .file-upload-item__iconDOCColored_mfb2c {
14
+ .file-upload-item__iconDOCColored_1cq84 {
15
15
  fill: var(--color-light-decorative-blue);
16
16
  }
17
- .file-upload-item__iconExcelColored_mfb2c {
17
+ .file-upload-item__iconExcelColored_1cq84 {
18
18
  fill: var(--color-light-decorative-green);
19
19
  }
20
- .file-upload-item__icon1CColored_mfb2c {
20
+ .file-upload-item__icon1CColored_1cq84 {
21
21
  fill: var(--color-light-decorative-orange);
22
22
  }
23
- .file-upload-item__iconDocumentColored_mfb2c {
23
+ .file-upload-item__iconDocumentColored_1cq84 {
24
24
  fill: var(--color-light-neutral-translucent-1300);
25
25
  }
26
- .file-upload-item__iconArchiveColored_mfb2c {
26
+ .file-upload-item__iconArchiveColored_1cq84 {
27
27
  fill: var(--color-light-status-attention);
28
28
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- const styles = {"iconPDFColored":"file-upload-item__iconPDFColored_mfb2c","iconDOCColored":"file-upload-item__iconDOCColored_mfb2c","iconExcelColored":"file-upload-item__iconExcelColored_mfb2c","icon1CColored":"file-upload-item__icon1CColored_mfb2c","iconDocumentColored":"file-upload-item__iconDocumentColored_mfb2c","iconArchiveColored":"file-upload-item__iconArchiveColored_mfb2c"};
3
+ const styles = {"iconPDFColored":"file-upload-item__iconPDFColored_1cq84","iconDOCColored":"file-upload-item__iconDOCColored_1cq84","iconExcelColored":"file-upload-item__iconExcelColored_1cq84","icon1CColored":"file-upload-item__icon1CColored_1cq84","iconDocumentColored":"file-upload-item__iconDocumentColored_1cq84","iconArchiveColored":"file-upload-item__iconArchiveColored_1cq84"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -6,30 +6,30 @@
6
6
  :root {
7
7
  --gap-4-neg: -4px;
8
8
  }
9
- .file-upload-item__container_j3int {
9
+ .file-upload-item__container_19efp {
10
10
  position: relative;
11
11
  }
12
- .file-upload-item__container_j3int.file-upload-item__clickable_j3int {
12
+ .file-upload-item__container_19efp.file-upload-item__clickable_19efp {
13
13
  cursor: pointer;
14
14
  }
15
- .file-upload-item__container_j3int .file-upload-item__progress_j3int {
15
+ .file-upload-item__container_19efp .file-upload-item__progress_19efp {
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-item__container_j3int .file-upload-item__progress_j3int.file-upload-item__success_j3int,
23
- .file-upload-item__container_j3int .file-upload-item__progress_j3int.file-upload-item__error_j3int {
22
+ .file-upload-item__container_19efp .file-upload-item__progress_19efp.file-upload-item__success_19efp,
23
+ .file-upload-item__container_19efp .file-upload-item__progress_19efp.file-upload-item__error_19efp {
24
24
  transition: opacity 400ms ease-in;
25
25
  opacity: 0;
26
26
  }
27
- .file-upload-item__container_j3int .file-upload-item__progress_j3int.file-upload-item__success_j3int path {
27
+ .file-upload-item__container_19efp .file-upload-item__progress_19efp.file-upload-item__success_19efp path {
28
28
  stroke: var(--color-light-status-positive);
29
29
  }
30
- .file-upload-item__container_j3int .file-upload-item__progress_j3int.file-upload-item__loading_j3int {
30
+ .file-upload-item__container_19efp .file-upload-item__progress_19efp.file-upload-item__loading_19efp {
31
31
  color: var(--color-light-neutral-500);
32
32
  }
33
- .file-upload-item__container_j3int .file-upload-item__progress_j3int.file-upload-item__error_j3int path {
33
+ .file-upload-item__container_19efp .file-upload-item__progress_19efp.file-upload-item__error_19efp path {
34
34
  stroke: var(--color-light-status-negative);
35
35
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- const styles = {"container":"file-upload-item__container_j3int","clickable":"file-upload-item__clickable_j3int","progress":"file-upload-item__progress_j3int","success":"file-upload-item__success_j3int","error":"file-upload-item__error_j3int","loading":"file-upload-item__loading_j3int"};
3
+ const styles = {"container":"file-upload-item__container_19efp","clickable":"file-upload-item__clickable_19efp","progress":"file-upload-item__progress_19efp","success":"file-upload-item__success_19efp","error":"file-upload-item__error_19efp","loading":"file-upload-item__loading_19efp"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
package/modern/index.css CHANGED
@@ -2,14 +2,14 @@
2
2
  --gap-2: 2px;
3
3
  --gap-12: 12px;
4
4
  }
5
- .file-upload-item__component_27zoh {
5
+ .file-upload-item__component_13o9f {
6
6
  box-sizing: border-box;
7
7
  display: flex;
8
8
  align-items: flex-start;
9
9
  width: 100%;
10
10
  min-height: 48px;
11
11
  }
12
- .file-upload-item__restore_27zoh {
12
+ .file-upload-item__restore_13o9f {
13
13
  margin-left: var(--gap-12);
14
14
  margin-top: var(--gap-2);
15
15
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- const styles = {"component":"file-upload-item__component_27zoh","restore":"file-upload-item__restore_27zoh"};
3
+ const styles = {"component":"file-upload-item__component_13o9f","restore":"file-upload-item__restore_13o9f"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -32,7 +32,10 @@ export interface FileUploadItemProps {
32
32
  */
33
33
  uploadDate?: string;
34
34
  /**
35
- * Ссылка на файл. Если прокидывается этот параметр, то появляется кнопка скачивания
35
+ * Ссылка на файл.
36
+ * Если передан `downloadLink` или `onDownload`, отображается кнопка скачивания.
37
+ * По клику на кнопку браузер переходит по ссылке (или скачивает файл, если передан `download`).
38
+ * Если вместе с `downloadLink` передан `onDownload`, переход по ссылке отменяется и вызывается только `onDownload`.
36
39
  */
37
40
  downloadLink?: string;
38
41
  /**
@@ -68,7 +71,9 @@ export interface FileUploadItemProps {
68
71
  */
69
72
  children?: ReactNode;
70
73
  /**
71
- * Обработчик загрузки файла
74
+ * Обработчик клика по кнопке скачивания файла.
75
+ * Если передан `onDownload` или `downloadLink`, отображается кнопка скачивания.
76
+ * Если вместе с `onDownload` передан `downloadLink`, переход по ссылке отменяется и вызывается только `onDownload`.
72
77
  */
73
78
  onDownload?: (id: string) => void;
74
79
  /**
@@ -32,7 +32,10 @@ export interface FileUploadItemProps {
32
32
  */
33
33
  uploadDate?: string;
34
34
  /**
35
- * Ссылка на файл. Если прокидывается этот параметр, то появляется кнопка скачивания
35
+ * Ссылка на файл.
36
+ * Если передан `downloadLink` или `onDownload`, отображается кнопка скачивания.
37
+ * По клику на кнопку браузер переходит по ссылке (или скачивает файл, если передан `download`).
38
+ * Если вместе с `downloadLink` передан `onDownload`, переход по ссылке отменяется и вызывается только `onDownload`.
36
39
  */
37
40
  downloadLink?: string;
38
41
  /**
@@ -68,7 +71,9 @@ export interface FileUploadItemProps {
68
71
  */
69
72
  children?: ReactNode;
70
73
  /**
71
- * Обработчик загрузки файла
74
+ * Обработчик клика по кнопке скачивания файла.
75
+ * Если передан `onDownload` или `downloadLink`, отображается кнопка скачивания.
76
+ * Если вместе с `onDownload` передан `downloadLink`, переход по ссылке отменяется и вызывается только `onDownload`.
72
77
  */
73
78
  onDownload?: (id: string) => void;
74
79
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-file-upload-item",
3
- "version": "8.2.3",
3
+ "version": "8.2.4",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -31,5 +31,5 @@
31
31
  "directory": "dist"
32
32
  },
33
33
  "themesVersion": "15.2.1",
34
- "varsVersion": "11.4.0"
34
+ "varsVersion": "11.4.1"
35
35
  }
@@ -47,7 +47,10 @@ export interface FileUploadItemProps {
47
47
  uploadDate?: string;
48
48
 
49
49
  /**
50
- * Ссылка на файл. Если прокидывается этот параметр, то появляется кнопка скачивания
50
+ * Ссылка на файл.
51
+ * Если передан `downloadLink` или `onDownload`, отображается кнопка скачивания.
52
+ * По клику на кнопку браузер переходит по ссылке (или скачивает файл, если передан `download`).
53
+ * Если вместе с `downloadLink` передан `onDownload`, переход по ссылке отменяется и вызывается только `onDownload`.
51
54
  */
52
55
  downloadLink?: string;
53
56
 
@@ -93,7 +96,9 @@ export interface FileUploadItemProps {
93
96
  children?: ReactNode;
94
97
 
95
98
  /**
96
- * Обработчик загрузки файла
99
+ * Обработчик клика по кнопке скачивания файла.
100
+ * Если передан `onDownload` или `downloadLink`, отображается кнопка скачивания.
101
+ * Если вместе с `onDownload` передан `downloadLink`, переход по ссылке отменяется и вызывается только `onDownload`.
97
102
  */
98
103
  onDownload?: (id: string) => void;
99
104
 
@@ -32,7 +32,10 @@ export interface FileUploadItemProps {
32
32
  */
33
33
  uploadDate?: string;
34
34
  /**
35
- * Ссылка на файл. Если прокидывается этот параметр, то появляется кнопка скачивания
35
+ * Ссылка на файл.
36
+ * Если передан `downloadLink` или `onDownload`, отображается кнопка скачивания.
37
+ * По клику на кнопку браузер переходит по ссылке (или скачивает файл, если передан `download`).
38
+ * Если вместе с `downloadLink` передан `onDownload`, переход по ссылке отменяется и вызывается только `onDownload`.
36
39
  */
37
40
  downloadLink?: string;
38
41
  /**
@@ -68,7 +71,9 @@ export interface FileUploadItemProps {
68
71
  */
69
72
  children?: ReactNode;
70
73
  /**
71
- * Обработчик загрузки файла
74
+ * Обработчик клика по кнопке скачивания файла.
75
+ * Если передан `onDownload` или `downloadLink`, отображается кнопка скачивания.
76
+ * Если вместе с `onDownload` передан `downloadLink`, переход по ссылке отменяется и вызывается только `onDownload`.
72
77
  */
73
78
  onDownload?: (id: string) => void;
74
79
  /**