react-native-boxes 1.4.26 → 1.4.27

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-boxes",
3
- "version": "1.4.26",
3
+ "version": "1.4.27",
4
4
  "description": "A react native library for rapid development of UI using boxes",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/Input.tsx CHANGED
@@ -217,6 +217,7 @@ export function CompositeTextInputView(props: CompositeTextInputViewProps) {
217
217
  }
218
218
  }}
219
219
  style={[{
220
+ paddingStart: props.readOnly ? theme.dimens.space.xs : undefined,
220
221
  color: theme.colors.text,
221
222
  fontSize: theme.dimens.font.md,
222
223
  fontFamily: theme.fonts.Regular,
package/src/Modal.tsx CHANGED
@@ -7,7 +7,7 @@ import { ThemeContext } from './ThemeContext';
7
7
  import { Center, HBox, VBox, VPage } from './Box';
8
8
  import { Subtitle, TextView, Title } from './Text';
9
9
  import { ButtonView, ButtonViewProps, LoadingButton, PressableView, TertiaryButtonView } from './Button';
10
- import { CompositeTextInputView } from './Input';
10
+ import { CompositeTextInputView, CompositeTextInputViewProps } from './Input';
11
11
  import * as WebBrowser from 'expo-web-browser';
12
12
  import { TransparentCenterToolbar } from './Bar';
13
13
  import { GestureDetector, Gesture, Directions } from 'react-native-gesture-handler';
@@ -380,7 +380,7 @@ export type DropDownViewProps = {
380
380
  onRenderOption?: (opt: DropDownViewOption) => any,
381
381
  forceDialogSelectOnWeb?: Boolean
382
382
  swipeToCloseDisabled?: boolean
383
- } & ViewProps
383
+ } & CompositeTextInputViewProps
384
384
 
385
385
  /**
386
386
  * set swipeToCloseDisabled = true if you face issues with scrolling
package/src/utils.ts CHANGED
@@ -3,10 +3,21 @@ import { Dimensions } from 'react-native';
3
3
  import AsyncStorage from '@react-native-async-storage/async-storage';
4
4
 
5
5
 
6
+ function extractPathFromUrl(url: string): string {
7
+ const pathStartIndex = url.indexOf('/', url.indexOf('//') + 2);
8
+ if (pathStartIndex === -1) {
9
+ return '';
10
+ }
11
+ return url.substring(pathStartIndex + 1); // +1 to remove leading '/'
12
+ }
13
+
6
14
  export function getNavParamsFromDeeplink(url: string) {
7
15
  if (url?.startsWith("/")) {
8
16
  url = url.substring(1)
9
17
  }
18
+ if (url?.startsWith("http")) {
19
+ url = extractPathFromUrl(url)
20
+ }
10
21
  let parts = url.split("/");
11
22
 
12
23
  let root, rootParams: any = {};