@oxyhq/services 5.26.4 → 5.27.0

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.
Files changed (263) hide show
  1. package/dist/web/oxy-services.esm.js +2 -0
  2. package/dist/web/oxy-services.esm.js.map +1 -0
  3. package/dist/web/types/assets/icons/OxyServices.d.ts +28 -0
  4. package/dist/web/types/assets/illustrations/HighFive.d.ts +8 -0
  5. package/dist/web/types/constants/version.d.ts +13 -0
  6. package/dist/web/types/core/AuthManager.d.ts +143 -0
  7. package/dist/web/types/core/CrossDomainAuth.d.ts +160 -0
  8. package/dist/web/types/core/HttpService.d.ts +163 -0
  9. package/dist/web/types/core/OxyServices.base.d.ts +126 -0
  10. package/dist/web/types/core/OxyServices.d.ts +81 -0
  11. package/dist/web/types/core/OxyServices.errors.d.ts +11 -0
  12. package/dist/web/types/core/index.d.ts +20 -0
  13. package/dist/web/types/core/mixins/OxyServices.analytics.d.ts +66 -0
  14. package/dist/web/types/core/mixins/OxyServices.assets.d.ts +135 -0
  15. package/dist/web/types/core/mixins/OxyServices.auth.d.ts +186 -0
  16. package/dist/web/types/core/mixins/OxyServices.developer.d.ts +99 -0
  17. package/dist/web/types/core/mixins/OxyServices.devices.d.ts +96 -0
  18. package/dist/web/types/core/mixins/OxyServices.features.d.ts +228 -0
  19. package/dist/web/types/core/mixins/OxyServices.fedcm.d.ts +200 -0
  20. package/dist/web/types/core/mixins/OxyServices.karma.d.ts +85 -0
  21. package/dist/web/types/core/mixins/OxyServices.language.d.ts +81 -0
  22. package/dist/web/types/core/mixins/OxyServices.location.d.ts +64 -0
  23. package/dist/web/types/core/mixins/OxyServices.payment.d.ts +111 -0
  24. package/dist/web/types/core/mixins/OxyServices.popup.d.ts +205 -0
  25. package/dist/web/types/core/mixins/OxyServices.privacy.d.ts +122 -0
  26. package/dist/web/types/core/mixins/OxyServices.redirect.d.ts +245 -0
  27. package/dist/web/types/core/mixins/OxyServices.security.d.ts +78 -0
  28. package/dist/web/types/core/mixins/OxyServices.user.d.ts +184 -0
  29. package/dist/web/types/core/mixins/OxyServices.utility.d.ts +93 -0
  30. package/dist/web/types/core/mixins/index.d.ts +30 -0
  31. package/dist/web/types/core/mixins/mixinHelpers.d.ts +31 -0
  32. package/dist/web/types/crypto/index.d.ts +11 -0
  33. package/dist/web/types/crypto/keyManager.d.ts +189 -0
  34. package/dist/web/types/crypto/polyfill.d.ts +12 -0
  35. package/dist/web/types/crypto/recoveryPhrase.d.ts +58 -0
  36. package/dist/web/types/crypto/signatureService.d.ts +86 -0
  37. package/dist/web/types/i18n/index.d.ts +3 -0
  38. package/dist/web/types/index.d.ts +62 -0
  39. package/dist/web/types/lib/sonner-safe.d.ts +8 -0
  40. package/dist/web/types/lib/sonner.d.ts +11 -0
  41. package/dist/web/types/lib/sonner.web.d.ts +14 -0
  42. package/dist/web/types/models/interfaces.d.ts +415 -0
  43. package/dist/web/types/models/session.d.ts +27 -0
  44. package/dist/web/types/node/index.d.ts +9 -0
  45. package/dist/web/types/shared/index.d.ts +28 -0
  46. package/dist/web/types/shared/utils/colorUtils.d.ts +104 -0
  47. package/dist/web/types/shared/utils/debugUtils.d.ts +48 -0
  48. package/dist/web/types/shared/utils/errorUtils.d.ts +97 -0
  49. package/dist/web/types/shared/utils/index.d.ts +13 -0
  50. package/dist/web/types/shared/utils/networkUtils.d.ts +139 -0
  51. package/dist/web/types/shared/utils/themeUtils.d.ts +90 -0
  52. package/dist/web/types/ui/client.d.ts +33 -0
  53. package/dist/web/types/ui/components/ActivityIndicator.d.ts +44 -0
  54. package/dist/web/types/ui/components/AnimationExample.d.ts +3 -0
  55. package/dist/web/types/ui/components/AutoHeightScrollView.d.ts +22 -0
  56. package/dist/web/types/ui/components/Avatar.d.ts +60 -0
  57. package/dist/web/types/ui/components/BottomSheet.d.ts +28 -0
  58. package/dist/web/types/ui/components/BottomSheetRouter.d.ts +8 -0
  59. package/dist/web/types/ui/components/CrossFadeIcon.d.ts +26 -0
  60. package/dist/web/types/ui/components/EmptyState.d.ts +7 -0
  61. package/dist/web/types/ui/components/ErrorBoundary.d.ts +30 -0
  62. package/dist/web/types/ui/components/FollowButton.d.ts +17 -0
  63. package/dist/web/types/ui/components/FontLoader.d.ts +14 -0
  64. package/dist/web/types/ui/components/GroupedItem.d.ts +23 -0
  65. package/dist/web/types/ui/components/GroupedSection.d.ts +24 -0
  66. package/dist/web/types/ui/components/Header.d.ts +37 -0
  67. package/dist/web/types/ui/components/HelperText.d.ts +46 -0
  68. package/dist/web/types/ui/components/Icon.d.ts +59 -0
  69. package/dist/web/types/ui/components/IconButton/IconButton.d.ts +98 -0
  70. package/dist/web/types/ui/components/IconButton/utils.d.ts +18 -0
  71. package/dist/web/types/ui/components/LoadingState.d.ts +8 -0
  72. package/dist/web/types/ui/components/OxyLogo.d.ts +28 -0
  73. package/dist/web/types/ui/components/OxyPayButton.d.ts +28 -0
  74. package/dist/web/types/ui/components/OxyProvider.d.ts +33 -0
  75. package/dist/web/types/ui/components/OxySignInButton.d.ts +64 -0
  76. package/dist/web/types/ui/components/ProfileCard.d.ts +17 -0
  77. package/dist/web/types/ui/components/QuickActions.d.ts +14 -0
  78. package/dist/web/types/ui/components/Section.d.ts +11 -0
  79. package/dist/web/types/ui/components/SectionTitle.d.ts +9 -0
  80. package/dist/web/types/ui/components/SettingRow.d.ts +19 -0
  81. package/dist/web/types/ui/components/SignInModal.d.ts +17 -0
  82. package/dist/web/types/ui/components/StepBasedScreen.d.ts +25 -0
  83. package/dist/web/types/ui/components/Surface.d.ts +75 -0
  84. package/dist/web/types/ui/components/TextField/Addons/Outline.d.ts +15 -0
  85. package/dist/web/types/ui/components/TextField/Addons/Underline.d.ts +18 -0
  86. package/dist/web/types/ui/components/TextField/Adornment/TextFieldAdornment.d.ts +44 -0
  87. package/dist/web/types/ui/components/TextField/Adornment/TextFieldAffix.d.ts +72 -0
  88. package/dist/web/types/ui/components/TextField/Adornment/TextFieldIcon.d.ts +77 -0
  89. package/dist/web/types/ui/components/TextField/Adornment/enums.d.ts +12 -0
  90. package/dist/web/types/ui/components/TextField/Adornment/types.d.ts +11 -0
  91. package/dist/web/types/ui/components/TextField/Adornment/utils.d.ts +11 -0
  92. package/dist/web/types/ui/components/TextField/Label/InputLabel.d.ts +4 -0
  93. package/dist/web/types/ui/components/TextField/Label/LabelBackground.d.ts +3 -0
  94. package/dist/web/types/ui/components/TextField/TextFieldFlat.d.ts +3 -0
  95. package/dist/web/types/ui/components/TextField/TextFieldOutlined.d.ts +3 -0
  96. package/dist/web/types/ui/components/TextField/constants.d.ts +31 -0
  97. package/dist/web/types/ui/components/TextField/helpers.d.ts +96 -0
  98. package/dist/web/types/ui/components/TextField/types.d.ts +155 -0
  99. package/dist/web/types/ui/components/TextField.d.ts +191 -0
  100. package/dist/web/types/ui/components/TouchableRipple/Pressable.d.ts +12 -0
  101. package/dist/web/types/ui/components/TouchableRipple/TouchableRipple.d.ts +61 -0
  102. package/dist/web/types/ui/components/TouchableRipple/utils.d.ts +10 -0
  103. package/dist/web/types/ui/components/Typography/AnimatedText.d.ts +34 -0
  104. package/dist/web/types/ui/components/Typography/types.d.ts +18 -0
  105. package/dist/web/types/ui/components/WebOxyProvider.d.ts +51 -0
  106. package/dist/web/types/ui/components/feedback/FormInput.d.ts +19 -0
  107. package/dist/web/types/ui/components/feedback/ProgressIndicator.d.ts +10 -0
  108. package/dist/web/types/ui/components/feedback/constants.d.ts +4 -0
  109. package/dist/web/types/ui/components/feedback/feedbackStyles.d.ts +279 -0
  110. package/dist/web/types/ui/components/feedback/index.d.ts +6 -0
  111. package/dist/web/types/ui/components/feedback/types.d.ts +45 -0
  112. package/dist/web/types/ui/components/feedback/useFeedbackForm.d.ts +8 -0
  113. package/dist/web/types/ui/components/fileManagement/AnimatedButton.d.ts +15 -0
  114. package/dist/web/types/ui/components/fileManagement/FileDetailsModal.d.ts +14 -0
  115. package/dist/web/types/ui/components/fileManagement/FileViewer.d.ts +17 -0
  116. package/dist/web/types/ui/components/fileManagement/UploadPreview.d.ts +20 -0
  117. package/dist/web/types/ui/components/fileManagement/styles.d.ts +859 -0
  118. package/dist/web/types/ui/components/icon/FAIRWalletIcon.d.ts +8 -0
  119. package/dist/web/types/ui/components/icon/OxyIcon.d.ts +9 -0
  120. package/dist/web/types/ui/components/icon/index.d.ts +3 -0
  121. package/dist/web/types/ui/components/index.d.ts +16 -0
  122. package/dist/web/types/ui/components/internal/GroupedPillButtons.d.ts +17 -0
  123. package/dist/web/types/ui/components/internal/PinInput.d.ts +22 -0
  124. package/dist/web/types/ui/components/modals/DeleteAccountModal.d.ts +18 -0
  125. package/dist/web/types/ui/components/modals/index.d.ts +1 -0
  126. package/dist/web/types/ui/components/payment/PaymentDetailsStep.d.ts +20 -0
  127. package/dist/web/types/ui/components/payment/PaymentMethodStep.d.ts +13 -0
  128. package/dist/web/types/ui/components/payment/PaymentReviewStep.d.ts +15 -0
  129. package/dist/web/types/ui/components/payment/PaymentSuccessStep.d.ts +9 -0
  130. package/dist/web/types/ui/components/payment/PaymentSummaryStep.d.ts +14 -0
  131. package/dist/web/types/ui/components/payment/constants.d.ts +6 -0
  132. package/dist/web/types/ui/components/payment/index.d.ts +8 -0
  133. package/dist/web/types/ui/components/payment/paymentStyles.d.ts +395 -0
  134. package/dist/web/types/ui/components/payment/types.d.ts +39 -0
  135. package/dist/web/types/ui/components/photogrid/JustifiedPhotoGrid.d.ts +26 -0
  136. package/dist/web/types/ui/components/styles/overlay.d.ts +3 -0
  137. package/dist/web/types/ui/components/styles/shadow.d.ts +2 -0
  138. package/dist/web/types/ui/components/theming.d.ts +7 -0
  139. package/dist/web/types/ui/components/types.d.ts +79 -0
  140. package/dist/web/types/ui/components/utils/forwardRef.d.ts +11 -0
  141. package/dist/web/types/ui/components/utils/hasTouchHandler.d.ts +5 -0
  142. package/dist/web/types/ui/components/utils/roundLayoutSize.d.ts +1 -0
  143. package/dist/web/types/ui/components/utils/splitStyles.d.ts +19 -0
  144. package/dist/web/types/ui/constants/iconColors.d.ts +129 -0
  145. package/dist/web/types/ui/constants/spacing.d.ts +32 -0
  146. package/dist/web/types/ui/constants/theme.d.ts +96 -0
  147. package/dist/web/types/ui/context/OxyContext.d.ts +74 -0
  148. package/dist/web/types/ui/context/ThemeContext.d.ts +18 -0
  149. package/dist/web/types/ui/context/hooks/useAuthOperations.d.ts +39 -0
  150. package/dist/web/types/ui/context/hooks/useDeviceManagement.d.ts +26 -0
  151. package/dist/web/types/ui/context/hooks/useLanguageManagement.d.ts +24 -0
  152. package/dist/web/types/ui/context/hooks/useSessionManagement.d.ts +40 -0
  153. package/dist/web/types/ui/hooks/index.d.ts +6 -0
  154. package/dist/web/types/ui/hooks/mutations/index.d.ts +8 -0
  155. package/dist/web/types/ui/hooks/mutations/mutationFactory.d.ts +75 -0
  156. package/dist/web/types/ui/hooks/mutations/useAccountMutations.d.ts +68 -0
  157. package/dist/web/types/ui/hooks/mutations/useServicesMutations.d.ts +22 -0
  158. package/dist/web/types/ui/hooks/queries/index.d.ts +10 -0
  159. package/dist/web/types/ui/hooks/queries/queryKeys.d.ts +64 -0
  160. package/dist/web/types/ui/hooks/queries/useAccountQueries.d.ts +42 -0
  161. package/dist/web/types/ui/hooks/queries/useSecurityQueries.d.ts +14 -0
  162. package/dist/web/types/ui/hooks/queries/useServicesQueries.d.ts +31 -0
  163. package/dist/web/types/ui/hooks/queryClient.d.ts +18 -0
  164. package/dist/web/types/ui/hooks/useAssets.d.ts +34 -0
  165. package/dist/web/types/ui/hooks/useAsyncAction.d.ts +50 -0
  166. package/dist/web/types/ui/hooks/useAuth.d.ts +73 -0
  167. package/dist/web/types/ui/hooks/useColorScheme.d.ts +7 -0
  168. package/dist/web/types/ui/hooks/useDeviceManagement.d.ts +26 -0
  169. package/dist/web/types/ui/hooks/useFileDownloadUrl.d.ts +18 -0
  170. package/dist/web/types/ui/hooks/useFileFiltering.d.ts +28 -0
  171. package/dist/web/types/ui/hooks/useFollow.d.ts +61 -0
  172. package/dist/web/types/ui/hooks/useFollow.types.d.ts +32 -0
  173. package/dist/web/types/ui/hooks/useI18n.d.ts +4 -0
  174. package/dist/web/types/ui/hooks/useLanguageManagement.d.ts +24 -0
  175. package/dist/web/types/ui/hooks/useProfileEditing.d.ts +35 -0
  176. package/dist/web/types/ui/hooks/useQueryClient.d.ts +6 -0
  177. package/dist/web/types/ui/hooks/useSessionManagement.d.ts +40 -0
  178. package/dist/web/types/ui/hooks/useSessionSocket.d.ts +13 -0
  179. package/dist/web/types/ui/hooks/useSettingToggle.d.ts +56 -0
  180. package/dist/web/types/ui/hooks/useStorage.d.ts +15 -0
  181. package/dist/web/types/ui/hooks/useThemeColors.d.ts +93 -0
  182. package/dist/web/types/ui/hooks/useThemeStyles.d.ts +44 -0
  183. package/dist/web/types/ui/hooks/useWebSSO.d.ts +57 -0
  184. package/dist/web/types/ui/index.d.ts +7 -0
  185. package/dist/web/types/ui/isFrontend.d.ts +2 -0
  186. package/dist/web/types/ui/navigation/bottomSheetManager.d.ts +26 -0
  187. package/dist/web/types/ui/navigation/routes.d.ts +5 -0
  188. package/dist/web/types/ui/screens/AccountCenterScreen.d.ts +4 -0
  189. package/dist/web/types/ui/screens/AccountOverviewScreen.d.ts +4 -0
  190. package/dist/web/types/ui/screens/AccountSettingsScreen.d.ts +7 -0
  191. package/dist/web/types/ui/screens/AccountSwitcherScreen.d.ts +4 -0
  192. package/dist/web/types/ui/screens/AccountVerificationScreen.d.ts +4 -0
  193. package/dist/web/types/ui/screens/AppInfoScreen.d.ts +4 -0
  194. package/dist/web/types/ui/screens/EditProfileFieldScreen.d.ts +12 -0
  195. package/dist/web/types/ui/screens/FAQScreen.d.ts +4 -0
  196. package/dist/web/types/ui/screens/FeedbackScreen.d.ts +4 -0
  197. package/dist/web/types/ui/screens/FileManagementScreen.d.ts +4 -0
  198. package/dist/web/types/ui/screens/FollowersListScreen.d.ts +8 -0
  199. package/dist/web/types/ui/screens/FollowingListScreen.d.ts +8 -0
  200. package/dist/web/types/ui/screens/HelpSupportScreen.d.ts +4 -0
  201. package/dist/web/types/ui/screens/HistoryViewScreen.d.ts +4 -0
  202. package/dist/web/types/ui/screens/LanguageSelectorScreen.d.ts +6 -0
  203. package/dist/web/types/ui/screens/LearnMoreUsernamesScreen.d.ts +4 -0
  204. package/dist/web/types/ui/screens/LegalDocumentsScreen.d.ts +4 -0
  205. package/dist/web/types/ui/screens/OxyAuthScreen.d.ts +16 -0
  206. package/dist/web/types/ui/screens/PaymentGatewayScreen.d.ts +14 -0
  207. package/dist/web/types/ui/screens/PremiumSubscriptionScreen.d.ts +4 -0
  208. package/dist/web/types/ui/screens/PrivacySettingsScreen.d.ts +4 -0
  209. package/dist/web/types/ui/screens/ProfileScreen.d.ts +8 -0
  210. package/dist/web/types/ui/screens/SavesCollectionsScreen.d.ts +4 -0
  211. package/dist/web/types/ui/screens/SearchSettingsScreen.d.ts +4 -0
  212. package/dist/web/types/ui/screens/SessionManagementScreen.d.ts +4 -0
  213. package/dist/web/types/ui/screens/UserLinksScreen.d.ts +14 -0
  214. package/dist/web/types/ui/screens/UserListScreen.d.ts +10 -0
  215. package/dist/web/types/ui/screens/WelcomeNewUserScreen.d.ts +12 -0
  216. package/dist/web/types/ui/screens/karma/KarmaAboutScreen.d.ts +4 -0
  217. package/dist/web/types/ui/screens/karma/KarmaCenterScreen.d.ts +4 -0
  218. package/dist/web/types/ui/screens/karma/KarmaFAQScreen.d.ts +4 -0
  219. package/dist/web/types/ui/screens/karma/KarmaLeaderboardScreen.d.ts +4 -0
  220. package/dist/web/types/ui/screens/karma/KarmaRewardsScreen.d.ts +4 -0
  221. package/dist/web/types/ui/screens/karma/KarmaRulesScreen.d.ts +4 -0
  222. package/dist/web/types/ui/server.d.ts +42 -0
  223. package/dist/web/types/ui/stores/accountStore.d.ts +33 -0
  224. package/dist/web/types/ui/stores/assetStore.d.ts +53 -0
  225. package/dist/web/types/ui/stores/authStore.d.ts +16 -0
  226. package/dist/web/types/ui/stores/fileStore.d.ts +30 -0
  227. package/dist/web/types/ui/stores/followStore.d.ts +24 -0
  228. package/dist/web/types/ui/styles/authStyles.d.ts +331 -0
  229. package/dist/web/types/ui/styles/fonts.d.ts +20 -0
  230. package/dist/web/types/ui/styles/index.d.ts +4 -0
  231. package/dist/web/types/ui/styles/spacing.d.ts +48 -0
  232. package/dist/web/types/ui/styles/theme.d.ts +67 -0
  233. package/dist/web/types/ui/types/fileManagement.d.ts +40 -0
  234. package/dist/web/types/ui/types/navigation.d.ts +36 -0
  235. package/dist/web/types/ui/utils/authHelpers.d.ts +98 -0
  236. package/dist/web/types/ui/utils/avatarUtils.d.ts +33 -0
  237. package/dist/web/types/ui/utils/colorUtils.d.ts +9 -0
  238. package/dist/web/types/ui/utils/confirmAction.d.ts +6 -0
  239. package/dist/web/types/ui/utils/errorHandlers.d.ts +34 -0
  240. package/dist/web/types/ui/utils/fileManagement.d.ts +86 -0
  241. package/dist/web/types/ui/utils/iconNames.d.ts +111 -0
  242. package/dist/web/types/ui/utils/sessionHelpers.d.ts +63 -0
  243. package/dist/web/types/ui/utils/storageHelpers.d.ts +27 -0
  244. package/dist/web/types/ui/utils/themeUtils.d.ts +10 -0
  245. package/dist/web/types/ui/utils/userUtils.d.ts +28 -0
  246. package/dist/web/types/utils/apiUtils.d.ts +53 -0
  247. package/dist/web/types/utils/asyncUtils.d.ts +58 -0
  248. package/dist/web/types/utils/cache.d.ts +127 -0
  249. package/dist/web/types/utils/deviceManager.d.ts +65 -0
  250. package/dist/web/types/utils/errorUtils.d.ts +46 -0
  251. package/dist/web/types/utils/hookUtils.d.ts +101 -0
  252. package/dist/web/types/utils/index.d.ts +6 -0
  253. package/dist/web/types/utils/languageUtils.d.ts +37 -0
  254. package/dist/web/types/utils/loggerUtils.d.ts +48 -0
  255. package/dist/web/types/utils/platform.d.ts +40 -0
  256. package/dist/web/types/utils/platformInit.d.ts +8 -0
  257. package/dist/web/types/utils/requestUtils.d.ts +123 -0
  258. package/dist/web/types/utils/sessionUtils.d.ts +54 -0
  259. package/dist/web/types/utils/validationUtils.d.ts +85 -0
  260. package/dist/web/types/web/WebOxyContext.d.ts +151 -0
  261. package/dist/web/types/web/index.d.ts +52 -0
  262. package/dist/web/types/web.d.ts +53 -0
  263. package/package.json +20 -6
