@pushwoosh/dumb-components 1.1.19 → 1.1.21
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/DropdownMenu/components/DropdownMenu/index.d.ts +0 -1
- package/DropdownMenu/components/DropdownMenu/index.js +1 -2
- package/DropdownMenu/components/DropdownMenu/styles.d.ts +0 -56
- package/DropdownMenu/components/DropdownMenu/styles.js +2 -6
- package/DropdownMenu/components/DropdownMenuItem/styles.js +2 -2
- package/DropdownMenu/components/DropdownMenuSection/DropdownMenuSection.d.ts +3 -0
- package/DropdownMenu/components/DropdownMenuSection/DropdownMenuSection.js +17 -0
- package/DropdownMenu/components/DropdownMenuSection/index.d.ts +1 -0
- package/DropdownMenu/components/DropdownMenuSection/index.js +1 -0
- package/DropdownMenu/components/DropdownMenuSection/styles.d.ts +56 -0
- package/DropdownMenu/components/DropdownMenuSection/styles.js +7 -0
- package/DropdownMenu/components/DropdownMenuSection/types.d.ts +4 -0
- package/DropdownMenu/components/DropdownMenuSection/types.js +1 -0
- package/DropdownMenu/index.d.ts +2 -1
- package/DropdownMenu/index.js +3 -2
- package/StatisticCard/StatisticCard.js +2 -2
- package/StatisticCard/types.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { DropdownMenu } from './DropdownMenu';
|
|
2
|
-
export { DropdownMenuSection } from './styles';
|
|
1
|
+
export { DropdownMenu } from './DropdownMenu';
|
|
@@ -59,59 +59,3 @@ export declare const Place: import("styled-components").StyledComponent<"div", a
|
|
|
59
59
|
$zIndex?: number;
|
|
60
60
|
$scrollable?: boolean;
|
|
61
61
|
}, "$gridAutoFlow">;
|
|
62
|
-
export declare const DropdownMenuSection: import("styled-components").StyledComponent<"div", any, {
|
|
63
|
-
$alignContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
|
|
64
|
-
$alignItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
|
|
65
|
-
$bgColor?: string | undefined;
|
|
66
|
-
$border?: string | ({
|
|
67
|
-
top?: string | undefined;
|
|
68
|
-
right?: string | undefined;
|
|
69
|
-
bottom?: string | undefined;
|
|
70
|
-
left?: string | undefined;
|
|
71
|
-
} | {
|
|
72
|
-
horizontal: string;
|
|
73
|
-
top?: string | undefined;
|
|
74
|
-
bottom?: string | undefined;
|
|
75
|
-
} | {
|
|
76
|
-
vertical: string;
|
|
77
|
-
right?: string | undefined;
|
|
78
|
-
left?: string | undefined;
|
|
79
|
-
}) | undefined;
|
|
80
|
-
$borderRadius?: (string | number) | undefined;
|
|
81
|
-
$boxShadow?: string | undefined;
|
|
82
|
-
$gap?: (string | number) | undefined;
|
|
83
|
-
$gridAutoFlow?: "row" | "column" | "dense" | "row dense" | "column dense" | undefined;
|
|
84
|
-
$justifyContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
|
|
85
|
-
$justifyItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
|
|
86
|
-
$margin?: (string | number) | ({
|
|
87
|
-
top?: (string | number) | undefined;
|
|
88
|
-
right?: (string | number) | undefined;
|
|
89
|
-
bottom?: (string | number) | undefined;
|
|
90
|
-
left?: (string | number) | undefined;
|
|
91
|
-
} | {
|
|
92
|
-
horizontal: string | number;
|
|
93
|
-
top?: (string | number) | undefined;
|
|
94
|
-
bottom?: (string | number) | undefined;
|
|
95
|
-
} | {
|
|
96
|
-
vertical: string | number;
|
|
97
|
-
right?: (string | number) | undefined;
|
|
98
|
-
left?: (string | number) | undefined;
|
|
99
|
-
}) | undefined;
|
|
100
|
-
$padding?: (string | number) | ({
|
|
101
|
-
top?: (string | number) | undefined;
|
|
102
|
-
right?: (string | number) | undefined;
|
|
103
|
-
bottom?: (string | number) | undefined;
|
|
104
|
-
left?: (string | number) | undefined;
|
|
105
|
-
} | {
|
|
106
|
-
horizontal: string | number;
|
|
107
|
-
top?: (string | number) | undefined;
|
|
108
|
-
bottom?: (string | number) | undefined;
|
|
109
|
-
} | {
|
|
110
|
-
vertical: string | number;
|
|
111
|
-
right?: (string | number) | undefined;
|
|
112
|
-
left?: (string | number) | undefined;
|
|
113
|
-
}) | undefined;
|
|
114
|
-
$placeItems?: "end" | "start" | "center" | "stretch" | undefined;
|
|
115
|
-
} & {
|
|
116
|
-
$gridAutoFlow: string;
|
|
117
|
-
}, "$gridAutoFlow">;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
|
-
import { Color, Shadow, ShapeRadius
|
|
2
|
+
import { Color, Shadow, ShapeRadius } from '@pushwoosh/kit-constants';
|
|
3
3
|
import { Vertical } from '@pushwoosh/kit-helpers';
|
|
4
4
|
const scrollableCss = css(["max-height:248px;overflow-y:auto;"]);
|
|
5
5
|
export const Place = styled(Vertical).withConfig({
|
|
@@ -13,8 +13,4 @@ export const Place = styled(Vertical).withConfig({
|
|
|
13
13
|
$scrollable
|
|
14
14
|
}) => $scrollable && scrollableCss, ShapeRadius.CONTROL, Shadow.REGULAR, ({
|
|
15
15
|
$zIndex
|
|
16
|
-
}) => $zIndex || 10);
|
|
17
|
-
export const DropdownMenuSection = styled(Vertical).withConfig({
|
|
18
|
-
displayName: "DropdownMenuSection",
|
|
19
|
-
componentId: "sc-ij8wqc-1"
|
|
20
|
-
})(["padding:", " 0;&:not(:first-child){border-top:1px solid ", ";}"], Spacing.S3, Color.FORM);
|
|
16
|
+
}) => $zIndex || 10);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
|
-
import { Color,
|
|
2
|
+
import { Color, UnitSize } from '@pushwoosh/kit-constants';
|
|
3
3
|
export const DropdownMenuItemStyled = styled.button.withConfig({
|
|
4
4
|
displayName: "DropdownMenuItemStyled",
|
|
5
5
|
componentId: "sc-1wmyvxp-0"
|
|
6
|
-
})(["appearance:none;display:flex;align-items:center;white-space:nowrap;padding:0
|
|
6
|
+
})(["appearance:none;display:flex;align-items:center;white-space:nowrap;padding:0 12px;min-height:", ";border:none;color:", ";background:none;cursor:pointer;&:hover{background:", ";color:", ";}&:disabled{color:", ";cursor:not-allowed;}"], UnitSize.FIELD_HEIGHT, ({
|
|
7
7
|
$active,
|
|
8
8
|
$danger
|
|
9
9
|
}) => {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Color } from '@pushwoosh/kit-constants';
|
|
3
|
+
import { Horizontal } from '@pushwoosh/kit-helpers';
|
|
4
|
+
import { Text } from '@pushwoosh/kit-typography';
|
|
5
|
+
import { DropdownMenuSectionRoot } from './styles';
|
|
6
|
+
export const DropdownMenuSection = ({
|
|
7
|
+
title,
|
|
8
|
+
children
|
|
9
|
+
}) => {
|
|
10
|
+
return React.createElement(DropdownMenuSectionRoot, null, title && React.createElement(Horizontal, {
|
|
11
|
+
"$padding": "8px 12px"
|
|
12
|
+
}, React.createElement(Text, {
|
|
13
|
+
"$variant": "h5",
|
|
14
|
+
"$color": Color.LOCKED,
|
|
15
|
+
"$uppercase": true
|
|
16
|
+
}, title)), children);
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DropdownMenuSection } from './DropdownMenuSection';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DropdownMenuSection } from './DropdownMenuSection';
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export declare const DropdownMenuSectionRoot: import("styled-components").StyledComponent<"div", any, {
|
|
2
|
+
$alignContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
|
|
3
|
+
$alignItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
|
|
4
|
+
$bgColor?: string | undefined;
|
|
5
|
+
$border?: string | ({
|
|
6
|
+
top?: string | undefined;
|
|
7
|
+
right?: string | undefined;
|
|
8
|
+
bottom?: string | undefined;
|
|
9
|
+
left?: string | undefined;
|
|
10
|
+
} | {
|
|
11
|
+
horizontal: string;
|
|
12
|
+
top?: string | undefined;
|
|
13
|
+
bottom?: string | undefined;
|
|
14
|
+
} | {
|
|
15
|
+
vertical: string;
|
|
16
|
+
right?: string | undefined;
|
|
17
|
+
left?: string | undefined;
|
|
18
|
+
}) | undefined;
|
|
19
|
+
$borderRadius?: (string | number) | undefined;
|
|
20
|
+
$boxShadow?: string | undefined;
|
|
21
|
+
$gap?: (string | number) | undefined;
|
|
22
|
+
$gridAutoFlow?: "row" | "column" | "dense" | "row dense" | "column dense" | undefined;
|
|
23
|
+
$justifyContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
|
|
24
|
+
$justifyItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
|
|
25
|
+
$margin?: (string | number) | ({
|
|
26
|
+
top?: (string | number) | undefined;
|
|
27
|
+
right?: (string | number) | undefined;
|
|
28
|
+
bottom?: (string | number) | undefined;
|
|
29
|
+
left?: (string | number) | undefined;
|
|
30
|
+
} | {
|
|
31
|
+
horizontal: string | number;
|
|
32
|
+
top?: (string | number) | undefined;
|
|
33
|
+
bottom?: (string | number) | undefined;
|
|
34
|
+
} | {
|
|
35
|
+
vertical: string | number;
|
|
36
|
+
right?: (string | number) | undefined;
|
|
37
|
+
left?: (string | number) | undefined;
|
|
38
|
+
}) | undefined;
|
|
39
|
+
$padding?: (string | number) | ({
|
|
40
|
+
top?: (string | number) | undefined;
|
|
41
|
+
right?: (string | number) | undefined;
|
|
42
|
+
bottom?: (string | number) | undefined;
|
|
43
|
+
left?: (string | number) | undefined;
|
|
44
|
+
} | {
|
|
45
|
+
horizontal: string | number;
|
|
46
|
+
top?: (string | number) | undefined;
|
|
47
|
+
bottom?: (string | number) | undefined;
|
|
48
|
+
} | {
|
|
49
|
+
vertical: string | number;
|
|
50
|
+
right?: (string | number) | undefined;
|
|
51
|
+
left?: (string | number) | undefined;
|
|
52
|
+
}) | undefined;
|
|
53
|
+
$placeItems?: "end" | "start" | "center" | "stretch" | undefined;
|
|
54
|
+
} & {
|
|
55
|
+
$gridAutoFlow: string;
|
|
56
|
+
}, "$gridAutoFlow">;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { Color } from '@pushwoosh/kit-constants';
|
|
3
|
+
import { Vertical } from '@pushwoosh/kit-helpers';
|
|
4
|
+
export const DropdownMenuSectionRoot = styled(Vertical).withConfig({
|
|
5
|
+
displayName: "DropdownMenuSectionRoot",
|
|
6
|
+
componentId: "sc-xi4vra-0"
|
|
7
|
+
})(["padding:8px 0;&:not(:first-child){border-top:1px solid ", ";}"], Color.FORM);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/DropdownMenu/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export { DropdownMenu
|
|
1
|
+
export { DropdownMenu } from './components/DropdownMenu';
|
|
2
2
|
export { DropdownMenuButton } from './components/DropdownMenuButton';
|
|
3
3
|
export { DropdownMenuItem } from './components/DropdownMenuItem';
|
|
4
|
+
export { DropdownMenuSection } from './components/DropdownMenuSection';
|
package/DropdownMenu/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export { DropdownMenu
|
|
1
|
+
export { DropdownMenu } from './components/DropdownMenu';
|
|
2
2
|
export { DropdownMenuButton } from './components/DropdownMenuButton';
|
|
3
|
-
export { DropdownMenuItem } from './components/DropdownMenuItem';
|
|
3
|
+
export { DropdownMenuItem } from './components/DropdownMenuItem';
|
|
4
|
+
export { DropdownMenuSection } from './components/DropdownMenuSection';
|
|
@@ -28,12 +28,12 @@ export function StatisticCard(props) {
|
|
|
28
28
|
return React.createElement(Horizontal, {
|
|
29
29
|
"$alignItems": "end",
|
|
30
30
|
"$gap": 8
|
|
31
|
-
}, React.createElement(StatValue, null, formatNumber(value, 'spaced')), React.createElement(Text, {
|
|
31
|
+
}, React.createElement(StatValue, null, typeof value === 'number' ? formatNumber(value, 'spaced') : value), React.createElement(Text, {
|
|
32
32
|
"$variant": "footnote",
|
|
33
33
|
"$color": Color.LOCKED
|
|
34
34
|
}, valueSubtext));
|
|
35
35
|
}
|
|
36
|
-
return React.createElement(StatValue, null, formatNumber(value, 'spaced'));
|
|
36
|
+
return React.createElement(StatValue, null, typeof value === 'number' ? formatNumber(value, 'spaced') : value);
|
|
37
37
|
}, [isLoading, value, valueSubtext]);
|
|
38
38
|
return React.createElement(Container, {
|
|
39
39
|
"$active": active,
|
package/StatisticCard/types.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { type ReactNode } from 'react';
|
|
|
2
2
|
export type StatisticCardProps = CommonProps & (SelectableProps | NonSelectableProps);
|
|
3
3
|
export type CommonProps = {
|
|
4
4
|
title: ReactNode;
|
|
5
|
-
value: number;
|
|
5
|
+
value: number | string;
|
|
6
6
|
valueSubtext?: string;
|
|
7
7
|
rightSlot?: ReactNode;
|
|
8
8
|
footer?: string;
|