@dropi/react-native-design-system 0.1.4 → 0.1.6
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/atoms/Buttons/DefaultButton.js +32 -27
- package/lib/atoms/Buttons/FeedbackButton.js +31 -26
- package/lib/atoms/Buttons/TextButton.js +30 -25
- package/lib/atoms/Text/Body.js +5 -4
- package/lib/atoms/Text/Caption.js +5 -4
- package/lib/atoms/Text/Heading.js +5 -4
- package/lib/atoms/Text/Label.js +5 -4
- package/lib/molecules/Alert/Alert.d.ts +9 -0
- package/lib/molecules/Alert/Alert.js +97 -0
- package/lib/molecules/Alert/index.d.ts +1 -0
- package/lib/molecules/Alert/index.js +16 -0
- package/lib/molecules/EmptyState/EmptyState.d.ts +8 -0
- package/lib/molecules/EmptyState/EmptyState.js +60 -0
- package/lib/molecules/EmptyState/index.d.ts +1 -0
- package/lib/molecules/EmptyState/index.js +16 -0
- package/lib/molecules/RadioButtons/TitleDescription/TitleDescription.d.ts +10 -0
- package/lib/molecules/RadioButtons/TitleDescription/TitleDescription.js +127 -0
- package/lib/molecules/RadioButtons/TitleDescription/index.d.ts +1 -0
- package/lib/molecules/RadioButtons/TitleDescription/index.js +16 -0
- package/lib/molecules/RadioButtons/index.d.ts +1 -0
- package/lib/molecules/RadioButtons/index.js +16 -0
- package/lib/molecules/Search/Search.d.ts +7 -0
- package/lib/molecules/Search/Search.js +58 -0
- package/lib/molecules/Search/index.d.ts +1 -0
- package/lib/molecules/Search/index.js +16 -0
- package/lib/molecules/Tooltip/Tooltip.d.ts +10 -0
- package/lib/molecules/Tooltip/Tooltip.js +55 -0
- package/lib/molecules/Tooltip/index.d.ts +1 -0
- package/lib/molecules/Tooltip/index.js +16 -0
- package/lib/molecules/index.d.ts +5 -0
- package/lib/molecules/index.js +60 -0
- package/lib/utils/DeviceInfo.d.ts +2 -0
- package/lib/utils/DeviceInfo.js +9 -0
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/index.js +11 -8
- package/package.json +5 -3
|
@@ -9,7 +9,7 @@ var _reactNative2 = require("dropi-lib-icons/react-native");
|
|
|
9
9
|
var _utils = require("../../utils");
|
|
10
10
|
var _constants = require("../../constants");
|
|
11
11
|
var _Text = require("../Text");
|
|
12
|
-
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
const DefaultButton = ({
|
|
14
14
|
label,
|
|
15
15
|
variant,
|
|
@@ -24,10 +24,10 @@ const DefaultButton = ({
|
|
|
24
24
|
const iconSize = size === 'small' ? 12 : size === 'large' ? 16 : 14;
|
|
25
25
|
const tabletIconSize = size === 'small' ? 20 : size === 'large' ? 24 : 22;
|
|
26
26
|
const labelColor = variant === 'primary' ? _constants.colors.White.light : variant === 'secondary' ? _constants.colors['Primary-500'].light : _constants.colors['Gray-500'].light;
|
|
27
|
-
return /*#__PURE__*/
|
|
27
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
28
28
|
style: {
|
|
29
29
|
backgroundColor: variant == 'primary' ? _constants.colors['Primary-500'].light : 'transparent',
|
|
30
|
-
paddingVertical: size === 'small' ?
|
|
30
|
+
paddingVertical: size === 'small' ? _constants.spacing['size-2'] : size === 'large' ? _constants.spacing['size-4'] : _constants.spacing['size-3'],
|
|
31
31
|
paddingHorizontal: _constants.spacing['size-4'],
|
|
32
32
|
borderRadius: _constants.radius['border-2'],
|
|
33
33
|
alignItems: 'center',
|
|
@@ -37,31 +37,36 @@ const DefaultButton = ({
|
|
|
37
37
|
borderColor: variant === 'secondary' ? _constants.colors['Primary-500'].light : _constants.colors['Gray-500'].light,
|
|
38
38
|
flexDirection: 'row'
|
|
39
39
|
},
|
|
40
|
-
disabled: disabled || isMakingRequest
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
40
|
+
disabled: disabled || isMakingRequest,
|
|
41
|
+
...rest,
|
|
42
|
+
children: [preIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
43
|
+
style: {
|
|
44
|
+
marginRight: _constants.spacing['size-2']
|
|
45
|
+
},
|
|
46
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative2.Icon, {
|
|
47
|
+
name: preIcon,
|
|
48
|
+
size: !_utils.isTablet ? iconSize : tabletIconSize,
|
|
49
|
+
color: labelColor
|
|
50
|
+
})
|
|
51
|
+
}), !isMakingRequest ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.Label, {
|
|
52
|
+
type: textVariant,
|
|
53
|
+
style: {
|
|
54
|
+
color: labelColor
|
|
55
|
+
},
|
|
56
|
+
children: label
|
|
57
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
52
58
|
color: labelColor
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
})));
|
|
59
|
+
}), postIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
60
|
+
style: {
|
|
61
|
+
marginLeft: _constants.spacing['size-2']
|
|
62
|
+
},
|
|
63
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative2.Icon, {
|
|
64
|
+
name: postIcon,
|
|
65
|
+
size: !_utils.isTablet ? iconSize : tabletIconSize,
|
|
66
|
+
color: labelColor
|
|
67
|
+
})
|
|
68
|
+
})]
|
|
69
|
+
});
|
|
65
70
|
};
|
|
66
71
|
exports.DefaultButton = DefaultButton;
|
|
67
72
|
const styles = _reactNative.StyleSheet.create({});
|
|
@@ -9,7 +9,7 @@ var _reactNative2 = require("dropi-lib-icons/react-native");
|
|
|
9
9
|
var _utils = require("../../utils");
|
|
10
10
|
var _constants = require("../../constants");
|
|
11
11
|
var _Text = require("../Text");
|
|
12
|
-
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
const FeedbackButton = ({
|
|
14
14
|
label,
|
|
15
15
|
feedbackType,
|
|
@@ -26,10 +26,10 @@ const FeedbackButton = ({
|
|
|
26
26
|
const tabletIconSize = size === 'small' ? 20 : size === 'large' ? 24 : 22;
|
|
27
27
|
const color = feedbackType === 'success' ? _constants.colors['Success-500'].light : feedbackType === 'error' ? _constants.colors['Error-500'].light : feedbackType === 'warning' ? _constants.colors['Warning-500'].light : _constants.colors['Info-500'].light;
|
|
28
28
|
const labelColor = variant === 'primary' ? _constants.colors.White.light : color;
|
|
29
|
-
return /*#__PURE__*/
|
|
29
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
30
30
|
style: {
|
|
31
31
|
backgroundColor: variant === 'primary' ? color : 'transparent',
|
|
32
|
-
paddingVertical: size === 'small' ?
|
|
32
|
+
paddingVertical: size === 'small' ? _constants.spacing['size-2'] : size === 'large' ? _constants.spacing['size-4'] : _constants.spacing['size-3'],
|
|
33
33
|
paddingHorizontal: _constants.spacing['size-4'],
|
|
34
34
|
borderRadius: _constants.radius['border-2'],
|
|
35
35
|
alignItems: 'center',
|
|
@@ -39,29 +39,34 @@ const FeedbackButton = ({
|
|
|
39
39
|
borderColor: variant === 'secondary' ? color : undefined,
|
|
40
40
|
flexDirection: 'row',
|
|
41
41
|
alignSelf: 'flex-start'
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
42
|
+
},
|
|
43
|
+
...rest,
|
|
44
|
+
children: [preIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
45
|
+
style: {
|
|
46
|
+
marginRight: _constants.spacing['size-2']
|
|
47
|
+
},
|
|
48
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative2.Icon, {
|
|
49
|
+
name: preIcon,
|
|
50
|
+
size: !_utils.isTablet ? iconSize : tabletIconSize,
|
|
51
|
+
color: labelColor
|
|
52
|
+
})
|
|
53
|
+
}), label !== '' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.Label, {
|
|
54
|
+
type: textVariant,
|
|
55
|
+
style: {
|
|
56
|
+
color: labelColor
|
|
57
|
+
},
|
|
58
|
+
children: label
|
|
59
|
+
}), postIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
60
|
+
style: {
|
|
61
|
+
marginLeft: _constants.spacing['size-2']
|
|
62
|
+
},
|
|
63
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative2.Icon, {
|
|
64
|
+
name: postIcon,
|
|
65
|
+
size: !_utils.isTablet ? iconSize : tabletIconSize,
|
|
66
|
+
color: labelColor
|
|
67
|
+
})
|
|
68
|
+
})]
|
|
69
|
+
});
|
|
65
70
|
};
|
|
66
71
|
exports.FeedbackButton = FeedbackButton;
|
|
67
72
|
const styles = _reactNative.StyleSheet.create({});
|
|
@@ -9,7 +9,7 @@ var _utils = require("../../utils");
|
|
|
9
9
|
var _constants = require("../../constants/");
|
|
10
10
|
var _Text = require("../Text");
|
|
11
11
|
var _reactNative2 = require("dropi-lib-icons/react-native");
|
|
12
|
-
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
const TextButton = ({
|
|
14
14
|
label,
|
|
15
15
|
variant,
|
|
@@ -23,30 +23,35 @@ const TextButton = ({
|
|
|
23
23
|
const iconSize = size === 'small' ? 12 : size === 'large' ? 16 : 14;
|
|
24
24
|
const tabletIconSize = size === 'small' ? 20 : size === 'large' ? 24 : 22;
|
|
25
25
|
const color = replaceColor ? replaceColor : variant == 'primary' ? _constants.colors['Primary-500'].light : _constants.colors['Gray-500'].dark;
|
|
26
|
-
return /*#__PURE__*/
|
|
27
|
-
style: styles.settingsButton
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
26
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
27
|
+
style: styles.settingsButton,
|
|
28
|
+
...rest,
|
|
29
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
30
|
+
style: {
|
|
31
|
+
marginRight: label != '' || postIcon ? _constants.spacing['size-2'] : 0
|
|
32
|
+
},
|
|
33
|
+
children: preIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative2.Icon, {
|
|
34
|
+
name: preIcon,
|
|
35
|
+
size: !_utils.isTablet ? iconSize : tabletIconSize,
|
|
36
|
+
color: color
|
|
37
|
+
})
|
|
38
|
+
}), label !== '' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.Label, {
|
|
39
|
+
type: textVariant,
|
|
40
|
+
style: {
|
|
41
|
+
color: color
|
|
42
|
+
},
|
|
43
|
+
children: label
|
|
44
|
+
}), postIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
45
|
+
style: {
|
|
46
|
+
marginLeft: label != '' || preIcon ? _constants.spacing['size-2'] : 0
|
|
47
|
+
},
|
|
48
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative2.Icon, {
|
|
49
|
+
name: postIcon,
|
|
50
|
+
size: !_utils.isTablet ? iconSize : tabletIconSize,
|
|
51
|
+
color: color
|
|
52
|
+
})
|
|
53
|
+
})]
|
|
54
|
+
});
|
|
50
55
|
};
|
|
51
56
|
exports.TextButton = TextButton;
|
|
52
57
|
const styles = _reactNative.StyleSheet.create({
|
package/lib/atoms/Text/Body.js
CHANGED
|
@@ -7,15 +7,16 @@ exports.Body = void 0;
|
|
|
7
7
|
var _reactNative = require("react-native");
|
|
8
8
|
var _constants = require("../../constants");
|
|
9
9
|
var _utils = require("../../utils");
|
|
10
|
-
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
11
|
const Body = ({
|
|
12
12
|
type,
|
|
13
13
|
style,
|
|
14
14
|
...rest
|
|
15
15
|
}) => {
|
|
16
|
-
return /*#__PURE__*/
|
|
17
|
-
style: [styles[type], style]
|
|
18
|
-
|
|
16
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
17
|
+
style: [styles[type], style],
|
|
18
|
+
...rest
|
|
19
|
+
});
|
|
19
20
|
};
|
|
20
21
|
exports.Body = Body;
|
|
21
22
|
const styles = _reactNative.StyleSheet.create({
|
|
@@ -7,15 +7,16 @@ exports.Caption = void 0;
|
|
|
7
7
|
var _reactNative = require("react-native");
|
|
8
8
|
var _constants = require("../../constants");
|
|
9
9
|
var _utils = require("../..//utils");
|
|
10
|
-
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
11
|
const Caption = ({
|
|
12
12
|
type,
|
|
13
13
|
style,
|
|
14
14
|
...rest
|
|
15
15
|
}) => {
|
|
16
|
-
return /*#__PURE__*/
|
|
17
|
-
style: [styles[type], style]
|
|
18
|
-
|
|
16
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
17
|
+
style: [styles[type], style],
|
|
18
|
+
...rest
|
|
19
|
+
});
|
|
19
20
|
};
|
|
20
21
|
exports.Caption = Caption;
|
|
21
22
|
const styles = _reactNative.StyleSheet.create({
|
|
@@ -7,15 +7,16 @@ exports.Heading = void 0;
|
|
|
7
7
|
var _reactNative = require("react-native");
|
|
8
8
|
var _constants = require("../../constants");
|
|
9
9
|
var _utils = require("../../utils");
|
|
10
|
-
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
11
|
const Heading = ({
|
|
12
12
|
type,
|
|
13
13
|
style,
|
|
14
14
|
...rest
|
|
15
15
|
}) => {
|
|
16
|
-
return /*#__PURE__*/
|
|
17
|
-
style: [styles[type], style]
|
|
18
|
-
|
|
16
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
17
|
+
style: [styles[type], style],
|
|
18
|
+
...rest
|
|
19
|
+
});
|
|
19
20
|
};
|
|
20
21
|
exports.Heading = Heading;
|
|
21
22
|
const styles = _reactNative.StyleSheet.create({
|
package/lib/atoms/Text/Label.js
CHANGED
|
@@ -7,15 +7,16 @@ exports.Label = void 0;
|
|
|
7
7
|
var _reactNative = require("react-native");
|
|
8
8
|
var _constants = require("../../constants");
|
|
9
9
|
var _utils = require("../../utils");
|
|
10
|
-
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
11
|
const Label = ({
|
|
12
12
|
type,
|
|
13
13
|
style,
|
|
14
14
|
...rest
|
|
15
15
|
}) => {
|
|
16
|
-
return /*#__PURE__*/
|
|
17
|
-
style: [styles[type], style]
|
|
18
|
-
|
|
16
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
17
|
+
style: [styles[type], style],
|
|
18
|
+
...rest
|
|
19
|
+
});
|
|
19
20
|
};
|
|
20
21
|
exports.Label = Label;
|
|
21
22
|
const styles = _reactNative.StyleSheet.create({
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface AlertProps {
|
|
2
|
+
message: string;
|
|
3
|
+
variant: 'info' | 'warning' | 'error' | 'success';
|
|
4
|
+
buttonLabel?: string;
|
|
5
|
+
onButtonPress?: () => void;
|
|
6
|
+
onClosePress?: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const Alert: ({ message, variant, buttonLabel, onButtonPress, onClosePress }: AlertProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Alert = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _reactNative2 = require("dropi-lib-icons/react-native");
|
|
9
|
+
var _utils = require("../../utils");
|
|
10
|
+
var _constants = require("../../constants");
|
|
11
|
+
var _atoms = require("../../atoms");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
const variantStyles = {
|
|
14
|
+
info: {
|
|
15
|
+
backgroundColor: _constants.colors['Info-50'].light,
|
|
16
|
+
borderColor: _constants.colors['Info-500'].light,
|
|
17
|
+
icon: 'check-circle'
|
|
18
|
+
},
|
|
19
|
+
warning: {
|
|
20
|
+
backgroundColor: _constants.colors['Warning-50'].light,
|
|
21
|
+
borderColor: _constants.colors['Warning-500'].light,
|
|
22
|
+
icon: 'cross-circle'
|
|
23
|
+
},
|
|
24
|
+
error: {
|
|
25
|
+
backgroundColor: _constants.colors['Error-50'].light,
|
|
26
|
+
borderColor: _constants.colors['Error-500'].light,
|
|
27
|
+
icon: 'warning-circle'
|
|
28
|
+
},
|
|
29
|
+
success: {
|
|
30
|
+
backgroundColor: _constants.colors['Success-50'].light,
|
|
31
|
+
borderColor: _constants.colors['Success-500'].light,
|
|
32
|
+
icon: 'info'
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
const Alert = ({
|
|
36
|
+
message,
|
|
37
|
+
variant,
|
|
38
|
+
buttonLabel,
|
|
39
|
+
onButtonPress,
|
|
40
|
+
onClosePress
|
|
41
|
+
}) => {
|
|
42
|
+
const {
|
|
43
|
+
backgroundColor,
|
|
44
|
+
borderColor,
|
|
45
|
+
icon
|
|
46
|
+
} = variantStyles[variant];
|
|
47
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
48
|
+
style: {
|
|
49
|
+
backgroundColor: backgroundColor,
|
|
50
|
+
borderWidth: 1,
|
|
51
|
+
borderColor: borderColor,
|
|
52
|
+
padding: 12,
|
|
53
|
+
borderRadius: _constants.radius["border-2"],
|
|
54
|
+
flexDirection: 'row'
|
|
55
|
+
},
|
|
56
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
57
|
+
style: styles.alertIcon,
|
|
58
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative2.Icon, {
|
|
59
|
+
name: icon,
|
|
60
|
+
size: _constants.sizes.s,
|
|
61
|
+
color: borderColor
|
|
62
|
+
})
|
|
63
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_atoms.Body, {
|
|
64
|
+
type: "s-regular",
|
|
65
|
+
style: {
|
|
66
|
+
color: _constants.colors['Gray-700'].light,
|
|
67
|
+
flex: 1,
|
|
68
|
+
marginRight: !_utils.isTablet ? 8 : 12
|
|
69
|
+
},
|
|
70
|
+
children: message
|
|
71
|
+
}), buttonLabel && onButtonPress && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
72
|
+
style: {
|
|
73
|
+
marginRight: !_utils.isTablet ? 8 : 12
|
|
74
|
+
},
|
|
75
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_atoms.FeedbackButton, {
|
|
76
|
+
feedbackType: variant,
|
|
77
|
+
label: buttonLabel || 'Label',
|
|
78
|
+
variant: "primary",
|
|
79
|
+
size: "small",
|
|
80
|
+
onPress: onButtonPress
|
|
81
|
+
})
|
|
82
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_atoms.TextButton, {
|
|
83
|
+
label: "",
|
|
84
|
+
size: "large",
|
|
85
|
+
variant: "secondary",
|
|
86
|
+
preIcon: 'close-small',
|
|
87
|
+
onPress: onClosePress
|
|
88
|
+
})]
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
exports.Alert = Alert;
|
|
92
|
+
const styles = _reactNative.StyleSheet.create({
|
|
93
|
+
alertIcon: {
|
|
94
|
+
marginRight: 16,
|
|
95
|
+
marginTop: 4
|
|
96
|
+
}
|
|
97
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Alert';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _Alert = require("./Alert");
|
|
7
|
+
Object.keys(_Alert).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _Alert[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _Alert[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.EmptyState = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _expoImage = require("expo-image");
|
|
9
|
+
var _constants = require("../../constants");
|
|
10
|
+
var _atoms = require("../../atoms");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
const EmptyState = ({
|
|
13
|
+
title,
|
|
14
|
+
message,
|
|
15
|
+
buttonLabel,
|
|
16
|
+
onButtonPress
|
|
17
|
+
}) => {
|
|
18
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
19
|
+
style: {
|
|
20
|
+
paddingVertical: _constants.spacing['size-4']
|
|
21
|
+
},
|
|
22
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_expoImage.Image, {
|
|
23
|
+
source: require('../../../assets/not-found.png'),
|
|
24
|
+
style: {
|
|
25
|
+
width: 51,
|
|
26
|
+
height: 48,
|
|
27
|
+
alignSelf: 'center',
|
|
28
|
+
marginBottom: _constants.spacing['size-4']
|
|
29
|
+
},
|
|
30
|
+
contentFit: "contain"
|
|
31
|
+
}), title && /*#__PURE__*/(0, _jsxRuntime.jsx)(_atoms.Body, {
|
|
32
|
+
type: "l-medium",
|
|
33
|
+
style: {
|
|
34
|
+
color: _constants.colors['Gray-700'].light,
|
|
35
|
+
textAlign: 'center',
|
|
36
|
+
marginBottom: _constants.spacing['size-2']
|
|
37
|
+
},
|
|
38
|
+
children: title
|
|
39
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_atoms.Body, {
|
|
40
|
+
type: "m-regular",
|
|
41
|
+
style: {
|
|
42
|
+
color: _constants.colors['Gray-500'].light,
|
|
43
|
+
textAlign: 'center'
|
|
44
|
+
},
|
|
45
|
+
children: message
|
|
46
|
+
}), buttonLabel && onButtonPress && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
47
|
+
style: {
|
|
48
|
+
marginTop: 24,
|
|
49
|
+
alignItems: 'center'
|
|
50
|
+
},
|
|
51
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_atoms.DefaultButton, {
|
|
52
|
+
label: buttonLabel,
|
|
53
|
+
onPress: onButtonPress,
|
|
54
|
+
variant: 'tertiary',
|
|
55
|
+
size: 'normal'
|
|
56
|
+
})
|
|
57
|
+
})]
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
exports.EmptyState = EmptyState;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './EmptyState';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _EmptyState = require("./EmptyState");
|
|
7
|
+
Object.keys(_EmptyState).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _EmptyState[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _EmptyState[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TouchableOpacityProps } from 'react-native';
|
|
2
|
+
interface TitleDescriptionProps extends TouchableOpacityProps {
|
|
3
|
+
title: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
imageSource?: string | number;
|
|
6
|
+
isActive: boolean;
|
|
7
|
+
isDisabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const TitleDescription: ({ title, label, imageSource, isActive, isDisabled, ...rest }: TitleDescriptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TitleDescription = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _expoImage = require("expo-image");
|
|
9
|
+
var _utils = require("../../../utils");
|
|
10
|
+
var _constants = require("../../../constants");
|
|
11
|
+
var _atoms = require("../../../atoms");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
const TitleDescription = ({
|
|
14
|
+
title,
|
|
15
|
+
label,
|
|
16
|
+
imageSource,
|
|
17
|
+
isActive,
|
|
18
|
+
isDisabled,
|
|
19
|
+
...rest
|
|
20
|
+
}) => {
|
|
21
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
22
|
+
children: isActive ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
23
|
+
style: styles.selectedOption,
|
|
24
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
25
|
+
style: styles.selectedOptionSelector,
|
|
26
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
27
|
+
style: styles.innerSelector
|
|
28
|
+
})
|
|
29
|
+
}), imageSource && /*#__PURE__*/(0, _jsxRuntime.jsx)(_expoImage.Image, {
|
|
30
|
+
source: imageSource,
|
|
31
|
+
style: styles.image
|
|
32
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
33
|
+
style: styles.textContainer,
|
|
34
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_atoms.Body, {
|
|
35
|
+
type: "m-regular",
|
|
36
|
+
style: styles.optionText,
|
|
37
|
+
children: title
|
|
38
|
+
}), label && /*#__PURE__*/(0, _jsxRuntime.jsx)(_atoms.Body, {
|
|
39
|
+
type: "s-regular",
|
|
40
|
+
style: styles.optionText,
|
|
41
|
+
children: label
|
|
42
|
+
})]
|
|
43
|
+
})]
|
|
44
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
45
|
+
style: styles.option,
|
|
46
|
+
...rest,
|
|
47
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
48
|
+
style: styles.optionSelector
|
|
49
|
+
}), imageSource && /*#__PURE__*/(0, _jsxRuntime.jsx)(_expoImage.Image, {
|
|
50
|
+
source: imageSource,
|
|
51
|
+
style: styles.image
|
|
52
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
53
|
+
style: styles.textContainer,
|
|
54
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_atoms.Body, {
|
|
55
|
+
type: "m-regular",
|
|
56
|
+
style: styles.optionText,
|
|
57
|
+
children: title
|
|
58
|
+
}), label && /*#__PURE__*/(0, _jsxRuntime.jsx)(_atoms.Body, {
|
|
59
|
+
type: "s-regular",
|
|
60
|
+
style: styles.optionText,
|
|
61
|
+
children: label
|
|
62
|
+
})]
|
|
63
|
+
})]
|
|
64
|
+
})
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
exports.TitleDescription = TitleDescription;
|
|
68
|
+
const styles = _reactNative.StyleSheet.create({
|
|
69
|
+
option: {
|
|
70
|
+
padding: _constants.spacing['size-4'],
|
|
71
|
+
borderRadius: _constants.radius['border-2'],
|
|
72
|
+
borderWidth: 1,
|
|
73
|
+
borderColor: _constants.colors['Gray-200'].light,
|
|
74
|
+
marginBottom: _constants.spacing['size-5'],
|
|
75
|
+
flexDirection: 'row',
|
|
76
|
+
alignItems: 'center'
|
|
77
|
+
},
|
|
78
|
+
selectedOption: {
|
|
79
|
+
padding: _constants.spacing['size-4'],
|
|
80
|
+
borderRadius: _constants.radius['border-2'],
|
|
81
|
+
borderWidth: 1,
|
|
82
|
+
borderColor: _constants.colors["Primary-500"].light,
|
|
83
|
+
marginBottom: _constants.spacing['size-5'],
|
|
84
|
+
flexDirection: 'row',
|
|
85
|
+
alignItems: 'center',
|
|
86
|
+
backgroundColor: _constants.colors['Primary-50'].light
|
|
87
|
+
},
|
|
88
|
+
optionSelector: {
|
|
89
|
+
width: !_utils.isTablet ? 20 : 20 * 1.5,
|
|
90
|
+
height: !_utils.isTablet ? 20 : 20 * 1.5,
|
|
91
|
+
borderRadius: _constants.radius.circle,
|
|
92
|
+
marginRight: _constants.spacing['size-3'],
|
|
93
|
+
borderWidth: 2,
|
|
94
|
+
borderColor: _constants.colors['Gray-200'].light
|
|
95
|
+
},
|
|
96
|
+
selectedOptionSelector: {
|
|
97
|
+
width: !_utils.isTablet ? 20 : 20 * 1.5,
|
|
98
|
+
height: !_utils.isTablet ? 20 : 20 * 1.5,
|
|
99
|
+
borderRadius: _constants.radius.circle,
|
|
100
|
+
marginRight: _constants.spacing['size-3'],
|
|
101
|
+
borderWidth: 2,
|
|
102
|
+
borderColor: _constants.colors["Primary-500"].light,
|
|
103
|
+
justifyContent: 'center',
|
|
104
|
+
alignItems: 'center'
|
|
105
|
+
},
|
|
106
|
+
innerSelector: {
|
|
107
|
+
width: !_utils.isTablet ? 12 : 12 * 1.5,
|
|
108
|
+
height: !_utils.isTablet ? 12 : 12 * 1.5,
|
|
109
|
+
borderRadius: _constants.radius.circle,
|
|
110
|
+
backgroundColor: _constants.colors["Primary-500"].light
|
|
111
|
+
},
|
|
112
|
+
image: {
|
|
113
|
+
width: 32,
|
|
114
|
+
height: 32,
|
|
115
|
+
marginRight: _constants.spacing['size-3'],
|
|
116
|
+
borderRadius: _constants.radius.circle
|
|
117
|
+
},
|
|
118
|
+
textContainer: {
|
|
119
|
+
flexDirection: 'column'
|
|
120
|
+
},
|
|
121
|
+
optionText: {
|
|
122
|
+
color: _constants.colors['Gray-700'].light
|
|
123
|
+
},
|
|
124
|
+
labelTaxt: {
|
|
125
|
+
color: _constants.colors['Gray-600'].light
|
|
126
|
+
}
|
|
127
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TitleDescription';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _TitleDescription = require("./TitleDescription");
|
|
7
|
+
Object.keys(_TitleDescription).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _TitleDescription[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _TitleDescription[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TitleDescription';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _TitleDescription = require("./TitleDescription");
|
|
7
|
+
Object.keys(_TitleDescription).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _TitleDescription[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _TitleDescription[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Search = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _reactNative2 = require("dropi-lib-icons/react-native");
|
|
9
|
+
var _constants = require("../../constants");
|
|
10
|
+
var _atoms = require("../../atoms");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
const Search = ({
|
|
13
|
+
filterText,
|
|
14
|
+
setFilterText,
|
|
15
|
+
placeholder
|
|
16
|
+
}) => {
|
|
17
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
18
|
+
style: {
|
|
19
|
+
width: '100%',
|
|
20
|
+
backgroundColor: _constants.colors['Gray-50'].light,
|
|
21
|
+
borderColor: '#D3D7DE',
|
|
22
|
+
borderWidth: 1,
|
|
23
|
+
borderRadius: 8,
|
|
24
|
+
paddingVertical: 16,
|
|
25
|
+
paddingHorizontal: 8,
|
|
26
|
+
flexDirection: 'row',
|
|
27
|
+
alignItems: 'center',
|
|
28
|
+
marginBottom: _constants.spacing['size-5']
|
|
29
|
+
},
|
|
30
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative2.Icon, {
|
|
31
|
+
name: "search",
|
|
32
|
+
size: 20,
|
|
33
|
+
color: _constants.colors['Gray-500'].light,
|
|
34
|
+
style: {
|
|
35
|
+
marginRight: _constants.spacing['size-2']
|
|
36
|
+
}
|
|
37
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
|
|
38
|
+
style: {
|
|
39
|
+
flex: 1,
|
|
40
|
+
fontSize: _constants.sizes.m,
|
|
41
|
+
color: _constants.colors['Gray-900'].light,
|
|
42
|
+
padding: 0
|
|
43
|
+
},
|
|
44
|
+
placeholder: placeholder || 'Buscar',
|
|
45
|
+
placeholderTextColor: _constants.colors['Gray-500'].light,
|
|
46
|
+
value: filterText,
|
|
47
|
+
onChangeText: setFilterText
|
|
48
|
+
}), filterText !== '' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_atoms.TextButton, {
|
|
49
|
+
label: "",
|
|
50
|
+
size: "large",
|
|
51
|
+
variant: "secondary",
|
|
52
|
+
preIcon: "close-small",
|
|
53
|
+
onPress: () => setFilterText(''),
|
|
54
|
+
replaceColor: _constants.colors['Gray-600'].light
|
|
55
|
+
})]
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
exports.Search = Search;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Search';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _Search = require("./Search");
|
|
7
|
+
Object.keys(_Search).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _Search[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _Search[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
width: number;
|
|
4
|
+
onClosePress?: () => void;
|
|
5
|
+
xPosition: number;
|
|
6
|
+
yPosition: number;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare const Tooltip: ({ width, xPosition, yPosition, children, onClosePress }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Tooltip = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _constants = require("../../constants");
|
|
9
|
+
var _atoms = require("../../atoms");
|
|
10
|
+
var _utils = require("../../utils");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
const Tooltip = ({
|
|
13
|
+
width,
|
|
14
|
+
xPosition,
|
|
15
|
+
yPosition,
|
|
16
|
+
children,
|
|
17
|
+
onClosePress
|
|
18
|
+
}) => {
|
|
19
|
+
let localXPosition = xPosition + width > _utils.windowWidth ? _utils.windowWidth - width - 40 : xPosition;
|
|
20
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
21
|
+
style: {
|
|
22
|
+
position: 'absolute',
|
|
23
|
+
top: yPosition,
|
|
24
|
+
left: localXPosition,
|
|
25
|
+
width: width,
|
|
26
|
+
backgroundColor: _constants.colors['Gray-800'].light,
|
|
27
|
+
padding: _constants.spacing['size-4'],
|
|
28
|
+
borderRadius: _constants.radius['border-2']
|
|
29
|
+
},
|
|
30
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
31
|
+
style: {
|
|
32
|
+
flexDirection: 'row'
|
|
33
|
+
},
|
|
34
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
35
|
+
style: {
|
|
36
|
+
flex: 1
|
|
37
|
+
},
|
|
38
|
+
children: children
|
|
39
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
40
|
+
style: {
|
|
41
|
+
paddingLeft: _constants.spacing['size-1']
|
|
42
|
+
},
|
|
43
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_atoms.TextButton, {
|
|
44
|
+
label: "",
|
|
45
|
+
size: "large",
|
|
46
|
+
variant: "secondary",
|
|
47
|
+
preIcon: "close-small",
|
|
48
|
+
replaceColor: _constants.colors.White.light,
|
|
49
|
+
onPress: onClosePress
|
|
50
|
+
})
|
|
51
|
+
})]
|
|
52
|
+
})
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
exports.Tooltip = Tooltip;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Tooltip';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _Tooltip = require("./Tooltip");
|
|
7
|
+
Object.keys(_Tooltip).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _Tooltip[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _Tooltip[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _Alert = require("./Alert");
|
|
7
|
+
Object.keys(_Alert).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _Alert[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _Alert[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _EmptyState = require("./EmptyState");
|
|
18
|
+
Object.keys(_EmptyState).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _EmptyState[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _EmptyState[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
var _RadioButtons = require("./RadioButtons");
|
|
29
|
+
Object.keys(_RadioButtons).forEach(function (key) {
|
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
|
31
|
+
if (key in exports && exports[key] === _RadioButtons[key]) return;
|
|
32
|
+
Object.defineProperty(exports, key, {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return _RadioButtons[key];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
var _Search = require("./Search");
|
|
40
|
+
Object.keys(_Search).forEach(function (key) {
|
|
41
|
+
if (key === "default" || key === "__esModule") return;
|
|
42
|
+
if (key in exports && exports[key] === _Search[key]) return;
|
|
43
|
+
Object.defineProperty(exports, key, {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () {
|
|
46
|
+
return _Search[key];
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
var _Tooltip = require("./Tooltip");
|
|
51
|
+
Object.keys(_Tooltip).forEach(function (key) {
|
|
52
|
+
if (key === "default" || key === "__esModule") return;
|
|
53
|
+
if (key in exports && exports[key] === _Tooltip[key]) return;
|
|
54
|
+
Object.defineProperty(exports, key, {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _Tooltip[key];
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.windowWidth = exports.isTablet = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
const windowWidth = exports.windowWidth = _reactNative.Dimensions.get("window").width;
|
|
9
|
+
const isTablet = exports.isTablet = windowWidth >= 768;
|
package/lib/utils/index.d.ts
CHANGED
package/lib/utils/index.js
CHANGED
|
@@ -3,15 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var _exportNames = {
|
|
7
|
-
isTablet: true
|
|
8
|
-
};
|
|
9
|
-
exports.isTablet = void 0;
|
|
10
|
-
var _reactNative = require("react-native");
|
|
11
6
|
var _TextUtils = require("./TextUtils");
|
|
12
7
|
Object.keys(_TextUtils).forEach(function (key) {
|
|
13
8
|
if (key === "default" || key === "__esModule") return;
|
|
14
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
15
9
|
if (key in exports && exports[key] === _TextUtils[key]) return;
|
|
16
10
|
Object.defineProperty(exports, key, {
|
|
17
11
|
enumerable: true,
|
|
@@ -20,5 +14,14 @@ Object.keys(_TextUtils).forEach(function (key) {
|
|
|
20
14
|
}
|
|
21
15
|
});
|
|
22
16
|
});
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
var _DeviceInfo = require("./DeviceInfo");
|
|
18
|
+
Object.keys(_DeviceInfo).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _DeviceInfo[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _DeviceInfo[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dropi/react-native-design-system",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "A React Native package built from scratch",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"react": ">=19.0.0",
|
|
23
23
|
"react-native": ">=0.79.5",
|
|
24
|
-
"dropi-lib-icons": ">=1.2.5"
|
|
24
|
+
"dropi-lib-icons": ">=1.2.5",
|
|
25
|
+
"expo-image": ">=2.4.0"
|
|
25
26
|
},
|
|
26
27
|
"devDependencies": {
|
|
27
28
|
"@babel/cli": "^7.28.3",
|
|
@@ -33,6 +34,7 @@
|
|
|
33
34
|
"react": "^19.2.0",
|
|
34
35
|
"react-native": "^0.82.1",
|
|
35
36
|
"typescript": "^5.6.0",
|
|
36
|
-
"dropi-lib-icons": "^1.2.5"
|
|
37
|
+
"dropi-lib-icons": "^1.2.5",
|
|
38
|
+
"expo-image": ">=2.4.0"
|
|
37
39
|
}
|
|
38
40
|
}
|