@@ -0,0 +1,18 @@
1
+ import { StyleProp, ViewStyle } from 'react-native';
2
+ import type { ThemeProp } from '../../types';
3
+ type UnderlineProps = {
4
+ parentState: {
5
+ focused: boolean;
6
+ };
7
+ error?: boolean;
8
+ colors?: {
9
+ error?: string;
10
+ };
11
+ activeColor: string;
12
+ underlineColorCustom?: string;
13
+ hasActiveOutline?: boolean;
14
+ style?: StyleProp<ViewStyle>;
15
+ theme?: ThemeProp;
16
+ };
17
+ export declare const Underline: ({ parentState, error, colors, activeColor, underlineColorCustom, hasActiveOutline, style, theme: themeOverrides, }: UnderlineProps) => import("react/jsx-runtime").JSX.Element;
18
+ export {};
@@ -0,0 +1,44 @@
1
+ import React from 'react';
2
+ import type { LayoutChangeEvent, TextStyle, StyleProp, Animated, DimensionValue } from 'react-native';
3
+ import type { ThemeProp } from '../../types';
4
+ import { AdornmentSide, AdornmentType } from './enums';
5
+ import type { AdornmentConfig, AdornmentStyleAdjustmentForNativeInput } from './types';
6
+ export declare function getAdornmentConfig({ left, right, }: {
7
+ left?: React.ReactNode;
8
+ right?: React.ReactNode;
9
+ }): Array<AdornmentConfig>;
10
+ export declare function getAdornmentStyleAdjustmentForNativeInput({ adornmentConfig, leftAffixWidth, rightAffixWidth, paddingHorizontal, inputOffset, mode, isV3, }: {
11
+ inputOffset?: number;
12
+ adornmentConfig: AdornmentConfig[];
13
+ leftAffixWidth: number;
14
+ rightAffixWidth: number;
15
+ mode?: 'outlined' | 'flat';
16
+ paddingHorizontal?: DimensionValue;
17
+ isV3?: boolean;
18
+ }): AdornmentStyleAdjustmentForNativeInput | {};
19
+ export interface TextFieldAdornmentProps {
20
+ forceFocus: () => void;
21
+ adornmentConfig: AdornmentConfig[];
22
+ topPosition: {
23
+ [AdornmentType.Affix]: {
24
+ [AdornmentSide.Left]: number | null;
25
+ [AdornmentSide.Right]: number | null;
26
+ };
27
+ [AdornmentType.Icon]: number;
28
+ };
29
+ onAffixChange: {
30
+ [AdornmentSide.Left]: (event: LayoutChangeEvent) => void;
31
+ [AdornmentSide.Right]: (event: LayoutChangeEvent) => void;
32
+ };
33
+ left?: React.ReactNode;
34
+ right?: React.ReactNode;
35
+ textStyle?: StyleProp<TextStyle>;
36
+ visible?: Animated.Value;
37
+ isTextInputFocused: boolean;
38
+ paddingHorizontal?: DimensionValue;
39
+ maxFontSizeMultiplier?: number | undefined | null;
40
+ theme?: ThemeProp;
41
+ disabled?: boolean;
42
+ }
43
+ declare const TextFieldAdornment: React.FunctionComponent<TextFieldAdornmentProps>;
44
+ export default TextFieldAdornment;
@@ -0,0 +1,72 @@
1
+ import React from 'react';
2
+ import { Animated, DimensionValue, GestureResponderEvent, LayoutChangeEvent, StyleProp, TextStyle } from 'react-native';
3
+ import { AdornmentSide } from './enums';
4
+ import type { ThemeProp } from "../../types";
5
+ export type Props = {
6
+ /**
7
+ * Text to show.
8
+ */
9
+ text: string;
10
+ onLayout?: (event: LayoutChangeEvent) => void;
11
+ /**
12
+ * Function to execute on press.
13
+ */
14
+ onPress?: (e: GestureResponderEvent) => void;
15
+ /**
16
+ * Accessibility label for the affix. This is read by the screen reader when the user taps the affix.
17
+ */
18
+ accessibilityLabel?: string;
19
+ /**
20
+ * Style that is passed to the Text element.
21
+ */
22
+ textStyle?: StyleProp<TextStyle>;
23
+ /**
24
+ * @optional
25
+ */
26
+ theme?: ThemeProp;
27
+ };
28
+ type ContextState = {
29
+ topPosition: number | null;
30
+ onLayout?: (event: LayoutChangeEvent) => void;
31
+ visible?: Animated.Value;
32
+ textStyle?: StyleProp<TextStyle>;
33
+ side: AdornmentSide;
34
+ paddingHorizontal?: DimensionValue;
35
+ maxFontSizeMultiplier?: number | undefined | null;
36
+ testID?: string;
37
+ disabled?: boolean;
38
+ };
39
+ declare const AffixAdornment: React.FunctionComponent<{
40
+ affix: React.ReactNode;
41
+ testID: string;
42
+ } & ContextState>;
43
+ /**
44
+ * A component to render a leading / trailing text in the TextInput
45
+ *
46
+ * ## Usage
47
+ * ```js
48
+ * import * as React from 'react';
49
+ * import { TextInput } from 'react-native-paper';
50
+ *
51
+ * const MyComponent = () => {
52
+ * const [text, setText] = React.useState('');
53
+ *
54
+ * return (
55
+ * <TextInput
56
+ * mode="outlined"
57
+ * label="Outlined input"
58
+ * placeholder="Type something"
59
+ * right={<TextInput.Affix text="/100" />}
60
+ * />
61
+ * );
62
+ * };
63
+ *
64
+ * export default MyComponent;
65
+ * ```
66
+ */
67
+ declare const TextFieldAffix: {
68
+ ({ text, textStyle: labelStyle, theme: themeOverrides, onLayout: onTextLayout, onPress, accessibilityLabel, }: Props): import("react/jsx-runtime").JSX.Element;
69
+ displayName: string;
70
+ };
71
+ export default TextFieldAffix;
72
+ export { TextFieldAffix, AffixAdornment };
@@ -0,0 +1,77 @@
1
+ import React from 'react';
2
+ import { ColorValue, GestureResponderEvent, StyleProp, ViewStyle } from 'react-native';
3
+ import type { $Omit, ThemeProp } from "../../types";
4
+ import type { IconSource } from '../../Icon';
5
+ import IconButton from '../../IconButton/IconButton';
6
+ export type Props = $Omit<React.ComponentProps<typeof IconButton>, 'icon' | 'theme' | 'color' | 'iconColor'> & {
7
+ /**
8
+ * @renamed Renamed from 'name' to 'icon` in v5.x
9
+ * Icon to show.
10
+ */
11
+ icon: IconSource;
12
+ /**
13
+ * Function to execute on press.
14
+ */
15
+ onPress?: (e: GestureResponderEvent) => void;
16
+ /**
17
+ * Whether the TextInput will focus after onPress.
18
+ */
19
+ forceTextInputFocus?: boolean;
20
+ /**
21
+ * Color of the icon or a function receiving a boolean indicating whether the TextInput is focused and returning the color.
22
+ */
23
+ color?: ((isTextInputFocused: boolean) => string | undefined) | string;
24
+ /**
25
+ * Color of the ripple effect.
26
+ */
27
+ rippleColor?: ColorValue;
28
+ style?: StyleProp<ViewStyle>;
29
+ /**
30
+ * @optional
31
+ */
32
+ theme?: ThemeProp;
33
+ };
34
+ type StyleContextType = {
35
+ style: StyleProp<ViewStyle>;
36
+ isTextInputFocused: boolean;
37
+ forceFocus: () => void;
38
+ testID: string;
39
+ disabled?: boolean;
40
+ };
41
+ declare const IconAdornment: React.FunctionComponent<{
42
+ testID: string;
43
+ icon: React.ReactNode;
44
+ topPosition: number;
45
+ side: 'left' | 'right';
46
+ theme?: ThemeProp;
47
+ disabled?: boolean;
48
+ } & Omit<StyleContextType, 'style'>>;
49
+ /**
50
+ * A component to render a leading / trailing icon in the TextInput
51
+ *
52
+ * ## Usage
53
+ * ```js
54
+ * import * as React from 'react';
55
+ * import { TextInput } from 'react-native-paper';
56
+ *
57
+ * const MyComponent = () => {
58
+ * const [text, setText] = React.useState('');
59
+ *
60
+ * return (
61
+ * <TextInput
62
+ * label="Password"
63
+ * secureTextEntry
64
+ * right={<TextInput.Icon icon="eye" />}
65
+ * />
66
+ * );
67
+ * };
68
+ *
69
+ * export default MyComponent;
70
+ * ```
71
+ */
72
+ declare const TextFieldIcon: {
73
+ ({ icon, onPress, forceTextInputFocus, color: customColor, theme: themeOverrides, rippleColor, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
74
+ displayName: string;
75
+ };
76
+ export default TextFieldIcon;
77
+ export { IconAdornment };
@@ -0,0 +1,12 @@
1
+ export declare enum AdornmentType {
2
+ Icon = "icon",
3
+ Affix = "affix"
4
+ }
5
+ export declare enum AdornmentSide {
6
+ Right = "right",
7
+ Left = "left"
8
+ }
9
+ export declare enum InputMode {
10
+ Outlined = "outlined",
11
+ Flat = "flat"
12
+ }
@@ -0,0 +1,11 @@
1
+ import type { AdornmentSide, AdornmentType } from './enums';
2
+ export type AdornmentConfig = {
3
+ side: AdornmentSide;
4
+ type: AdornmentType;
5
+ };
6
+ export type AdornmentStyleAdjustmentForNativeInput = {
7
+ adornmentStyleAdjustmentForNativeInput: Array<{
8
+ paddingRight: number;
9
+ paddingLeft: number;
10
+ } | {}>;
11
+ };
@@ -0,0 +1,11 @@
1
+ import type { InternalTheme } from "../../types";
2
+ type BaseProps = {
3
+ theme: InternalTheme;
4
+ disabled?: boolean;
5
+ };
6
+ export declare function getTextColor({ theme, disabled }: BaseProps): string;
7
+ export declare function getIconColor({ theme, isTextInputFocused, disabled, customColor, }: BaseProps & {
8
+ isTextInputFocused: boolean;
9
+ customColor?: ((isTextInputFocused: boolean) => string | undefined) | string;
10
+ }): string | undefined;
11
+ export {};
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { InputLabelProps } from '../types';
3
+ declare const _default: React.MemoExoticComponent<(props: InputLabelProps) => import("react/jsx-runtime").JSX.Element>;
4
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import type { LabelBackgroundProps } from '../types';
2
+ declare const LabelBackground: ({ labeled, labelLayoutWidth, labelLayoutHeight, placeholderStyle, baseLabelTranslateX, topPosition, backgroundColor, roundness, labelStyle, maxFontSizeMultiplier, testID, }: LabelBackgroundProps) => (import("react/jsx-runtime").JSX.Element | null)[];
3
+ export default LabelBackground;
@@ -0,0 +1,3 @@
1
+ import type { ChildTextInputProps } from './types';
2
+ declare const TextInputFlat: ({ disabled, editable, label, error, selectionColor: customSelectionColor, cursorColor, underlineColor, underlineStyle, activeUnderlineColor, textColor, dense, style, theme, render, multiline, parentState, innerRef, onFocus, forceFocus, onBlur, onChangeText, onLayoutAnimatedText, onLabelTextLayout, onLeftAffixLayoutChange, onRightAffixLayoutChange, onInputLayout, left, right, placeholderTextColor, testID, contentStyle, scaledLabel, ...rest }: ChildTextInputProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default TextInputFlat;
@@ -0,0 +1,3 @@
1
+ import type { ChildTextInputProps } from './types';
2
+ declare const TextInputOutlined: ({ disabled, editable, label, error, selectionColor: customSelectionColor, cursorColor, underlineColor: _underlineColor, outlineColor: customOutlineColor, activeOutlineColor, outlineStyle, textColor, dense, style, theme, render, multiline, parentState, innerRef, onFocus, forceFocus, onBlur, onChangeText, onLayoutAnimatedText, onLabelTextLayout, onLeftAffixLayoutChange, onRightAffixLayoutChange, onInputLayout, onLayout, left, right, placeholderTextColor, testID, contentStyle, scaledLabel, ...rest }: ChildTextInputProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default TextInputOutlined;
@@ -0,0 +1,31 @@
1
+ export declare const MAXIMIZED_LABEL_FONT_SIZE = 16;
2
+ export declare const MINIMIZED_LABEL_FONT_SIZE = 12;
3
+ export declare const LABEL_WIGGLE_X_OFFSET = 4;
4
+ export declare const ADORNMENT_SIZE = 24;
5
+ export declare const MIN_WIDTH = 100;
6
+ export declare const MD2_AFFIX_OFFSET = 12;
7
+ export declare const MD3_AFFIX_OFFSET = 16;
8
+ export declare const ICON_SIZE = 24;
9
+ export declare const MD2_ICON_OFFSET = 12;
10
+ export declare const MD3_ICON_OFFSET = 16;
11
+ export declare const MD2_MIN_HEIGHT = 64;
12
+ export declare const MD3_MIN_HEIGHT = 56;
13
+ export declare const MD3_ADORNMENT_OFFSET = 16;
14
+ export declare const MD2_ADORNMENT_OFFSET = 12;
15
+ export declare const LABEL_PADDING_TOP_DENSE = 24;
16
+ export declare const LABEL_PADDING_TOP = 8;
17
+ export declare const MD2_LABEL_PADDING_TOP = 30;
18
+ export declare const MD3_LABEL_PADDING_TOP = 26;
19
+ export declare const MD2_LABEL_PADDING_HORIZONTAL = 12;
20
+ export declare const MD3_LABEL_PADDING_HORIZONTAL = 16;
21
+ export declare const MD2_FLAT_INPUT_OFFSET = 8;
22
+ export declare const MD3_FLAT_INPUT_OFFSET = 16;
23
+ export declare const MINIMIZED_LABEL_Y_OFFSET = -18;
24
+ export declare const MIN_DENSE_HEIGHT_WL = 52;
25
+ export declare const MIN_DENSE_HEIGHT = 40;
26
+ export declare const MD2_INPUT_PADDING_HORIZONTAL = 14;
27
+ export declare const MD3_INPUT_PADDING_HORIZONTAL = 16;
28
+ export declare const MD2_OUTLINED_INPUT_OFFSET = 8;
29
+ export declare const MD3_OUTLINED_INPUT_OFFSET = 16;
30
+ export declare const OUTLINE_MINIMIZED_LABEL_Y_OFFSET = -6;
31
+ export declare const MIN_DENSE_HEIGHT_OUTLINED = 48;
@@ -0,0 +1,96 @@
1
+ import type { AdornmentConfig } from './Adornment/types';
2
+ import type { TextInputLabelProp } from './types';
3
+ import type { InternalTheme } from "../types";
4
+ type PaddingProps = {
5
+ height: number | null;
6
+ labelHalfHeight: number;
7
+ multiline: boolean | null;
8
+ dense: boolean | null;
9
+ topPosition: number;
10
+ fontSize: number;
11
+ lineHeight?: number;
12
+ label?: TextInputLabelProp | null;
13
+ scale: number;
14
+ offset: number;
15
+ isAndroid: boolean;
16
+ styles: {
17
+ paddingTop: number;
18
+ paddingBottom: number;
19
+ };
20
+ };
21
+ type AdjProps = PaddingProps & {
22
+ pad: number;
23
+ };
24
+ export type Padding = {
25
+ paddingTop: number;
26
+ paddingBottom: number;
27
+ };
28
+ export declare const calculateLabelTopPosition: (labelHeight: number, height?: number, optionalPadding?: number) => number;
29
+ export declare const calculateInputHeight: (labelHeight: number, height: any | undefined, minHeight: number) => number;
30
+ export declare const calculatePadding: (props: PaddingProps) => number;
31
+ export declare const adjustPaddingOut: ({ pad, multiline, label, scale, height, fontSize, lineHeight, dense, offset, isAndroid, }: AdjProps) => Padding;
32
+ export declare const adjustPaddingFlat: ({ pad, scale, multiline, label, height, offset, dense, fontSize, isAndroid, styles, }: AdjProps) => Padding;
33
+ export declare function calculateFlatAffixTopPosition({ height, paddingTop, paddingBottom, affixHeight, }: {
34
+ height: number;
35
+ paddingTop: number;
36
+ paddingBottom: number;
37
+ affixHeight: number;
38
+ }): number;
39
+ export declare function calculateOutlinedIconAndAffixTopPosition({ height, affixHeight, labelYOffset, }: {
40
+ height: number;
41
+ affixHeight: number;
42
+ labelYOffset: number;
43
+ }): number;
44
+ export declare const calculateFlatInputHorizontalPadding: ({ adornmentConfig, isV3, }: {
45
+ adornmentConfig: AdornmentConfig[];
46
+ isV3?: boolean;
47
+ }) => {
48
+ paddingLeft: number;
49
+ paddingRight: number;
50
+ };
51
+ export declare const getFlatInputColors: ({ underlineColor, activeUnderlineColor, customSelectionColor, textColor, disabled, error, theme, }: {
52
+ underlineColor?: string;
53
+ activeUnderlineColor?: string;
54
+ customSelectionColor?: string;
55
+ textColor?: string;
56
+ disabled?: boolean;
57
+ error?: boolean;
58
+ theme: InternalTheme;
59
+ }) => {
60
+ inputTextColor: string;
61
+ activeColor: string;
62
+ underlineColorCustom: string;
63
+ placeholderColor: string;
64
+ selectionColor: string;
65
+ errorColor: string;
66
+ backgroundColor: string | undefined;
67
+ };
68
+ export declare const getOutlinedInputColors: ({ activeOutlineColor, customOutlineColor, customSelectionColor, textColor, disabled, error, theme, }: {
69
+ activeOutlineColor?: string;
70
+ customOutlineColor?: string;
71
+ customSelectionColor?: string;
72
+ textColor?: string;
73
+ disabled?: boolean;
74
+ error?: boolean;
75
+ theme: InternalTheme;
76
+ }) => {
77
+ inputTextColor: string;
78
+ activeColor: string;
79
+ outlineColor: string | undefined;
80
+ placeholderColor: string;
81
+ selectionColor: string;
82
+ errorColor: string;
83
+ };
84
+ export declare const getConstants: (isV3?: boolean) => {
85
+ AFFIX_OFFSET: number;
86
+ ICON_OFFSET: number;
87
+ LABEL_PADDING_TOP: number;
88
+ LABEL_PADDING_HORIZONTAL: number;
89
+ FLAT_INPUT_OFFSET: number;
90
+ MIN_HEIGHT: number;
91
+ INPUT_PADDING_HORIZONTAL: number;
92
+ ADORNMENT_OFFSET: number;
93
+ OUTLINED_INPUT_OFFSET: number;
94
+ MIN_WIDTH: number;
95
+ };
96
+ export {};
@@ -0,0 +1,155 @@
1
+ import * as React from 'react';
2
+ import type { TextInput as NativeTextInput, Animated, TextStyle, LayoutChangeEvent, ColorValue, StyleProp, ViewProps, ViewStyle, NativeSyntheticEvent, TextLayoutEventData } from 'react-native';
3
+ import type { $Omit, InternalTheme, ThemeProp } from '../types';
4
+ export type TextFieldLabelProp = string | React.ReactElement;
5
+ export type TextInputLabelProp = TextFieldLabelProp;
6
+ type TextInputProps = React.ComponentPropsWithRef<typeof NativeTextInput> & {
7
+ mode?: 'flat' | 'outlined';
8
+ left?: React.ReactNode;
9
+ right?: React.ReactNode;
10
+ disabled?: boolean;
11
+ label?: TextFieldLabelProp;
12
+ placeholder?: string;
13
+ error?: boolean;
14
+ onChangeText?: Function;
15
+ selectionColor?: string;
16
+ cursorColor?: string;
17
+ underlineColor?: string;
18
+ activeUnderlineColor?: string;
19
+ outlineColor?: string;
20
+ activeOutlineColor?: string;
21
+ textColor?: string;
22
+ dense?: boolean;
23
+ multiline?: boolean;
24
+ numberOfLines?: number;
25
+ onFocus?: (args: any) => void;
26
+ onBlur?: (args: any) => void;
27
+ render?: (props: RenderProps) => React.ReactNode;
28
+ value?: string;
29
+ style?: StyleProp<TextStyle>;
30
+ theme?: ThemeProp;
31
+ testID?: string;
32
+ contentStyle?: StyleProp<TextStyle>;
33
+ outlineStyle?: StyleProp<ViewStyle>;
34
+ underlineStyle?: StyleProp<ViewStyle>;
35
+ scaledLabel?: boolean;
36
+ };
37
+ export type RenderProps = {
38
+ ref: (a?: NativeTextInput | null) => void;
39
+ onChangeText?: (a: string) => void;
40
+ placeholder?: string;
41
+ placeholderTextColor?: ColorValue;
42
+ editable?: boolean;
43
+ selectionColor?: string;
44
+ cursorColor?: string;
45
+ onFocus?: (args: any) => void;
46
+ onBlur?: (args: any) => void;
47
+ underlineColorAndroid?: string;
48
+ onLayout?: (args: any) => void;
49
+ style: any;
50
+ multiline?: boolean;
51
+ numberOfLines?: number;
52
+ value?: string;
53
+ adjustsFontSizeToFit?: boolean;
54
+ testID?: string;
55
+ };
56
+ type TextInputTypesWithoutMode = $Omit<TextInputProps, 'mode'>;
57
+ export type State = {
58
+ labeled: Animated.Value;
59
+ error: Animated.Value;
60
+ focused: boolean;
61
+ displayPlaceholder: boolean;
62
+ value?: string;
63
+ labelTextLayout: {
64
+ width: number;
65
+ };
66
+ labelLayout: {
67
+ measured: boolean;
68
+ width: number;
69
+ height: number;
70
+ };
71
+ leftLayout: {
72
+ height: number | null;
73
+ width: number | null;
74
+ };
75
+ rightLayout: {
76
+ height: number | null;
77
+ width: number | null;
78
+ };
79
+ inputContainerLayout: {
80
+ width: number;
81
+ };
82
+ contentStyle?: StyleProp<ViewProps>;
83
+ };
84
+ export type ChildTextInputProps = {
85
+ parentState: State;
86
+ innerRef: (ref?: NativeTextInput | null) => void;
87
+ onFocus?: (args: any) => void;
88
+ onBlur?: (args: any) => void;
89
+ forceFocus: () => void;
90
+ onChangeText?: (value: string) => void;
91
+ onInputLayout: (event: LayoutChangeEvent) => void;
92
+ onLayoutAnimatedText: (args: any) => void;
93
+ onLabelTextLayout: (event: NativeSyntheticEvent<TextLayoutEventData>) => void;
94
+ onLeftAffixLayoutChange: (event: LayoutChangeEvent) => void;
95
+ onRightAffixLayoutChange: (event: LayoutChangeEvent) => void;
96
+ } & $Omit<TextInputTypesWithoutMode, 'theme'> & {
97
+ theme: InternalTheme;
98
+ };
99
+ export type LabelProps = {
100
+ mode?: 'flat' | 'outlined';
101
+ placeholderStyle: any;
102
+ placeholderOpacity: number | Animated.Value | Animated.AnimatedInterpolation<number>;
103
+ baseLabelTranslateX: number;
104
+ baseLabelTranslateY: number;
105
+ wiggleOffsetX: number;
106
+ labelScale: number;
107
+ fontSize: number;
108
+ lineHeight?: number | undefined;
109
+ fontWeight: TextStyle['fontWeight'];
110
+ font: any;
111
+ topPosition: number;
112
+ paddingLeft?: number;
113
+ paddingRight?: number;
114
+ labelTranslationXOffset?: number;
115
+ placeholderColor: string | null;
116
+ backgroundColor?: ColorValue;
117
+ label?: TextFieldLabelProp | null;
118
+ hasActiveOutline?: boolean | null;
119
+ activeColor: string;
120
+ errorColor?: string;
121
+ labelError?: boolean | null;
122
+ onLayoutAnimatedText: (args: any) => void;
123
+ onLabelTextLayout: (event: NativeSyntheticEvent<TextLayoutEventData>) => void;
124
+ roundness: number;
125
+ maxFontSizeMultiplier?: number | undefined | null;
126
+ testID?: string;
127
+ contentStyle?: StyleProp<ViewProps>;
128
+ theme?: ThemeProp;
129
+ };
130
+ export type InputLabelProps = {
131
+ labeled: Animated.Value;
132
+ error: Animated.Value;
133
+ focused: boolean;
134
+ wiggle: boolean;
135
+ opacity: number;
136
+ labelLayoutMeasured: boolean;
137
+ labelLayoutWidth: number;
138
+ labelLayoutHeight: number;
139
+ inputContainerLayout: {
140
+ width: number;
141
+ };
142
+ labelBackground?: any;
143
+ maxFontSizeMultiplier?: number | undefined | null;
144
+ isV3?: boolean;
145
+ scaledLabel?: boolean;
146
+ } & LabelProps;
147
+ export type LabelBackgroundProps = {
148
+ labelStyle: any;
149
+ labeled: Animated.Value;
150
+ labelLayoutWidth: number;
151
+ labelLayoutHeight: number;
152
+ maxFontSizeMultiplier?: number | undefined | null;
153
+ theme?: ThemeProp;
154
+ } & LabelProps;
155
+ export {};