@oxyhq/services 5.21.5 → 5.21.7
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/commonjs/crypto/keyManager.js +67 -22
- package/lib/commonjs/crypto/keyManager.js.map +1 -1
- package/lib/commonjs/index.js +66 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/components/BottomSheetRouter.js +100 -286
- package/lib/commonjs/ui/components/BottomSheetRouter.js.map +1 -1
- package/lib/commonjs/ui/components/GroupedItem.js +0 -3
- package/lib/commonjs/ui/components/GroupedItem.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +14 -19
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/AnimatedButton.js +57 -0
- package/lib/commonjs/ui/components/fileManagement/AnimatedButton.js.map +1 -0
- package/lib/commonjs/ui/components/profile/EditBioModal.js +24 -156
- package/lib/commonjs/ui/components/profile/EditBioModal.js.map +1 -1
- package/lib/commonjs/ui/components/profile/EditDisplayNameModal.js +28 -178
- package/lib/commonjs/ui/components/profile/EditDisplayNameModal.js.map +1 -1
- package/lib/commonjs/ui/components/profile/EditEmailModal.js +32 -159
- package/lib/commonjs/ui/components/profile/EditEmailModal.js.map +1 -1
- package/lib/commonjs/ui/components/profile/EditLocationModal.js +45 -227
- package/lib/commonjs/ui/components/profile/EditLocationModal.js.map +1 -1
- package/lib/commonjs/ui/components/profile/EditUsernameModal.js +30 -155
- package/lib/commonjs/ui/components/profile/EditUsernameModal.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/mutationFactory.js +177 -0
- package/lib/commonjs/ui/hooks/mutations/mutationFactory.js.map +1 -0
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +10 -123
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useAccountQueries.js +2 -32
- package/lib/commonjs/ui/hooks/queries/useAccountQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useServicesQueries.js +2 -31
- package/lib/commonjs/ui/hooks/queries/useServicesQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/useFileFiltering.js +76 -0
- package/lib/commonjs/ui/hooks/useFileFiltering.js.map +1 -0
- package/lib/commonjs/ui/navigation/bottomSheetManager.js +43 -145
- package/lib/commonjs/ui/navigation/bottomSheetManager.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +0 -2
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +2 -2
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/utils/authHelpers.js +164 -0
- package/lib/commonjs/ui/utils/authHelpers.js.map +1 -0
- package/lib/commonjs/ui/utils/avatarUtils.js +18 -61
- package/lib/commonjs/ui/utils/avatarUtils.js.map +1 -1
- package/lib/module/crypto/keyManager.js +67 -22
- package/lib/module/crypto/keyManager.js.map +1 -1
- package/lib/module/index.js +6 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/components/BottomSheetRouter.js +102 -284
- package/lib/module/ui/components/BottomSheetRouter.js.map +1 -1
- package/lib/module/ui/components/GroupedItem.js +0 -3
- package/lib/module/ui/components/GroupedItem.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +14 -19
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/fileManagement/AnimatedButton.js +50 -0
- package/lib/module/ui/components/fileManagement/AnimatedButton.js.map +1 -0
- package/lib/module/ui/components/profile/EditBioModal.js +24 -156
- package/lib/module/ui/components/profile/EditBioModal.js.map +1 -1
- package/lib/module/ui/components/profile/EditDisplayNameModal.js +28 -178
- package/lib/module/ui/components/profile/EditDisplayNameModal.js.map +1 -1
- package/lib/module/ui/components/profile/EditEmailModal.js +32 -159
- package/lib/module/ui/components/profile/EditEmailModal.js.map +1 -1
- package/lib/module/ui/components/profile/EditLocationModal.js +45 -227
- package/lib/module/ui/components/profile/EditLocationModal.js.map +1 -1
- package/lib/module/ui/components/profile/EditUsernameModal.js +30 -155
- package/lib/module/ui/components/profile/EditUsernameModal.js.map +1 -1
- package/lib/module/ui/hooks/mutations/mutationFactory.js +173 -0
- package/lib/module/ui/hooks/mutations/mutationFactory.js.map +1 -0
- package/lib/module/ui/hooks/mutations/useAccountMutations.js +10 -122
- package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/module/ui/hooks/queries/useAccountQueries.js +2 -32
- package/lib/module/ui/hooks/queries/useAccountQueries.js.map +1 -1
- package/lib/module/ui/hooks/queries/useServicesQueries.js +2 -31
- package/lib/module/ui/hooks/queries/useServicesQueries.js.map +1 -1
- package/lib/module/ui/hooks/useFileFiltering.js +72 -0
- package/lib/module/ui/hooks/useFileFiltering.js.map +1 -0
- package/lib/module/ui/navigation/bottomSheetManager.js +37 -135
- package/lib/module/ui/navigation/bottomSheetManager.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +0 -2
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +2 -2
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/utils/authHelpers.js +154 -0
- package/lib/module/ui/utils/authHelpers.js.map +1 -0
- package/lib/module/ui/utils/avatarUtils.js +18 -61
- package/lib/module/ui/utils/avatarUtils.js.map +1 -1
- package/lib/typescript/commonjs/crypto/keyManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +6 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/BottomSheetRouter.d.ts +2 -7
- package/lib/typescript/commonjs/ui/components/BottomSheetRouter.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/GroupedItem.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/AnimatedButton.d.ts +16 -0
- package/lib/typescript/commonjs/ui/components/fileManagement/AnimatedButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/profile/EditBioModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/profile/EditDisplayNameModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/profile/EditEmailModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/profile/EditLocationModal.d.ts +1 -0
- package/lib/typescript/commonjs/ui/components/profile/EditLocationModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/profile/EditUsernameModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/mutationFactory.d.ts +76 -0
- package/lib/typescript/commonjs/ui/hooks/mutations/mutationFactory.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts +29 -4
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useAccountQueries.d.ts +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useServicesQueries.d.ts +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useFileFiltering.d.ts +29 -0
- package/lib/typescript/commonjs/ui/hooks/useFileFiltering.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts +11 -60
- package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/authHelpers.d.ts +99 -0
- package/lib/typescript/commonjs/ui/utils/authHelpers.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/utils/avatarUtils.d.ts.map +1 -1
- package/lib/typescript/module/crypto/keyManager.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +6 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts +2 -7
- package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/GroupedItem.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/fileManagement/AnimatedButton.d.ts +16 -0
- package/lib/typescript/module/ui/components/fileManagement/AnimatedButton.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/profile/EditBioModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/profile/EditDisplayNameModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/profile/EditEmailModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/profile/EditLocationModal.d.ts +1 -0
- package/lib/typescript/module/ui/components/profile/EditLocationModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/profile/EditUsernameModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/mutations/mutationFactory.d.ts +76 -0
- package/lib/typescript/module/ui/hooks/mutations/mutationFactory.d.ts.map +1 -0
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts +29 -4
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/useAccountQueries.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/useServicesQueries.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useFileFiltering.d.ts +29 -0
- package/lib/typescript/module/ui/hooks/useFileFiltering.d.ts.map +1 -0
- package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts +11 -60
- package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/authHelpers.d.ts +99 -0
- package/lib/typescript/module/ui/utils/authHelpers.d.ts.map +1 -0
- package/lib/typescript/module/ui/utils/avatarUtils.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/crypto/keyManager.ts +23 -22
- package/src/index.ts +25 -0
- package/src/ui/components/BottomSheetRouter.tsx +97 -319
- package/src/ui/components/GroupedItem.tsx +0 -4
- package/src/ui/components/OxyProvider.tsx +13 -18
- package/src/ui/components/fileManagement/AnimatedButton.tsx +56 -0
- package/src/ui/components/profile/EditBioModal.tsx +38 -176
- package/src/ui/components/profile/EditDisplayNameModal.tsx +48 -195
- package/src/ui/components/profile/EditEmailModal.tsx +49 -180
- package/src/ui/components/profile/EditLocationModal.tsx +76 -263
- package/src/ui/components/profile/EditUsernameModal.tsx +47 -175
- package/src/ui/hooks/mutations/mutationFactory.ts +215 -0
- package/src/ui/hooks/mutations/useAccountMutations.ts +48 -136
- package/src/ui/hooks/queries/useAccountQueries.ts +6 -33
- package/src/ui/hooks/queries/useServicesQueries.ts +6 -32
- package/src/ui/hooks/useFileFiltering.ts +115 -0
- package/src/ui/navigation/bottomSheetManager.ts +43 -150
- package/src/ui/screens/AccountSettingsScreen.tsx +0 -2
- package/src/ui/screens/FileManagementScreen.tsx +2 -2
- package/src/ui/utils/authHelpers.ts +183 -0
- package/src/ui/utils/avatarUtils.ts +25 -65
- package/lib/commonjs/ui/hooks/use-haptic-press.js +0 -21
- package/lib/commonjs/ui/hooks/use-haptic-press.js.map +0 -1
- package/lib/module/ui/hooks/use-haptic-press.js +0 -17
- package/lib/module/ui/hooks/use-haptic-press.js.map +0 -1
- package/lib/typescript/commonjs/ui/hooks/use-haptic-press.d.ts +0 -8
- package/lib/typescript/commonjs/ui/hooks/use-haptic-press.d.ts.map +0 -1
- package/lib/typescript/module/ui/hooks/use-haptic-press.d.ts +0 -8
- package/lib/typescript/module/ui/hooks/use-haptic-press.d.ts.map +0 -1
- package/src/ui/hooks/use-haptic-press.ts +0 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useEffect","useRef","useState","AppState","Platform","GestureHandlerRootView","SafeAreaProvider","OxyContextProvider","QueryClientProvider","focusManager","onlineManager","setupFonts","Toaster","createQueryClient","createPlatformStorage","jsx","_jsx","jsxs","_jsxs","isWeb","OS","KeyboardProvider","children","BottomSheetRouter","require","default","OxyProvider","oxyServices","onAuthStateChange","storageKeyPrefix","baseURL","authWebUrl","authRedirectUri","queryClient","providedQueryClient","storageRef","queryClientRef","setQueryClient","current","mounted","then","storage","client","catch","error","__DEV__","console","warn","handleVisibilityChange","setFocused","document","visibilityState","addEventListener","removeEventListener","subscription","state","remove","cleanup","setupNetworkMonitoring","setOnline","navigator","onLine","handleOnline","handleOffline","window","NetInfo","fetch","isConnected","unsubscribe","coreContent","style","flex"],"sourceRoot":"../../../../src","sources":["ui/components/OxyProvider.tsx"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAiB,OAAO;AAC5D,SAASC,QAAQ,EAAEC,QAAQ,QAAQ,cAAc;AACjD,SAASC,sBAAsB,QAAQ,8BAA8B;AACrE,SAASC,gBAAgB,QAAQ,gCAAgC;AAEjE,SAASC,kBAAkB,QAAQ,0BAAuB;AAC1D,SAASC,mBAAmB,EAAEC,YAAY,EAAEC,aAAa,QAAQ,uBAAuB;AACxF,SAASC,UAAU,QAAQ,iBAAc;AACzC,SAASC,OAAO,QAAQ,qBAAkB;AAC1C,SAASC,iBAAiB,QAAQ,yBAAsB;AACxD,SAASC,qBAAqB,QAA+B,4BAAyB;;AAEtF;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AACAP,UAAU,CAAC,CAAC;;AAEZ;AACA,MAAMQ,KAAK,GAAGf,QAAQ,CAACgB,EAAE,KAAK,KAAK;;AAEnC;AACA,IAAIC,gBAAqB,GAAGA,CAAC;EAAEC;AAAc,CAAC,KAAKA,QAAQ;AAC3D,IAAIC,iBAAsB,
|
|
1
|
+
{"version":3,"names":["useEffect","useRef","useState","AppState","Platform","GestureHandlerRootView","SafeAreaProvider","OxyContextProvider","QueryClientProvider","focusManager","onlineManager","setupFonts","Toaster","createQueryClient","createPlatformStorage","jsx","_jsx","jsxs","_jsxs","isWeb","OS","KeyboardProvider","children","BottomSheetRouter","require","default","OxyProvider","oxyServices","onAuthStateChange","storageKeyPrefix","baseURL","authWebUrl","authRedirectUri","queryClient","providedQueryClient","storageRef","queryClientRef","setQueryClient","current","mounted","then","storage","client","catch","error","__DEV__","console","warn","handleVisibilityChange","setFocused","document","visibilityState","addEventListener","removeEventListener","subscription","state","remove","cleanup","setupNetworkMonitoring","setOnline","navigator","onLine","handleOnline","handleOffline","window","NetInfo","fetch","isConnected","unsubscribe","coreContent","style","flex"],"sourceRoot":"../../../../src","sources":["ui/components/OxyProvider.tsx"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAiB,OAAO;AAC5D,SAASC,QAAQ,EAAEC,QAAQ,QAAQ,cAAc;AACjD,SAASC,sBAAsB,QAAQ,8BAA8B;AACrE,SAASC,gBAAgB,QAAQ,gCAAgC;AAEjE,SAASC,kBAAkB,QAAQ,0BAAuB;AAC1D,SAASC,mBAAmB,EAAEC,YAAY,EAAEC,aAAa,QAAQ,uBAAuB;AACxF,SAASC,UAAU,QAAQ,iBAAc;AACzC,SAASC,OAAO,QAAQ,qBAAkB;AAC1C,SAASC,iBAAiB,QAAQ,yBAAsB;AACxD,SAASC,qBAAqB,QAA+B,4BAAyB;;AAEtF;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AACAP,UAAU,CAAC,CAAC;;AAEZ;AACA,MAAMQ,KAAK,GAAGf,QAAQ,CAACgB,EAAE,KAAK,KAAK;;AAEnC;AACA,IAAIC,gBAAqB,GAA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,sBAAsB,CAAC,CAAC;IAExB,OAAO,MAAM;MACTD,OAAO,GAAG,CAAC;IACf,CAAC;EACL,CAAC,EAAE,EAAE,CAAC;;EAEN;EACA,IAAI,CAACxB,WAAW,EAAE;IACd,OAAO,IAAI;EACf;;EAEA;EACA,MAAMoC,WAAW,gBACbrD,IAAA,CAACR,mBAAmB;IAACkC,MAAM,EAAET,WAAY;IAAAX,QAAA,eACrCJ,KAAA,CAACX,kBAAkB;MACfoB,WAAW,EAAEA,WAAmB;MAChCG,OAAO,EAAEA,OAAQ;MACjBC,UAAU,EAAEA,UAAW;MACvBC,eAAe,EAAEA,eAAgB;MACjCH,gBAAgB,EAAEA,gBAAiB;MACnCD,iBAAiB,EAAEA,iBAAyB;MAAAN,QAAA,GAE3CA,QAAQ,EAERC,iBAAiB,iBAAIP,IAAA,CAACO,iBAAiB,IAAE,CAAC,eAC3CP,IAAA,CAACJ,OAAO,IAAE,CAAC;IAAA,CACK;EAAC,CACJ,CACxB;;EAED;EACA,oBACII,IAAA,CAACV,gBAAgB;IAAAgB,QAAA,eACbN,IAAA,CAACX,sBAAsB;MAACiE,KAAK,EAAE;QAAEC,IAAI,EAAE;MAAE,CAAE;MAAAjD,QAAA,eACvCN,IAAA,CAACK,gBAAgB;QAAAC,QAAA,EACZ+C;MAAW,CACE;IAAC,CACC;EAAC,CACX,CAAC;AAE3B,CAAC;AAED,eAAe3C,WAAW","ignoreList":[]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { useEffect, useRef } from 'react';
|
|
4
|
+
import { TouchableOpacity, Animated, Easing } from 'react-native';
|
|
5
|
+
// @ts-ignore - MaterialCommunityIcons is available at runtime
|
|
6
|
+
import { MaterialCommunityIcons } from '@expo/vector-icons';
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
/**
|
|
9
|
+
* Animated button component for smooth selection transitions
|
|
10
|
+
* Used in file management views for view mode toggles
|
|
11
|
+
*/
|
|
12
|
+
export const AnimatedButton = ({
|
|
13
|
+
isSelected,
|
|
14
|
+
onPress,
|
|
15
|
+
icon,
|
|
16
|
+
primaryColor,
|
|
17
|
+
textColor,
|
|
18
|
+
style
|
|
19
|
+
}) => {
|
|
20
|
+
const animatedValue = useRef(new Animated.Value(isSelected ? 1 : 0)).current;
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
Animated.timing(animatedValue, {
|
|
23
|
+
toValue: isSelected ? 1 : 0,
|
|
24
|
+
duration: 200,
|
|
25
|
+
easing: Easing.out(Easing.ease),
|
|
26
|
+
useNativeDriver: false
|
|
27
|
+
}).start();
|
|
28
|
+
}, [isSelected, animatedValue]);
|
|
29
|
+
const backgroundColor = animatedValue.interpolate({
|
|
30
|
+
inputRange: [0, 1],
|
|
31
|
+
outputRange: ['transparent', primaryColor]
|
|
32
|
+
});
|
|
33
|
+
return /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
34
|
+
onPress: onPress,
|
|
35
|
+
activeOpacity: 0.7,
|
|
36
|
+
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
37
|
+
style: [style, {
|
|
38
|
+
backgroundColor
|
|
39
|
+
}],
|
|
40
|
+
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
41
|
+
children: /*#__PURE__*/_jsx(MaterialCommunityIcons, {
|
|
42
|
+
name: icon,
|
|
43
|
+
size: 16,
|
|
44
|
+
color: isSelected ? '#FFFFFF' : textColor
|
|
45
|
+
})
|
|
46
|
+
})
|
|
47
|
+
})
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=AnimatedButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useEffect","useRef","TouchableOpacity","Animated","Easing","MaterialCommunityIcons","jsx","_jsx","AnimatedButton","isSelected","onPress","icon","primaryColor","textColor","style","animatedValue","Value","current","timing","toValue","duration","easing","out","ease","useNativeDriver","start","backgroundColor","interpolate","inputRange","outputRange","activeOpacity","children","View","name","size","color"],"sourceRoot":"../../../../../src","sources":["ui/components/fileManagement/AnimatedButton.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAChD,SAASC,gBAAgB,EAAEC,QAAQ,EAAEC,MAAM,QAAQ,cAAc;AACjE;AACA,SAASC,sBAAsB,QAAQ,oBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAW5D;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAA6C,GAAGA,CAAC;EAC5DC,UAAU;EACVC,OAAO;EACPC,IAAI;EACJC,YAAY;EACZC,SAAS;EACTC;AACF,CAAC,KAAK;EACJ,MAAMC,aAAa,GAAGd,MAAM,CAAC,IAAIE,QAAQ,CAACa,KAAK,CAACP,UAAU,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAACQ,OAAO;EAE5EjB,SAAS,CAAC,MAAM;IACdG,QAAQ,CAACe,MAAM,CAACH,aAAa,EAAE;MAC7BI,OAAO,EAAEV,UAAU,GAAG,CAAC,GAAG,CAAC;MAC3BW,QAAQ,EAAE,GAAG;MACbC,MAAM,EAAEjB,MAAM,CAACkB,GAAG,CAAClB,MAAM,CAACmB,IAAI,CAAC;MAC/BC,eAAe,EAAE;IACnB,CAAC,CAAC,CAACC,KAAK,CAAC,CAAC;EACZ,CAAC,EAAE,CAAChB,UAAU,EAAEM,aAAa,CAAC,CAAC;EAE/B,MAAMW,eAAe,GAAGX,aAAa,CAACY,WAAW,CAAC;IAChDC,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IAClBC,WAAW,EAAE,CAAC,aAAa,EAAEjB,YAAY;EAC3C,CAAC,CAAC;EAEF,oBACEL,IAAA,CAACL,gBAAgB;IAACQ,OAAO,EAAEA,OAAQ;IAACoB,aAAa,EAAE,GAAI;IAAAC,QAAA,eACrDxB,IAAA,CAACJ,QAAQ,CAAC6B,IAAI;MAAClB,KAAK,EAAE,CAACA,KAAK,EAAE;QAAEY;MAAgB,CAAC,CAAE;MAAAK,QAAA,eACjDxB,IAAA,CAACJ,QAAQ,CAAC6B,IAAI;QAAAD,QAAA,eACZxB,IAAA,CAACF,sBAAsB;UACrB4B,IAAI,EAAEtB,IAAY;UAClBuB,IAAI,EAAE,EAAG;UACTC,KAAK,EAAE1B,UAAU,GAAG,SAAS,GAAGI;QAAU,CAC3C;MAAC,CACW;IAAC,CACH;EAAC,CACA,CAAC;AAEvB,CAAC","ignoreList":[]}
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import React
|
|
4
|
-
import {
|
|
5
|
-
import { Ionicons } from '@expo/vector-icons';
|
|
6
|
-
import { useThemeStyles } from "../../hooks/useThemeStyles.js";
|
|
7
|
-
import { useColorScheme } from "../../hooks/use-color-scheme.js";
|
|
8
|
-
import { useI18n } from "../../hooks/useI18n.js";
|
|
9
|
-
import { fontFamilies } from "../../styles/fonts.js";
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { EditFieldModal } from "./EditFieldModal.js";
|
|
10
5
|
import { useProfileEditing } from "../../hooks/useProfileEditing.js";
|
|
11
|
-
import {
|
|
6
|
+
import { useI18n } from "../../hooks/useI18n.js";
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
8
|
export const EditBioModal = ({
|
|
13
9
|
visible,
|
|
14
10
|
onClose,
|
|
@@ -19,157 +15,29 @@ export const EditBioModal = ({
|
|
|
19
15
|
const {
|
|
20
16
|
t
|
|
21
17
|
} = useI18n();
|
|
22
|
-
const colorScheme = useColorScheme();
|
|
23
|
-
const themeStyles = useThemeStyles(theme || 'light', colorScheme);
|
|
24
|
-
const colors = themeStyles.colors;
|
|
25
18
|
const {
|
|
26
|
-
updateField
|
|
27
|
-
isSaving
|
|
19
|
+
updateField
|
|
28
20
|
} = useProfileEditing();
|
|
29
|
-
|
|
30
|
-
useEffect(() => {
|
|
31
|
-
if (visible) {
|
|
32
|
-
setBio(initialValue);
|
|
33
|
-
}
|
|
34
|
-
}, [visible, initialValue]);
|
|
35
|
-
const handleSave = async () => {
|
|
36
|
-
const success = await updateField('bio', bio);
|
|
37
|
-
if (success) {
|
|
38
|
-
onSave?.();
|
|
39
|
-
onClose();
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
return /*#__PURE__*/_jsx(Modal, {
|
|
21
|
+
return /*#__PURE__*/_jsx(EditFieldModal, {
|
|
43
22
|
visible: visible,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
})
|
|
63
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
64
|
-
style: [styles.modalTitle, {
|
|
65
|
-
color: colors.text
|
|
66
|
-
}],
|
|
67
|
-
children: t('editProfile.items.bio.title') || 'Bio'
|
|
68
|
-
}), /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
69
|
-
onPress: handleSave,
|
|
70
|
-
disabled: isSaving,
|
|
71
|
-
style: [styles.saveButton, {
|
|
72
|
-
opacity: isSaving ? 0.5 : 1
|
|
73
|
-
}],
|
|
74
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
75
|
-
style: [styles.saveButtonText, {
|
|
76
|
-
color: colors.tint
|
|
77
|
-
}],
|
|
78
|
-
children: isSaving ? 'Saving...' : 'Save'
|
|
79
|
-
})
|
|
80
|
-
})]
|
|
81
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
82
|
-
style: styles.modalBody,
|
|
83
|
-
children: /*#__PURE__*/_jsxs(View, {
|
|
84
|
-
style: styles.inputGroup,
|
|
85
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
86
|
-
style: [styles.label, {
|
|
87
|
-
color: colors.text
|
|
88
|
-
}],
|
|
89
|
-
children: t('editProfile.items.bio.label') || 'Bio'
|
|
90
|
-
}), /*#__PURE__*/_jsx(TextInput, {
|
|
91
|
-
style: [styles.textArea, {
|
|
92
|
-
backgroundColor: colors.card,
|
|
93
|
-
color: colors.text,
|
|
94
|
-
borderColor: colors.border
|
|
95
|
-
}],
|
|
96
|
-
value: bio,
|
|
97
|
-
onChangeText: setBio,
|
|
98
|
-
placeholder: t('editProfile.items.bio.placeholder') || 'Tell people about yourself...',
|
|
99
|
-
placeholderTextColor: colors.secondaryText,
|
|
100
|
-
autoFocus: true,
|
|
101
|
-
multiline: true,
|
|
102
|
-
numberOfLines: 6,
|
|
103
|
-
textAlignVertical: "top",
|
|
104
|
-
selectionColor: colors.tint
|
|
105
|
-
})]
|
|
106
|
-
})
|
|
107
|
-
})]
|
|
108
|
-
})
|
|
109
|
-
})
|
|
23
|
+
onClose: onClose,
|
|
24
|
+
title: t('editProfile.items.bio.title') || 'Bio',
|
|
25
|
+
theme: theme,
|
|
26
|
+
onSave: onSave,
|
|
27
|
+
variant: "single",
|
|
28
|
+
fields: [{
|
|
29
|
+
key: 'bio',
|
|
30
|
+
label: t('editProfile.items.bio.label') || 'Bio',
|
|
31
|
+
initialValue,
|
|
32
|
+
placeholder: t('editProfile.items.bio.placeholder') || 'Tell people about yourself...',
|
|
33
|
+
inputProps: {
|
|
34
|
+
multiline: true,
|
|
35
|
+
numberOfLines: 6
|
|
36
|
+
}
|
|
37
|
+
}],
|
|
38
|
+
onSubmit: async data => {
|
|
39
|
+
return await updateField('bio', data.bio);
|
|
40
|
+
}
|
|
110
41
|
});
|
|
111
42
|
};
|
|
112
|
-
const styles = StyleSheet.create({
|
|
113
|
-
modalOverlay: {
|
|
114
|
-
flex: 1,
|
|
115
|
-
backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
|
116
|
-
justifyContent: 'flex-end'
|
|
117
|
-
},
|
|
118
|
-
modalContent: {
|
|
119
|
-
borderTopLeftRadius: 20,
|
|
120
|
-
borderTopRightRadius: 20,
|
|
121
|
-
paddingTop: Platform.OS === 'ios' ? 20 : 16,
|
|
122
|
-
maxHeight: '80%'
|
|
123
|
-
},
|
|
124
|
-
modalHeader: {
|
|
125
|
-
flexDirection: 'row',
|
|
126
|
-
alignItems: 'center',
|
|
127
|
-
justifyContent: 'space-between',
|
|
128
|
-
paddingHorizontal: 16,
|
|
129
|
-
paddingBottom: 16,
|
|
130
|
-
borderBottomWidth: StyleSheet.hairlineWidth,
|
|
131
|
-
borderBottomColor: '#E5E5EA'
|
|
132
|
-
},
|
|
133
|
-
closeButton: {
|
|
134
|
-
width: 40,
|
|
135
|
-
height: 40,
|
|
136
|
-
alignItems: 'center',
|
|
137
|
-
justifyContent: 'center'
|
|
138
|
-
},
|
|
139
|
-
modalTitle: {
|
|
140
|
-
fontSize: 18,
|
|
141
|
-
fontWeight: '600',
|
|
142
|
-
fontFamily: fontFamilies.phuduSemiBold,
|
|
143
|
-
flex: 1,
|
|
144
|
-
textAlign: 'center'
|
|
145
|
-
},
|
|
146
|
-
saveButton: {
|
|
147
|
-
paddingHorizontal: 16,
|
|
148
|
-
paddingVertical: 8
|
|
149
|
-
},
|
|
150
|
-
saveButtonText: {
|
|
151
|
-
fontSize: 16,
|
|
152
|
-
fontWeight: '600',
|
|
153
|
-
fontFamily: fontFamilies.phuduSemiBold
|
|
154
|
-
},
|
|
155
|
-
modalBody: {
|
|
156
|
-
padding: 16,
|
|
157
|
-
gap: 16
|
|
158
|
-
},
|
|
159
|
-
inputGroup: {
|
|
160
|
-
gap: 8
|
|
161
|
-
},
|
|
162
|
-
label: {
|
|
163
|
-
fontSize: 14,
|
|
164
|
-
fontWeight: '600',
|
|
165
|
-
fontFamily: fontFamilies.phuduSemiBold
|
|
166
|
-
},
|
|
167
|
-
textArea: {
|
|
168
|
-
borderWidth: StyleSheet.hairlineWidth,
|
|
169
|
-
borderRadius: 12,
|
|
170
|
-
padding: 16,
|
|
171
|
-
fontSize: 16,
|
|
172
|
-
minHeight: 120
|
|
173
|
-
}
|
|
174
|
-
});
|
|
175
43
|
//# sourceMappingURL=EditBioModal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","
|
|
1
|
+
{"version":3,"names":["React","EditFieldModal","useProfileEditing","useI18n","jsx","_jsx","EditBioModal","visible","onClose","initialValue","theme","onSave","t","updateField","title","variant","fields","key","label","placeholder","inputProps","multiline","numberOfLines","onSubmit","data","bio"],"sourceRoot":"../../../../../src","sources":["ui/components/profile/EditBioModal.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,cAAc,QAAQ,qBAAkB;AACjD,SAASC,iBAAiB,QAAQ,kCAA+B;AACjE,SAASC,OAAO,QAAQ,wBAAqB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAU9C,OAAO,MAAMC,YAAyC,GAAGA,CAAC;EACxDC,OAAO;EACPC,OAAO;EACPC,YAAY,GAAG,EAAE;EACjBC,KAAK,GAAG,OAAO;EACfC;AACF,CAAC,KAAK;EACJ,MAAM;IAAEC;EAAE,CAAC,GAAGT,OAAO,CAAC,CAAC;EACvB,MAAM;IAAEU;EAAY,CAAC,GAAGX,iBAAiB,CAAC,CAAC;EAE3C,oBACEG,IAAA,CAACJ,cAAc;IACbM,OAAO,EAAEA,OAAQ;IACjBC,OAAO,EAAEA,OAAQ;IACjBM,KAAK,EAAEF,CAAC,CAAC,6BAA6B,CAAC,IAAI,KAAM;IACjDF,KAAK,EAAEA,KAAM;IACbC,MAAM,EAAEA,MAAO;IACfI,OAAO,EAAC,QAAQ;IAChBC,MAAM,EAAE,CACN;MACEC,GAAG,EAAE,KAAK;MACVC,KAAK,EAAEN,CAAC,CAAC,6BAA6B,CAAC,IAAI,KAAK;MAChDH,YAAY;MACZU,WAAW,EAAEP,CAAC,CAAC,mCAAmC,CAAC,IAAI,+BAA+B;MACtFQ,UAAU,EAAE;QAAEC,SAAS,EAAE,IAAI;QAAEC,aAAa,EAAE;MAAE;IAClD,CAAC,CACD;IACFC,QAAQ,EAAE,MAAOC,IAAI,IAAK;MACxB,OAAO,MAAMX,WAAW,CAAC,KAAK,EAAEW,IAAI,CAACC,GAAa,CAAC;IACrD;EAAE,CACH,CAAC;AAEN,CAAC","ignoreList":[]}
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import React
|
|
4
|
-
import {
|
|
5
|
-
import { Ionicons } from '@expo/vector-icons';
|
|
6
|
-
import { useThemeStyles } from "../../hooks/useThemeStyles.js";
|
|
7
|
-
import { useColorScheme } from "../../hooks/use-color-scheme.js";
|
|
8
|
-
import { useI18n } from "../../hooks/useI18n.js";
|
|
9
|
-
import { fontFamilies } from "../../styles/fonts.js";
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { EditFieldModal } from "./EditFieldModal.js";
|
|
10
5
|
import { useProfileEditing } from "../../hooks/useProfileEditing.js";
|
|
11
|
-
import {
|
|
6
|
+
import { useI18n } from "../../hooks/useI18n.js";
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
8
|
export const EditDisplayNameModal = ({
|
|
13
9
|
visible,
|
|
14
10
|
onClose,
|
|
@@ -20,179 +16,33 @@ export const EditDisplayNameModal = ({
|
|
|
20
16
|
const {
|
|
21
17
|
t
|
|
22
18
|
} = useI18n();
|
|
23
|
-
const colorScheme = useColorScheme();
|
|
24
|
-
const themeStyles = useThemeStyles(theme || 'light', colorScheme);
|
|
25
|
-
const colors = themeStyles.colors;
|
|
26
19
|
const {
|
|
27
|
-
saveProfile
|
|
28
|
-
isSaving
|
|
20
|
+
saveProfile
|
|
29
21
|
} = useProfileEditing();
|
|
30
|
-
|
|
31
|
-
const [lastName, setLastName] = useState(initialLastName);
|
|
32
|
-
useEffect(() => {
|
|
33
|
-
if (visible) {
|
|
34
|
-
setDisplayName(initialDisplayName);
|
|
35
|
-
setLastName(initialLastName);
|
|
36
|
-
}
|
|
37
|
-
}, [visible, initialDisplayName, initialLastName]);
|
|
38
|
-
const handleSave = async () => {
|
|
39
|
-
const updates = {
|
|
40
|
-
displayName,
|
|
41
|
-
lastName
|
|
42
|
-
};
|
|
43
|
-
const success = await saveProfile(updates);
|
|
44
|
-
if (success) {
|
|
45
|
-
onSave?.();
|
|
46
|
-
onClose();
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
return /*#__PURE__*/_jsx(Modal, {
|
|
22
|
+
return /*#__PURE__*/_jsx(EditFieldModal, {
|
|
50
23
|
visible: visible,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}],
|
|
74
|
-
children: t('editProfile.items.displayName.title') || 'Display Name'
|
|
75
|
-
}), /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
76
|
-
onPress: handleSave,
|
|
77
|
-
disabled: isSaving,
|
|
78
|
-
style: [styles.saveButton, {
|
|
79
|
-
opacity: isSaving ? 0.5 : 1
|
|
80
|
-
}],
|
|
81
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
82
|
-
style: [styles.saveButtonText, {
|
|
83
|
-
color: colors.tint
|
|
84
|
-
}],
|
|
85
|
-
children: isSaving ? 'Saving...' : 'Save'
|
|
86
|
-
})
|
|
87
|
-
})]
|
|
88
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
89
|
-
style: styles.modalBody,
|
|
90
|
-
children: [/*#__PURE__*/_jsxs(View, {
|
|
91
|
-
style: styles.inputGroup,
|
|
92
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
93
|
-
style: [styles.label, {
|
|
94
|
-
color: colors.text
|
|
95
|
-
}],
|
|
96
|
-
children: t('editProfile.items.displayName.firstName') || 'First Name'
|
|
97
|
-
}), /*#__PURE__*/_jsx(TextInput, {
|
|
98
|
-
style: [styles.input, {
|
|
99
|
-
backgroundColor: colors.card,
|
|
100
|
-
color: colors.text,
|
|
101
|
-
borderColor: colors.border
|
|
102
|
-
}],
|
|
103
|
-
value: displayName,
|
|
104
|
-
onChangeText: setDisplayName,
|
|
105
|
-
placeholder: t('editProfile.items.displayName.firstNamePlaceholder') || 'Enter first name',
|
|
106
|
-
placeholderTextColor: colors.secondaryText,
|
|
107
|
-
autoFocus: true,
|
|
108
|
-
selectionColor: colors.tint
|
|
109
|
-
})]
|
|
110
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
111
|
-
style: styles.inputGroup,
|
|
112
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
113
|
-
style: [styles.label, {
|
|
114
|
-
color: colors.text
|
|
115
|
-
}],
|
|
116
|
-
children: t('editProfile.items.displayName.lastName') || 'Last Name'
|
|
117
|
-
}), /*#__PURE__*/_jsx(TextInput, {
|
|
118
|
-
style: [styles.input, {
|
|
119
|
-
backgroundColor: colors.card,
|
|
120
|
-
color: colors.text,
|
|
121
|
-
borderColor: colors.border
|
|
122
|
-
}],
|
|
123
|
-
value: lastName,
|
|
124
|
-
onChangeText: setLastName,
|
|
125
|
-
placeholder: t('editProfile.items.displayName.lastNamePlaceholder') || 'Enter last name (optional)',
|
|
126
|
-
placeholderTextColor: colors.secondaryText,
|
|
127
|
-
selectionColor: colors.tint
|
|
128
|
-
})]
|
|
129
|
-
})]
|
|
130
|
-
})]
|
|
131
|
-
})
|
|
132
|
-
})
|
|
24
|
+
onClose: onClose,
|
|
25
|
+
title: t('editProfile.items.displayName.title') || 'Display Name',
|
|
26
|
+
theme: theme,
|
|
27
|
+
onSave: onSave,
|
|
28
|
+
variant: "multi",
|
|
29
|
+
fields: [{
|
|
30
|
+
key: 'displayName',
|
|
31
|
+
label: t('editProfile.items.displayName.firstName') || 'First Name',
|
|
32
|
+
initialValue: initialDisplayName,
|
|
33
|
+
placeholder: t('editProfile.items.displayName.firstNamePlaceholder') || 'Enter first name'
|
|
34
|
+
}, {
|
|
35
|
+
key: 'lastName',
|
|
36
|
+
label: t('editProfile.items.displayName.lastName') || 'Last Name',
|
|
37
|
+
initialValue: initialLastName,
|
|
38
|
+
placeholder: t('editProfile.items.displayName.lastNamePlaceholder') || 'Enter last name (optional)'
|
|
39
|
+
}],
|
|
40
|
+
onSubmit: async data => {
|
|
41
|
+
return await saveProfile({
|
|
42
|
+
displayName: data.displayName,
|
|
43
|
+
lastName: data.lastName
|
|
44
|
+
});
|
|
45
|
+
}
|
|
133
46
|
});
|
|
134
47
|
};
|
|
135
|
-
const styles = StyleSheet.create({
|
|
136
|
-
modalOverlay: {
|
|
137
|
-
flex: 1,
|
|
138
|
-
backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
|
139
|
-
justifyContent: 'flex-end'
|
|
140
|
-
},
|
|
141
|
-
modalContent: {
|
|
142
|
-
borderTopLeftRadius: 20,
|
|
143
|
-
borderTopRightRadius: 20,
|
|
144
|
-
paddingTop: Platform.OS === 'ios' ? 20 : 16,
|
|
145
|
-
maxHeight: '80%'
|
|
146
|
-
},
|
|
147
|
-
modalHeader: {
|
|
148
|
-
flexDirection: 'row',
|
|
149
|
-
alignItems: 'center',
|
|
150
|
-
justifyContent: 'space-between',
|
|
151
|
-
paddingHorizontal: 16,
|
|
152
|
-
paddingBottom: 16,
|
|
153
|
-
borderBottomWidth: StyleSheet.hairlineWidth,
|
|
154
|
-
borderBottomColor: '#E5E5EA'
|
|
155
|
-
},
|
|
156
|
-
closeButton: {
|
|
157
|
-
width: 40,
|
|
158
|
-
height: 40,
|
|
159
|
-
alignItems: 'center',
|
|
160
|
-
justifyContent: 'center'
|
|
161
|
-
},
|
|
162
|
-
modalTitle: {
|
|
163
|
-
fontSize: 18,
|
|
164
|
-
fontWeight: '600',
|
|
165
|
-
fontFamily: fontFamilies.phuduSemiBold,
|
|
166
|
-
flex: 1,
|
|
167
|
-
textAlign: 'center'
|
|
168
|
-
},
|
|
169
|
-
saveButton: {
|
|
170
|
-
paddingHorizontal: 16,
|
|
171
|
-
paddingVertical: 8
|
|
172
|
-
},
|
|
173
|
-
saveButtonText: {
|
|
174
|
-
fontSize: 16,
|
|
175
|
-
fontWeight: '600',
|
|
176
|
-
fontFamily: fontFamilies.phuduSemiBold
|
|
177
|
-
},
|
|
178
|
-
modalBody: {
|
|
179
|
-
padding: 16,
|
|
180
|
-
gap: 16
|
|
181
|
-
},
|
|
182
|
-
inputGroup: {
|
|
183
|
-
gap: 8
|
|
184
|
-
},
|
|
185
|
-
label: {
|
|
186
|
-
fontSize: 14,
|
|
187
|
-
fontWeight: '600',
|
|
188
|
-
fontFamily: fontFamilies.phuduSemiBold
|
|
189
|
-
},
|
|
190
|
-
input: {
|
|
191
|
-
borderWidth: StyleSheet.hairlineWidth,
|
|
192
|
-
borderRadius: 12,
|
|
193
|
-
padding: 16,
|
|
194
|
-
fontSize: 16,
|
|
195
|
-
minHeight: 52
|
|
196
|
-
}
|
|
197
|
-
});
|
|
198
48
|
//# sourceMappingURL=EditDisplayNameModal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","
|
|
1
|
+
{"version":3,"names":["React","EditFieldModal","useProfileEditing","useI18n","jsx","_jsx","EditDisplayNameModal","visible","onClose","initialDisplayName","initialLastName","theme","onSave","t","saveProfile","title","variant","fields","key","label","initialValue","placeholder","onSubmit","data","displayName","lastName"],"sourceRoot":"../../../../../src","sources":["ui/components/profile/EditDisplayNameModal.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,cAAc,QAAQ,qBAAkB;AACjD,SAASC,iBAAiB,QAAQ,kCAA+B;AACjE,SAASC,OAAO,QAAQ,wBAAqB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAW9C,OAAO,MAAMC,oBAAyD,GAAGA,CAAC;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