@oxyhq/services 5.4.3 → 5.4.5
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/README.md +14 -0
- package/lib/commonjs/assets/assets/illustrations/HighFive.tsx +41 -0
- package/lib/commonjs/assets/icons/OxyServices.js +1 -1
- package/lib/commonjs/assets/illustrations/HighFive.js +61 -0
- package/lib/commonjs/assets/illustrations/HighFive.js.map +1 -0
- package/lib/commonjs/core/index.js +24 -5
- package/lib/commonjs/core/index.js.map +1 -1
- package/lib/commonjs/index.js +72 -23
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/node/createAuth.js +95 -0
- package/lib/commonjs/node/createAuth.js.map +1 -0
- package/lib/commonjs/node/index.js +15 -6
- package/lib/commonjs/node/index.js.map +1 -1
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/ui/components/Avatar.js +3 -3
- package/lib/commonjs/ui/components/Avatar.js.map +1 -1
- package/lib/commonjs/ui/components/FollowButton.js +82 -34
- package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
- package/lib/commonjs/ui/components/GroupedSection.js +1 -1
- package/lib/commonjs/ui/components/OxyLogo.js +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +146 -141
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/OxySignInButton.js +4 -4
- package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileCard.js +2 -2
- package/lib/commonjs/ui/components/Section.js +1 -1
- package/lib/commonjs/ui/components/SectionTitle.js +1 -1
- package/lib/commonjs/ui/components/icon/index.js +1 -1
- package/lib/commonjs/ui/components/index.js +12 -12
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +213 -0
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +1 -0
- package/lib/commonjs/ui/components/internal/TextField.js +576 -0
- package/lib/commonjs/ui/components/internal/TextField.js.map +1 -0
- package/lib/commonjs/ui/context/OxyContext.js +12 -2
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/hooks/index.js +13 -0
- package/lib/commonjs/ui/hooks/index.js.map +1 -0
- package/lib/commonjs/ui/hooks/useFollow.js +184 -0
- package/lib/commonjs/ui/hooks/useFollow.js.map +1 -0
- package/lib/commonjs/ui/index.js +44 -12
- package/lib/commonjs/ui/index.js.map +1 -1
- package/lib/commonjs/ui/navigation/OxyRouter.js +23 -18
- package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +21 -20
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountManagementDemo.js +3 -3
- package/lib/commonjs/ui/screens/AccountManagementDemo.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +11 -10
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +8 -7
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +6 -5
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +12 -14
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/BillingManagementScreen.js +3 -3
- package/lib/commonjs/ui/screens/FeedbackScreen.js +1169 -0
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/FileManagementScreen.js +3 -3
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +3 -3
- package/lib/commonjs/ui/screens/ProfileScreen.js +2 -2
- package/lib/commonjs/ui/screens/SessionManagementScreen.js +2 -2
- package/lib/commonjs/ui/screens/SignInScreen.js +183 -305
- package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SignUpScreen.js +811 -712
- package/lib/commonjs/ui/screens/SignUpScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +8 -7
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js +2 -2
- package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js +1 -1
- package/lib/commonjs/ui/store/index.js +267 -0
- package/lib/commonjs/ui/store/index.js.map +1 -0
- package/lib/commonjs/ui/styles/index.js +2 -2
- package/lib/commonjs/ui/styles/theme.js +1 -1
- package/lib/commonjs/utils/index.js +1 -1
- package/lib/module/assets/assets/illustrations/HighFive.tsx +41 -0
- package/lib/module/assets/icons/OxyServices.js +1 -1
- package/lib/module/assets/icons/OxyServices.js.map +1 -1
- package/lib/module/assets/illustrations/HighFive.js +55 -0
- package/lib/module/assets/illustrations/HighFive.js.map +1 -0
- package/lib/module/core/index.js +24 -5
- package/lib/module/core/index.js.map +1 -1
- package/lib/module/index.js +15 -11
- package/lib/module/index.js.map +1 -1
- package/lib/module/node/createAuth.js +90 -0
- package/lib/module/node/createAuth.js.map +1 -0
- package/lib/module/node/index.js +8 -4
- package/lib/module/node/index.js.map +1 -1
- package/lib/module/package.json +1 -0
- package/lib/module/ui/components/Avatar.js +2 -2
- package/lib/module/ui/components/Avatar.js.map +1 -1
- package/lib/module/ui/components/FollowButton.js +83 -35
- package/lib/module/ui/components/FollowButton.js.map +1 -1
- package/lib/module/ui/components/GroupedSection.js +1 -1
- package/lib/module/ui/components/GroupedSection.js.map +1 -1
- package/lib/module/ui/components/OxyLogo.js +1 -1
- package/lib/module/ui/components/OxyLogo.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +143 -138
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/OxySignInButton.js +4 -4
- package/lib/module/ui/components/OxySignInButton.js.map +1 -1
- package/lib/module/ui/components/ProfileCard.js +2 -2
- package/lib/module/ui/components/ProfileCard.js.map +1 -1
- package/lib/module/ui/components/Section.js +1 -1
- package/lib/module/ui/components/Section.js.map +1 -1
- package/lib/module/ui/components/SectionTitle.js +1 -1
- package/lib/module/ui/components/SectionTitle.js.map +1 -1
- package/lib/module/ui/components/icon/index.js +1 -1
- package/lib/module/ui/components/icon/index.js.map +1 -1
- package/lib/module/ui/components/index.js +12 -12
- package/lib/module/ui/components/index.js.map +1 -1
- package/lib/module/ui/components/internal/GroupedPillButtons.js +208 -0
- package/lib/module/ui/components/internal/GroupedPillButtons.js.map +1 -0
- package/lib/module/ui/components/internal/TextField.js +571 -0
- package/lib/module/ui/components/internal/TextField.js.map +1 -0
- package/lib/module/ui/context/OxyContext.js +12 -2
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/hooks/index.js +4 -0
- package/lib/module/ui/hooks/index.js.map +1 -0
- package/lib/module/ui/hooks/useFollow.js +180 -0
- package/lib/module/ui/hooks/useFollow.js.map +1 -0
- package/lib/module/ui/index.js +21 -10
- package/lib/module/ui/index.js.map +1 -1
- package/lib/module/ui/navigation/OxyRouter.js +23 -18
- package/lib/module/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +9 -8
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountManagementDemo.js +2 -2
- package/lib/module/ui/screens/AccountManagementDemo.js.map +1 -1
- package/lib/module/ui/screens/AccountOverviewScreen.js +11 -10
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +8 -7
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +6 -5
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +12 -14
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/BillingManagementScreen.js +3 -3
- package/lib/module/ui/screens/BillingManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +1164 -0
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -0
- package/lib/module/ui/screens/FileManagementScreen.js +3 -3
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +3 -3
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +2 -2
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/SessionManagementScreen.js +2 -2
- package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/SignInScreen.js +183 -305
- package/lib/module/ui/screens/SignInScreen.js.map +1 -1
- package/lib/module/ui/screens/SignUpScreen.js +810 -712
- package/lib/module/ui/screens/SignUpScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js +8 -7
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js +2 -2
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js +1 -1
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
- package/lib/module/ui/store/index.js +255 -0
- package/lib/module/ui/store/index.js.map +1 -0
- package/lib/module/ui/styles/index.js +2 -2
- package/lib/module/ui/styles/index.js.map +1 -1
- package/lib/module/ui/styles/theme.js +1 -1
- package/lib/module/ui/styles/theme.js.map +1 -1
- package/lib/module/utils/index.js +1 -1
- package/lib/module/utils/index.js.map +1 -1
- package/lib/typescript/assets/illustrations/HighFive.d.ts +9 -0
- package/lib/typescript/assets/illustrations/HighFive.d.ts.map +1 -0
- package/lib/typescript/core/index.d.ts +16 -3
- package/lib/typescript/core/index.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +4 -2
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/node/createAuth.d.ts +7 -0
- package/lib/typescript/node/createAuth.d.ts.map +1 -0
- package/lib/typescript/node/index.d.ts +2 -0
- package/lib/typescript/node/index.d.ts.map +1 -1
- package/lib/typescript/types/expo-vector-icons.d.ts +3 -0
- package/lib/typescript/types/express.d.ts +5 -0
- package/lib/typescript/types/react-redux.d.ts +5 -0
- package/lib/typescript/ui/components/FollowButton.d.ts +1 -0
- package/lib/typescript/ui/components/FollowButton.d.ts.map +1 -1
- package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/ui/components/internal/GroupedPillButtons.d.ts +18 -0
- package/lib/typescript/ui/components/internal/GroupedPillButtons.d.ts.map +1 -0
- package/lib/typescript/ui/components/internal/TextField.d.ts +25 -0
- package/lib/typescript/ui/components/internal/TextField.d.ts.map +1 -0
- package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/index.d.ts +2 -0
- package/lib/typescript/ui/hooks/index.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/useFollow.d.ts +43 -0
- package/lib/typescript/ui/hooks/useFollow.d.ts.map +1 -0
- package/lib/typescript/ui/index.d.ts +5 -0
- package/lib/typescript/ui/index.d.ts.map +1 -1
- package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/FeedbackScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/FeedbackScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SignUpScreen.d.ts.map +1 -1
- package/lib/typescript/ui/store/index.d.ts +66 -0
- package/lib/typescript/ui/store/index.d.ts.map +1 -0
- package/package.json +10 -25
- package/src/assets/illustrations/HighFive.tsx +41 -0
- package/src/core/index.ts +88 -3
- package/src/index.ts +19 -3
- package/src/node/createAuth.ts +116 -0
- package/src/node/index.ts +4 -0
- package/src/types/expo-vector-icons.d.ts +3 -0
- package/src/types/express.d.ts +5 -0
- package/src/types/react-redux.d.ts +5 -0
- package/src/ui/components/FollowButton.tsx +114 -56
- package/src/ui/components/OxyProvider.tsx +136 -135
- package/src/ui/components/OxySignInButton.tsx +2 -2
- package/src/ui/components/internal/GroupedPillButtons.tsx +253 -0
- package/src/ui/components/internal/TextField.tsx +694 -0
- package/src/ui/context/OxyContext.tsx +12 -2
- package/src/ui/hooks/index.ts +1 -0
- package/src/ui/hooks/useFollow.ts +173 -0
- package/src/ui/index.ts +15 -2
- package/src/ui/navigation/OxyRouter.tsx +8 -3
- package/src/ui/screens/AccountCenterScreen.tsx +17 -15
- package/src/ui/screens/AccountOverviewScreen.tsx +25 -25
- package/src/ui/screens/AccountSettingsScreen.tsx +30 -30
- package/src/ui/screens/AccountSwitcherScreen.tsx +34 -33
- package/src/ui/screens/AppInfoScreen.tsx +153 -155
- package/src/ui/screens/FeedbackScreen.tsx +1042 -0
- package/src/ui/screens/SignInScreen.tsx +181 -224
- package/src/ui/screens/SignUpScreen.tsx +772 -608
- package/src/ui/screens/karma/KarmaCenterScreen.tsx +4 -4
- package/src/ui/store/index.ts +245 -0
|
@@ -0,0 +1,576 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _vectorIcons = require("@expo/vector-icons");
|
|
10
|
+
var _reactNativeSvg = _interopRequireWildcard(require("react-native-svg"));
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
13
|
+
const TextField = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
14
|
+
label,
|
|
15
|
+
icon,
|
|
16
|
+
iconColor,
|
|
17
|
+
error,
|
|
18
|
+
success = false,
|
|
19
|
+
loading = false,
|
|
20
|
+
rightComponent,
|
|
21
|
+
leftComponent,
|
|
22
|
+
colors,
|
|
23
|
+
containerStyle,
|
|
24
|
+
inputStyle,
|
|
25
|
+
labelStyle,
|
|
26
|
+
errorStyle,
|
|
27
|
+
variant = 'outlined',
|
|
28
|
+
onFocus,
|
|
29
|
+
onBlur,
|
|
30
|
+
onChangeText,
|
|
31
|
+
testID,
|
|
32
|
+
secureTextEntry,
|
|
33
|
+
value = '',
|
|
34
|
+
...textInputProps
|
|
35
|
+
}, ref) => {
|
|
36
|
+
const [isFocused, setIsFocused] = (0, _react.useState)(false);
|
|
37
|
+
const [showPassword, setShowPassword] = (0, _react.useState)(false);
|
|
38
|
+
const [isLabelFloating, setIsLabelFloating] = (0, _react.useState)(value ? true : false);
|
|
39
|
+
const [labelWidth, setLabelWidth] = (0, _react.useState)(0);
|
|
40
|
+
const [labelLeft, setLabelLeft] = (0, _react.useState)(0);
|
|
41
|
+
const [inputWidth, setInputWidth] = (0, _react.useState)(0);
|
|
42
|
+
const [inputHeight, setInputHeight] = (0, _react.useState)(64);
|
|
43
|
+
const borderRadius = 16;
|
|
44
|
+
const borderWidth = 2;
|
|
45
|
+
|
|
46
|
+
// Animation values
|
|
47
|
+
const labelAnim = (0, _react.useRef)(new _reactNative.Animated.Value(value ? 1 : 0)).current;
|
|
48
|
+
const borderAnim = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
|
|
49
|
+
const handleFocus = (0, _react.useCallback)(() => {
|
|
50
|
+
setIsFocused(true);
|
|
51
|
+
onFocus?.();
|
|
52
|
+
|
|
53
|
+
// Animate label to top
|
|
54
|
+
_reactNative.Animated.timing(labelAnim, {
|
|
55
|
+
toValue: 1,
|
|
56
|
+
duration: 200,
|
|
57
|
+
useNativeDriver: false
|
|
58
|
+
}).start();
|
|
59
|
+
|
|
60
|
+
// Animate border
|
|
61
|
+
_reactNative.Animated.timing(borderAnim, {
|
|
62
|
+
toValue: 1,
|
|
63
|
+
duration: 200,
|
|
64
|
+
useNativeDriver: false
|
|
65
|
+
}).start();
|
|
66
|
+
}, [onFocus, labelAnim, borderAnim]);
|
|
67
|
+
const handleBlur = (0, _react.useCallback)(() => {
|
|
68
|
+
setIsFocused(false);
|
|
69
|
+
onBlur?.();
|
|
70
|
+
|
|
71
|
+
// Animate border back
|
|
72
|
+
_reactNative.Animated.timing(borderAnim, {
|
|
73
|
+
toValue: 0,
|
|
74
|
+
duration: 200,
|
|
75
|
+
useNativeDriver: false
|
|
76
|
+
}).start();
|
|
77
|
+
|
|
78
|
+
// Keep label at top if there's a value
|
|
79
|
+
if (!value) {
|
|
80
|
+
_reactNative.Animated.timing(labelAnim, {
|
|
81
|
+
toValue: 0,
|
|
82
|
+
duration: 200,
|
|
83
|
+
useNativeDriver: false
|
|
84
|
+
}).start();
|
|
85
|
+
}
|
|
86
|
+
}, [onBlur, borderAnim, labelAnim, value]);
|
|
87
|
+
const handleChangeText = (0, _react.useCallback)(text => {
|
|
88
|
+
onChangeText?.(text);
|
|
89
|
+
|
|
90
|
+
// Animate label if value changes from empty to filled or vice versa
|
|
91
|
+
const shouldShowLabel = text.length > 0;
|
|
92
|
+
if (shouldShowLabel !== isLabelFloating) {
|
|
93
|
+
setIsLabelFloating(shouldShowLabel);
|
|
94
|
+
_reactNative.Animated.timing(labelAnim, {
|
|
95
|
+
toValue: shouldShowLabel ? 1 : 0,
|
|
96
|
+
duration: 200,
|
|
97
|
+
useNativeDriver: false
|
|
98
|
+
}).start();
|
|
99
|
+
}
|
|
100
|
+
}, [onChangeText, labelAnim, isLabelFloating]);
|
|
101
|
+
|
|
102
|
+
// Initialize label position based on current value
|
|
103
|
+
(0, _react.useEffect)(() => {
|
|
104
|
+
if (value && !isLabelFloating) {
|
|
105
|
+
setIsLabelFloating(true);
|
|
106
|
+
labelAnim.setValue(1);
|
|
107
|
+
}
|
|
108
|
+
}, [value, isLabelFloating, labelAnim]);
|
|
109
|
+
const togglePasswordVisibility = (0, _react.useCallback)(() => {
|
|
110
|
+
setShowPassword(!showPassword);
|
|
111
|
+
}, [showPassword]);
|
|
112
|
+
const getBorderColor = () => {
|
|
113
|
+
if (error) return colors?.error || '#D32F2F';
|
|
114
|
+
if (success) return colors?.success || '#2E7D32';
|
|
115
|
+
if (isFocused) return colors?.primary || '#d169e5';
|
|
116
|
+
return colors?.border || '#E0E0E0';
|
|
117
|
+
};
|
|
118
|
+
const getIconColor = () => {
|
|
119
|
+
if (isFocused) return colors?.primary || '#d169e5';
|
|
120
|
+
return iconColor || colors?.secondaryText || '#666666';
|
|
121
|
+
};
|
|
122
|
+
const getLabelColor = () => {
|
|
123
|
+
if (error) return colors?.error || '#D32F2F';
|
|
124
|
+
if (isFocused) return colors?.primary || '#d169e5';
|
|
125
|
+
return colors?.secondaryText || '#666666';
|
|
126
|
+
};
|
|
127
|
+
const getBackgroundColor = () => {
|
|
128
|
+
if (variant === 'filled') {
|
|
129
|
+
return colors?.inputBackground || '#F5F5F5';
|
|
130
|
+
}
|
|
131
|
+
return 'transparent';
|
|
132
|
+
};
|
|
133
|
+
const styles = createStyles(colors, variant);
|
|
134
|
+
const BASE_PADDING = 20;
|
|
135
|
+
const ICON_WIDTH = 22;
|
|
136
|
+
const ICON_MARGIN = 12;
|
|
137
|
+
const TEXT_LEFT = icon || leftComponent ? BASE_PADDING + ICON_WIDTH + ICON_MARGIN : BASE_PADDING;
|
|
138
|
+
const FLOAT_LEFT_OFFSET = 10;
|
|
139
|
+
const isLabelFloated = Boolean(value || isFocused);
|
|
140
|
+
|
|
141
|
+
// For web, make TextInput the primary element with absolute positioned decorations
|
|
142
|
+
if (_reactNative.Platform.OS === 'web') {
|
|
143
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
144
|
+
style: [styles.container, containerStyle],
|
|
145
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
146
|
+
style: styles.webInputContainer,
|
|
147
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
|
|
148
|
+
ref: ref,
|
|
149
|
+
style: [styles.webInput, {
|
|
150
|
+
color: colors?.text || '#000000',
|
|
151
|
+
borderColor: 'transparent',
|
|
152
|
+
backgroundColor: getBackgroundColor(),
|
|
153
|
+
paddingLeft: TEXT_LEFT,
|
|
154
|
+
paddingRight: 60,
|
|
155
|
+
// Space for right components
|
|
156
|
+
paddingTop: label ? 24 : 20,
|
|
157
|
+
// Make room for floated label
|
|
158
|
+
paddingBottom: 8,
|
|
159
|
+
borderWidth: 0,
|
|
160
|
+
..._reactNative.Platform.select({
|
|
161
|
+
web: {
|
|
162
|
+
border: 'none',
|
|
163
|
+
outline: 'none',
|
|
164
|
+
boxShadow: 'none'
|
|
165
|
+
},
|
|
166
|
+
default: {}
|
|
167
|
+
})
|
|
168
|
+
}, inputStyle],
|
|
169
|
+
onFocus: handleFocus,
|
|
170
|
+
onBlur: handleBlur,
|
|
171
|
+
onChangeText: handleChangeText,
|
|
172
|
+
secureTextEntry: secureTextEntry && !showPassword,
|
|
173
|
+
placeholderTextColor: "transparent",
|
|
174
|
+
testID: testID,
|
|
175
|
+
autoComplete: secureTextEntry ? 'current-password' : 'off',
|
|
176
|
+
spellCheck: false,
|
|
177
|
+
value: value,
|
|
178
|
+
...textInputProps
|
|
179
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.default, {
|
|
180
|
+
width: inputWidth,
|
|
181
|
+
height: inputHeight,
|
|
182
|
+
style: {
|
|
183
|
+
position: 'absolute',
|
|
184
|
+
top: 0,
|
|
185
|
+
left: 0,
|
|
186
|
+
zIndex: 0
|
|
187
|
+
},
|
|
188
|
+
pointerEvents: "none",
|
|
189
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Path, {
|
|
190
|
+
d: (() => {
|
|
191
|
+
const y = borderWidth / 2;
|
|
192
|
+
const x1 = borderRadius + borderWidth / 2;
|
|
193
|
+
const x2 = inputWidth - borderRadius - borderWidth / 2;
|
|
194
|
+
const labelGapStart = isLabelFloated ? labelLeft - 4 : x1;
|
|
195
|
+
const labelGapEnd = isLabelFloated ? labelLeft + labelWidth + 4 : x2;
|
|
196
|
+
// Start at left arc
|
|
197
|
+
return `M${x1},${y}` + ` A${borderRadius},${borderRadius} 0 0 1 ${borderWidth / 2},${y + borderRadius}` + ` L${borderWidth / 2},${inputHeight - borderRadius - borderWidth / 2}` + ` A${borderRadius},${borderRadius} 0 0 1 ${x1},${inputHeight - borderWidth / 2}` + ` L${x2},${inputHeight - borderWidth / 2}` + ` A${borderRadius},${borderRadius} 0 0 1 ${inputWidth - borderWidth / 2},${inputHeight - borderRadius - borderWidth / 2}` + ` L${inputWidth - borderWidth / 2},${y + borderRadius}` + ` A${borderRadius},${borderRadius} 0 0 1 ${x2},${y}` + ` L${labelGapStart},${y}` + ` M${labelGapEnd},${y}` + ` L${x2},${y}`;
|
|
198
|
+
})(),
|
|
199
|
+
stroke: getBorderColor(),
|
|
200
|
+
strokeWidth: borderWidth,
|
|
201
|
+
fill: "none"
|
|
202
|
+
})
|
|
203
|
+
}), label && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.Text, {
|
|
204
|
+
onLayout: e => {
|
|
205
|
+
setLabelWidth(e.nativeEvent.layout.width);
|
|
206
|
+
setLabelLeft(e.nativeEvent.layout.x);
|
|
207
|
+
},
|
|
208
|
+
style: [styles.webFloatingLabel, {
|
|
209
|
+
color: getLabelColor(),
|
|
210
|
+
left: labelAnim.interpolate({
|
|
211
|
+
inputRange: [0, 1],
|
|
212
|
+
outputRange: [TEXT_LEFT, FLOAT_LEFT_OFFSET]
|
|
213
|
+
}),
|
|
214
|
+
top: labelAnim.interpolate({
|
|
215
|
+
inputRange: [0, 1],
|
|
216
|
+
outputRange: [20, -14]
|
|
217
|
+
}),
|
|
218
|
+
fontSize: labelAnim.interpolate({
|
|
219
|
+
inputRange: [0, 1],
|
|
220
|
+
outputRange: [16, 12]
|
|
221
|
+
}),
|
|
222
|
+
backgroundColor: 'transparent',
|
|
223
|
+
paddingHorizontal: 4,
|
|
224
|
+
zIndex: 2
|
|
225
|
+
}, labelStyle],
|
|
226
|
+
children: label
|
|
227
|
+
}), icon && !leftComponent && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
228
|
+
style: styles.webLeftIcon,
|
|
229
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
230
|
+
name: icon,
|
|
231
|
+
size: 22,
|
|
232
|
+
color: getIconColor()
|
|
233
|
+
})
|
|
234
|
+
}), leftComponent && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
235
|
+
style: styles.webLeftComponent,
|
|
236
|
+
children: leftComponent
|
|
237
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
238
|
+
style: styles.webRightComponents,
|
|
239
|
+
children: [loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
240
|
+
size: "small",
|
|
241
|
+
color: colors?.primary || '#d169e5',
|
|
242
|
+
style: styles.validationIndicator
|
|
243
|
+
}), success && !loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
244
|
+
name: "checkmark-circle",
|
|
245
|
+
size: 22,
|
|
246
|
+
color: colors?.success || '#2E7D32',
|
|
247
|
+
style: styles.validationIndicator
|
|
248
|
+
}), error && !loading && !success && /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
249
|
+
name: "close-circle",
|
|
250
|
+
size: 22,
|
|
251
|
+
color: colors?.error || '#D32F2F',
|
|
252
|
+
style: styles.validationIndicator
|
|
253
|
+
}), secureTextEntry && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
254
|
+
style: styles.passwordToggle,
|
|
255
|
+
onPress: togglePasswordVisibility,
|
|
256
|
+
hitSlop: {
|
|
257
|
+
top: 10,
|
|
258
|
+
bottom: 10,
|
|
259
|
+
left: 10,
|
|
260
|
+
right: 10
|
|
261
|
+
},
|
|
262
|
+
...(_reactNative.Platform.OS === 'web' && {
|
|
263
|
+
role: 'button',
|
|
264
|
+
tabIndex: 0,
|
|
265
|
+
onKeyPress: e => {
|
|
266
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
267
|
+
e.preventDefault();
|
|
268
|
+
togglePasswordVisibility();
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}),
|
|
272
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
273
|
+
name: showPassword ? "eye-off" : "eye",
|
|
274
|
+
size: 22,
|
|
275
|
+
color: colors?.secondaryText || '#666666'
|
|
276
|
+
})
|
|
277
|
+
}), rightComponent]
|
|
278
|
+
})]
|
|
279
|
+
}), error && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
280
|
+
style: [styles.errorContainer, errorStyle],
|
|
281
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
282
|
+
name: "alert-circle",
|
|
283
|
+
size: 16,
|
|
284
|
+
color: colors?.error || '#D32F2F'
|
|
285
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
286
|
+
style: [styles.errorText, {
|
|
287
|
+
color: colors?.error || '#D32F2F'
|
|
288
|
+
}],
|
|
289
|
+
children: error
|
|
290
|
+
})]
|
|
291
|
+
})]
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
// For mobile platforms, use Material Design structure
|
|
296
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
297
|
+
style: [styles.container, containerStyle],
|
|
298
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
299
|
+
style: [styles.inputWrapper, {
|
|
300
|
+
borderColor: 'transparent',
|
|
301
|
+
backgroundColor: getBackgroundColor(),
|
|
302
|
+
borderWidth: 0,
|
|
303
|
+
borderBottomWidth: variant === 'filled' ? 2 : variant === 'outlined' ? 2 : 0
|
|
304
|
+
}],
|
|
305
|
+
onLayout: e => {
|
|
306
|
+
setInputWidth(e.nativeEvent.layout.width);
|
|
307
|
+
setInputHeight(e.nativeEvent.layout.height);
|
|
308
|
+
},
|
|
309
|
+
children: [icon && !leftComponent && /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
310
|
+
name: icon,
|
|
311
|
+
size: 22,
|
|
312
|
+
color: getIconColor(),
|
|
313
|
+
style: styles.inputIcon
|
|
314
|
+
}), leftComponent, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
315
|
+
style: styles.inputContent,
|
|
316
|
+
children: [label && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
317
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.default, {
|
|
318
|
+
width: inputWidth,
|
|
319
|
+
height: inputHeight,
|
|
320
|
+
style: {
|
|
321
|
+
position: 'absolute',
|
|
322
|
+
top: 0,
|
|
323
|
+
left: 0,
|
|
324
|
+
zIndex: 0
|
|
325
|
+
},
|
|
326
|
+
pointerEvents: "none",
|
|
327
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Path, {
|
|
328
|
+
d: (() => {
|
|
329
|
+
const y = borderWidth / 2;
|
|
330
|
+
const x1 = borderRadius + borderWidth / 2;
|
|
331
|
+
const x2 = inputWidth - borderRadius - borderWidth / 2;
|
|
332
|
+
const labelGapStart = isLabelFloated ? labelLeft - 4 : x1;
|
|
333
|
+
const labelGapEnd = isLabelFloated ? labelLeft + labelWidth + 4 : x2;
|
|
334
|
+
// Start at left arc
|
|
335
|
+
return `M${x1},${y}` + ` A${borderRadius},${borderRadius} 0 0 1 ${borderWidth / 2},${y + borderRadius}` + ` L${borderWidth / 2},${inputHeight - borderRadius - borderWidth / 2}` + ` A${borderRadius},${borderRadius} 0 0 1 ${x1},${inputHeight - borderWidth / 2}` + ` L${x2},${inputHeight - borderWidth / 2}` + ` A${borderRadius},${borderRadius} 0 0 1 ${inputWidth - borderWidth / 2},${inputHeight - borderRadius - borderWidth / 2}` + ` L${inputWidth - borderWidth / 2},${y + borderRadius}` + ` A${borderRadius},${borderRadius} 0 0 1 ${x2},${y}` + ` L${labelGapStart},${y}` + ` M${labelGapEnd},${y}` + ` L${x2},${y}`;
|
|
336
|
+
})(),
|
|
337
|
+
stroke: getBorderColor(),
|
|
338
|
+
strokeWidth: borderWidth,
|
|
339
|
+
fill: "none"
|
|
340
|
+
})
|
|
341
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.Text, {
|
|
342
|
+
onLayout: e => {
|
|
343
|
+
setLabelWidth(e.nativeEvent.layout.width);
|
|
344
|
+
setLabelLeft(e.nativeEvent.layout.x);
|
|
345
|
+
},
|
|
346
|
+
style: [styles.floatingLabel, {
|
|
347
|
+
color: getLabelColor(),
|
|
348
|
+
left: labelAnim.interpolate({
|
|
349
|
+
inputRange: [0, 1],
|
|
350
|
+
outputRange: [TEXT_LEFT, FLOAT_LEFT_OFFSET]
|
|
351
|
+
}),
|
|
352
|
+
top: labelAnim.interpolate({
|
|
353
|
+
inputRange: [0, 1],
|
|
354
|
+
outputRange: [20, -14]
|
|
355
|
+
}),
|
|
356
|
+
fontSize: labelAnim.interpolate({
|
|
357
|
+
inputRange: [0, 1],
|
|
358
|
+
outputRange: [16, 12]
|
|
359
|
+
}),
|
|
360
|
+
zIndex: 2,
|
|
361
|
+
paddingHorizontal: 4,
|
|
362
|
+
backgroundColor: 'transparent'
|
|
363
|
+
}, labelStyle],
|
|
364
|
+
children: label
|
|
365
|
+
})]
|
|
366
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
|
|
367
|
+
ref: ref,
|
|
368
|
+
style: [styles.input, {
|
|
369
|
+
color: colors?.text || '#000000',
|
|
370
|
+
backgroundColor: getBackgroundColor(),
|
|
371
|
+
paddingLeft: TEXT_LEFT,
|
|
372
|
+
paddingRight: 60,
|
|
373
|
+
// Space for right components
|
|
374
|
+
paddingTop: label ? 24 : 20,
|
|
375
|
+
// Make room for floated label
|
|
376
|
+
paddingBottom: 8,
|
|
377
|
+
borderWidth: 0,
|
|
378
|
+
borderColor: 'transparent',
|
|
379
|
+
..._reactNative.Platform.select({
|
|
380
|
+
web: {
|
|
381
|
+
border: 'none',
|
|
382
|
+
outline: 'none',
|
|
383
|
+
boxShadow: 'none'
|
|
384
|
+
},
|
|
385
|
+
default: {}
|
|
386
|
+
})
|
|
387
|
+
}, inputStyle],
|
|
388
|
+
onFocus: handleFocus,
|
|
389
|
+
onBlur: handleBlur,
|
|
390
|
+
onChangeText: handleChangeText,
|
|
391
|
+
secureTextEntry: secureTextEntry && !showPassword,
|
|
392
|
+
placeholderTextColor: "transparent",
|
|
393
|
+
testID: testID,
|
|
394
|
+
value: value,
|
|
395
|
+
...textInputProps
|
|
396
|
+
})]
|
|
397
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
398
|
+
style: styles.rightComponents,
|
|
399
|
+
children: [loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
400
|
+
size: "small",
|
|
401
|
+
color: colors?.primary || '#d169e5',
|
|
402
|
+
style: styles.validationIndicator
|
|
403
|
+
}), success && !loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
404
|
+
name: "checkmark-circle",
|
|
405
|
+
size: 22,
|
|
406
|
+
color: colors?.success || '#2E7D32',
|
|
407
|
+
style: styles.validationIndicator
|
|
408
|
+
}), error && !loading && !success && /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
409
|
+
name: "close-circle",
|
|
410
|
+
size: 22,
|
|
411
|
+
color: colors?.error || '#D32F2F',
|
|
412
|
+
style: styles.validationIndicator
|
|
413
|
+
}), secureTextEntry && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
414
|
+
style: styles.passwordToggle,
|
|
415
|
+
onPress: togglePasswordVisibility,
|
|
416
|
+
hitSlop: {
|
|
417
|
+
top: 10,
|
|
418
|
+
bottom: 10,
|
|
419
|
+
left: 10,
|
|
420
|
+
right: 10
|
|
421
|
+
},
|
|
422
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
423
|
+
name: showPassword ? "eye-off" : "eye",
|
|
424
|
+
size: 22,
|
|
425
|
+
color: colors?.secondaryText || '#666666'
|
|
426
|
+
})
|
|
427
|
+
}), rightComponent]
|
|
428
|
+
})]
|
|
429
|
+
}), error && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
430
|
+
style: [styles.errorContainer, errorStyle],
|
|
431
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
432
|
+
name: "alert-circle",
|
|
433
|
+
size: 16,
|
|
434
|
+
color: colors?.error || '#D32F2F'
|
|
435
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
436
|
+
style: [styles.errorText, {
|
|
437
|
+
color: colors?.error || '#D32F2F'
|
|
438
|
+
}],
|
|
439
|
+
children: error
|
|
440
|
+
})]
|
|
441
|
+
})]
|
|
442
|
+
});
|
|
443
|
+
});
|
|
444
|
+
const createStyles = (colors, variant) => _reactNative.StyleSheet.create({
|
|
445
|
+
container: {
|
|
446
|
+
width: '100%',
|
|
447
|
+
marginBottom: 24
|
|
448
|
+
},
|
|
449
|
+
inputWrapper: {
|
|
450
|
+
flexDirection: 'row',
|
|
451
|
+
alignItems: 'center',
|
|
452
|
+
height: 64,
|
|
453
|
+
borderTopLeftRadius: 16,
|
|
454
|
+
borderTopRightRadius: 16,
|
|
455
|
+
borderBottomLeftRadius: 0,
|
|
456
|
+
borderBottomRightRadius: 0,
|
|
457
|
+
paddingHorizontal: 20,
|
|
458
|
+
backgroundColor: variant === 'filled' ? colors?.inputBackground || '#F5F5F5' : 'transparent',
|
|
459
|
+
position: 'relative',
|
|
460
|
+
borderWidth: 0,
|
|
461
|
+
borderColor: 'transparent'
|
|
462
|
+
},
|
|
463
|
+
inputIcon: {
|
|
464
|
+
marginRight: 12,
|
|
465
|
+
width: 22,
|
|
466
|
+
height: 22,
|
|
467
|
+
justifyContent: 'center',
|
|
468
|
+
alignItems: 'center'
|
|
469
|
+
},
|
|
470
|
+
inputContent: {
|
|
471
|
+
flex: 1,
|
|
472
|
+
justifyContent: 'center',
|
|
473
|
+
position: 'relative',
|
|
474
|
+
height: 64
|
|
475
|
+
},
|
|
476
|
+
floatingLabel: {
|
|
477
|
+
position: 'absolute',
|
|
478
|
+
fontWeight: '500',
|
|
479
|
+
lineHeight: 24,
|
|
480
|
+
backgroundColor: 'transparent',
|
|
481
|
+
paddingHorizontal: 4
|
|
482
|
+
},
|
|
483
|
+
input: {
|
|
484
|
+
flex: 1,
|
|
485
|
+
fontSize: 16,
|
|
486
|
+
height: 24,
|
|
487
|
+
paddingVertical: 0,
|
|
488
|
+
marginTop: 8,
|
|
489
|
+
// Space for floating label
|
|
490
|
+
borderWidth: 0,
|
|
491
|
+
borderColor: 'transparent'
|
|
492
|
+
},
|
|
493
|
+
// Web-specific styles
|
|
494
|
+
webInputContainer: {
|
|
495
|
+
position: 'relative',
|
|
496
|
+
height: 64
|
|
497
|
+
},
|
|
498
|
+
webInput: {
|
|
499
|
+
width: '100%',
|
|
500
|
+
height: 64,
|
|
501
|
+
fontSize: 16,
|
|
502
|
+
paddingHorizontal: 20,
|
|
503
|
+
borderTopLeftRadius: 16,
|
|
504
|
+
borderTopRightRadius: 16,
|
|
505
|
+
borderBottomLeftRadius: 0,
|
|
506
|
+
borderBottomRightRadius: 0,
|
|
507
|
+
borderWidth: 0,
|
|
508
|
+
borderColor: 'transparent',
|
|
509
|
+
borderStyle: 'solid'
|
|
510
|
+
},
|
|
511
|
+
webFloatingLabel: {
|
|
512
|
+
position: 'absolute',
|
|
513
|
+
fontWeight: '500',
|
|
514
|
+
lineHeight: 24,
|
|
515
|
+
backgroundColor: 'transparent',
|
|
516
|
+
paddingHorizontal: 4
|
|
517
|
+
},
|
|
518
|
+
webLeftIcon: {
|
|
519
|
+
position: 'absolute',
|
|
520
|
+
left: 20,
|
|
521
|
+
top: 21,
|
|
522
|
+
// (64 - 22) / 2
|
|
523
|
+
zIndex: 1,
|
|
524
|
+
width: 22,
|
|
525
|
+
height: 22,
|
|
526
|
+
justifyContent: 'center',
|
|
527
|
+
alignItems: 'center'
|
|
528
|
+
},
|
|
529
|
+
webLeftComponent: {
|
|
530
|
+
position: 'absolute',
|
|
531
|
+
left: 20,
|
|
532
|
+
top: 0,
|
|
533
|
+
height: 64,
|
|
534
|
+
justifyContent: 'center',
|
|
535
|
+
zIndex: 1
|
|
536
|
+
},
|
|
537
|
+
webRightComponents: {
|
|
538
|
+
position: 'absolute',
|
|
539
|
+
right: 20,
|
|
540
|
+
top: 0,
|
|
541
|
+
height: 64,
|
|
542
|
+
flexDirection: 'row',
|
|
543
|
+
alignItems: 'center',
|
|
544
|
+
zIndex: 1
|
|
545
|
+
},
|
|
546
|
+
rightComponents: {
|
|
547
|
+
flexDirection: 'row',
|
|
548
|
+
alignItems: 'center'
|
|
549
|
+
},
|
|
550
|
+
validationIndicator: {
|
|
551
|
+
marginLeft: 8
|
|
552
|
+
},
|
|
553
|
+
passwordToggle: {
|
|
554
|
+
padding: 4,
|
|
555
|
+
marginLeft: 8
|
|
556
|
+
},
|
|
557
|
+
errorContainer: {
|
|
558
|
+
flexDirection: 'row',
|
|
559
|
+
alignItems: 'center',
|
|
560
|
+
padding: 12,
|
|
561
|
+
borderRadius: 12,
|
|
562
|
+
marginTop: 8,
|
|
563
|
+
gap: 8,
|
|
564
|
+
backgroundColor: (colors?.error || '#D32F2F') + '10',
|
|
565
|
+
borderWidth: 1,
|
|
566
|
+
borderColor: (colors?.error || '#D32F2F') + '30'
|
|
567
|
+
},
|
|
568
|
+
errorText: {
|
|
569
|
+
fontSize: 12,
|
|
570
|
+
fontWeight: '500',
|
|
571
|
+
flex: 1
|
|
572
|
+
}
|
|
573
|
+
});
|
|
574
|
+
TextField.displayName = 'TextField';
|
|
575
|
+
var _default = exports.default = TextField;
|
|
576
|
+
//# sourceMappingURL=TextField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_vectorIcons","_reactNativeSvg","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TextField","forwardRef","label","icon","iconColor","error","success","loading","rightComponent","leftComponent","colors","containerStyle","inputStyle","labelStyle","errorStyle","variant","onFocus","onBlur","onChangeText","testID","secureTextEntry","value","textInputProps","ref","isFocused","setIsFocused","useState","showPassword","setShowPassword","isLabelFloating","setIsLabelFloating","labelWidth","setLabelWidth","labelLeft","setLabelLeft","inputWidth","setInputWidth","inputHeight","setInputHeight","borderRadius","borderWidth","labelAnim","useRef","Animated","Value","current","borderAnim","handleFocus","useCallback","timing","toValue","duration","useNativeDriver","start","handleBlur","handleChangeText","text","shouldShowLabel","length","useEffect","setValue","togglePasswordVisibility","getBorderColor","primary","border","getIconColor","secondaryText","getLabelColor","getBackgroundColor","inputBackground","styles","createStyles","BASE_PADDING","ICON_WIDTH","ICON_MARGIN","TEXT_LEFT","FLOAT_LEFT_OFFSET","isLabelFloated","Boolean","Platform","OS","jsxs","View","style","container","children","webInputContainer","jsx","TextInput","webInput","color","borderColor","backgroundColor","paddingLeft","paddingRight","paddingTop","paddingBottom","select","web","outline","boxShadow","placeholderTextColor","autoComplete","spellCheck","width","height","position","top","left","zIndex","pointerEvents","Path","d","y","x1","x2","labelGapStart","labelGapEnd","stroke","strokeWidth","fill","Text","onLayout","nativeEvent","layout","x","webFloatingLabel","interpolate","inputRange","outputRange","fontSize","paddingHorizontal","webLeftIcon","Ionicons","name","size","webLeftComponent","webRightComponents","ActivityIndicator","validationIndicator","TouchableOpacity","passwordToggle","onPress","hitSlop","bottom","right","role","tabIndex","onKeyPress","key","preventDefault","errorContainer","errorText","inputWrapper","borderBottomWidth","inputIcon","inputContent","Fragment","floatingLabel","input","rightComponents","StyleSheet","create","marginBottom","flexDirection","alignItems","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","marginRight","justifyContent","flex","fontWeight","lineHeight","paddingVertical","marginTop","borderStyle","marginLeft","padding","gap","displayName","_default","exports"],"sourceRoot":"../../../../../src","sources":["ui/components/internal/TextField.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAYA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,eAAA,GAAAJ,uBAAA,CAAAC,OAAA;AAA6C,IAAAI,WAAA,GAAAJ,OAAA;A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ignoreList":[]}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useOxy = exports.default = exports.OxyContextProvider = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _deviceManager = require("../../utils/deviceManager
|
|
8
|
+
var _deviceManager = require("../../utils/deviceManager");
|
|
9
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
10
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } // Define the context shape
|
|
11
11
|
// Create the context with default values
|
|
@@ -540,13 +540,23 @@ const OxyContextProvider = ({
|
|
|
540
540
|
}
|
|
541
541
|
}, [bottomSheetRef]);
|
|
542
542
|
|
|
543
|
+
// Compute comprehensive authentication status
|
|
544
|
+
// This is the single source of truth for authentication across the entire app
|
|
545
|
+
const isAuthenticated = (0, _react.useMemo)(() => {
|
|
546
|
+
// User is authenticated if:
|
|
547
|
+
// 1. We have a full user object loaded, OR
|
|
548
|
+
// 2. We have an active session with a valid token
|
|
549
|
+
// This covers both the loaded state and the loading-but-authenticated state
|
|
550
|
+
return !!user || !!activeSessionId && !!oxyServices?.getCurrentUserId();
|
|
551
|
+
}, [user, activeSessionId, oxyServices]);
|
|
552
|
+
|
|
543
553
|
// Context value
|
|
544
554
|
const contextValue = {
|
|
545
555
|
user,
|
|
546
556
|
minimalUser,
|
|
547
557
|
sessions,
|
|
548
558
|
activeSessionId,
|
|
549
|
-
isAuthenticated
|
|
559
|
+
isAuthenticated,
|
|
550
560
|
isLoading,
|
|
551
561
|
error,
|
|
552
562
|
login,
|