@draftbit/core 49.0.1-c3bbf3.2 → 49.0.1

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.
@@ -1 +1 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _BottomSheetComponent=_interopRequireDefault(require("./BottomSheetComponent"));var _theming=require("../../theming");var _jsxRuntime=require("react/jsx-runtime");var _excluded=["theme","snapPoints","topSnapPosition","middleSnapPosition","bottomSnapPosition","initialSnapIndex","initialSnapPosition","showHandle","handleColor","topBorderRadius","borderWidth","borderColor","onSettle","style","children"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/BottomSheet/BottomSheet.tsx";var BottomSheet=_react.default.forwardRef(function(_ref,ref){var theme=_ref.theme,snapPointsProp=_ref.snapPoints,_ref$topSnapPosition=_ref.topSnapPosition,topSnapPosition=_ref$topSnapPosition===void 0?"10%":_ref$topSnapPosition,_ref$middleSnapPositi=_ref.middleSnapPosition,middleSnapPosition=_ref$middleSnapPositi===void 0?"50%":_ref$middleSnapPositi,_ref$bottomSnapPositi=_ref.bottomSnapPosition,bottomSnapPosition=_ref$bottomSnapPositi===void 0?"80%":_ref$bottomSnapPositi,initialSnapIndex=_ref.initialSnapIndex,_ref$initialSnapPosit=_ref.initialSnapPosition,initialSnapPosition=_ref$initialSnapPosit===void 0?"bottom":_ref$initialSnapPosit,_ref$showHandle=_ref.showHandle,showHandle=_ref$showHandle===void 0?true:_ref$showHandle,_ref$handleColor=_ref.handleColor,handleColor=_ref$handleColor===void 0?theme.colors.divider:_ref$handleColor,_ref$topBorderRadius=_ref.topBorderRadius,topBorderRadius=_ref$topBorderRadius===void 0?20:_ref$topBorderRadius,_ref$borderWidth=_ref.borderWidth,borderWidth=_ref$borderWidth===void 0?1:_ref$borderWidth,_ref$borderColor=_ref.borderColor,borderColor=_ref$borderColor===void 0?theme.colors.divider:_ref$borderColor,onSettle=_ref.onSettle,style=_ref.style,children=_ref.children,rest=(0,_objectWithoutProperties2.default)(_ref,_excluded);var backgroundColor=(style==null?void 0:style.backgroundColor)||theme.colors.background;var snapPoints=snapPointsProp||[topSnapPosition,middleSnapPosition,bottomSnapPosition];var getSnapIndexFromPosition=function getSnapIndexFromPosition(position){switch(position){case"top":return 0;case"middle":return 1;case"bottom":return 2;}};return(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.parentContainer,pointerEvents:"box-none",children:(0,_jsxRuntime.jsx)(_BottomSheetComponent.default,Object.assign({ref:ref,componentType:"ScrollView",snapPoints:snapPoints,initialSnapIndex:initialSnapIndex!=null?initialSnapIndex:getSnapIndexFromPosition(initialSnapPosition),renderHandle:function renderHandle(){return(0,_jsxRuntime.jsx)(_jsxRuntime.Fragment,{children:showHandle&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.handleContainer,{backgroundColor:backgroundColor,borderTopLeftRadius:topBorderRadius,borderTopRightRadius:topBorderRadius}],children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.handle,{backgroundColor:handleColor}]})})});},contentContainerStyle:[styles.contentContainerStyle,style],containerStyle:_reactNative.StyleSheet.flatten([styles.containerStyle,{backgroundColor:backgroundColor,borderTopLeftRadius:topBorderRadius,borderTopRightRadius:topBorderRadius,borderWidth:borderWidth,borderColor:borderColor}]),onSettle:onSettle},rest,{children:children}))});});var styles=_reactNative.StyleSheet.create({parentContainer:{position:"absolute",left:0,right:0,top:0,bottom:0,zIndex:10,overflow:"hidden"},contentContainerStyle:{paddingHorizontal:16,paddingVertical:10},containerStyle:{flex:1,overflow:"hidden"},handleContainer:{alignItems:"center",paddingVertical:20},handle:{width:40,height:2,borderRadius:4}});var _default=(0,_theming.withTheme)(BottomSheet);exports.default=_default;
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _toConsumableArray2=_interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _bottomSheet=_interopRequireWildcard(require("@gorhom/bottom-sheet"));var _theming=require("../../theming");var _utilities=require("../../utilities");var _jsxRuntime=require("react/jsx-runtime");var _excluded=["theme","snapPoints","topSnapPosition","middleSnapPosition","bottomSnapPosition","initialSnapIndex","initialSnapPosition","showHandle","handleColor","topBorderRadius","borderWidth","borderColor","onSettle","style","children"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/BottomSheet/BottomSheet.tsx";function _getRequireWildcardCache(nodeInterop){if(typeof WeakMap!=="function")return null;var cacheBabelInterop=new WeakMap();var cacheNodeInterop=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop;})(nodeInterop);}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule){return obj;}if(obj===null||typeof obj!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(key!=="default"&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}var windowHeight=_reactNative.Dimensions.get("window").height;var BottomSheet=_react.default.forwardRef(function(_ref,ref){var theme=_ref.theme,snapPointsProp=_ref.snapPoints,_ref$topSnapPosition=_ref.topSnapPosition,topSnapPosition=_ref$topSnapPosition===void 0?"10%":_ref$topSnapPosition,_ref$middleSnapPositi=_ref.middleSnapPosition,middleSnapPosition=_ref$middleSnapPositi===void 0?"50%":_ref$middleSnapPositi,_ref$bottomSnapPositi=_ref.bottomSnapPosition,bottomSnapPosition=_ref$bottomSnapPositi===void 0?"80%":_ref$bottomSnapPositi,initialSnapIndex=_ref.initialSnapIndex,_ref$initialSnapPosit=_ref.initialSnapPosition,initialSnapPosition=_ref$initialSnapPosit===void 0?"bottom":_ref$initialSnapPosit,_ref$showHandle=_ref.showHandle,showHandle=_ref$showHandle===void 0?true:_ref$showHandle,_ref$handleColor=_ref.handleColor,handleColor=_ref$handleColor===void 0?theme.colors.divider:_ref$handleColor,_ref$topBorderRadius=_ref.topBorderRadius,topBorderRadius=_ref$topBorderRadius===void 0?20:_ref$topBorderRadius,_ref$borderWidth=_ref.borderWidth,borderWidth=_ref$borderWidth===void 0?1:_ref$borderWidth,_ref$borderColor=_ref.borderColor,borderColor=_ref$borderColor===void 0?theme.colors.divider:_ref$borderColor,onSettle=_ref.onSettle,style=_ref.style,children=_ref.children,rest=(0,_objectWithoutProperties2.default)(_ref,_excluded);var backgroundColor=(style==null?void 0:style.backgroundColor)||theme.colors.background;var snapPoints=snapPointsProp!=null?snapPointsProp:[topSnapPosition,middleSnapPosition,bottomSnapPosition];var mappedSnapPoints=(0,_utilities.useDeepCompareMemo)(function(){return convertSnapPointsForNewImplementation(snapPoints);},snapPoints);var getSnapIndexFromPosition=function getSnapIndexFromPosition(position){switch(position){case"bottom":return 0;case"middle":return 1;case"top":return 2;}};return(0,_jsxRuntime.jsx)(_bottomSheet.default,{ref:ref,snapPoints:mappedSnapPoints,index:initialSnapIndex!=undefined?mappedSnapPoints.length-initialSnapIndex-1:getSnapIndexFromPosition(initialSnapPosition),handleIndicatorStyle:[{backgroundColor:handleColor},!showHandle?{display:"none"}:{}],backgroundStyle:{backgroundColor:backgroundColor,borderTopLeftRadius:topBorderRadius,borderTopRightRadius:topBorderRadius,borderWidth:borderWidth,borderColor:borderColor},onChange:function onChange(index){return onSettle==null?void 0:onSettle(mappedSnapPoints.length-index-1);},children:(0,_jsxRuntime.jsx)(_bottomSheet.BottomSheetScrollView,Object.assign({contentContainerStyle:[styles.contentContainerStyle,style]},rest,{children:children}))});});function convertSnapPointsForNewImplementation(snapPoints){var reversedSnapPoints=(0,_toConsumableArray2.default)(snapPoints).reverse();return reversedSnapPoints.map(function(point){if(typeof point==="string"){var percentNumber=extractPercentNumber(point);if(percentNumber!==undefined){return`${100-percentNumber}%`;}return point;}else if(typeof point==="number"){return windowHeight-point;}else{return point;}});}function extractPercentNumber(percentString){var percentRegex=/(\d+)?%/;var matches=percentString.match(percentRegex);if(matches!=null&&matches.length){var percentNumber=Number(matches[1]);if(!isNaN(percentNumber)){return percentNumber;}}return undefined;}var styles=_reactNative.StyleSheet.create({contentContainerStyle:{paddingHorizontal:16,paddingVertical:10}});var _default=(0,_theming.withTheme)(BottomSheet);exports.default=_default;
@@ -1 +1 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _TextInput=_interopRequireDefault(require("../TextInput"));var _reactNativeConfirmationCodeField=require("react-native-confirmation-code-field");var _theming=require("../../theming");var _PinInputText=_interopRequireDefault(require("./PinInputText"));var _utilities=require("../../utilities");var _jsxRuntime=require("react/jsx-runtime");var _excluded=["theme","onInputFull","cellCount","clearOnCellFocus","blurOnFull","renderItem","value","onChangeText","focusedBorderColor","focusedBackgroundColor","focusedBorderWidth","focusedTextColor","style"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/PinInput/PinInput.tsx";var PinInput=_react.default.forwardRef(function(_ref,ref){var theme=_ref.theme,onInputFull=_ref.onInputFull,_ref$cellCount=_ref.cellCount,cellCount=_ref$cellCount===void 0?4:_ref$cellCount,_ref$clearOnCellFocus=_ref.clearOnCellFocus,clearOnCellFocus=_ref$clearOnCellFocus===void 0?true:_ref$clearOnCellFocus,_ref$blurOnFull=_ref.blurOnFull,blurOnFull=_ref$blurOnFull===void 0?true:_ref$blurOnFull,renderItem=_ref.renderItem,value=_ref.value,onChangeText=_ref.onChangeText,_ref$focusedBorderCol=_ref.focusedBorderColor,focusedBorderColor=_ref$focusedBorderCol===void 0?theme.colors.primary:_ref$focusedBorderCol,focusedBackgroundColor=_ref.focusedBackgroundColor,focusedBorderWidth=_ref.focusedBorderWidth,focusedTextColor=_ref.focusedTextColor,style=_ref.style,rest=(0,_objectWithoutProperties2.default)(_ref,_excluded);var newPinInputRef=_react.default.useRef(null);var pinInputRef=ref?ref:newPinInputRef;var _extractStyles=(0,_utilities.extractStyles)(style),viewStyles=_extractStyles.viewStyles,textStyles=_extractStyles.textStyles;var _useClearByFocusCell=(0,_reactNativeConfirmationCodeField.useClearByFocusCell)({value:value,setValue:function setValue(text){return onChangeText==null?void 0:onChangeText(text);}}),_useClearByFocusCell2=(0,_slicedToArray2.default)(_useClearByFocusCell,2),codeFieldProps=_useClearByFocusCell2[0],getCellOnLayout=_useClearByFocusCell2[1];_react.default.useEffect(function(){if((value==null?void 0:value.length)===cellCount){if(blurOnFull){var _pinInputRef$current;(_pinInputRef$current=pinInputRef.current)==null?void 0:_pinInputRef$current.blur();}onInputFull==null?void 0:onInputFull(value);}},[value,cellCount,blurOnFull,pinInputRef]);var _renderCell=function renderCell(cellValue,index,isFocused){var cell=(renderItem==null?void 0:renderItem({cellValue:cellValue,index:index,isFocused:isFocused}))||(0,_jsxRuntime.jsx)(_reactNative.View,{testID:"default-code-input-cell",style:[styles.cell,{borderColor:theme.colors.disabled},viewStyles,isFocused&&focusedBorderWidth?{borderWidth:focusedBorderWidth}:undefined,isFocused&&focusedBorderColor?{borderColor:focusedBorderColor}:undefined,isFocused&&focusedBackgroundColor?{backgroundColor:focusedBackgroundColor}:undefined],children:(0,_jsxRuntime.jsx)(_PinInputText.default,{style:[styles.cellText,{color:theme.colors.strong},textStyles,isFocused&&focusedTextColor?{color:focusedTextColor}:undefined],isFocused:isFocused,children:cellValue})});return _react.default.cloneElement(cell,{onLayout:clearOnCellFocus?getCellOnLayout(index):undefined});};return(0,_jsxRuntime.jsx)(_reactNativeConfirmationCodeField.CodeField,Object.assign({ref:pinInputRef},clearOnCellFocus?codeFieldProps:{},{value:value,onChangeText:onChangeText,rootStyle:styles.rootContainer,textInputStyle:{height:"100%"},InputComponent:_TextInput.default,cellCount:cellCount,renderCell:function renderCell(_ref2){var cellValue=_ref2.symbol,index=_ref2.index,isFocused=_ref2.isFocused;return(0,_jsxRuntime.jsx)(_react.default.Fragment,{children:_renderCell(cellValue,index,isFocused)},index);}},rest));});var styles=_reactNative.StyleSheet.create({rootContainer:{justifyContent:"center"},cell:{marginLeft:5,marginRight:5,padding:5,borderRadius:5,justifyContent:"center",alignItems:"center",aspectRatio:1,maxWidth:70,maxHeight:70,borderWidth:1,flex:1},cellText:{fontSize:25}});var _default=(0,_theming.withTheme)(PinInput);exports.default=_default;
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _TextInput=_interopRequireDefault(require("../TextInput"));var _reactNativeConfirmationCodeField=require("react-native-confirmation-code-field");var _theming=require("../../theming");var _PinInputText=_interopRequireDefault(require("./PinInputText"));var _utilities=require("../../utilities");var _jsxRuntime=require("react/jsx-runtime");var _excluded=["theme","onInputFull","cellCount","clearOnCellFocus","blurOnFull","renderItem","value","onChangeText","focusedBorderColor","focusedBackgroundColor","focusedBorderWidth","focusedTextColor","style"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/PinInput/PinInput.tsx";var PinInput=_react.default.forwardRef(function(_ref,ref){var theme=_ref.theme,onInputFull=_ref.onInputFull,_ref$cellCount=_ref.cellCount,cellCount=_ref$cellCount===void 0?4:_ref$cellCount,_ref$clearOnCellFocus=_ref.clearOnCellFocus,clearOnCellFocus=_ref$clearOnCellFocus===void 0?true:_ref$clearOnCellFocus,_ref$blurOnFull=_ref.blurOnFull,blurOnFull=_ref$blurOnFull===void 0?true:_ref$blurOnFull,renderItem=_ref.renderItem,value=_ref.value,onChangeText=_ref.onChangeText,_ref$focusedBorderCol=_ref.focusedBorderColor,focusedBorderColor=_ref$focusedBorderCol===void 0?theme.colors.primary:_ref$focusedBorderCol,focusedBackgroundColor=_ref.focusedBackgroundColor,focusedBorderWidth=_ref.focusedBorderWidth,focusedTextColor=_ref.focusedTextColor,style=_ref.style,rest=(0,_objectWithoutProperties2.default)(_ref,_excluded);var newPinInputRef=_react.default.useRef(null);var pinInputRef=ref?ref:newPinInputRef;var _extractStyles=(0,_utilities.extractStyles)(style),viewStyles=_extractStyles.viewStyles,textStyles=_extractStyles.textStyles;var _useClearByFocusCell=(0,_reactNativeConfirmationCodeField.useClearByFocusCell)({value:value,setValue:function setValue(text){return onChangeText==null?void 0:onChangeText(text);}}),_useClearByFocusCell2=(0,_slicedToArray2.default)(_useClearByFocusCell,2),codeFieldProps=_useClearByFocusCell2[0],getCellOnLayout=_useClearByFocusCell2[1];_react.default.useEffect(function(){if((value==null?void 0:value.length)===cellCount){if(blurOnFull){var _pinInputRef$current;(_pinInputRef$current=pinInputRef.current)==null?void 0:_pinInputRef$current.blur();}onInputFull==null?void 0:onInputFull(value);}},[value,cellCount,blurOnFull,pinInputRef]);var _renderCell=function renderCell(cellValue,index,isFocused){var cell=(renderItem==null?void 0:renderItem({cellValue:cellValue,index:index,isFocused:isFocused}))||(0,_jsxRuntime.jsx)(_reactNative.View,{testID:"default-code-input-cell",style:[styles.cell,{borderColor:theme.colors.disabled},viewStyles,isFocused&&focusedBorderWidth?{borderWidth:focusedBorderWidth}:undefined,isFocused&&focusedBorderColor?{borderColor:focusedBorderColor}:undefined,isFocused&&focusedBackgroundColor?{backgroundColor:focusedBackgroundColor}:undefined],children:(0,_jsxRuntime.jsx)(_PinInputText.default,{style:[styles.cellText,{color:theme.colors.strong},textStyles,isFocused&&focusedTextColor?{color:focusedTextColor}:undefined],isFocused:isFocused,children:cellValue})});return _react.default.cloneElement(cell,{onLayout:clearOnCellFocus?getCellOnLayout(index):undefined});};return(0,_jsxRuntime.jsx)(_reactNativeConfirmationCodeField.CodeField,Object.assign({ref:pinInputRef},clearOnCellFocus?codeFieldProps:{},{value:value,onChangeText:onChangeText,rootStyle:styles.rootContainer,textInputStyle:[{height:"100%"},_reactNative.Platform.OS==="web"?{outlineWidth:0}:{}],InputComponent:_TextInput.default,cellCount:cellCount,renderCell:function renderCell(_ref2){var cellValue=_ref2.symbol,index=_ref2.index,isFocused=_ref2.isFocused;return(0,_jsxRuntime.jsx)(_react.default.Fragment,{children:_renderCell(cellValue,index,isFocused)},index);}},rest));});var styles=_reactNative.StyleSheet.create({rootContainer:{justifyContent:"center"},cell:{marginLeft:5,marginRight:5,padding:5,borderRadius:5,justifyContent:"center",alignItems:"center",aspectRatio:1,maxWidth:70,maxHeight:70,borderWidth:1,flex:1},cellText:{fontSize:25}});var _default=(0,_theming.withTheme)(PinInput);exports.default=_default;
@@ -1,12 +1,14 @@
1
1
  import React from "react";
2
2
  import { StyleProp, ViewStyle, ScrollViewProps } from "react-native";
3
- import BottomSheetComponent from "./BottomSheetComponent";
4
3
  import type { Theme } from "../../styles/DefaultTheme";
5
4
  declare type SnapPosition = "top" | "middle" | "bottom";
6
5
  export interface BottomSheetProps extends ScrollViewProps {
7
6
  topSnapPosition?: string | number;
8
7
  middleSnapPosition?: string | number;
9
8
  bottomSnapPosition?: string | number;
9
+ /**
10
+ * As distance from top (number or percentage string), sorted from top to bottom
11
+ */
10
12
  snapPoints?: (string | number)[];
11
13
  initialSnapIndex?: number;
12
14
  initialSnapPosition?: SnapPosition;
@@ -22,7 +24,7 @@ export interface BottomSheetProps extends ScrollViewProps {
22
24
  style?: StyleProp<ViewStyle>;
23
25
  theme: Theme;
24
26
  }
25
- declare const _default: React.ComponentType<import("@draftbit/react-theme-provider").$Without<BottomSheetProps & React.RefAttributes<BottomSheetComponent<any>>, "theme"> & {
27
+ declare const _default: React.ComponentType<import("@draftbit/react-theme-provider").$Without<BottomSheetProps & React.RefAttributes<import("@gorhom/bottom-sheet/lib/typescript/types").BottomSheetMethods>, "theme"> & {
26
28
  theme?: import("@draftbit/react-theme-provider").$DeepPartial<any> | undefined;
27
- }> & import("@draftbit/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<BottomSheetProps & React.RefAttributes<BottomSheetComponent<any>>> & React.ForwardRefExoticComponent<BottomSheetProps & React.RefAttributes<BottomSheetComponent<any>>>, {}>;
29
+ }> & import("@draftbit/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<BottomSheetProps & React.RefAttributes<import("@gorhom/bottom-sheet/lib/typescript/types").BottomSheetMethods>> & React.ForwardRefExoticComponent<BottomSheetProps & React.RefAttributes<import("@gorhom/bottom-sheet/lib/typescript/types").BottomSheetMethods>>, {}>;
28
30
  export default _default;
@@ -1,72 +1,81 @@
1
1
  import React from "react";
2
- import { StyleSheet, View, } from "react-native";
3
- import BottomSheetComponent from "./BottomSheetComponent";
2
+ import { StyleSheet, Dimensions, } from "react-native";
3
+ import BottomSheetComponent, { BottomSheetScrollView, } from "@gorhom/bottom-sheet";
4
4
  import { withTheme } from "../../theming";
5
+ import { useDeepCompareMemo } from "../../utilities";
6
+ const windowHeight = Dimensions.get("window").height;
7
+ // Clarification:
8
+ // Input of snap points is sorted top -> bottom where each value represents distance from top
9
+ // Implementation using `@gorhom/bottom-sheet` is sorted bottom -> top where each value represents distance from bottom
5
10
  const BottomSheet = React.forwardRef(({ theme, snapPoints: snapPointsProp, topSnapPosition = "10%", middleSnapPosition = "50%", bottomSnapPosition = "80%", initialSnapIndex, initialSnapPosition = "bottom", showHandle = true, handleColor = theme.colors.divider, topBorderRadius = 20, borderWidth = 1, borderColor = theme.colors.divider, onSettle, style, children, ...rest }, ref) => {
6
11
  const backgroundColor = (style === null || style === void 0 ? void 0 : style.backgroundColor) || theme.colors.background;
7
- const snapPoints = snapPointsProp || [
12
+ const snapPoints = snapPointsProp !== null && snapPointsProp !== void 0 ? snapPointsProp : [
8
13
  topSnapPosition,
9
14
  middleSnapPosition,
10
15
  bottomSnapPosition,
11
16
  ];
17
+ const mappedSnapPoints = useDeepCompareMemo(() => convertSnapPointsForNewImplementation(snapPoints), snapPoints);
12
18
  const getSnapIndexFromPosition = (position) => {
13
19
  switch (position) {
14
- case "top":
20
+ case "bottom":
15
21
  return 0;
16
22
  case "middle":
17
23
  return 1;
18
- case "bottom":
24
+ case "top":
19
25
  return 2;
20
26
  }
21
27
  };
22
- return (React.createElement(View, { style: styles.parentContainer, pointerEvents: "box-none" },
23
- React.createElement(BottomSheetComponent, { ref: ref, componentType: "ScrollView", snapPoints: snapPoints, initialSnapIndex: initialSnapIndex !== null && initialSnapIndex !== void 0 ? initialSnapIndex : getSnapIndexFromPosition(initialSnapPosition), renderHandle: () => (React.createElement(React.Fragment, null, showHandle && (React.createElement(View, { style: [
24
- styles.handleContainer,
25
- {
26
- backgroundColor,
27
- borderTopLeftRadius: topBorderRadius,
28
- borderTopRightRadius: topBorderRadius,
29
- },
30
- ] },
31
- React.createElement(View, { style: [styles.handle, { backgroundColor: handleColor }] }))))), contentContainerStyle: [styles.contentContainerStyle, style], containerStyle: StyleSheet.flatten([
32
- styles.containerStyle,
33
- {
34
- backgroundColor,
35
- borderTopLeftRadius: topBorderRadius,
36
- borderTopRightRadius: topBorderRadius,
37
- borderWidth,
38
- borderColor,
39
- },
40
- ]), onSettle: onSettle, ...rest }, children)));
28
+ return (React.createElement(BottomSheetComponent, { ref: ref, snapPoints: mappedSnapPoints, index: initialSnapIndex != undefined
29
+ ? mappedSnapPoints.length - initialSnapIndex - 1
30
+ : getSnapIndexFromPosition(initialSnapPosition), handleIndicatorStyle: [
31
+ { backgroundColor: handleColor },
32
+ !showHandle ? { display: "none" } : {},
33
+ ], backgroundStyle: {
34
+ backgroundColor,
35
+ borderTopLeftRadius: topBorderRadius,
36
+ borderTopRightRadius: topBorderRadius,
37
+ borderWidth,
38
+ borderColor,
39
+ }, onChange: (index) => onSettle === null || onSettle === void 0 ? void 0 : onSettle(mappedSnapPoints.length - index - 1) },
40
+ React.createElement(BottomSheetScrollView, { contentContainerStyle: [styles.contentContainerStyle, style], ...rest }, children)));
41
41
  });
42
+ // @gorhom/bottom-sheet has a different format for snap points and requires some manipulation
43
+ function convertSnapPointsForNewImplementation(snapPoints) {
44
+ // Older implementation required snap points sorted top -> bottom, new library requires bottom -> top
45
+ const reversedSnapPoints = [...snapPoints].reverse();
46
+ // Older implementation required snap points as distance from top, new library requires them as distance from bottom
47
+ return reversedSnapPoints.map((point) => {
48
+ if (typeof point === "string") {
49
+ const percentNumber = extractPercentNumber(point);
50
+ if (percentNumber !== undefined) {
51
+ return `${100 - percentNumber}%`;
52
+ }
53
+ return point;
54
+ }
55
+ else if (typeof point === "number") {
56
+ return windowHeight - point;
57
+ }
58
+ else {
59
+ return point;
60
+ }
61
+ });
62
+ }
63
+ function extractPercentNumber(percentString) {
64
+ const percentRegex = /(\d+)?%/;
65
+ const matches = percentString.match(percentRegex);
66
+ if (matches === null || matches === void 0 ? void 0 : matches.length) {
67
+ const percentNumber = Number(matches[1]);
68
+ if (!isNaN(percentNumber)) {
69
+ return percentNumber;
70
+ }
71
+ }
72
+ return undefined;
73
+ }
42
74
  const styles = StyleSheet.create({
43
- //Render on top of everything
44
- parentContainer: {
45
- position: "absolute",
46
- left: 0,
47
- right: 0,
48
- top: 0,
49
- bottom: 0,
50
- zIndex: 10,
51
- overflow: "hidden",
52
- },
53
75
  contentContainerStyle: {
54
76
  paddingHorizontal: 16,
55
77
  paddingVertical: 10,
56
78
  },
57
- containerStyle: {
58
- flex: 1,
59
- overflow: "hidden",
60
- },
61
- handleContainer: {
62
- alignItems: "center",
63
- paddingVertical: 20,
64
- },
65
- handle: {
66
- width: 40,
67
- height: 2,
68
- borderRadius: 4,
69
- },
70
79
  });
71
80
  export default withTheme(BottomSheet);
72
81
  //# sourceMappingURL=BottomSheet.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BottomSheet.js","sourceRoot":"","sources":["../../../../../src/components/BottomSheet/BottomSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,UAAU,EACV,IAAI,GAIL,MAAM,cAAc,CAAC;AAEtB,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAuB1C,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAIlC,CACE,EACE,KAAK,EACL,UAAU,EAAE,cAAc,EAC1B,eAAe,GAAG,KAAK,EACvB,kBAAkB,GAAG,KAAK,EAC1B,kBAAkB,GAAG,KAAK,EAC1B,gBAAgB,EAChB,mBAAmB,GAAG,QAAQ,EAC9B,UAAU,GAAG,IAAI,EACjB,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,EAClC,eAAe,GAAG,EAAE,EACpB,WAAW,GAAG,CAAC,EACf,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,EAClC,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,GAAG,IAAI,EACR,EACD,GAAG,EACH,EAAE;IACF,MAAM,eAAe,GACnB,CAAC,KAAmB,aAAnB,KAAK,uBAAL,KAAK,CAAgB,eAAe,KAAI,KAAK,CAAC,MAAM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AAI,IAEP,QAAQ,CACY,CAClB,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,6BAA6B;IAC7B,eAAe,EAAE;QACf,QAAQ,EAAE,UAAU;QACpB,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,CAAC;QACR,GAAG,EAAE,CAAC;QACN,MAAM,EAAE,CAAC;QACT,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE,QAAQ;KACnB;IACD,qBAAqB,EAAE;QACrB,iBAAiB,EAAE,EAAE;QACrB,eAAe,EAAE,EAAE;KACpB;IACD,cAAc,EAAE;QACd,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,QAAQ;KACnB;IACD,eAAe,EAAE;QACf,UAAU,EAAE,QAAQ;QACpB,eAAe,EAAE,EAAE;KACpB;IACD,MAAM,EAAE;QACN,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,CAAC;QACT,YAAY,EAAE,CAAC;KAChB;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC,WAAW,CAAC,CAAC"}
1
+ {"version":3,"file":"BottomSheet.js","sourceRoot":"","sources":["../../../../../src/components/BottomSheet/BottomSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,UAAU,EAIV,UAAU,GACX,MAAM,cAAc,CAAC;AAEtB,OAAO,oBAAoB,EAAE,EAC3B,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAIrD,MAAM,YAAY,GAAG,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC;AAyBrD,iBAAiB;AACjB,6FAA6F;AAC7F,uHAAuH;AACvH,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAClC,CACE,EACE,K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CAAC,YAAY,CAAC,CAAC;IAClD,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,EAAE;QACnB,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;QACzC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,EAAE;YACzB,OAAO,aAAa,CAAC;SACtB;KACF;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,qBAAqB,EAAE;QACrB,iBAAiB,EAAE,EAAE;QACrB,eAAe,EAAE,EAAE;KACpB;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC,WAAW,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { View, StyleSheet, } from "react-native";
2
+ import { View, StyleSheet, Platform, } from "react-native";
3
3
  import TextInput from "../TextInput";
4
4
  import { CodeField, useClearByFocusCell, } from "react-native-confirmation-code-field";
5
5
  import { withTheme } from "../../theming";
@@ -54,7 +54,12 @@ const PinInput = React.forwardRef(({ theme, onInputFull, cellCount = 4, clearOnC
54
54
  onLayout: clearOnCellFocus ? getCellOnLayout(index) : undefined,
55
55
  });
56
56
  };
57
- return (React.createElement(CodeField, { ref: pinInputRef, ...(clearOnCellFocus ? codeFieldProps : {}), value: value, onChangeText: onChangeText, rootStyle: styles.rootContainer, textInputStyle: { height: "100%" }, InputComponent: TextInput, cellCount: cellCount, renderCell: ({ symbol: cellValue, index, isFocused }) => (React.createElement(React.Fragment, { key: index }, renderCell(cellValue, index, isFocused))), ...rest }));
57
+ return (React.createElement(CodeField, { ref: pinInputRef, ...(clearOnCellFocus ? codeFieldProps : {}), value: value, onChangeText: onChangeText, rootStyle: styles.rootContainer, textInputStyle: [
58
+ // addresses issue on firefox where the hidden input did not fill the height
59
+ { height: "100%" },
60
+ //@ts-ignore Web specific prop. Removes default blue outline that appears on the hidden TextInput
61
+ Platform.OS === "web" ? { outlineWidth: 0 } : {},
62
+ ], InputComponent: TextInput, cellCount: cellCount, renderCell: ({ symbol: cellValue, index, isFocused }) => (React.createElement(React.Fragment, { key: index }, renderCell(cellValue, index, isFocused))), ...rest }));
58
63
  });
59
64
  const styles = StyleSheet.create({
60
65
  rootContainer: {
@@ -1 +1 @@
1
- {"version":3,"file":"PinInput.js","sourceRoot":"","sources":["../../../../../src/components/PinInput/PinInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAKL,IAAI,EACJ,UAAU,GACX,MAAM,cAAc,CAAC;AACtB,OAAO,SAA6B,MAAM,cAAc,CAAC;AACzD,OAAO,EACL,SAAS,EACT,mBAAmB,GACpB,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAsBhD,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAC/B,CACE,EACE,KAAK,EACL,WAAW,EACX,SAAS,GAAG,CAAC,EACb,gBAAgB,GAAG,IAAI,EACvB,UAAU,GAAG,IAAI,EACjB,UAAU,EACV,KAAK,EACL,YAAY,EACZ,kBAAkB,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,EACzC,sBAAsB,EACtB,kBAAkB,EAClB,gBAAgB,EAChB,KAAK,EACL,GAAG,IAAI,EACR,EACD,GAAG,EACH,EAAE;IACF,MAAM,cAAc,GAAG,KAAK,CAAC,MAAM,CAAkB,IAAI,CAAC,CAAC;IAE3D,+DAA+D;IAC/D,MAAM,WAAW,GAAG,GAAG;QACrB,CAAC,CAAE,GAAwC;QAC3C,CAAC,CAAC,cAAc,CAAC;IAEnB,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;IAExD,mNAAmN;IACnN,MAAM,CA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AAE,CAAC;QACV,YAAY,EAAE,CAAC;QACf,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,WAAW,EAAE,CAAC;QACd,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,EAAE;QACb,WAAW,EAAE,CAAC;QACd,IAAI,EAAE,CAAC;KACR;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE,EAAE;KACb;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC,QAAQ,CAAC,CAAC"}
1
+ {"version":3,"file":"PinInput.js","sourceRoot":"","sources":["../../../../../src/components/PinInput/PinInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAKL,IAAI,EACJ,UAAU,EACV,QAAQ,GACT,MAAM,cAAc,CAAC;AACtB,OAAO,SAA6B,MAAM,cAAc,CAAC;AACzD,OAAO,EACL,SAAS,EACT,mBAAmB,GACpB,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAsBhD,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAC/B,CACE,EACE,KAAK,EACL,WAAW,EACX,SAAS,GAAG,CAAC,EACb,gBAAgB,GAAG,IAAI,EACvB,UAAU,GAAG,IAAI,EACjB,UAAU,EACV,KAAK,EACL,YAAY,EACZ,kBAAkB,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,EACzC,sBAAsB,EACtB,kBAAkB,EAClB,gBAAgB,EAChB,KAAK,EACL,GAAG,IAAI,EACR,EACD,GAAG,EACH,EAAE;IACF,MAAM,cAAc,GAAG,KAAK,CAAC,MAAM,CAAkB,IAAI,CAAC,CAAC;IAE3D,+DAA+D;IAC/D,MAAM,WAAW,GAAG,GAAG;QACrB,CAAC,CAAE,GAAwC;QAC3C,CAAC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