@alfalab/core-components-file-upload-item 6.2.6 → 6.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Component.js +6 -2
- package/actions-control.module-4114c202.js +6 -0
- package/components/actions-control/actions-control.css +19 -12
- package/components/actions-control/actions.js +7 -2
- package/components/actions-control/components/delete-button/delete-button.js +1 -1
- package/components/actions-control/components/download-button/download-button.js +1 -1
- package/components/actions-control/components/restore-button/restore-button.js +1 -1
- package/components/content/components/content-error/content-error.css +2 -2
- package/components/content/components/content-error/content-error.js +1 -1
- package/components/content/components/content-subtitle/content-subtitle.css +5 -5
- package/components/content/components/content-subtitle/content-subtitle.js +1 -1
- package/components/content/content.css +11 -10
- package/components/content/content.js +3 -2
- package/components/status-control/components/status-control-icon/status-control-icon.css +7 -7
- package/components/status-control/components/status-control-icon/status-control-icon.js +1 -1
- package/components/status-control/status-control.css +14 -13
- package/components/status-control/status-control.js +17 -15
- package/context/file-upload-item-context.d.ts +3 -0
- package/context/file-upload-item-context.js +3 -0
- package/cssm/Component.js +5 -1
- package/cssm/components/actions-control/actions-control.module.css +15 -8
- package/cssm/components/actions-control/actions.js +6 -1
- package/cssm/components/content/components/content-subtitle/content-subtitle.module.css +1 -1
- package/cssm/components/content/content.js +2 -1
- package/cssm/components/content/content.module.css +5 -4
- package/cssm/components/status-control/components/status-control-icon/status-control-icon.module.css +1 -1
- package/cssm/components/status-control/status-control.js +16 -14
- package/cssm/components/status-control/status-control.module.css +5 -4
- package/cssm/context/file-upload-item-context.d.ts +3 -0
- package/cssm/context/file-upload-item-context.js +3 -0
- package/cssm/index.module.css +1 -1
- package/cssm/types/file-upload-item-props.d.ts +4 -0
- package/esm/Component.js +7 -3
- package/esm/actions-control.module-cc662da0.js +4 -0
- package/esm/components/actions-control/actions-control.css +19 -12
- package/esm/components/actions-control/actions.js +8 -3
- package/esm/components/actions-control/components/delete-button/delete-button.js +1 -1
- package/esm/components/actions-control/components/download-button/download-button.js +1 -1
- package/esm/components/actions-control/components/restore-button/restore-button.js +1 -1
- package/esm/components/content/components/content-error/content-error.css +2 -2
- package/esm/components/content/components/content-error/content-error.js +1 -1
- package/esm/components/content/components/content-subtitle/content-subtitle.css +5 -5
- package/esm/components/content/components/content-subtitle/content-subtitle.js +1 -1
- package/esm/components/content/content.css +11 -10
- package/esm/components/content/content.js +3 -2
- package/esm/components/status-control/components/status-control-icon/status-control-icon.css +7 -7
- package/esm/components/status-control/components/status-control-icon/status-control-icon.js +1 -1
- package/esm/components/status-control/status-control.css +14 -13
- package/esm/components/status-control/status-control.js +17 -15
- package/esm/context/file-upload-item-context.d.ts +3 -0
- package/esm/context/file-upload-item-context.js +3 -0
- package/esm/index.css +4 -4
- package/esm/types/file-upload-item-props.d.ts +4 -0
- package/index.css +4 -4
- package/modern/Component.js +36 -30
- package/modern/actions-control.module-3ddc9e8e.js +4 -0
- package/modern/components/actions-control/actions-control.css +19 -12
- package/modern/components/actions-control/actions.js +8 -3
- package/modern/components/actions-control/components/delete-button/delete-button.js +1 -1
- package/modern/components/actions-control/components/download-button/download-button.js +1 -1
- package/modern/components/actions-control/components/restore-button/restore-button.js +1 -1
- package/modern/components/content/components/content-error/content-error.css +2 -2
- package/modern/components/content/components/content-error/content-error.js +1 -1
- package/modern/components/content/components/content-subtitle/content-subtitle.css +5 -5
- package/modern/components/content/components/content-subtitle/content-subtitle.js +1 -1
- package/modern/components/content/content.css +11 -10
- package/modern/components/content/content.js +3 -2
- package/modern/components/status-control/components/status-control-icon/status-control-icon.css +7 -7
- package/modern/components/status-control/components/status-control-icon/status-control-icon.js +1 -1
- package/modern/components/status-control/status-control.css +14 -13
- package/modern/components/status-control/status-control.js +5 -3
- package/modern/context/file-upload-item-context.d.ts +3 -0
- package/modern/context/file-upload-item-context.js +3 -0
- package/modern/index.css +4 -4
- package/modern/types/file-upload-item-props.d.ts +4 -0
- package/moderncssm/Component.js +35 -29
- package/moderncssm/components/actions-control/actions-control.module.css +15 -3
- package/moderncssm/components/actions-control/actions.js +7 -2
- package/moderncssm/components/content/content.js +2 -1
- package/moderncssm/components/content/content.module.css +5 -2
- package/moderncssm/components/status-control/status-control.js +4 -2
- package/moderncssm/components/status-control/status-control.module.css +5 -2
- package/moderncssm/context/file-upload-item-context.d.ts +3 -0
- package/moderncssm/context/file-upload-item-context.js +3 -0
- package/moderncssm/types/file-upload-item-props.d.ts +4 -0
- package/package.json +3 -3
- package/src/Component.tsx +48 -40
- package/src/components/actions-control/actions-control.module.css +12 -0
- package/src/components/actions-control/actions.tsx +9 -2
- package/src/components/content/content.module.css +4 -1
- package/src/components/content/content.tsx +3 -0
- package/src/components/status-control/status-control.module.css +4 -1
- package/src/components/status-control/status-control.tsx +12 -2
- package/src/context/file-upload-item-context.tsx +6 -0
- package/src/types/file-upload-item-props.ts +5 -0
- package/types/file-upload-item-props.d.ts +4 -0
- package/actions-control.module-abc8f125.js +0 -6
- package/esm/actions-control.module-7305124e.js +0 -4
- package/modern/actions-control.module-0da6088b.js +0 -4
|
@@ -17,6 +17,7 @@ type TFileUploadItemContext = {
|
|
|
17
17
|
downloadLink?: string;
|
|
18
18
|
download?: string | true;
|
|
19
19
|
disableButtons?: boolean;
|
|
20
|
+
isClickable?: boolean;
|
|
20
21
|
target?: HTMLAttributeAnchorTarget;
|
|
21
22
|
showDelete?: boolean;
|
|
22
23
|
customIcon?: ElementType<{ className?: string }>;
|
|
@@ -25,6 +26,8 @@ type TFileUploadItemContext = {
|
|
|
25
26
|
customContent?: ElementType;
|
|
26
27
|
truncate?: boolean;
|
|
27
28
|
imageUrl?: string;
|
|
29
|
+
actionsPresent?: boolean;
|
|
30
|
+
setActionsPresent?: (present: boolean) => void;
|
|
28
31
|
};
|
|
29
32
|
|
|
30
33
|
export const FileUploadItemContext = createContext<TFileUploadItemContext>({
|
|
@@ -42,6 +45,7 @@ export const FileUploadItemContext = createContext<TFileUploadItemContext>({
|
|
|
42
45
|
downloadLink: '',
|
|
43
46
|
download: '',
|
|
44
47
|
disableButtons: false,
|
|
48
|
+
isClickable: true,
|
|
45
49
|
target: undefined,
|
|
46
50
|
showDelete: false,
|
|
47
51
|
iconStyle: 'gray',
|
|
@@ -50,4 +54,6 @@ export const FileUploadItemContext = createContext<TFileUploadItemContext>({
|
|
|
50
54
|
customContent: undefined,
|
|
51
55
|
truncate: false,
|
|
52
56
|
imageUrl: undefined,
|
|
57
|
+
actionsPresent: false,
|
|
58
|
+
setActionsPresent: undefined,
|
|
53
59
|
});
|
|
@@ -72,6 +72,10 @@ type FileUploadItemProps = {
|
|
|
72
72
|
* Управление активностью кнопок
|
|
73
73
|
*/
|
|
74
74
|
disableButtons?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Управление отображением кликабельности элемента Content
|
|
77
|
+
*/
|
|
78
|
+
isClickable?: boolean;
|
|
75
79
|
/**
|
|
76
80
|
* Указывает, где открыть скачиваемый документ
|
|
77
81
|
*/
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var styles = {"container":"file-upload-item__container_1r6f4","icon":"file-upload-item__icon_1r6f4","deleteIconColor":"file-upload-item__deleteIconColor_1r6f4","downloadIconColor":"file-upload-item__downloadIconColor_1r6f4","restoreIconColor":"file-upload-item__restoreIconColor_1r6f4"};
|
|
4
|
-
require('./components/actions-control/actions-control.css')
|
|
5
|
-
|
|
6
|
-
exports.styles = styles;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
var styles = {"container":"file-upload-item__container_1r6f4","icon":"file-upload-item__icon_1r6f4","deleteIconColor":"file-upload-item__deleteIconColor_1r6f4","downloadIconColor":"file-upload-item__downloadIconColor_1r6f4","restoreIconColor":"file-upload-item__restoreIconColor_1r6f4"};
|
|
2
|
-
require('./components/actions-control/actions-control.css')
|
|
3
|
-
|
|
4
|
-
export { styles as s };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
const styles = {"container":"file-upload-item__container_1r6f4","icon":"file-upload-item__icon_1r6f4","deleteIconColor":"file-upload-item__deleteIconColor_1r6f4","downloadIconColor":"file-upload-item__downloadIconColor_1r6f4","restoreIconColor":"file-upload-item__restoreIconColor_1r6f4"};
|
|
2
|
-
require('./components/actions-control/actions-control.css')
|
|
3
|
-
|
|
4
|
-
export { styles as s };
|