@pushwoosh/smart-components-kit 1.3.37 → 1.5.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/MediaStorage/CanvaImportDrawer.d.ts +14 -0
- package/MediaStorage/CanvaImportDrawer.js +386 -0
- package/MediaStorage/MediaStorage.js +65 -30
- package/MediaStorage/canva.d.ts +18 -0
- package/MediaStorage/canva.js +86 -0
- package/MediaStorage/canvaPages.d.ts +2 -0
- package/MediaStorage/canvaPages.js +7 -0
- package/MediaStorage/index.d.ts +1 -0
- package/MediaStorage/index.js +2 -1
- package/MediaStorage/mediaFile.utils.d.ts +4 -0
- package/MediaStorage/mediaFile.utils.js +8 -0
- package/MediaStorage/polyglot/messages_ar.js +25 -1
- package/MediaStorage/polyglot/messages_bn.js +25 -1
- package/MediaStorage/polyglot/messages_de.js +25 -1
- package/MediaStorage/polyglot/messages_en.js +25 -1
- package/MediaStorage/polyglot/messages_es.js +25 -1
- package/MediaStorage/polyglot/messages_fr.js +25 -1
- package/MediaStorage/polyglot/messages_he.js +25 -1
- package/MediaStorage/polyglot/messages_hi.js +25 -1
- package/MediaStorage/polyglot/messages_ja.js +25 -1
- package/MediaStorage/polyglot/messages_ko.js +25 -1
- package/MediaStorage/polyglot/messages_pt.js +25 -1
- package/MediaStorage/polyglot/messages_ru.js +25 -1
- package/MediaStorage/polyglot/messages_th.js +25 -1
- package/MediaStorage/polyglot/messages_zh.js +25 -1
- package/MediaStorage/polyglot/types.d.ts +35 -0
- package/MediaStorage/styles.d.ts +8 -1
- package/MediaStorage/styles.js +49 -25
- package/package.json +3 -3
|
@@ -18,6 +18,10 @@ export type MediaStorageMessages = {
|
|
|
18
18
|
'SMART.MEDIA_STORAGE.CROPS_BADGE': {
|
|
19
19
|
count: number;
|
|
20
20
|
};
|
|
21
|
+
'SMART.MEDIA_STORAGE.VERSIONS_BADGE': {
|
|
22
|
+
count: number;
|
|
23
|
+
};
|
|
24
|
+
'SMART.MEDIA_STORAGE.DELETE_CONFIRM.DESCRIPTION_VERSION': NoParams;
|
|
21
25
|
'SMART.MEDIA_STORAGE.SELECT_ORIGINAL': NoParams;
|
|
22
26
|
'SMART.MEDIA_STORAGE.CREATE_CROP_HINT': NoParams;
|
|
23
27
|
'SMART.MEDIA_STORAGE.DELETE_HINT': NoParams;
|
|
@@ -60,4 +64,35 @@ export type MediaStorageMessages = {
|
|
|
60
64
|
'SMART.MEDIA_STORAGE.CREATE_CROP.DELETE_HINT': NoParams;
|
|
61
65
|
'SMART.MEDIA_STORAGE.CREATE_CROP.DELETE_CONFIRM.TITLE': NoParams;
|
|
62
66
|
'SMART.MEDIA_STORAGE.CREATE_CROP.DELETE_CONFIRM.BUTTON': NoParams;
|
|
67
|
+
'SMART.MEDIA_STORAGE.CANVA.BUTTON': NoParams;
|
|
68
|
+
'SMART.MEDIA_STORAGE.CANVA.TITLE': NoParams;
|
|
69
|
+
'SMART.MEDIA_STORAGE.CANVA.CLOSE': NoParams;
|
|
70
|
+
'SMART.MEDIA_STORAGE.CANVA.CONNECT_HINT': NoParams;
|
|
71
|
+
'SMART.MEDIA_STORAGE.CANVA.RECONNECT_HINT': NoParams;
|
|
72
|
+
'SMART.MEDIA_STORAGE.CANVA.CONNECT': NoParams;
|
|
73
|
+
'SMART.MEDIA_STORAGE.CANVA.CONNECTED_AS': {
|
|
74
|
+
name: string;
|
|
75
|
+
};
|
|
76
|
+
'SMART.MEDIA_STORAGE.CANVA.DISCONNECT': NoParams;
|
|
77
|
+
'SMART.MEDIA_STORAGE.CANVA.SEARCH': NoParams;
|
|
78
|
+
'SMART.MEDIA_STORAGE.CANVA.EMPTY': NoParams;
|
|
79
|
+
'SMART.MEDIA_STORAGE.CANVA.UNTITLED': NoParams;
|
|
80
|
+
'SMART.MEDIA_STORAGE.CANVA.PAGES': {
|
|
81
|
+
count: number;
|
|
82
|
+
};
|
|
83
|
+
'SMART.MEDIA_STORAGE.CANVA.LOAD_MORE': NoParams;
|
|
84
|
+
'SMART.MEDIA_STORAGE.CANVA.PAGES_LABEL': {
|
|
85
|
+
max: number;
|
|
86
|
+
};
|
|
87
|
+
'SMART.MEDIA_STORAGE.CANVA.FORMAT_LABEL': NoParams;
|
|
88
|
+
'SMART.MEDIA_STORAGE.CANVA.IMPORT': NoParams;
|
|
89
|
+
'SMART.MEDIA_STORAGE.CANVA.IMPORTING': {
|
|
90
|
+
done: number;
|
|
91
|
+
total: number;
|
|
92
|
+
};
|
|
93
|
+
'SMART.MEDIA_STORAGE.CANVA.EXPORTING': NoParams;
|
|
94
|
+
'SMART.MEDIA_STORAGE.CANVA.SUCCESS': NoParams;
|
|
95
|
+
'SMART.MEDIA_STORAGE.CANVA.POPUP_BLOCKED': NoParams;
|
|
96
|
+
'SMART.MEDIA_STORAGE.CANVA.CONNECT_FAILED': NoParams;
|
|
97
|
+
'SMART.MEDIA_STORAGE.CANVA.ERROR': NoParams;
|
|
63
98
|
};
|
package/MediaStorage/styles.d.ts
CHANGED
|
@@ -3,7 +3,9 @@ export declare const Tile: import("styled-components").StyledComponent<"div", an
|
|
|
3
3
|
$selected?: boolean;
|
|
4
4
|
}, never>;
|
|
5
5
|
export declare const TileImage: import("styled-components").StyledComponent<"img", any, {}, never>;
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const TileBadges: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
|
+
export declare const SourceBadge: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
8
|
+
export declare const CountBadge: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
7
9
|
export declare const WarningBadge: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
8
10
|
export declare const TileCheckbox: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
9
11
|
export declare const SelectionBar: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -31,3 +33,8 @@ export declare const CropStrip: import("styled-components").StyledComponent<"div
|
|
|
31
33
|
export declare const CropThumb: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
32
34
|
export declare const CropThumbDelete: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
33
35
|
export declare const CropThumbCaption: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
36
|
+
export declare const DesignTile: import("styled-components").StyledComponent<"button", any, {
|
|
37
|
+
$selected?: boolean;
|
|
38
|
+
}, never>;
|
|
39
|
+
export declare const DesignCaption: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
40
|
+
export declare const DropzoneRow: import("styled-components").StyledComponent<"div", any, {}, never>;
|
package/MediaStorage/styles.js
CHANGED
|
@@ -17,37 +17,45 @@ export const TileImage = styled.img.withConfig({
|
|
|
17
17
|
displayName: "TileImage",
|
|
18
18
|
componentId: "sc-uu3cbo-2"
|
|
19
19
|
})(["width:100%;aspect-ratio:1;object-fit:cover;display:block;"]);
|
|
20
|
-
export const
|
|
21
|
-
displayName: "
|
|
20
|
+
export const TileBadges = styled.div.withConfig({
|
|
21
|
+
displayName: "TileBadges",
|
|
22
22
|
componentId: "sc-uu3cbo-3"
|
|
23
|
-
})(["position:absolute;top:6px;right:6px;
|
|
23
|
+
})(["position:absolute;top:6px;right:6px;display:flex;flex-direction:column;align-items:flex-end;gap:4px;z-index:2;pointer-events:none;"]);
|
|
24
|
+
export const SourceBadge = styled.span.withConfig({
|
|
25
|
+
displayName: "SourceBadge",
|
|
26
|
+
componentId: "sc-uu3cbo-4"
|
|
27
|
+
})(["font-size:10px;font-weight:", ";line-height:1;color:", ";background:", ";border-radius:20px;padding:3px 7px;"], FontWeight.BOLD, Color.MAIN, Color.CLEAR);
|
|
28
|
+
export const CountBadge = styled.span.withConfig({
|
|
29
|
+
displayName: "CountBadge",
|
|
30
|
+
componentId: "sc-uu3cbo-5"
|
|
31
|
+
})(["font-size:10px;font-weight:", ";line-height:1;color:", ";background:", ";border-radius:20px;padding:3px 7px;"], FontWeight.BOLD, Color.CLEAR, Color.PRIMARY);
|
|
24
32
|
export const WarningBadge = styled.span.withConfig({
|
|
25
33
|
displayName: "WarningBadge",
|
|
26
|
-
componentId: "sc-uu3cbo-
|
|
34
|
+
componentId: "sc-uu3cbo-6"
|
|
27
35
|
})(["position:absolute;bottom:0;left:0;right:0;font-size:10px;line-height:1.2;text-align:center;color:", ";background:", ";padding:3px 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none;"], Color.CLEAR, Color.WARNING);
|
|
28
36
|
export const TileCheckbox = styled.div.withConfig({
|
|
29
37
|
displayName: "TileCheckbox",
|
|
30
|
-
componentId: "sc-uu3cbo-
|
|
38
|
+
componentId: "sc-uu3cbo-7"
|
|
31
39
|
})(["position:absolute;top:6px;left:6px;z-index:2;padding:2px;border-radius:4px;background:", ";"], Color.CLEAR);
|
|
32
40
|
export const SelectionBar = styled.div.withConfig({
|
|
33
41
|
displayName: "SelectionBar",
|
|
34
|
-
componentId: "sc-uu3cbo-
|
|
42
|
+
componentId: "sc-uu3cbo-8"
|
|
35
43
|
})(["display:flex;align-items:center;gap:12px;min-height:32px;margin-bottom:12px;"]);
|
|
36
44
|
export const SelectionCount = styled.span.withConfig({
|
|
37
45
|
displayName: "SelectionCount",
|
|
38
|
-
componentId: "sc-uu3cbo-
|
|
46
|
+
componentId: "sc-uu3cbo-9"
|
|
39
47
|
})(["font-size:", ";color:", ";"], FontSize.SMALL, Color.LOCKED);
|
|
40
48
|
export const TileActions = styled.div.withConfig({
|
|
41
49
|
displayName: "TileActions",
|
|
42
|
-
componentId: "sc-uu3cbo-
|
|
50
|
+
componentId: "sc-uu3cbo-10"
|
|
43
51
|
})(["position:absolute;inset:0;z-index:1;display:flex;align-items:center;justify-content:center;gap:6px;background:rgba(0,0,0,0.45);backdrop-filter:blur(2px);opacity:0;transition:opacity 0.15s;", ":hover &{opacity:1;}@media (hover:none){opacity:1;}"], Tile);
|
|
44
52
|
export const EmptyState = styled.div.withConfig({
|
|
45
53
|
displayName: "EmptyState",
|
|
46
|
-
componentId: "sc-uu3cbo-
|
|
54
|
+
componentId: "sc-uu3cbo-11"
|
|
47
55
|
})(["text-align:center;padding:48px 16px;color:", ";"], Color.LOCKED);
|
|
48
56
|
export const Dropzone = styled.button.withConfig({
|
|
49
57
|
displayName: "Dropzone",
|
|
50
|
-
componentId: "sc-uu3cbo-
|
|
58
|
+
componentId: "sc-uu3cbo-12"
|
|
51
59
|
})(["width:100%;min-height:96px;margin-bottom:16px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:16px;font:inherit;font-size:13px;color:", ";cursor:pointer;border:2px dashed ", ";border-radius:8px;background:", ";transition:border-color 0.15s,background 0.15s;&:hover{border-color:", ";}&:disabled{cursor:default;opacity:0.7;}"], Color.LOCKED, ({
|
|
52
60
|
$dragOver
|
|
53
61
|
}) => $dragOver ? Color.PRIMARY : Color.DIVIDER, ({
|
|
@@ -55,46 +63,46 @@ export const Dropzone = styled.button.withConfig({
|
|
|
55
63
|
}) => $dragOver ? Color.SOFT_LIGHT : Color.CLEAR, Color.PRIMARY);
|
|
56
64
|
export const HiddenInput = styled.input.withConfig({
|
|
57
65
|
displayName: "HiddenInput",
|
|
58
|
-
componentId: "sc-uu3cbo-
|
|
66
|
+
componentId: "sc-uu3cbo-13"
|
|
59
67
|
})(["display:none;"]);
|
|
60
68
|
export const UsageLine = styled.div.withConfig({
|
|
61
69
|
displayName: "UsageLine",
|
|
62
|
-
componentId: "sc-uu3cbo-
|
|
70
|
+
componentId: "sc-uu3cbo-14"
|
|
63
71
|
})(["margin-left:auto;font-size:", ";color:", ";"], FontSize.SMALL, Color.LOCKED);
|
|
64
72
|
/* ---------- CreateCropDrawer ---------- */
|
|
65
73
|
export const PreviewStage = styled.div.withConfig({
|
|
66
74
|
displayName: "PreviewStage",
|
|
67
|
-
componentId: "sc-uu3cbo-
|
|
75
|
+
componentId: "sc-uu3cbo-15"
|
|
68
76
|
})(["display:flex;align-items:center;justify-content:center;min-height:200px;max-height:360px;padding:12px;border:1px solid ", ";border-radius:6px;overflow:hidden;background:", ";"], Color.DIVIDER, Color.SOFT_LIGHT);
|
|
69
77
|
export const PreviewFrame = styled.div.withConfig({
|
|
70
78
|
displayName: "PreviewFrame",
|
|
71
|
-
componentId: "sc-uu3cbo-
|
|
79
|
+
componentId: "sc-uu3cbo-16"
|
|
72
80
|
})(["aspect-ratio:", ";max-width:100%;max-height:336px;overflow:hidden;border-radius:4px;"], ({
|
|
73
81
|
$ratio
|
|
74
82
|
}) => $ratio);
|
|
75
83
|
export const PreviewImage = styled.img.withConfig({
|
|
76
84
|
displayName: "PreviewImage",
|
|
77
|
-
componentId: "sc-uu3cbo-
|
|
85
|
+
componentId: "sc-uu3cbo-17"
|
|
78
86
|
})(["width:100%;height:100%;object-fit:cover;display:block;"]);
|
|
79
87
|
export const FieldLabel = styled.div.withConfig({
|
|
80
88
|
displayName: "FieldLabel",
|
|
81
|
-
componentId: "sc-uu3cbo-
|
|
89
|
+
componentId: "sc-uu3cbo-18"
|
|
82
90
|
})(["font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.4px;color:", ";margin-bottom:6px;"], Color.LOCKED);
|
|
83
91
|
export const SizeInput = styled(NativeInput).withConfig({
|
|
84
92
|
displayName: "SizeInput",
|
|
85
|
-
componentId: "sc-uu3cbo-
|
|
93
|
+
componentId: "sc-uu3cbo-19"
|
|
86
94
|
})(["&[readonly]{background:", ";color:", ";}"], Color.SOFT_LIGHT, Color.LOCKED);
|
|
87
95
|
export const Chips = styled.div.withConfig({
|
|
88
96
|
displayName: "Chips",
|
|
89
|
-
componentId: "sc-uu3cbo-
|
|
97
|
+
componentId: "sc-uu3cbo-20"
|
|
90
98
|
})(["display:flex;flex-wrap:wrap;gap:7px;"]);
|
|
91
99
|
export const Segment = styled.div.withConfig({
|
|
92
100
|
displayName: "Segment",
|
|
93
|
-
componentId: "sc-uu3cbo-
|
|
101
|
+
componentId: "sc-uu3cbo-21"
|
|
94
102
|
})(["display:inline-flex;border:1px solid ", ";border-radius:6px;overflow:hidden;"], Color.DIVIDER);
|
|
95
103
|
export const SegmentItem = styled.button.withConfig({
|
|
96
104
|
displayName: "SegmentItem",
|
|
97
|
-
componentId: "sc-uu3cbo-
|
|
105
|
+
componentId: "sc-uu3cbo-22"
|
|
98
106
|
})(["font:inherit;font-size:13px;cursor:pointer;padding:7px 14px;border:none;background:", ";color:", ";& + &{border-left:1px solid ", ";}"], ({
|
|
99
107
|
$active
|
|
100
108
|
}) => $active ? Color.PRIMARY : Color.CLEAR, ({
|
|
@@ -102,17 +110,33 @@ export const SegmentItem = styled.button.withConfig({
|
|
|
102
110
|
}) => $active ? Color.CLEAR : Color.MAIN, Color.DIVIDER);
|
|
103
111
|
export const CropStrip = styled.div.withConfig({
|
|
104
112
|
displayName: "CropStrip",
|
|
105
|
-
componentId: "sc-uu3cbo-
|
|
113
|
+
componentId: "sc-uu3cbo-23"
|
|
106
114
|
})(["display:flex;gap:10px;flex-wrap:wrap;align-items:flex-start;"]);
|
|
107
115
|
export const CropThumb = styled.div.withConfig({
|
|
108
116
|
displayName: "CropThumb",
|
|
109
|
-
componentId: "sc-uu3cbo-
|
|
117
|
+
componentId: "sc-uu3cbo-24"
|
|
110
118
|
})(["position:relative;width:88px;border:1px solid ", ";border-radius:6px;overflow:hidden;background:", ";"], Color.DIVIDER, Color.SOFT_LIGHT);
|
|
111
119
|
export const CropThumbDelete = styled.div.withConfig({
|
|
112
120
|
displayName: "CropThumbDelete",
|
|
113
|
-
componentId: "sc-uu3cbo-
|
|
121
|
+
componentId: "sc-uu3cbo-25"
|
|
114
122
|
})(["position:absolute;top:4px;right:4px;opacity:0;transition:opacity 0.15s;", ":hover &{opacity:1;}@media (hover:none){opacity:1;}"], CropThumb);
|
|
115
123
|
export const CropThumbCaption = styled.div.withConfig({
|
|
116
124
|
displayName: "CropThumbCaption",
|
|
117
|
-
componentId: "sc-uu3cbo-
|
|
118
|
-
})(["font-size:10px;text-align:center;padding:3px 2px;color:", ";"], Color.LOCKED);
|
|
125
|
+
componentId: "sc-uu3cbo-26"
|
|
126
|
+
})(["font-size:10px;text-align:center;padding:3px 2px;color:", ";"], Color.LOCKED);
|
|
127
|
+
export const DesignTile = styled.button.withConfig({
|
|
128
|
+
displayName: "DesignTile",
|
|
129
|
+
componentId: "sc-uu3cbo-27"
|
|
130
|
+
})(["display:flex;flex-direction:column;padding:0;font:inherit;text-align:left;cursor:pointer;background:", ";border-radius:6px;overflow:hidden;border:1px solid ", ";box-shadow:", ";transition:border-color 0.15s,box-shadow 0.15s;&:hover:not(:disabled){border-color:", ";}&:disabled{cursor:default;}"], Color.CLEAR, ({
|
|
131
|
+
$selected
|
|
132
|
+
}) => $selected ? Color.PRIMARY : Color.DIVIDER, ({
|
|
133
|
+
$selected
|
|
134
|
+
}) => $selected ? `0 0 0 1px ${Color.PRIMARY}` : 'none', Color.PRIMARY);
|
|
135
|
+
export const DesignCaption = styled.span.withConfig({
|
|
136
|
+
displayName: "DesignCaption",
|
|
137
|
+
componentId: "sc-uu3cbo-28"
|
|
138
|
+
})(["display:flex;justify-content:space-between;gap:6px;padding:6px 8px;font-size:", ";color:", ";span:first-child{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}span:last-child{flex-shrink:0;color:", ";}"], FontSize.SMALL, Color.MAIN, Color.LOCKED);
|
|
139
|
+
export const DropzoneRow = styled.div.withConfig({
|
|
140
|
+
displayName: "DropzoneRow",
|
|
141
|
+
componentId: "sc-uu3cbo-29"
|
|
142
|
+
})(["display:flex;align-items:stretch;gap:12px;& > :first-child{flex:1;}"]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pushwoosh/smart-components-kit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Stateful, data-connected React components shared by Pushwoosh micro-frontends",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@floating-ui/react-dom": "^2.1.2",
|
|
20
|
-
"@pushwoosh/dumb-components": "^2.9.
|
|
20
|
+
"@pushwoosh/dumb-components": "^2.9.16",
|
|
21
21
|
"@pushwoosh/kit-constants": "^2.1.0",
|
|
22
22
|
"@pushwoosh/kit-helpers": "^4.12.7",
|
|
23
23
|
"@pushwoosh/kit-icons": "^2.3.3",
|
|
24
24
|
"@pushwoosh/kit-typography": "^1.8.7",
|
|
25
|
-
"@pushwoosh/rpc-v2-http-api-data": "^0.2.
|
|
25
|
+
"@pushwoosh/rpc-v2-http-api-data": "^0.2.383",
|
|
26
26
|
"@pushwoosh/spa-context": "^1.8.1",
|
|
27
27
|
"idb-keyval": "^6.2.2",
|
|
28
28
|
"jwt-decode": "^4.0.0",
|