ota-components-module 1.3.1 → 1.3.2
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/lib/button/ThemedButton.d.ts +19 -0
- package/lib/button/ThemedButton.js +73 -0
- package/lib/feedback/ActivityLoader.d.ts +12 -0
- package/lib/feedback/ActivityLoader.js +65 -0
- package/lib/feedback/CustomAlert.d.ts +20 -0
- package/lib/feedback/CustomAlert.js +96 -0
- package/lib/feedback/DeleteImageConfirmationDialog.d.ts +16 -0
- package/lib/feedback/DeleteImageConfirmationDialog.js +19 -0
- package/lib/feedback/ProgressBar.d.ts +15 -0
- package/lib/feedback/ProgressBar.js +34 -0
- package/lib/image/ImagePickerBottomSheet.d.ts +10 -0
- package/lib/image/ImagePickerBottomSheet.js +31 -0
- package/lib/image/ImagePickerView.d.ts +11 -0
- package/lib/image/ImagePickerView.js +65 -0
- package/lib/image/MultipleImagePreview.d.ts +33 -0
- package/lib/image/MultipleImagePreview.js +332 -0
- package/lib/image/StackedImage.d.ts +11 -0
- package/lib/image/StackedImage.js +122 -0
- package/lib/index.d.ts +25 -0
- package/lib/index.js +56 -0
- package/lib/input/CustomDropdown.d.ts +40 -0
- package/lib/input/CustomDropdown.js +71 -0
- package/lib/input/CustomInput.d.ts +17 -0
- package/lib/input/CustomInput.js +47 -0
- package/lib/input/FormField.d.ts +31 -0
- package/lib/input/FormField.js +250 -0
- package/lib/input/KeyboardScrollView.d.ts +7 -0
- package/lib/input/KeyboardScrollView.js +96 -0
- package/lib/input/SearchViewInput.d.ts +59 -0
- package/lib/input/SearchViewInput.js +80 -0
- package/lib/layout/BottomSheetDialog.d.ts +5 -0
- package/lib/layout/BottomSheetDialog.js +156 -0
- package/lib/layout/BottomTwoButtonLayoutComponent.d.ts +26 -0
- package/lib/layout/BottomTwoButtonLayoutComponent.js +81 -0
- package/lib/layout/CardView.d.ts +24 -0
- package/lib/layout/CardView.js +79 -0
- package/lib/layout/PropertyHeaderComponent.d.ts +34 -0
- package/lib/layout/PropertyHeaderComponent.js +63 -0
- package/lib/list/SearchableList.d.ts +50 -0
- package/lib/list/SearchableList.js +143 -0
- package/lib/models/PropertyImage.d.ts +11 -0
- package/lib/models/PropertyImage.js +22 -0
- package/lib/typography/Label.d.ts +26 -0
- package/lib/typography/Label.js +147 -0
- package/lib/utils/BaseStyle.d.ts +31 -0
- package/lib/utils/BaseStyle.js +42 -0
- package/lib/utils/Strings.d.ts +1 -0
- package/lib/utils/Strings.js +4 -0
- package/lib/utils/TextConstants.d.ts +23 -0
- package/lib/utils/TextConstants.js +28 -0
- package/lib/utils/Utils.d.ts +5 -0
- package/lib/utils/Utils.js +12 -0
- package/lib/webbaseview/WebBaseView.d.ts +8 -0
- package/lib/webbaseview/WebBaseView.js +28 -0
- package/package.json +7 -7
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PropertyImage = void 0;
|
|
4
|
+
var PropertyImage = /** @class */ (function () {
|
|
5
|
+
function PropertyImage(data) {
|
|
6
|
+
this.propertyId = 0;
|
|
7
|
+
this.propertyImagesId = null;
|
|
8
|
+
this.imageBlobUrl = "";
|
|
9
|
+
this.imageType = "";
|
|
10
|
+
this.imageName = "";
|
|
11
|
+
this.isDefault = false;
|
|
12
|
+
this.propertyId = (data === null || data === void 0 ? void 0 : data.propertyId) || 0;
|
|
13
|
+
this.propertyImagesId = (data === null || data === void 0 ? void 0 : data.propertyImagesId) || null;
|
|
14
|
+
this.imageBlobUrl = (data === null || data === void 0 ? void 0 : data.imageBlobUrl) || "";
|
|
15
|
+
this.imageType = (data === null || data === void 0 ? void 0 : data.imageType) || "";
|
|
16
|
+
this.imageName = (data === null || data === void 0 ? void 0 : data.imageName) || "";
|
|
17
|
+
this.isDefault = (data === null || data === void 0 ? void 0 : data.isDefault) || false;
|
|
18
|
+
this.id = (data === null || data === void 0 ? void 0 : data.id) || "";
|
|
19
|
+
}
|
|
20
|
+
return PropertyImage;
|
|
21
|
+
}());
|
|
22
|
+
exports.PropertyImage = PropertyImage;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TextStyle, StyleProp } from 'react-native';
|
|
3
|
+
export type FontWeight = 'thin' | 'light' | 'normal' | 'bold' | 'extra-bold' | 'semi-light' | 'semi-regular' | 'semi-bold';
|
|
4
|
+
export type FontStyle = 'normal' | 'italic';
|
|
5
|
+
export type TextAlign = 'auto' | 'left' | 'right' | 'center' | 'justify';
|
|
6
|
+
type TextColorType = 'primary' | 'secondary';
|
|
7
|
+
export type LabelType = 'link' | 'label';
|
|
8
|
+
export type FontSize = 'tiny' | 'small' | 'normal' | 'large' | 'xlarge' | 'xxlarge' | 'xxxlarge' | 'xxxxlarge' | 'xxxxxlarge' | 'xxxxxxlarge' | 'header';
|
|
9
|
+
export type LabelVariant = 'heading1' | 'heading2' | 'heading3' | 'title' | 'subtitle' | 'body' | 'bodyBold' | 'caption' | 'captionBold' | 'label' | 'value' | 'email' | 'address';
|
|
10
|
+
interface LabelProps {
|
|
11
|
+
testID?: string;
|
|
12
|
+
labelType?: LabelType;
|
|
13
|
+
text: string;
|
|
14
|
+
variant?: LabelVariant;
|
|
15
|
+
size?: FontSize;
|
|
16
|
+
weight?: FontWeight;
|
|
17
|
+
style?: FontStyle;
|
|
18
|
+
color?: string;
|
|
19
|
+
align?: TextAlign;
|
|
20
|
+
numberOfLines?: number;
|
|
21
|
+
customStyle?: StyleProp<TextStyle>;
|
|
22
|
+
onPress?: () => void;
|
|
23
|
+
textColorType?: TextColorType;
|
|
24
|
+
}
|
|
25
|
+
declare const Label: React.FC<LabelProps>;
|
|
26
|
+
export default Label;
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
var react_1 = require("react");
|
|
15
|
+
var react_native_1 = require("react-native");
|
|
16
|
+
var BaseStyle_1 = require("../utils/BaseStyle");
|
|
17
|
+
var Utils_1 = require("../utils/Utils");
|
|
18
|
+
var Label = function (_a) {
|
|
19
|
+
var testID = _a.testID, _b = _a.labelType, labelType = _b === void 0 ? 'label' : _b, text = _a.text, _c = _a.variant, variant = _c === void 0 ? 'body' : _c, size = _a.size, weight = _a.weight, fontStyle = _a.style, color = _a.color, align = _a.align, numberOfLines = _a.numberOfLines, customStyle = _a.customStyle, onPress = _a.onPress, _d = _a.textColorType, textColorType = _d === void 0 ? 'primary' : _d;
|
|
20
|
+
// Get base style from variant
|
|
21
|
+
var variantStyle = styles[variant] || styles.body;
|
|
22
|
+
var width = (0, react_native_1.useWindowDimensions)().width;
|
|
23
|
+
var isBigScreen = width >= Utils_1.MAX_RESOLUTION_MOBILE;
|
|
24
|
+
// Override with specific props if provided
|
|
25
|
+
var textStyle = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, variantStyle), (size && { fontSize: getFontSize(size, isBigScreen) })), (weight && { fontFamily: getFontFamily(weight) })), (weight && { fontWeight: getFontWeight(weight) })), (fontStyle && { fontStyle: fontStyle })), (textColorType === 'primary' ? { color: BaseStyle_1.Colors.primaryTextColor } : { color: BaseStyle_1.Colors.secondaryTextColor })), (color && { color: color })), (align && { textAlign: align }));
|
|
26
|
+
return (<react_native_1.Text testID={testID} style={[textStyle, customStyle, labelType === 'link' && styles.link]} numberOfLines={numberOfLines} onPress={onPress}>
|
|
27
|
+
{text}
|
|
28
|
+
</react_native_1.Text>);
|
|
29
|
+
};
|
|
30
|
+
// Helper function to get font size from size prop
|
|
31
|
+
var getFontSize = function (size, isBigScreen) {
|
|
32
|
+
var fontSizes = {
|
|
33
|
+
tiny: isBigScreen ? 14 : 12,
|
|
34
|
+
small: isBigScreen ? 16 : 14,
|
|
35
|
+
normal: isBigScreen ? 18 : 16,
|
|
36
|
+
large: isBigScreen ? 20 : 18,
|
|
37
|
+
xlarge: isBigScreen ? 22 : 20,
|
|
38
|
+
xxlarge: isBigScreen ? 24 : 22,
|
|
39
|
+
xxxlarge: isBigScreen ? 26 : 24,
|
|
40
|
+
xxxxlarge: isBigScreen ? 28 : 26,
|
|
41
|
+
xxxxxlarge: isBigScreen ? 30 : 28,
|
|
42
|
+
xxxxxxlarge: isBigScreen ? 32 : 30,
|
|
43
|
+
header: isBigScreen ? 34 : 32
|
|
44
|
+
};
|
|
45
|
+
return fontSizes[size];
|
|
46
|
+
};
|
|
47
|
+
// Helper function to map weight to fontWeight value
|
|
48
|
+
var getFontWeight = function (weight) {
|
|
49
|
+
var weightMap = {
|
|
50
|
+
'thin': '200',
|
|
51
|
+
'light': '300',
|
|
52
|
+
'semi-light': '400',
|
|
53
|
+
'semi-regular': '500',
|
|
54
|
+
'normal': 'normal',
|
|
55
|
+
'semi-bold': '600',
|
|
56
|
+
'bold': 'bold',
|
|
57
|
+
'extra-bold': '800',
|
|
58
|
+
};
|
|
59
|
+
return weightMap[weight];
|
|
60
|
+
};
|
|
61
|
+
// Helper function to map weight to fontWeight value
|
|
62
|
+
var getFontFamily = function (weight) {
|
|
63
|
+
var weightMap = {
|
|
64
|
+
'thin': 'OpenSans-Light',
|
|
65
|
+
'light': 'OpenSans-Light',
|
|
66
|
+
'semi-light': 'OpenSans-Light',
|
|
67
|
+
'semi-regular': 'OpenSans-Regular',
|
|
68
|
+
'normal': 'OpenSans-Regular',
|
|
69
|
+
'semi-bold': 'OpenSans-SemiBold',
|
|
70
|
+
'bold': 'OpenSans-Bold',
|
|
71
|
+
'extra-bold': 'OpenSans-Bold',
|
|
72
|
+
};
|
|
73
|
+
return weightMap[weight];
|
|
74
|
+
};
|
|
75
|
+
// Define styles for each variant
|
|
76
|
+
var styles = react_native_1.StyleSheet.create({
|
|
77
|
+
heading1: {
|
|
78
|
+
fontSize: 20, // xlarge
|
|
79
|
+
fontWeight: getFontWeight('extra-bold'),
|
|
80
|
+
color: '#1A1A1A',
|
|
81
|
+
},
|
|
82
|
+
heading2: {
|
|
83
|
+
fontSize: 18, // large
|
|
84
|
+
fontWeight: getFontWeight('bold'),
|
|
85
|
+
color: '#1A1A1A',
|
|
86
|
+
},
|
|
87
|
+
heading3: {
|
|
88
|
+
fontSize: 16, // normal
|
|
89
|
+
fontWeight: getFontWeight('bold'),
|
|
90
|
+
color: '#1A1A1A',
|
|
91
|
+
},
|
|
92
|
+
title: {
|
|
93
|
+
fontSize: 18, // large
|
|
94
|
+
fontWeight: getFontWeight('bold'),
|
|
95
|
+
color: '#1A1A1A',
|
|
96
|
+
},
|
|
97
|
+
subtitle: {
|
|
98
|
+
fontSize: 16, // normal
|
|
99
|
+
fontWeight: getFontWeight('bold'),
|
|
100
|
+
color: '#1A1A1A',
|
|
101
|
+
},
|
|
102
|
+
body: {
|
|
103
|
+
fontSize: 16, // normal
|
|
104
|
+
fontWeight: getFontWeight('normal'),
|
|
105
|
+
color: '#333333',
|
|
106
|
+
},
|
|
107
|
+
bodyBold: {
|
|
108
|
+
fontSize: 16, // normal
|
|
109
|
+
fontWeight: getFontWeight('bold'),
|
|
110
|
+
color: '#333333',
|
|
111
|
+
},
|
|
112
|
+
caption: {
|
|
113
|
+
fontSize: 14, // small
|
|
114
|
+
fontWeight: getFontWeight('normal'),
|
|
115
|
+
color: '#666666',
|
|
116
|
+
},
|
|
117
|
+
captionBold: {
|
|
118
|
+
fontSize: 14, // small
|
|
119
|
+
fontWeight: getFontWeight('bold'),
|
|
120
|
+
color: '#666666',
|
|
121
|
+
},
|
|
122
|
+
label: {
|
|
123
|
+
fontSize: 16, // normal
|
|
124
|
+
fontWeight: getFontWeight('light'),
|
|
125
|
+
color: '#666666',
|
|
126
|
+
},
|
|
127
|
+
value: {
|
|
128
|
+
fontSize: 18, // large
|
|
129
|
+
fontWeight: getFontWeight('bold'),
|
|
130
|
+
color: '#1A1A1A',
|
|
131
|
+
},
|
|
132
|
+
email: {
|
|
133
|
+
fontSize: 14, // small
|
|
134
|
+
fontWeight: getFontWeight('normal'),
|
|
135
|
+
color: '#666666',
|
|
136
|
+
},
|
|
137
|
+
address: {
|
|
138
|
+
fontSize: 14, // small
|
|
139
|
+
fontWeight: getFontWeight('normal'),
|
|
140
|
+
color: '#666666',
|
|
141
|
+
},
|
|
142
|
+
link: {
|
|
143
|
+
color: '#1e90ff',
|
|
144
|
+
textDecorationLine: 'underline',
|
|
145
|
+
},
|
|
146
|
+
});
|
|
147
|
+
exports.default = Label;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare const Colors: {
|
|
2
|
+
primaryColor: string;
|
|
3
|
+
lightThemePrimaryColor: string;
|
|
4
|
+
darkThemePrimaryColor: string;
|
|
5
|
+
primaryTextColor: string;
|
|
6
|
+
secondaryTextColor: string;
|
|
7
|
+
textBlack: string;
|
|
8
|
+
textWhite: string;
|
|
9
|
+
backgroundColor: string;
|
|
10
|
+
lightGrayColor: string;
|
|
11
|
+
mediumGrayColor: string;
|
|
12
|
+
darkGrayColor: string;
|
|
13
|
+
successColor: string;
|
|
14
|
+
warningColor: string;
|
|
15
|
+
errorColor: string;
|
|
16
|
+
infoColor: string;
|
|
17
|
+
borderColor: string;
|
|
18
|
+
shadowColor: string;
|
|
19
|
+
disabledColor: string;
|
|
20
|
+
bottomDeviderColor: string;
|
|
21
|
+
buttonPrimaryColor: string;
|
|
22
|
+
buttonSecondaryColor: string;
|
|
23
|
+
inputBorderColor: string;
|
|
24
|
+
inputFocusBorderColor: string;
|
|
25
|
+
transparentBlack: string;
|
|
26
|
+
transparentWhite: string;
|
|
27
|
+
whiteColor: string;
|
|
28
|
+
blackColor: string;
|
|
29
|
+
placeholderColor: string;
|
|
30
|
+
textMidnightColor: string;
|
|
31
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Colors = void 0;
|
|
4
|
+
exports.Colors = {
|
|
5
|
+
// Primary colors
|
|
6
|
+
primaryColor: '#007AC6',
|
|
7
|
+
lightThemePrimaryColor: '#007AC6',
|
|
8
|
+
darkThemePrimaryColor: '#007AC6',
|
|
9
|
+
// Text colors
|
|
10
|
+
primaryTextColor: '#162029',
|
|
11
|
+
secondaryTextColor: '#607184',
|
|
12
|
+
textBlack: '#000000',
|
|
13
|
+
textWhite: '#FFFFFF',
|
|
14
|
+
// Background colors
|
|
15
|
+
backgroundColor: '#FFFFFF',
|
|
16
|
+
lightGrayColor: '#F5F5F5',
|
|
17
|
+
mediumGrayColor: '#E0E0E0',
|
|
18
|
+
darkGrayColor: '#9E9E9E',
|
|
19
|
+
// Status colors
|
|
20
|
+
successColor: '#4CAF50',
|
|
21
|
+
warningColor: '#FFC107',
|
|
22
|
+
errorColor: '#F44336',
|
|
23
|
+
infoColor: '#2196F3',
|
|
24
|
+
// Other UI colors
|
|
25
|
+
borderColor: '#E0E0E0',
|
|
26
|
+
shadowColor: '#000000',
|
|
27
|
+
disabledColor: '#BDBDBD',
|
|
28
|
+
bottomDeviderColor: '#ddd',
|
|
29
|
+
// Specific UI elements
|
|
30
|
+
buttonPrimaryColor: '#007AC6',
|
|
31
|
+
buttonSecondaryColor: '#FFFFFF',
|
|
32
|
+
inputBorderColor: '#E0E0E0',
|
|
33
|
+
inputFocusBorderColor: '#007AC6',
|
|
34
|
+
// Transparency colors
|
|
35
|
+
transparentBlack: 'rgba(0, 0, 0, 0.5)',
|
|
36
|
+
transparentWhite: 'rgba(255, 255, 255, 0.5)',
|
|
37
|
+
// Standard colors
|
|
38
|
+
whiteColor: '#FFFFFF',
|
|
39
|
+
blackColor: '#000000',
|
|
40
|
+
placeholderColor: '#607184',
|
|
41
|
+
textMidnightColor: '#162029',
|
|
42
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const delete_image_confirmation_msg = "Are you sure you wish to delete this image?";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare enum TextSize {
|
|
2
|
+
TINY = "tiny",// 12
|
|
3
|
+
SMALL = "small",// 14
|
|
4
|
+
NORMAL = "normal",// 16
|
|
5
|
+
LARGE = "large",// 18
|
|
6
|
+
XLARGE = "xlarge",// 20
|
|
7
|
+
XXLARGE = "xxlarge",// 22
|
|
8
|
+
XXXLARGE = "xxxlarge",// 24
|
|
9
|
+
XXXXLARGE = "xxxxlarge",// 26
|
|
10
|
+
XXXXXLARGE = "xxxxxlarge",// 28
|
|
11
|
+
XXXXXXLARGE = "xxxxxxlarge",// 30
|
|
12
|
+
HEADER = "header"
|
|
13
|
+
}
|
|
14
|
+
export declare enum TextWeight {
|
|
15
|
+
THIN = "thin",
|
|
16
|
+
LIGHT = "light",
|
|
17
|
+
NORMAL = "normal",
|
|
18
|
+
SEMI_LIGHT = "semi-light",
|
|
19
|
+
SEMI_REGULAR = "semi-regular",
|
|
20
|
+
SEMI_BOLD = "semi-bold",
|
|
21
|
+
BOLD = "bold",
|
|
22
|
+
EXTRA_BOLD = "extra-bold"
|
|
23
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TextWeight = exports.TextSize = void 0;
|
|
4
|
+
var TextSize;
|
|
5
|
+
(function (TextSize) {
|
|
6
|
+
TextSize["TINY"] = "tiny";
|
|
7
|
+
TextSize["SMALL"] = "small";
|
|
8
|
+
TextSize["NORMAL"] = "normal";
|
|
9
|
+
TextSize["LARGE"] = "large";
|
|
10
|
+
TextSize["XLARGE"] = "xlarge";
|
|
11
|
+
TextSize["XXLARGE"] = "xxlarge";
|
|
12
|
+
TextSize["XXXLARGE"] = "xxxlarge";
|
|
13
|
+
TextSize["XXXXLARGE"] = "xxxxlarge";
|
|
14
|
+
TextSize["XXXXXLARGE"] = "xxxxxlarge";
|
|
15
|
+
TextSize["XXXXXXLARGE"] = "xxxxxxlarge";
|
|
16
|
+
TextSize["HEADER"] = "header";
|
|
17
|
+
})(TextSize || (exports.TextSize = TextSize = {}));
|
|
18
|
+
var TextWeight;
|
|
19
|
+
(function (TextWeight) {
|
|
20
|
+
TextWeight["THIN"] = "thin";
|
|
21
|
+
TextWeight["LIGHT"] = "light";
|
|
22
|
+
TextWeight["NORMAL"] = "normal";
|
|
23
|
+
TextWeight["SEMI_LIGHT"] = "semi-light";
|
|
24
|
+
TextWeight["SEMI_REGULAR"] = "semi-regular";
|
|
25
|
+
TextWeight["SEMI_BOLD"] = "semi-bold";
|
|
26
|
+
TextWeight["BOLD"] = "bold";
|
|
27
|
+
TextWeight["EXTRA_BOLD"] = "extra-bold";
|
|
28
|
+
})(TextWeight || (exports.TextWeight = TextWeight = {}));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isWebDevice = exports.MAX_RESOLUTION_MOBILE = exports.MAX_RESOLUTION_WEB = exports.isAndroid15AndAbove = exports.isIOS = void 0;
|
|
4
|
+
var react_native_1 = require("react-native");
|
|
5
|
+
exports.isIOS = react_native_1.Platform.OS === 'ios';
|
|
6
|
+
exports.isAndroid15AndAbove = react_native_1.Platform.OS === 'android' && parseInt(react_native_1.Platform.Version.toString(), 10) >= 35;
|
|
7
|
+
exports.MAX_RESOLUTION_WEB = 1100;
|
|
8
|
+
exports.MAX_RESOLUTION_MOBILE = 768;
|
|
9
|
+
var isWebDevice = function (width) {
|
|
10
|
+
return width >= exports.MAX_RESOLUTION_WEB ? true : false;
|
|
11
|
+
};
|
|
12
|
+
exports.isWebDevice = isWebDevice;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ViewStyle } from 'react-native';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
interface WebBaseViewProps {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
viewStyle?: ViewStyle;
|
|
6
|
+
}
|
|
7
|
+
declare const WebBaseView: ({ children, viewStyle }: WebBaseViewProps) => any;
|
|
8
|
+
export default WebBaseView;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
var react_native_1 = require("react-native");
|
|
15
|
+
var react_1 = require("react");
|
|
16
|
+
var Utils_1 = require("../utils/Utils");
|
|
17
|
+
var WebBaseView = function (_a) {
|
|
18
|
+
var children = _a.children, viewStyle = _a.viewStyle;
|
|
19
|
+
var width = (0, react_native_1.useWindowDimensions)().width;
|
|
20
|
+
var style = styles(width);
|
|
21
|
+
return (<react_native_1.View style={[style.container, viewStyle]}>
|
|
22
|
+
{children}
|
|
23
|
+
</react_native_1.View>);
|
|
24
|
+
};
|
|
25
|
+
var styles = function (width) { return react_native_1.StyleSheet.create({
|
|
26
|
+
container: __assign({}, ((0, Utils_1.isWebDevice)(width) ? { width: width * 0.8, marginHorizontal: 'auto' } : { width: width }))
|
|
27
|
+
}); };
|
|
28
|
+
exports.default = WebBaseView;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ota-components-module",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "Reusable UI components for OTA applications",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -10,19 +10,19 @@
|
|
|
10
10
|
"license": "ISC",
|
|
11
11
|
"peerDependencies": {
|
|
12
12
|
"@expo/vector-icons": "*",
|
|
13
|
-
"@types/react": "*"
|
|
14
|
-
"expo-checkbox": "*",
|
|
15
|
-
"expo-image": "*",
|
|
16
|
-
"react": "*",
|
|
17
|
-
"react-native": "*"
|
|
13
|
+
"@types/react": "*"
|
|
18
14
|
},
|
|
19
15
|
"dependencies": {
|
|
16
|
+
"expo-checkbox": "^5.0.7",
|
|
17
|
+
"expo-image": "^3.0.10",
|
|
20
18
|
"react-native-element-dropdown": "^2.12.4",
|
|
21
19
|
"react-native-safe-area-context": "^5.6.2"
|
|
22
20
|
},
|
|
23
21
|
"devDependencies": {
|
|
24
22
|
"@types/node": "^24.0.8",
|
|
25
23
|
"mri-cli-app-dev": "^1.0.5",
|
|
26
|
-
"typescript": "^5.9.2"
|
|
24
|
+
"typescript": "^5.9.2",
|
|
25
|
+
"react": ">=16.8.0",
|
|
26
|
+
"react-native": ">=0.60.0"
|
|
27
27
|
}
|
|
28
28
|
}
|