@applicaster/zapp-react-native-ui-components 12.0.0-rc.107 → 12.0.0-rc.108
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.
|
@@ -117,9 +117,6 @@ export const BorderContainerView = (props: Props) => {
|
|
|
117
117
|
children,
|
|
118
118
|
} = props;
|
|
119
119
|
|
|
120
|
-
const borderStyleForMissingBorder =
|
|
121
|
-
style?.borderWidth === 0 || !style?.borderColor ? { borderRadius: 0 } : {};
|
|
122
|
-
|
|
123
120
|
const padding =
|
|
124
121
|
borderPosition === "outside"
|
|
125
122
|
? {
|
|
@@ -131,10 +128,7 @@ export const BorderContainerView = (props: Props) => {
|
|
|
131
128
|
: {};
|
|
132
129
|
|
|
133
130
|
return (
|
|
134
|
-
<View
|
|
135
|
-
{...props}
|
|
136
|
-
style={[style, styles.container, borderStyleForMissingBorder]}
|
|
137
|
-
>
|
|
131
|
+
<View {...props} style={[style, styles.container]}>
|
|
138
132
|
<Border style={style} padding={padding} borderPosition={borderPosition} />
|
|
139
133
|
{children}
|
|
140
134
|
</View>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ImageStyle } from "react-native";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
getImageContainerMarginStyles,
|
|
5
|
+
ifElseFocusedSelected,
|
|
6
|
+
} from "@applicaster/zapp-react-native-utils/cellUtils";
|
|
7
|
+
import { toNumberWithDefaultZero } from "@applicaster/zapp-react-native-utils/numberUtils";
|
|
8
|
+
|
|
9
|
+
export const ImageBorderContainer = ({
|
|
10
|
+
value,
|
|
11
|
+
state,
|
|
12
|
+
imageStyles,
|
|
13
|
+
}: {
|
|
14
|
+
value: (key: string) => string;
|
|
15
|
+
state: CellState;
|
|
16
|
+
imageStyles: ImageStyle;
|
|
17
|
+
}) => {
|
|
18
|
+
return {
|
|
19
|
+
type: "BorderContainerView",
|
|
20
|
+
style: {
|
|
21
|
+
...getImageContainerMarginStyles({ value }),
|
|
22
|
+
position: "absolute",
|
|
23
|
+
top: 0,
|
|
24
|
+
zIndex: 1,
|
|
25
|
+
borderWidth: value("image_border_size"),
|
|
26
|
+
borderColor: ifElseFocusedSelected(
|
|
27
|
+
state,
|
|
28
|
+
value("image_focused_border_color"),
|
|
29
|
+
value("image_selected_border_color"),
|
|
30
|
+
value("image_focused_selected_border_color"),
|
|
31
|
+
value("image_border_color")
|
|
32
|
+
),
|
|
33
|
+
borderRadius: toNumberWithDefaultZero(value("image_corner_radius")),
|
|
34
|
+
},
|
|
35
|
+
additionalProps: {
|
|
36
|
+
borderPosition: value("image_border_position"),
|
|
37
|
+
borderPaddingTop: toNumberWithDefaultZero(
|
|
38
|
+
value("image_border_padding_top")
|
|
39
|
+
),
|
|
40
|
+
borderPaddingRight: toNumberWithDefaultZero(
|
|
41
|
+
value("image_border_padding_right")
|
|
42
|
+
),
|
|
43
|
+
borderPaddingBottom: toNumberWithDefaultZero(
|
|
44
|
+
value("image_border_padding_bottom")
|
|
45
|
+
),
|
|
46
|
+
borderPaddingLeft: toNumberWithDefaultZero(
|
|
47
|
+
value("image_border_padding_left")
|
|
48
|
+
),
|
|
49
|
+
},
|
|
50
|
+
elements: [
|
|
51
|
+
{
|
|
52
|
+
type: "View",
|
|
53
|
+
style: imageStyles,
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
};
|
|
57
|
+
};
|
|
@@ -15,6 +15,7 @@ import { BorderContainerView } from "./BorderContainerView";
|
|
|
15
15
|
import { CellBadge } from "./CellBadge";
|
|
16
16
|
import { TvActionButtons } from "./tv/TvActionButtons";
|
|
17
17
|
import { ButtonContainerView } from "./tv/ButtonContainerView";
|
|
18
|
+
import { ImageBorderContainer } from "./ImageBorderContainer";
|
|
18
19
|
|
|
19
20
|
export const defaultComponents = {
|
|
20
21
|
View,
|
|
@@ -28,6 +29,7 @@ export const defaultComponents = {
|
|
|
28
29
|
ProgressBar,
|
|
29
30
|
Toggle,
|
|
30
31
|
LiveImage,
|
|
32
|
+
ImageBorderContainer,
|
|
31
33
|
BorderContainerView,
|
|
32
34
|
DynamicBadge,
|
|
33
35
|
SecondaryImage,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-ui-components",
|
|
3
|
-
"version": "12.0.0-rc.
|
|
3
|
+
"version": "12.0.0-rc.108",
|
|
4
4
|
"description": "Applicaster Zapp React Native ui components for the Quick Brick App",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"redux-mock-store": "^1.5.3"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@applicaster/applicaster-types": "12.0.0-rc.
|
|
38
|
-
"@applicaster/zapp-react-native-bridge": "12.0.0-rc.
|
|
39
|
-
"@applicaster/zapp-react-native-redux": "12.0.0-rc.
|
|
40
|
-
"@applicaster/zapp-react-native-utils": "12.0.0-rc.
|
|
37
|
+
"@applicaster/applicaster-types": "12.0.0-rc.108",
|
|
38
|
+
"@applicaster/zapp-react-native-bridge": "12.0.0-rc.108",
|
|
39
|
+
"@applicaster/zapp-react-native-redux": "12.0.0-rc.108",
|
|
40
|
+
"@applicaster/zapp-react-native-utils": "12.0.0-rc.108",
|
|
41
41
|
"promise": "^8.3.0",
|
|
42
42
|
"react-router-native": "^5.1.2",
|
|
43
43
|
"url": "^0.11.0",
|