@pushwoosh/dumb-components 0.0.14 → 0.0.15
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/ExportResult/ExportResult.d.ts +3 -0
- package/ExportResult/ExportResult.js +39 -0
- package/ExportResult/index.d.ts +1 -0
- package/ExportResult/index.js +1 -0
- package/ExportResult/styled.d.ts +46 -0
- package/ExportResult/styled.js +75 -0
- package/ExportResult/types.d.ts +9 -0
- package/ExportResult/types.js +1 -0
- package/index.d.ts +1 -0
- package/index.js +2 -1
- package/package.json +2 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Button } from '@pushwoosh/kit-button';
|
|
3
|
+
import { Spacing } from '@pushwoosh/kit-constants';
|
|
4
|
+
import { Horizontal } from '@pushwoosh/kit-helpers';
|
|
5
|
+
import { CloseIcon, CSVIcon } from '@pushwoosh/kit-icons';
|
|
6
|
+
import { LeftSlot, MainInfoContainer, RightSlotContainer, Subtitle, Title } from './styled';
|
|
7
|
+
export function ExportResult({
|
|
8
|
+
type,
|
|
9
|
+
title,
|
|
10
|
+
subtitle,
|
|
11
|
+
leftSlotIcon,
|
|
12
|
+
rightSlot,
|
|
13
|
+
handleClose
|
|
14
|
+
}) {
|
|
15
|
+
return React.createElement(Horizontal, {
|
|
16
|
+
"$justifyContent": "space-between",
|
|
17
|
+
"$alignItems": "center",
|
|
18
|
+
"$gap": Spacing.S4
|
|
19
|
+
}, React.createElement(Horizontal, {
|
|
20
|
+
"$gap": Spacing.S4
|
|
21
|
+
}, React.createElement(LeftSlot, {
|
|
22
|
+
"$type": type,
|
|
23
|
+
"$alignItems": "center",
|
|
24
|
+
"$padding": Spacing.S1
|
|
25
|
+
}, leftSlotIcon || React.createElement(CSVIcon, {
|
|
26
|
+
size: "medium",
|
|
27
|
+
view: "filled"
|
|
28
|
+
})), React.createElement(MainInfoContainer, null, React.createElement(Title, null, title), React.createElement(Subtitle, null, subtitle))), React.createElement(RightSlotContainer, {
|
|
29
|
+
"$gap": Spacing.S3,
|
|
30
|
+
"$alignItems": "center"
|
|
31
|
+
}, rightSlot, React.createElement(Button, {
|
|
32
|
+
color: "secondary",
|
|
33
|
+
onClick: handleClose,
|
|
34
|
+
size: "compact",
|
|
35
|
+
icon: React.createElement(CloseIcon, {
|
|
36
|
+
size: "small"
|
|
37
|
+
})
|
|
38
|
+
})));
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ExportResult';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ExportResult';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { H5 } from '@pushwoosh/kit-typography';
|
|
2
|
+
export declare const MainInfoContainer: import("styled-components").StyledComponent<"div", any, {
|
|
3
|
+
$alignContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
|
|
4
|
+
$alignItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
|
|
5
|
+
$gap?: string | number | undefined;
|
|
6
|
+
$gridAutoFlow?: "row" | "column" | "dense" | "row dense" | "column dense" | undefined;
|
|
7
|
+
$justifyContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
|
|
8
|
+
$justifyItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
|
|
9
|
+
$margin?: string | number | undefined;
|
|
10
|
+
$padding?: string | number | undefined;
|
|
11
|
+
$placeItems?: "end" | "start" | "center" | "stretch" | undefined;
|
|
12
|
+
} & {
|
|
13
|
+
$gridAutoFlow: string;
|
|
14
|
+
}, "$gridAutoFlow">;
|
|
15
|
+
export declare const Title: import("styled-components").StyledComponent<typeof H5, any, {}, never>;
|
|
16
|
+
export declare const Subtitle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
17
|
+
interface LeftSlotProps {
|
|
18
|
+
$type: 'error' | 'warning' | 'info' | 'success';
|
|
19
|
+
}
|
|
20
|
+
export declare const LeftSlot: import("styled-components").StyledComponent<"div", any, {
|
|
21
|
+
$alignContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
|
|
22
|
+
$alignItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
|
|
23
|
+
$gap?: string | number | undefined;
|
|
24
|
+
$gridAutoFlow?: "row" | "column" | "dense" | "row dense" | "column dense" | undefined;
|
|
25
|
+
$justifyContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
|
|
26
|
+
$justifyItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
|
|
27
|
+
$margin?: string | number | undefined;
|
|
28
|
+
$padding?: string | number | undefined;
|
|
29
|
+
$placeItems?: "end" | "start" | "center" | "stretch" | undefined;
|
|
30
|
+
} & {
|
|
31
|
+
$gridAutoFlow: string;
|
|
32
|
+
} & LeftSlotProps, "$gridAutoFlow">;
|
|
33
|
+
export declare const RightSlotContainer: import("styled-components").StyledComponent<"div", any, {
|
|
34
|
+
$alignContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
|
|
35
|
+
$alignItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
|
|
36
|
+
$gap?: string | number | undefined;
|
|
37
|
+
$gridAutoFlow?: "row" | "column" | "dense" | "row dense" | "column dense" | undefined;
|
|
38
|
+
$justifyContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
|
|
39
|
+
$justifyItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
|
|
40
|
+
$margin?: string | number | undefined;
|
|
41
|
+
$padding?: string | number | undefined;
|
|
42
|
+
$placeItems?: "end" | "start" | "center" | "stretch" | undefined;
|
|
43
|
+
} & {
|
|
44
|
+
$gridAutoFlow: string;
|
|
45
|
+
}, "$gridAutoFlow">;
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
import { Color, FontSize, ShapeRadius } from '@pushwoosh/kit-constants';
|
|
3
|
+
import { Horizontal, Vertical } from '@pushwoosh/kit-helpers';
|
|
4
|
+
import { H5 } from '@pushwoosh/kit-typography';
|
|
5
|
+
const colorMixin = css(["color:", ";background:", ";"], ({
|
|
6
|
+
$type
|
|
7
|
+
}) => {
|
|
8
|
+
switch ($type) {
|
|
9
|
+
case 'success':
|
|
10
|
+
{
|
|
11
|
+
return Color.SUCCESS;
|
|
12
|
+
}
|
|
13
|
+
case 'warning':
|
|
14
|
+
{
|
|
15
|
+
return Color.WARNING;
|
|
16
|
+
}
|
|
17
|
+
case 'error':
|
|
18
|
+
{
|
|
19
|
+
return Color.DANGER;
|
|
20
|
+
}
|
|
21
|
+
case 'info':
|
|
22
|
+
{
|
|
23
|
+
return Color.BRIGHT;
|
|
24
|
+
}
|
|
25
|
+
default:
|
|
26
|
+
{
|
|
27
|
+
return Color.BRIGHT;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}, ({
|
|
31
|
+
$type
|
|
32
|
+
}) => {
|
|
33
|
+
switch ($type) {
|
|
34
|
+
case 'success':
|
|
35
|
+
{
|
|
36
|
+
return Color.SUCCESS_LIGHT;
|
|
37
|
+
}
|
|
38
|
+
case 'warning':
|
|
39
|
+
{
|
|
40
|
+
return Color.WARNING_LIGHT;
|
|
41
|
+
}
|
|
42
|
+
case 'error':
|
|
43
|
+
{
|
|
44
|
+
return Color.DANGER_LIGHT;
|
|
45
|
+
}
|
|
46
|
+
case 'info':
|
|
47
|
+
{
|
|
48
|
+
return Color.BRIGHT_LIGHT;
|
|
49
|
+
}
|
|
50
|
+
default:
|
|
51
|
+
{
|
|
52
|
+
return Color.BRIGHT_LIGHT;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
export const MainInfoContainer = styled(Vertical).withConfig({
|
|
57
|
+
displayName: "MainInfoContainer",
|
|
58
|
+
componentId: "sc-1ekol67-0"
|
|
59
|
+
})(["flex:1;overflow:hidden;"]);
|
|
60
|
+
export const Title = styled(H5).withConfig({
|
|
61
|
+
displayName: "Title",
|
|
62
|
+
componentId: "sc-1ekol67-1"
|
|
63
|
+
})(["font-size:", ";text-transform:uppercase;"], FontSize.SMALL);
|
|
64
|
+
export const Subtitle = styled.div.withConfig({
|
|
65
|
+
displayName: "Subtitle",
|
|
66
|
+
componentId: "sc-1ekol67-2"
|
|
67
|
+
})(["font-size:", ";color:", ";white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"], FontSize.SMALL, Color.LOCKED);
|
|
68
|
+
export const LeftSlot = styled(Horizontal).withConfig({
|
|
69
|
+
displayName: "LeftSlot",
|
|
70
|
+
componentId: "sc-1ekol67-3"
|
|
71
|
+
})(["border-radius:", ";", ";"], ShapeRadius.CONTROL, colorMixin);
|
|
72
|
+
export const RightSlotContainer = styled(Horizontal).withConfig({
|
|
73
|
+
displayName: "RightSlotContainer",
|
|
74
|
+
componentId: "sc-1ekol67-4"
|
|
75
|
+
})(["flex-shrink:0;"]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -2,4 +2,5 @@ export { ProgressBar } from './ProgressBar';
|
|
|
2
2
|
export * from './Tabs';
|
|
3
3
|
export { StatisticCard } from './StatisticCard';
|
|
4
4
|
export { EmailTemplatePreview, NoEmailTemplatePreview } from './EmailTemplatePreview';
|
|
5
|
-
export { PushPreview } from './PushPreview';
|
|
5
|
+
export { PushPreview } from './PushPreview';
|
|
6
|
+
export { ExportResult } from './ExportResult';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pushwoosh/dumb-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15",
|
|
4
4
|
"description": "React components to build Pushwoosh products",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.js",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"npm": ">= 7"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
+
"@pushwoosh/kit-button": "^2.3.5",
|
|
42
43
|
"@pushwoosh/kit-helpers": "^4.6.2",
|
|
43
44
|
"@pushwoosh/kit-icons": "^2.0.25",
|
|
44
45
|
"@pushwoosh/kit-spinner": "^1.5.1",
|