@react-navigation/elements 2.0.0-rc.2 → 2.0.0-rc.21
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/Background.js +4 -3
- package/lib/commonjs/Background.js.map +1 -1
- package/lib/commonjs/Button.js +29 -56
- package/lib/commonjs/Button.js.map +1 -1
- package/lib/commonjs/Header/Header.js +143 -62
- package/lib/commonjs/Header/Header.js.map +1 -1
- package/lib/commonjs/Header/HeaderBackButton.js +74 -76
- package/lib/commonjs/Header/HeaderBackButton.js.map +1 -1
- package/lib/commonjs/Header/HeaderBackContext.js +1 -1
- package/lib/commonjs/Header/HeaderBackground.js +9 -7
- package/lib/commonjs/Header/HeaderBackground.js.map +1 -1
- package/lib/commonjs/Header/HeaderButton.js +6 -7
- package/lib/commonjs/Header/HeaderButton.js.map +1 -1
- package/lib/commonjs/Header/HeaderHeightContext.js +1 -1
- package/lib/commonjs/Header/HeaderIcon.js +44 -0
- package/lib/commonjs/Header/HeaderIcon.js.map +1 -0
- package/lib/commonjs/Header/HeaderSearchBar.js +267 -0
- package/lib/commonjs/Header/HeaderSearchBar.js.map +1 -0
- package/lib/commonjs/Header/HeaderShownContext.js +1 -1
- package/lib/commonjs/Header/HeaderTitle.js +5 -8
- package/lib/commonjs/Header/HeaderTitle.js.map +1 -1
- package/lib/commonjs/Header/useHeaderHeight.js +1 -1
- package/lib/commonjs/Label/Label.js +6 -9
- package/lib/commonjs/Label/Label.js.map +1 -1
- package/lib/commonjs/MaskedView.android.js +1 -1
- package/lib/commonjs/MaskedView.ios.js +1 -1
- package/lib/commonjs/MaskedViewNative.js +5 -1
- package/lib/commonjs/MaskedViewNative.js.map +1 -1
- package/lib/commonjs/MissingIcon.js +6 -9
- package/lib/commonjs/MissingIcon.js.map +1 -1
- package/lib/commonjs/PlatformPressable.js +61 -6
- package/lib/commonjs/PlatformPressable.js.map +1 -1
- package/lib/commonjs/ResourceSavingView.js +19 -15
- package/lib/commonjs/ResourceSavingView.js.map +1 -1
- package/lib/commonjs/SafeAreaProviderCompat.js +26 -19
- package/lib/commonjs/SafeAreaProviderCompat.js.map +1 -1
- package/lib/commonjs/Screen.js +38 -28
- package/lib/commonjs/Screen.js.map +1 -1
- package/lib/commonjs/Text.js +6 -7
- package/lib/commonjs/Text.js.map +1 -1
- package/lib/commonjs/assets/back-icon-mask.png +0 -0
- package/lib/commonjs/assets/back-icon@4x.ios.png +0 -0
- package/lib/commonjs/assets/clear-icon.png +0 -0
- package/lib/commonjs/assets/clear-icon@1x.png +0 -0
- package/lib/commonjs/assets/clear-icon@2x.png +0 -0
- package/lib/commonjs/assets/clear-icon@3x.png +0 -0
- package/lib/commonjs/assets/clear-icon@4x.png +0 -0
- package/lib/commonjs/assets/close-icon.png +0 -0
- package/lib/commonjs/assets/close-icon@1x.png +0 -0
- package/lib/commonjs/assets/close-icon@2x.png +0 -0
- package/lib/commonjs/assets/close-icon@3x.png +0 -0
- package/lib/commonjs/assets/close-icon@4x.png +0 -0
- package/lib/commonjs/assets/search-icon.png +0 -0
- package/lib/commonjs/assets/search-icon@1x.android.png +0 -0
- package/lib/commonjs/assets/search-icon@1x.ios.png +0 -0
- package/lib/commonjs/assets/search-icon@2x.android.png +0 -0
- package/lib/commonjs/assets/search-icon@2x.ios.png +0 -0
- package/lib/commonjs/assets/search-icon@3x.android.png +0 -0
- package/lib/commonjs/assets/search-icon@3x.ios.png +0 -0
- package/lib/commonjs/assets/search-icon@4x.android.png +0 -0
- package/lib/commonjs/assets/search-icon@4x.ios.png +0 -0
- package/lib/commonjs/index.js +30 -28
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/package.json +1 -0
- package/lib/module/Background.js +6 -3
- package/lib/module/Background.js.map +1 -1
- package/lib/module/Button.js +31 -56
- package/lib/module/Button.js.map +1 -1
- package/lib/module/Header/Header.js +144 -62
- package/lib/module/Header/Header.js.map +1 -1
- package/lib/module/Header/HeaderBackButton.js +75 -76
- package/lib/module/Header/HeaderBackButton.js.map +1 -1
- package/lib/module/Header/HeaderBackContext.js +3 -1
- package/lib/module/Header/HeaderBackContext.js.map +1 -1
- package/lib/module/Header/HeaderBackground.js +11 -7
- package/lib/module/Header/HeaderBackground.js.map +1 -1
- package/lib/module/Header/HeaderButton.js +8 -5
- package/lib/module/Header/HeaderButton.js.map +1 -1
- package/lib/module/Header/HeaderHeightContext.js +3 -1
- package/lib/module/Header/HeaderHeightContext.js.map +1 -1
- package/lib/module/Header/HeaderIcon.js +39 -0
- package/lib/module/Header/HeaderIcon.js.map +1 -0
- package/lib/module/Header/HeaderSearchBar.js +260 -0
- package/lib/module/Header/HeaderSearchBar.js.map +1 -0
- package/lib/module/Header/HeaderShownContext.js +3 -1
- package/lib/module/Header/HeaderShownContext.js.map +1 -1
- package/lib/module/Header/HeaderTitle.js +7 -6
- package/lib/module/Header/HeaderTitle.js.map +1 -1
- package/lib/module/Header/getDefaultHeaderHeight.js +2 -0
- package/lib/module/Header/getDefaultHeaderHeight.js.map +1 -1
- package/lib/module/Header/getHeaderTitle.js +2 -0
- package/lib/module/Header/getHeaderTitle.js.map +1 -1
- package/lib/module/Header/useHeaderHeight.js +3 -1
- package/lib/module/Header/useHeaderHeight.js.map +1 -1
- package/lib/module/Label/Label.js +8 -7
- package/lib/module/Label/Label.js.map +1 -1
- package/lib/module/Label/getLabel.js +2 -0
- package/lib/module/Label/getLabel.js.map +1 -1
- package/lib/module/MaskedView.android.js +3 -1
- package/lib/module/MaskedView.android.js.map +1 -1
- package/lib/module/MaskedView.ios.js +3 -1
- package/lib/module/MaskedView.ios.js.map +1 -1
- package/lib/module/MaskedView.js +2 -0
- package/lib/module/MaskedView.js.map +1 -1
- package/lib/module/MaskedViewNative.js +7 -1
- package/lib/module/MaskedViewNative.js.map +1 -1
- package/lib/module/MissingIcon.js +9 -7
- package/lib/module/MissingIcon.js.map +1 -1
- package/lib/module/PlatformPressable.js +63 -6
- package/lib/module/PlatformPressable.js.map +1 -1
- package/lib/module/ResourceSavingView.js +21 -15
- package/lib/module/ResourceSavingView.js.map +1 -1
- package/lib/module/SafeAreaProviderCompat.js +28 -19
- package/lib/module/SafeAreaProviderCompat.js.map +1 -1
- package/lib/module/Screen.js +40 -28
- package/lib/module/Screen.js.map +1 -1
- package/lib/module/Text.js +7 -6
- package/lib/module/Text.js.map +1 -1
- package/lib/module/assets/back-icon-mask.png +0 -0
- package/lib/module/assets/back-icon@4x.ios.png +0 -0
- package/lib/module/assets/clear-icon.png +0 -0
- package/lib/module/assets/clear-icon@1x.png +0 -0
- package/lib/module/assets/clear-icon@2x.png +0 -0
- package/lib/module/assets/clear-icon@3x.png +0 -0
- package/lib/module/assets/clear-icon@4x.png +0 -0
- package/lib/module/assets/close-icon.png +0 -0
- package/lib/module/assets/close-icon@1x.png +0 -0
- package/lib/module/assets/close-icon@2x.png +0 -0
- package/lib/module/assets/close-icon@3x.png +0 -0
- package/lib/module/assets/close-icon@4x.png +0 -0
- package/lib/module/assets/search-icon.png +0 -0
- package/lib/module/assets/search-icon@1x.android.png +0 -0
- package/lib/module/assets/search-icon@1x.ios.png +0 -0
- package/lib/module/assets/search-icon@2x.android.png +0 -0
- package/lib/module/assets/search-icon@2x.ios.png +0 -0
- package/lib/module/assets/search-icon@3x.android.png +0 -0
- package/lib/module/assets/search-icon@3x.ios.png +0 -0
- package/lib/module/assets/search-icon@4x.android.png +0 -0
- package/lib/module/assets/search-icon@4x.ios.png +0 -0
- package/lib/module/getDefaultSidebarWidth.js +2 -0
- package/lib/module/getDefaultSidebarWidth.js.map +1 -1
- package/lib/module/getNamedContext.js +2 -0
- package/lib/module/getNamedContext.js.map +1 -1
- package/lib/module/index.js +31 -28
- package/lib/module/index.js.map +1 -1
- package/lib/module/package.json +1 -0
- package/lib/module/types.js +2 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/{src → commonjs/src}/Background.d.ts +1 -1
- package/lib/typescript/commonjs/src/Background.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/Button.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/Header/Header.d.ts +31 -0
- package/lib/typescript/commonjs/src/Header/Header.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/Header/HeaderBackButton.d.ts +3 -0
- package/lib/typescript/commonjs/src/Header/HeaderBackButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/Header/HeaderBackContext.d.ts.map +1 -0
- package/lib/typescript/{src → commonjs/src}/Header/HeaderBackground.d.ts +1 -1
- package/lib/typescript/commonjs/src/Header/HeaderBackground.d.ts.map +1 -0
- package/lib/typescript/{src → commonjs/src}/Header/HeaderButton.d.ts +1 -2
- package/lib/typescript/commonjs/src/Header/HeaderButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/Header/HeaderHeightContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/Header/HeaderIcon.d.ts +5 -0
- package/lib/typescript/commonjs/src/Header/HeaderIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/Header/HeaderSearchBar.d.ts +10 -0
- package/lib/typescript/commonjs/src/Header/HeaderSearchBar.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/Header/HeaderShownContext.d.ts.map +1 -0
- package/lib/typescript/{src → commonjs/src}/Header/HeaderTitle.d.ts +1 -2
- package/lib/typescript/commonjs/src/Header/HeaderTitle.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/Header/getDefaultHeaderHeight.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/Header/getHeaderTitle.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/Header/useHeaderHeight.d.ts.map +1 -0
- package/lib/typescript/{src → commonjs/src}/Label/Label.d.ts +1 -2
- package/lib/typescript/commonjs/src/Label/Label.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/Label/getLabel.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/MaskedView.android.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/MaskedView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/MaskedView.ios.d.ts.map +1 -0
- package/lib/typescript/{src → commonjs/src}/MaskedViewNative.d.ts +1 -1
- package/lib/typescript/commonjs/src/MaskedViewNative.d.ts.map +1 -0
- package/lib/typescript/{src → commonjs/src}/MissingIcon.d.ts +1 -2
- package/lib/typescript/commonjs/src/MissingIcon.d.ts.map +1 -0
- package/lib/typescript/{src → commonjs/src}/PlatformPressable.d.ts +8 -1
- package/lib/typescript/commonjs/src/PlatformPressable.d.ts.map +1 -0
- package/lib/typescript/{src → commonjs/src}/ResourceSavingView.d.ts +1 -1
- package/lib/typescript/commonjs/src/ResourceSavingView.d.ts.map +1 -0
- package/lib/typescript/{src → commonjs/src}/SafeAreaProviderCompat.d.ts +1 -1
- package/lib/typescript/commonjs/src/SafeAreaProviderCompat.d.ts.map +1 -0
- package/lib/typescript/{src → commonjs/src}/Screen.d.ts +1 -1
- package/lib/typescript/commonjs/src/Screen.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/Text.d.ts +3 -0
- package/lib/typescript/commonjs/src/Text.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/getDefaultSidebarWidth.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/getNamedContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/lib/typescript/{src → commonjs/src}/types.d.ts +73 -10
- package/lib/typescript/commonjs/src/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/tsconfig.build.tsbuildinfo +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/src/Background.d.ts +9 -0
- package/lib/typescript/module/src/Background.d.ts.map +1 -0
- package/lib/typescript/module/src/Button.d.ts +13 -0
- package/lib/typescript/module/src/Button.d.ts.map +1 -0
- package/lib/typescript/module/src/Header/Header.d.ts +31 -0
- package/lib/typescript/module/src/Header/Header.d.ts.map +1 -0
- package/lib/typescript/module/src/Header/HeaderBackButton.d.ts +3 -0
- package/lib/typescript/module/src/Header/HeaderBackButton.d.ts.map +1 -0
- package/lib/typescript/module/src/Header/HeaderBackContext.d.ts +5 -0
- package/lib/typescript/module/src/Header/HeaderBackContext.d.ts.map +1 -0
- package/lib/typescript/module/src/Header/HeaderBackground.d.ts +9 -0
- package/lib/typescript/module/src/Header/HeaderBackground.d.ts.map +1 -0
- package/lib/typescript/module/src/Header/HeaderButton.d.ts +3 -0
- package/lib/typescript/module/src/Header/HeaderButton.d.ts.map +1 -0
- package/lib/typescript/module/src/Header/HeaderHeightContext.d.ts +2 -0
- package/lib/typescript/module/src/Header/HeaderHeightContext.d.ts.map +1 -0
- package/lib/typescript/module/src/Header/HeaderIcon.d.ts +5 -0
- package/lib/typescript/module/src/Header/HeaderIcon.d.ts.map +1 -0
- package/lib/typescript/module/src/Header/HeaderSearchBar.d.ts +10 -0
- package/lib/typescript/module/src/Header/HeaderSearchBar.d.ts.map +1 -0
- package/lib/typescript/module/src/Header/HeaderShownContext.d.ts +2 -0
- package/lib/typescript/module/src/Header/HeaderShownContext.d.ts.map +1 -0
- package/lib/typescript/module/src/Header/HeaderTitle.d.ts +9 -0
- package/lib/typescript/module/src/Header/HeaderTitle.d.ts.map +1 -0
- package/lib/typescript/module/src/Header/getDefaultHeaderHeight.d.ts +3 -0
- package/lib/typescript/module/src/Header/getDefaultHeaderHeight.d.ts.map +1 -0
- package/lib/typescript/module/src/Header/getHeaderTitle.d.ts +6 -0
- package/lib/typescript/module/src/Header/getHeaderTitle.d.ts.map +1 -0
- package/lib/typescript/module/src/Header/useHeaderHeight.d.ts +2 -0
- package/lib/typescript/module/src/Header/useHeaderHeight.d.ts.map +1 -0
- package/lib/typescript/module/src/Label/Label.d.ts +9 -0
- package/lib/typescript/module/src/Label/Label.d.ts.map +1 -0
- package/lib/typescript/module/src/Label/getLabel.d.ts +5 -0
- package/lib/typescript/module/src/Label/getLabel.d.ts.map +1 -0
- package/lib/typescript/module/src/MaskedView.android.d.ts +2 -0
- package/lib/typescript/module/src/MaskedView.android.d.ts.map +1 -0
- package/lib/typescript/module/src/MaskedView.d.ts +11 -0
- package/lib/typescript/module/src/MaskedView.d.ts.map +1 -0
- package/lib/typescript/module/src/MaskedView.ios.d.ts +2 -0
- package/lib/typescript/module/src/MaskedView.ios.d.ts.map +1 -0
- package/lib/typescript/module/src/MaskedViewNative.d.ts +11 -0
- package/lib/typescript/module/src/MaskedViewNative.d.ts.map +1 -0
- package/lib/typescript/module/src/MissingIcon.d.ts +9 -0
- package/lib/typescript/module/src/MissingIcon.d.ts.map +1 -0
- package/lib/typescript/module/src/PlatformPressable.d.ts +21 -0
- package/lib/typescript/module/src/PlatformPressable.d.ts.map +1 -0
- package/lib/typescript/module/src/ResourceSavingView.d.ts +10 -0
- package/lib/typescript/module/src/ResourceSavingView.d.ts.map +1 -0
- package/lib/typescript/module/src/SafeAreaProviderCompat.d.ts +13 -0
- package/lib/typescript/module/src/SafeAreaProviderCompat.d.ts.map +1 -0
- package/lib/typescript/module/src/Screen.d.ts +18 -0
- package/lib/typescript/module/src/Screen.d.ts.map +1 -0
- package/lib/typescript/module/src/Text.d.ts +3 -0
- package/lib/typescript/module/src/Text.d.ts.map +1 -0
- package/lib/typescript/module/src/getDefaultSidebarWidth.d.ts +4 -0
- package/lib/typescript/module/src/getDefaultSidebarWidth.d.ts.map +1 -0
- package/lib/typescript/module/src/getNamedContext.d.ts +6 -0
- package/lib/typescript/module/src/getNamedContext.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +25 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/lib/typescript/module/src/types.d.ts +289 -0
- package/lib/typescript/module/src/types.d.ts.map +1 -0
- package/lib/typescript/module/tsconfig.build.tsbuildinfo +1 -0
- package/package.json +42 -13
- package/src/Button.tsx +3 -40
- package/src/Header/Header.tsx +157 -60
- package/src/Header/HeaderBackButton.tsx +87 -81
- package/src/Header/HeaderBackground.tsx +3 -3
- package/src/Header/HeaderButton.tsx +0 -1
- package/src/Header/HeaderIcon.tsx +36 -0
- package/src/Header/HeaderSearchBar.tsx +283 -0
- package/src/Header/HeaderTitle.tsx +0 -1
- package/src/Label/Label.tsx +0 -1
- package/src/MissingIcon.tsx +3 -4
- package/src/PlatformPressable.tsx +71 -2
- package/src/SafeAreaProviderCompat.tsx +1 -0
- package/src/Screen.tsx +19 -14
- package/src/Text.tsx +1 -3
- package/src/assets/back-icon-mask.png +0 -0
- package/src/assets/back-icon@4x.ios.png +0 -0
- package/src/assets/clear-icon.png +0 -0
- package/src/assets/clear-icon@1x.png +0 -0
- package/src/assets/clear-icon@2x.png +0 -0
- package/src/assets/clear-icon@3x.png +0 -0
- package/src/assets/clear-icon@4x.png +0 -0
- package/src/assets/close-icon.png +0 -0
- package/src/assets/close-icon@1x.png +0 -0
- package/src/assets/close-icon@2x.png +0 -0
- package/src/assets/close-icon@3x.png +0 -0
- package/src/assets/close-icon@4x.png +0 -0
- package/src/assets/search-icon.png +0 -0
- package/src/assets/search-icon@1x.android.png +0 -0
- package/src/assets/search-icon@1x.ios.png +0 -0
- package/src/assets/search-icon@2x.android.png +0 -0
- package/src/assets/search-icon@2x.ios.png +0 -0
- package/src/assets/search-icon@3x.android.png +0 -0
- package/src/assets/search-icon@3x.ios.png +0 -0
- package/src/assets/search-icon@4x.android.png +0 -0
- package/src/assets/search-icon@4x.ios.png +0 -0
- package/src/index.tsx +11 -4
- package/src/types.tsx +77 -10
- package/lib/typescript/src/Background.d.ts.map +0 -1
- package/lib/typescript/src/Button.d.ts.map +0 -1
- package/lib/typescript/src/Header/Header.d.ts +0 -19
- package/lib/typescript/src/Header/Header.d.ts.map +0 -1
- package/lib/typescript/src/Header/HeaderBackButton.d.ts +0 -4
- package/lib/typescript/src/Header/HeaderBackButton.d.ts.map +0 -1
- package/lib/typescript/src/Header/HeaderBackContext.d.ts.map +0 -1
- package/lib/typescript/src/Header/HeaderBackground.d.ts.map +0 -1
- package/lib/typescript/src/Header/HeaderButton.d.ts.map +0 -1
- package/lib/typescript/src/Header/HeaderHeightContext.d.ts.map +0 -1
- package/lib/typescript/src/Header/HeaderShownContext.d.ts.map +0 -1
- package/lib/typescript/src/Header/HeaderTitle.d.ts.map +0 -1
- package/lib/typescript/src/Header/getDefaultHeaderHeight.d.ts.map +0 -1
- package/lib/typescript/src/Header/getHeaderTitle.d.ts.map +0 -1
- package/lib/typescript/src/Header/useHeaderHeight.d.ts.map +0 -1
- package/lib/typescript/src/Label/Label.d.ts.map +0 -1
- package/lib/typescript/src/Label/getLabel.d.ts.map +0 -1
- package/lib/typescript/src/MaskedView.android.d.ts.map +0 -1
- package/lib/typescript/src/MaskedView.d.ts.map +0 -1
- package/lib/typescript/src/MaskedView.ios.d.ts.map +0 -1
- package/lib/typescript/src/MaskedViewNative.d.ts.map +0 -1
- package/lib/typescript/src/MissingIcon.d.ts.map +0 -1
- package/lib/typescript/src/PlatformPressable.d.ts.map +0 -1
- package/lib/typescript/src/ResourceSavingView.d.ts.map +0 -1
- package/lib/typescript/src/SafeAreaProviderCompat.d.ts.map +0 -1
- package/lib/typescript/src/Screen.d.ts.map +0 -1
- package/lib/typescript/src/Text.d.ts +0 -4
- package/lib/typescript/src/Text.d.ts.map +0 -1
- package/lib/typescript/src/getDefaultSidebarWidth.d.ts.map +0 -1
- package/lib/typescript/src/getNamedContext.d.ts.map +0 -1
- package/lib/typescript/src/index.d.ts.map +0 -1
- package/lib/typescript/src/types.d.ts.map +0 -1
- /package/lib/typescript/{src → commonjs/src}/Button.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/Header/HeaderBackContext.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/Header/HeaderHeightContext.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/Header/HeaderShownContext.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/Header/getDefaultHeaderHeight.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/Header/getHeaderTitle.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/Header/useHeaderHeight.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/Label/getLabel.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/MaskedView.android.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/MaskedView.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/MaskedView.ios.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/getDefaultSidebarWidth.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/getNamedContext.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/index.d.ts +0 -0
|
@@ -3,15 +3,19 @@ import * as React from 'react';
|
|
|
3
3
|
import {
|
|
4
4
|
Animated,
|
|
5
5
|
Image,
|
|
6
|
-
type LayoutChangeEvent,
|
|
7
6
|
Platform,
|
|
7
|
+
type StyleProp,
|
|
8
8
|
StyleSheet,
|
|
9
|
+
type TextStyle,
|
|
9
10
|
View,
|
|
10
11
|
} from 'react-native';
|
|
11
12
|
|
|
13
|
+
import backIcon from '../assets/back-icon.png';
|
|
14
|
+
import backIconMask from '../assets/back-icon-mask.png';
|
|
12
15
|
import { MaskedView } from '../MaskedView';
|
|
13
16
|
import type { HeaderBackButtonProps } from '../types';
|
|
14
17
|
import { HeaderButton } from './HeaderButton';
|
|
18
|
+
import { HeaderIcon, ICON_MARGIN } from './HeaderIcon';
|
|
15
19
|
|
|
16
20
|
export function HeaderBackButton({
|
|
17
21
|
disabled,
|
|
@@ -19,13 +23,13 @@ export function HeaderBackButton({
|
|
|
19
23
|
backImage,
|
|
20
24
|
label,
|
|
21
25
|
labelStyle,
|
|
22
|
-
|
|
26
|
+
displayMode = Platform.OS === 'ios' ? 'default' : 'minimal',
|
|
23
27
|
onLabelLayout,
|
|
24
28
|
onPress,
|
|
25
29
|
pressColor,
|
|
26
30
|
pressOpacity,
|
|
27
31
|
screenLayout,
|
|
28
|
-
tintColor
|
|
32
|
+
tintColor,
|
|
29
33
|
titleLayout,
|
|
30
34
|
truncatedLabel = 'Back',
|
|
31
35
|
accessibilityLabel = label && label !== 'Back' ? `${label}, back` : 'Go back',
|
|
@@ -36,85 +40,97 @@ export function HeaderBackButton({
|
|
|
36
40
|
const { colors, fonts } = useTheme();
|
|
37
41
|
const { direction } = useLocale();
|
|
38
42
|
|
|
39
|
-
const [
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
const tintColor =
|
|
44
|
-
customTintColor !== undefined
|
|
45
|
-
? customTintColor
|
|
46
|
-
: Platform.select({
|
|
47
|
-
ios: colors.primary,
|
|
48
|
-
default: colors.text,
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
const handleLabelLayout = (e: LayoutChangeEvent) => {
|
|
52
|
-
onLabelLayout?.(e);
|
|
53
|
-
|
|
54
|
-
const { layout } = e.nativeEvent;
|
|
55
|
-
|
|
56
|
-
setInitialLabelWidth(
|
|
57
|
-
(direction === 'rtl' ? layout.y : layout.x) + layout.width
|
|
58
|
-
);
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
const shouldTruncateLabel = () => {
|
|
62
|
-
return (
|
|
63
|
-
!label ||
|
|
64
|
-
(initialLabelWidth &&
|
|
65
|
-
titleLayout &&
|
|
66
|
-
screenLayout &&
|
|
67
|
-
(screenLayout.width - titleLayout.width) / 2 < initialLabelWidth + 26)
|
|
68
|
-
);
|
|
69
|
-
};
|
|
43
|
+
const [labelWidth, setLabelWidth] = React.useState<number | null>(null);
|
|
44
|
+
const [truncatedLabelWidth, setTruncatedLabelWidth] = React.useState<
|
|
45
|
+
number | null
|
|
46
|
+
>(null);
|
|
70
47
|
|
|
71
48
|
const renderBackImage = () => {
|
|
72
49
|
if (backImage) {
|
|
73
|
-
return backImage({ tintColor });
|
|
50
|
+
return backImage({ tintColor: tintColor ?? colors.text });
|
|
74
51
|
} else {
|
|
75
52
|
return (
|
|
76
|
-
<
|
|
53
|
+
<HeaderIcon
|
|
77
54
|
style={[
|
|
78
55
|
styles.icon,
|
|
79
|
-
|
|
80
|
-
Boolean(labelVisible) && styles.iconWithLabel,
|
|
56
|
+
displayMode !== 'minimal' && styles.iconWithLabel,
|
|
81
57
|
Boolean(tintColor) && { tintColor },
|
|
82
58
|
]}
|
|
83
|
-
|
|
84
|
-
source={require('../assets/back-icon.png')}
|
|
85
|
-
fadeDuration={0}
|
|
59
|
+
source={backIcon}
|
|
86
60
|
/>
|
|
87
61
|
);
|
|
88
62
|
}
|
|
89
63
|
};
|
|
90
64
|
|
|
91
65
|
const renderLabel = () => {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
if (!labelVisible || leftLabelText === undefined) {
|
|
66
|
+
if (displayMode === 'minimal') {
|
|
95
67
|
return null;
|
|
96
68
|
}
|
|
97
69
|
|
|
70
|
+
const availableSpace =
|
|
71
|
+
titleLayout && screenLayout
|
|
72
|
+
? (screenLayout.width - titleLayout.width) / 2 -
|
|
73
|
+
(ICON_WIDTH + ICON_MARGIN)
|
|
74
|
+
: null;
|
|
75
|
+
|
|
76
|
+
const potentialLabelText =
|
|
77
|
+
displayMode === 'default' ? label : truncatedLabel;
|
|
78
|
+
const finalLabelText =
|
|
79
|
+
availableSpace && labelWidth && truncatedLabelWidth
|
|
80
|
+
? availableSpace > labelWidth
|
|
81
|
+
? potentialLabelText
|
|
82
|
+
: availableSpace > truncatedLabelWidth
|
|
83
|
+
? truncatedLabel
|
|
84
|
+
: null
|
|
85
|
+
: potentialLabelText;
|
|
86
|
+
|
|
87
|
+
const commonStyle: Animated.WithAnimatedValue<StyleProp<TextStyle>> = [
|
|
88
|
+
fonts.regular,
|
|
89
|
+
styles.label,
|
|
90
|
+
labelStyle,
|
|
91
|
+
];
|
|
92
|
+
|
|
93
|
+
const hiddenStyle: Animated.WithAnimatedValue<StyleProp<TextStyle>> = [
|
|
94
|
+
commonStyle,
|
|
95
|
+
{
|
|
96
|
+
position: 'absolute',
|
|
97
|
+
top: 0,
|
|
98
|
+
left: 0,
|
|
99
|
+
opacity: 0,
|
|
100
|
+
},
|
|
101
|
+
];
|
|
102
|
+
|
|
98
103
|
const labelElement = (
|
|
99
104
|
<View style={styles.labelWrapper}>
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
105
|
+
{label && displayMode === 'default' ? (
|
|
106
|
+
<Animated.Text
|
|
107
|
+
style={hiddenStyle}
|
|
108
|
+
numberOfLines={1}
|
|
109
|
+
onLayout={(e) => setLabelWidth(e.nativeEvent.layout.width)}
|
|
110
|
+
>
|
|
111
|
+
{label}
|
|
112
|
+
</Animated.Text>
|
|
113
|
+
) : null}
|
|
114
|
+
{truncatedLabel ? (
|
|
115
|
+
<Animated.Text
|
|
116
|
+
style={hiddenStyle}
|
|
117
|
+
numberOfLines={1}
|
|
118
|
+
onLayout={(e) => setTruncatedLabelWidth(e.nativeEvent.layout.width)}
|
|
119
|
+
>
|
|
120
|
+
{truncatedLabel}
|
|
121
|
+
</Animated.Text>
|
|
122
|
+
) : null}
|
|
123
|
+
{finalLabelText ? (
|
|
124
|
+
<Animated.Text
|
|
125
|
+
accessible={false}
|
|
126
|
+
onLayout={onLabelLayout}
|
|
127
|
+
style={[tintColor ? { color: tintColor } : null, commonStyle]}
|
|
128
|
+
numberOfLines={1}
|
|
129
|
+
allowFontScaling={!!allowFontScaling}
|
|
130
|
+
>
|
|
131
|
+
{finalLabelText}
|
|
132
|
+
</Animated.Text>
|
|
133
|
+
) : null}
|
|
118
134
|
</View>
|
|
119
135
|
);
|
|
120
136
|
|
|
@@ -135,7 +151,7 @@ export function HeaderBackButton({
|
|
|
135
151
|
]}
|
|
136
152
|
>
|
|
137
153
|
<Image
|
|
138
|
-
source={
|
|
154
|
+
source={backIconMask}
|
|
139
155
|
resizeMode="contain"
|
|
140
156
|
style={[styles.iconMask, direction === 'rtl' && styles.flip]}
|
|
141
157
|
/>
|
|
@@ -173,6 +189,9 @@ export function HeaderBackButton({
|
|
|
173
189
|
);
|
|
174
190
|
}
|
|
175
191
|
|
|
192
|
+
const ICON_WIDTH = Platform.OS === 'ios' ? 13 : 24;
|
|
193
|
+
const ICON_MARGIN_END = Platform.OS === 'ios' ? 22 : 3;
|
|
194
|
+
|
|
176
195
|
const styles = StyleSheet.create({
|
|
177
196
|
container: {
|
|
178
197
|
paddingHorizontal: 0,
|
|
@@ -196,25 +215,12 @@ const styles = StyleSheet.create({
|
|
|
196
215
|
// Otherwise it messes with the measurement of the label
|
|
197
216
|
flexDirection: 'row',
|
|
198
217
|
alignItems: 'flex-start',
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
218
|
+
marginEnd: ICON_MARGIN,
|
|
219
|
+
},
|
|
220
|
+
icon: {
|
|
221
|
+
width: ICON_WIDTH,
|
|
222
|
+
marginEnd: ICON_MARGIN_END,
|
|
203
223
|
},
|
|
204
|
-
icon: Platform.select({
|
|
205
|
-
ios: {
|
|
206
|
-
height: 21,
|
|
207
|
-
width: 13,
|
|
208
|
-
marginStart: 8,
|
|
209
|
-
marginEnd: 22,
|
|
210
|
-
marginVertical: 8,
|
|
211
|
-
},
|
|
212
|
-
default: {
|
|
213
|
-
height: 24,
|
|
214
|
-
width: 24,
|
|
215
|
-
margin: 3,
|
|
216
|
-
},
|
|
217
|
-
}),
|
|
218
224
|
iconWithLabel:
|
|
219
225
|
Platform.OS === 'ios'
|
|
220
226
|
? {
|
|
@@ -15,7 +15,7 @@ type Props = Omit<ViewProps, 'style'> & {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
export function HeaderBackground({ style, ...rest }: Props) {
|
|
18
|
-
const { colors } = useTheme();
|
|
18
|
+
const { colors, dark } = useTheme();
|
|
19
19
|
|
|
20
20
|
return (
|
|
21
21
|
<Animated.View
|
|
@@ -24,7 +24,7 @@ export function HeaderBackground({ style, ...rest }: Props) {
|
|
|
24
24
|
{
|
|
25
25
|
backgroundColor: colors.card,
|
|
26
26
|
borderBottomColor: colors.border,
|
|
27
|
-
shadowColor:
|
|
27
|
+
shadowColor: dark ? 'rgba(255, 255, 255, 0.45)' : 'rgba(0, 0, 0, 1)',
|
|
28
28
|
},
|
|
29
29
|
style,
|
|
30
30
|
]}
|
|
@@ -41,7 +41,7 @@ const styles = StyleSheet.create({
|
|
|
41
41
|
elevation: 4,
|
|
42
42
|
},
|
|
43
43
|
ios: {
|
|
44
|
-
shadowOpacity: 0.
|
|
44
|
+
shadowOpacity: 0.3,
|
|
45
45
|
shadowRadius: 0,
|
|
46
46
|
shadowOffset: {
|
|
47
47
|
width: 0,
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { useLocale, useTheme } from '@react-navigation/native';
|
|
2
|
+
import { Image, type ImageProps, Platform, StyleSheet } from 'react-native';
|
|
3
|
+
|
|
4
|
+
export function HeaderIcon({ source, style, ...rest }: ImageProps) {
|
|
5
|
+
const { colors } = useTheme();
|
|
6
|
+
const { direction } = useLocale();
|
|
7
|
+
|
|
8
|
+
return (
|
|
9
|
+
<Image
|
|
10
|
+
source={source}
|
|
11
|
+
resizeMode="contain"
|
|
12
|
+
fadeDuration={0}
|
|
13
|
+
style={[
|
|
14
|
+
styles.icon,
|
|
15
|
+
direction === 'rtl' && styles.flip,
|
|
16
|
+
{ tintColor: colors.text },
|
|
17
|
+
style,
|
|
18
|
+
]}
|
|
19
|
+
{...rest}
|
|
20
|
+
/>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const ICON_SIZE = Platform.OS === 'ios' ? 21 : 24;
|
|
25
|
+
export const ICON_MARGIN = Platform.OS === 'ios' ? 8 : 3;
|
|
26
|
+
|
|
27
|
+
const styles = StyleSheet.create({
|
|
28
|
+
icon: {
|
|
29
|
+
width: ICON_SIZE,
|
|
30
|
+
height: ICON_SIZE,
|
|
31
|
+
margin: ICON_MARGIN,
|
|
32
|
+
},
|
|
33
|
+
flip: {
|
|
34
|
+
transform: 'scaleX(-1)',
|
|
35
|
+
},
|
|
36
|
+
});
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
import { useNavigation, useTheme } from '@react-navigation/native';
|
|
2
|
+
import Color from 'color';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import {
|
|
5
|
+
Animated,
|
|
6
|
+
Image,
|
|
7
|
+
Platform,
|
|
8
|
+
type StyleProp,
|
|
9
|
+
StyleSheet,
|
|
10
|
+
TextInput,
|
|
11
|
+
View,
|
|
12
|
+
type ViewStyle,
|
|
13
|
+
} from 'react-native';
|
|
14
|
+
|
|
15
|
+
import clearIcon from '../assets/clear-icon.png';
|
|
16
|
+
import closeIcon from '../assets/close-icon.png';
|
|
17
|
+
import searchIcon from '../assets/search-icon.png';
|
|
18
|
+
import { PlatformPressable } from '../PlatformPressable';
|
|
19
|
+
import { Text } from '../Text';
|
|
20
|
+
import type { HeaderOptions } from '../types';
|
|
21
|
+
import { HeaderButton } from './HeaderButton';
|
|
22
|
+
import { HeaderIcon } from './HeaderIcon';
|
|
23
|
+
|
|
24
|
+
type Props = HeaderOptions['headerSearchBarOptions'] & {
|
|
25
|
+
visible: boolean;
|
|
26
|
+
onClose: () => void;
|
|
27
|
+
style?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const INPUT_TYPE_TO_MODE = {
|
|
31
|
+
text: 'text',
|
|
32
|
+
number: 'numeric',
|
|
33
|
+
phone: 'tel',
|
|
34
|
+
email: 'email',
|
|
35
|
+
} as const;
|
|
36
|
+
|
|
37
|
+
export function HeaderSearchBar({
|
|
38
|
+
visible,
|
|
39
|
+
inputType,
|
|
40
|
+
autoFocus = true,
|
|
41
|
+
placeholder = 'Search',
|
|
42
|
+
cancelButtonText = 'Cancel',
|
|
43
|
+
onChangeText,
|
|
44
|
+
onClose,
|
|
45
|
+
style,
|
|
46
|
+
...rest
|
|
47
|
+
}: Props) {
|
|
48
|
+
const navigation = useNavigation();
|
|
49
|
+
const { dark, colors, fonts } = useTheme();
|
|
50
|
+
const [value, setValue] = React.useState('');
|
|
51
|
+
const [rendered, setRendered] = React.useState(visible);
|
|
52
|
+
const [visibleAnim] = React.useState(
|
|
53
|
+
() => new Animated.Value(visible ? 1 : 0)
|
|
54
|
+
);
|
|
55
|
+
const [clearVisibleAnim] = React.useState(() => new Animated.Value(0));
|
|
56
|
+
|
|
57
|
+
const visibleValueRef = React.useRef(visible);
|
|
58
|
+
const clearVisibleValueRef = React.useRef(false);
|
|
59
|
+
const inputRef = React.useRef<TextInput>(null);
|
|
60
|
+
|
|
61
|
+
React.useEffect(() => {
|
|
62
|
+
// Avoid act warning in tests just by rendering header
|
|
63
|
+
if (visible === visibleValueRef.current) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
Animated.timing(visibleAnim, {
|
|
68
|
+
toValue: visible ? 1 : 0,
|
|
69
|
+
duration: 100,
|
|
70
|
+
useNativeDriver: true,
|
|
71
|
+
}).start(({ finished }) => {
|
|
72
|
+
if (finished) {
|
|
73
|
+
setRendered(visible);
|
|
74
|
+
visibleValueRef.current = visible;
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
return () => {
|
|
79
|
+
visibleAnim.stopAnimation();
|
|
80
|
+
};
|
|
81
|
+
}, [visible, visibleAnim]);
|
|
82
|
+
|
|
83
|
+
const hasText = value !== '';
|
|
84
|
+
|
|
85
|
+
React.useEffect(() => {
|
|
86
|
+
if (clearVisibleValueRef.current === hasText) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
Animated.timing(clearVisibleAnim, {
|
|
91
|
+
toValue: hasText ? 1 : 0,
|
|
92
|
+
duration: 100,
|
|
93
|
+
useNativeDriver: true,
|
|
94
|
+
}).start(({ finished }) => {
|
|
95
|
+
if (finished) {
|
|
96
|
+
clearVisibleValueRef.current = hasText;
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
}, [clearVisibleAnim, hasText]);
|
|
100
|
+
|
|
101
|
+
const onClear = React.useCallback(() => {
|
|
102
|
+
inputRef.current?.clear();
|
|
103
|
+
inputRef.current?.focus();
|
|
104
|
+
setValue('');
|
|
105
|
+
// FIXME: figure out how to create a SyntheticEvent
|
|
106
|
+
// @ts-expect-error: we don't have the native event here
|
|
107
|
+
onChangeText?.({ nativeEvent: { text: '' } });
|
|
108
|
+
}, [onChangeText]);
|
|
109
|
+
|
|
110
|
+
React.useEffect(
|
|
111
|
+
() =>
|
|
112
|
+
navigation?.addListener('blur', () => {
|
|
113
|
+
onClear();
|
|
114
|
+
onClose();
|
|
115
|
+
}),
|
|
116
|
+
[navigation, onClear, onClose]
|
|
117
|
+
);
|
|
118
|
+
|
|
119
|
+
if (!visible && !rendered) {
|
|
120
|
+
return null;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
return (
|
|
124
|
+
<Animated.View
|
|
125
|
+
pointerEvents={visible ? 'auto' : 'none'}
|
|
126
|
+
accessibilityLiveRegion="polite"
|
|
127
|
+
accessibilityElementsHidden={!visible}
|
|
128
|
+
importantForAccessibility={visible ? 'auto' : 'no-hide-descendants'}
|
|
129
|
+
style={[styles.container, { opacity: visibleAnim }, style]}
|
|
130
|
+
>
|
|
131
|
+
<View style={styles.searchbarContainer}>
|
|
132
|
+
<HeaderIcon source={searchIcon} style={styles.inputSearchIcon} />
|
|
133
|
+
<TextInput
|
|
134
|
+
{...rest}
|
|
135
|
+
ref={inputRef}
|
|
136
|
+
onChange={onChangeText}
|
|
137
|
+
onChangeText={setValue}
|
|
138
|
+
autoFocus={autoFocus}
|
|
139
|
+
inputMode={INPUT_TYPE_TO_MODE[inputType ?? 'text']}
|
|
140
|
+
placeholder={placeholder}
|
|
141
|
+
placeholderTextColor={Color(colors.text).alpha(0.5).string()}
|
|
142
|
+
cursorColor={colors.primary}
|
|
143
|
+
selectionHandleColor={colors.primary}
|
|
144
|
+
selectionColor={Color(colors.primary).alpha(0.3).string()}
|
|
145
|
+
style={[
|
|
146
|
+
fonts.regular,
|
|
147
|
+
styles.searchbar,
|
|
148
|
+
{
|
|
149
|
+
backgroundColor: Platform.select({
|
|
150
|
+
ios: dark ? 'rgba(255, 255, 255, 0.1)' : 'rgba(0, 0, 0, 0.1)',
|
|
151
|
+
default: 'transparent',
|
|
152
|
+
}),
|
|
153
|
+
color: colors.text,
|
|
154
|
+
borderBottomColor: colors.border,
|
|
155
|
+
},
|
|
156
|
+
]}
|
|
157
|
+
/>
|
|
158
|
+
{Platform.OS === 'ios' ? (
|
|
159
|
+
<PlatformPressable
|
|
160
|
+
onPress={onClear}
|
|
161
|
+
style={[
|
|
162
|
+
{
|
|
163
|
+
opacity: clearVisibleAnim,
|
|
164
|
+
transform: [{ scale: clearVisibleAnim }],
|
|
165
|
+
},
|
|
166
|
+
styles.clearButton,
|
|
167
|
+
]}
|
|
168
|
+
>
|
|
169
|
+
<Image
|
|
170
|
+
source={clearIcon}
|
|
171
|
+
resizeMode="contain"
|
|
172
|
+
style={[styles.clearIcon, { tintColor: colors.text }]}
|
|
173
|
+
/>
|
|
174
|
+
</PlatformPressable>
|
|
175
|
+
) : null}
|
|
176
|
+
</View>
|
|
177
|
+
{Platform.OS !== 'ios' ? (
|
|
178
|
+
<HeaderButton
|
|
179
|
+
onPress={() => {
|
|
180
|
+
if (value) {
|
|
181
|
+
onClear();
|
|
182
|
+
} else {
|
|
183
|
+
onClose();
|
|
184
|
+
}
|
|
185
|
+
}}
|
|
186
|
+
style={styles.closeButton}
|
|
187
|
+
>
|
|
188
|
+
<HeaderIcon source={closeIcon} />
|
|
189
|
+
</HeaderButton>
|
|
190
|
+
) : null}
|
|
191
|
+
{Platform.OS === 'ios' ? (
|
|
192
|
+
<PlatformPressable
|
|
193
|
+
onPress={() => {
|
|
194
|
+
onClear();
|
|
195
|
+
onClose();
|
|
196
|
+
}}
|
|
197
|
+
style={styles.cancelButton}
|
|
198
|
+
>
|
|
199
|
+
<Text
|
|
200
|
+
style={[
|
|
201
|
+
fonts.regular,
|
|
202
|
+
{ color: colors.primary },
|
|
203
|
+
styles.cancelText,
|
|
204
|
+
]}
|
|
205
|
+
>
|
|
206
|
+
{cancelButtonText}
|
|
207
|
+
</Text>
|
|
208
|
+
</PlatformPressable>
|
|
209
|
+
) : null}
|
|
210
|
+
</Animated.View>
|
|
211
|
+
);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
const styles = StyleSheet.create({
|
|
215
|
+
container: {
|
|
216
|
+
flex: 1,
|
|
217
|
+
flexDirection: 'row',
|
|
218
|
+
alignItems: 'stretch',
|
|
219
|
+
},
|
|
220
|
+
inputSearchIcon: {
|
|
221
|
+
position: 'absolute',
|
|
222
|
+
opacity: 0.5,
|
|
223
|
+
left: Platform.select({ ios: 16, default: 4 }),
|
|
224
|
+
top: Platform.select({ ios: -1, default: 17 }),
|
|
225
|
+
...Platform.select({
|
|
226
|
+
ios: {
|
|
227
|
+
height: 18,
|
|
228
|
+
width: 18,
|
|
229
|
+
},
|
|
230
|
+
default: {},
|
|
231
|
+
}),
|
|
232
|
+
},
|
|
233
|
+
closeButton: {
|
|
234
|
+
position: 'absolute',
|
|
235
|
+
opacity: 0.5,
|
|
236
|
+
right: Platform.select({ ios: 0, default: 8 }),
|
|
237
|
+
top: Platform.select({ ios: -2, default: 17 }),
|
|
238
|
+
},
|
|
239
|
+
clearButton: {
|
|
240
|
+
position: 'absolute',
|
|
241
|
+
right: 0,
|
|
242
|
+
top: -7,
|
|
243
|
+
bottom: 0,
|
|
244
|
+
justifyContent: 'center',
|
|
245
|
+
padding: 8,
|
|
246
|
+
},
|
|
247
|
+
clearIcon: {
|
|
248
|
+
height: 16,
|
|
249
|
+
width: 16,
|
|
250
|
+
opacity: 0.5,
|
|
251
|
+
},
|
|
252
|
+
cancelButton: {
|
|
253
|
+
alignSelf: 'center',
|
|
254
|
+
top: -4,
|
|
255
|
+
},
|
|
256
|
+
cancelText: {
|
|
257
|
+
fontSize: 17,
|
|
258
|
+
marginHorizontal: 12,
|
|
259
|
+
},
|
|
260
|
+
searchbarContainer: {
|
|
261
|
+
flex: 1,
|
|
262
|
+
},
|
|
263
|
+
searchbar: Platform.select({
|
|
264
|
+
ios: {
|
|
265
|
+
flex: 1,
|
|
266
|
+
fontSize: 17,
|
|
267
|
+
paddingHorizontal: 32,
|
|
268
|
+
marginLeft: 16,
|
|
269
|
+
marginTop: -2,
|
|
270
|
+
marginBottom: 5,
|
|
271
|
+
borderRadius: 8,
|
|
272
|
+
},
|
|
273
|
+
default: {
|
|
274
|
+
flex: 1,
|
|
275
|
+
fontSize: 18,
|
|
276
|
+
paddingHorizontal: 36,
|
|
277
|
+
marginRight: 8,
|
|
278
|
+
marginTop: 8,
|
|
279
|
+
marginBottom: 8,
|
|
280
|
+
borderBottomWidth: 1,
|
|
281
|
+
},
|
|
282
|
+
}),
|
|
283
|
+
});
|
package/src/Label/Label.tsx
CHANGED
package/src/MissingIcon.tsx
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import { type StyleProp, StyleSheet, Text, type TextStyle } from 'react-native';
|
|
1
|
+
import { type StyleProp, StyleSheet, type TextStyle } from 'react-native';
|
|
2
|
+
|
|
3
|
+
import { Text } from './Text';
|
|
5
4
|
|
|
6
5
|
type Props = {
|
|
7
6
|
color?: string;
|