@draftbit/core 49.3.2-6494ea.2 → 49.3.2-bc13e1.2

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
- import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["theme","onInputFull","cellCount","clearOnCellFocus","blurOnFull","renderItem","value","onChangeText","focusedBorderColor","focusedBackgroundColor","focusedBorderWidth","focusedTextColor","secureTextEntry","style"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/PinInput/PinInput.tsx";import React from"react";import{View,StyleSheet,Platform}from"react-native";import TextInput from"../TextInput";import{CodeField,useClearByFocusCell}from"react-native-confirmation-code-field";import{withTheme}from"../../theming";import PinInputText from"./PinInputText";import{extractStyles}from"../../utilities";import{jsx as _jsx}from"react/jsx-runtime";var PinInput=React.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,secureTextEntry=_ref.secureTextEntry,style=_ref.style,rest=_objectWithoutProperties(_ref,_excluded);var newPinInputRef=React.useRef(null);var pinInputRef=ref?ref:newPinInputRef;var _extractStyles=extractStyles(style),viewStyles=_extractStyles.viewStyles,textStyles=_extractStyles.textStyles;var _useClearByFocusCell=useClearByFocusCell({value:value,setValue:function setValue(text){return onChangeText==null?void 0:onChangeText(text);}}),_useClearByFocusCell2=_slicedToArray(_useClearByFocusCell,2),codeFieldProps=_useClearByFocusCell2[0],getCellOnLayout=_useClearByFocusCell2[1];React.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){if(secureTextEntry&&cellValue){cellValue="•";}var cell=(renderItem==null?void 0:renderItem({cellValue:cellValue,index:index,isFocused:isFocused}))||_jsx(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:_jsx(PinInputText,{style:[styles.cellText,{color:theme.colors.strong},textStyles,isFocused&&focusedTextColor?{color:focusedTextColor}:undefined],isFocused:isFocused,children:cellValue})});return React.cloneElement(cell,{onLayout:clearOnCellFocus?getCellOnLayout(index):undefined});};return _jsx(CodeField,Object.assign({ref:pinInputRef},clearOnCellFocus?codeFieldProps:{},{value:value,onChangeText:onChangeText,rootStyle:styles.rootContainer,textInputStyle:[{height:"100%"},Platform.OS==="web"?{outlineWidth:0}:{}],InputComponent:TextInput,cellCount:cellCount,renderCell:function renderCell(_ref2){var cellValue=_ref2.symbol,index=_ref2.index,isFocused=_ref2.isFocused;return _jsx(React.Fragment,{children:_renderCell(cellValue,index,isFocused)},index);},secureTextEntry:secureTextEntry},rest));});var styles=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}});export default withTheme(PinInput);
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";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";import React from"react";import{View,StyleSheet,Platform}from"react-native";import TextInput from"../TextInput";import{CodeField,useClearByFocusCell}from"react-native-confirmation-code-field";import{withTheme}from"../../theming";import PinInputText from"./PinInputText";import{extractStyles}from"../../utilities";import{jsx as _jsx}from"react/jsx-runtime";var PinInput=React.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=_objectWithoutProperties(_ref,_excluded);var newPinInputRef=React.useRef(null);var pinInputRef=ref?ref:newPinInputRef;var _extractStyles=extractStyles(style),viewStyles=_extractStyles.viewStyles,textStyles=_extractStyles.textStyles;var _useClearByFocusCell=useClearByFocusCell({value:value,setValue:function setValue(text){return onChangeText==null?void 0:onChangeText(text);}}),_useClearByFocusCell2=_slicedToArray(_useClearByFocusCell,2),codeFieldProps=_useClearByFocusCell2[0],getCellOnLayout=_useClearByFocusCell2[1];React.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}))||_jsx(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:_jsx(PinInputText,{style:[styles.cellText,{color:theme.colors.strong},textStyles,isFocused&&focusedTextColor?{color:focusedTextColor}:undefined],isFocused:isFocused,children:cellValue})});return React.cloneElement(cell,{onLayout:clearOnCellFocus?getCellOnLayout(index):undefined});};return _jsx(CodeField,Object.assign({ref:pinInputRef},clearOnCellFocus?codeFieldProps:{},{value:value,onChangeText:onChangeText,rootStyle:styles.rootContainer,textInputStyle:[{height:"100%"},Platform.OS==="web"?{outlineWidth:0}:{}],InputComponent:TextInput,cellCount:cellCount,renderCell:function renderCell(_ref2){var cellValue=_ref2.symbol,index=_ref2.index,isFocused=_ref2.isFocused;return _jsx(React.Fragment,{children:_renderCell(cellValue,index,isFocused)},index);}},rest));});var styles=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}});export default withTheme(PinInput);
@@ -1 +1 @@
1
- import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["onChangeTextDelayed","changeTextDelay","value"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/TextInput.tsx";import React from"react";import{TextInput as NativeTextInput}from"react-native";import{useDebounce,useOnUpdate}from"../hooks";import{jsx as _jsx}from"react/jsx-runtime";var TextInput=React.forwardRef(function(_ref,ref){var onChangeTextDelayed=_ref.onChangeTextDelayed,_ref$changeTextDelay=_ref.changeTextDelay,changeTextDelay=_ref$changeTextDelay===void 0?500:_ref$changeTextDelay,value=_ref.value,rest=_objectWithoutProperties(_ref,_excluded);var delayedValue=useDebounce(value,changeTextDelay);useOnUpdate(function(){if(delayedValue!==undefined){onChangeTextDelayed==null?void 0:onChangeTextDelayed(delayedValue);}},[delayedValue]);return _jsx(NativeTextInput,Object.assign({testID:"native-text-input",ref:ref,value:value},rest));});export default TextInput;
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["onChangeTextDelayed","changeTextDelay","webShowOutline","style","value"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/TextInput.tsx";import React from"react";import{TextInput as NativeTextInput,Platform}from"react-native";import{useDebounce,useOnUpdate}from"../hooks";import{jsx as _jsx}from"react/jsx-runtime";var TextInput=React.forwardRef(function(_ref,ref){var onChangeTextDelayed=_ref.onChangeTextDelayed,_ref$changeTextDelay=_ref.changeTextDelay,changeTextDelay=_ref$changeTextDelay===void 0?500:_ref$changeTextDelay,_ref$webShowOutline=_ref.webShowOutline,webShowOutline=_ref$webShowOutline===void 0?true:_ref$webShowOutline,style=_ref.style,value=_ref.value,rest=_objectWithoutProperties(_ref,_excluded);var delayedValue=useDebounce(value,changeTextDelay);useOnUpdate(function(){if(delayedValue!==undefined){onChangeTextDelayed==null?void 0:onChangeTextDelayed(delayedValue);}},[delayedValue]);return _jsx(NativeTextInput,Object.assign({testID:"native-text-input",ref:ref,value:value,style:[Platform.OS==="web"&&!webShowOutline?{outlineWidth:0}:{},style]},rest));});export default TextInput;
@@ -5,7 +5,7 @@ import { CodeField, useClearByFocusCell, } from "react-native-confirmation-code-
5
5
  import { withTheme } from "../../theming";
6
6
  import PinInputText from "./PinInputText";
7
7
  import { extractStyles } from "../../utilities";
8
- const PinInput = React.forwardRef(({ theme, onInputFull, cellCount = 4, clearOnCellFocus = true, blurOnFull = true, renderItem, value, onChangeText, focusedBorderColor = theme.colors.primary, focusedBackgroundColor, focusedBorderWidth, focusedTextColor, secureTextEntry, style, ...rest }, ref) => {
8
+ const PinInput = React.forwardRef(({ theme, onInputFull, cellCount = 4, clearOnCellFocus = true, blurOnFull = true, renderItem, value, onChangeText, focusedBorderColor = theme.colors.primary, focusedBackgroundColor, focusedBorderWidth, focusedTextColor, style, ...rest }, ref) => {
9
9
  const newPinInputRef = React.useRef(null);
10
10
  // Use the provided ref or default to new ref when not provided
11
11
  const pinInputRef = ref
@@ -28,9 +28,6 @@ const PinInput = React.forwardRef(({ theme, onInputFull, cellCount = 4, clearOnC
28
28
  // eslint-disable-next-line react-hooks/exhaustive-deps
29
29
  }, [value, cellCount, blurOnFull, pinInputRef]);
30
30
  const renderCell = (cellValue, index, isFocused) => {
31
- if (secureTextEntry && cellValue) {
32
- cellValue = "•";
33
- }
34
31
  const cell = (renderItem === null || renderItem === void 0 ? void 0 : renderItem({ cellValue, index, isFocused })) || (React.createElement(View, { testID: "default-code-input-cell", style: [
35
32
  styles.cell,
36
33
  { borderColor: theme.colors.disabled },
@@ -62,7 +59,7 @@ const PinInput = React.forwardRef(({ theme, onInputFull, cellCount = 4, clearOnC
62
59
  { height: "100%" },
63
60
  //@ts-ignore Web specific prop. Removes default blue outline that appears on the hidden TextInput
64
61
  Platform.OS === "web" ? { outlineWidth: 0 } : {},
65
- ], InputComponent: TextInput, cellCount: cellCount, renderCell: ({ symbol: cellValue, index, isFocused }) => (React.createElement(React.Fragment, { key: index }, renderCell(cellValue, index, isFocused))), secureTextEntry: secureTextEntry, ...rest }));
62
+ ], InputComponent: TextInput, cellCount: cellCount, renderCell: ({ symbol: cellValue, index, isFocused }) => (React.createElement(React.Fragment, { key: index }, renderCell(cellValue, index, isFocused))), ...rest }));
66
63
  });
67
64
  const styles = StyleSheet.create({
68
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,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,eAAe,EACf,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,CAAC,cAAc,EAAE,eA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e,KAC5B,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,aAAa,EAAE;QACb,cAAc,EAAE,QAAQ;KACzB;IACD,IAAI,EAAE;QACJ,UAAU,EAAE,CAAC;QACb,WAAW,EAAE,CAAC;QACd,OAAO,EAAE,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,k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AC,EAAE;SACjD,EACD,cAAc,EAAE,SAAS,EACzB,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CACvD,oBAAC,KAAK,CAAC,QAAQ,IAAC,GAAG,EAAE,KAAK,IACvB,UAAU,CAAC,SAAS,EAAE,KAAK,EAAE,SAAS,CAAC,CACzB,CAClB,KACG,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,aAAa,EAAE;QACb,cAAc,EAAE,QAAQ;KACzB;IACD,IAAI,EAAE;QACJ,UAAU,EAAE,CAAC;QACb,WAAW,EAAE,CAAC;QACd,OAAO,EAAE,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,6 +1,7 @@
1
1
  import React from "react";
2
2
  import { TextInput as NativeTextInput, TextInputProps as NativeTextInputProps } from "react-native";
3
3
  export interface TextInputProps extends NativeTextInputProps {
4
+ webShowOutline?: boolean;
4
5
  onChangeTextDelayed?: (text: string) => void;
5
6
  changeTextDelay?: number;
6
7
  }
@@ -1,14 +1,18 @@
1
1
  import React from "react";
2
- import { TextInput as NativeTextInput, } from "react-native";
2
+ import { TextInput as NativeTextInput, Platform, } from "react-native";
3
3
  import { useDebounce, useOnUpdate } from "../hooks";
4
- const TextInput = React.forwardRef(({ onChangeTextDelayed, changeTextDelay = 500, value, ...rest }, ref) => {
4
+ const TextInput = React.forwardRef(({ onChangeTextDelayed, changeTextDelay = 500, webShowOutline = true, style, value, ...rest }, ref) => {
5
5
  const delayedValue = useDebounce(value, changeTextDelay);
6
6
  useOnUpdate(() => {
7
7
  if (delayedValue !== undefined) {
8
8
  onChangeTextDelayed === null || onChangeTextDelayed === void 0 ? void 0 : onChangeTextDelayed(delayedValue);
9
9
  }
10
10
  }, [delayedValue]);
11
- return (React.createElement(NativeTextInput, { testID: "native-text-input", ref: ref, value: value, ...rest }));
11
+ return (React.createElement(NativeTextInput, { testID: "native-text-input", ref: ref, value: value, style: [
12
+ //@ts-ignore Web specific prop. Removes default blue outline that appears on the hidden TextInput
13
+ Platform.OS === "web" && !webShowOutline ? { outlineWidth: 0 } : {},
14
+ style,
15
+ ], ...rest }));
12
16
  });
13
17
  export default TextInput;
14
18
  //# sourceMappingURL=TextInput.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextInput.js","sourceRoot":"","sources":["../../../../src/components/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,SAAS,IAAI,eAAe,GAE7B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAOpD,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAChC,CAAC,EAAE,mBAAmB,EAAE,eAAe,GAAG,GAAG,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE;IACtE,MAAM,YAAY,GAAG,WAAW,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;IAEzD,WAAW,CAAC,GAAG,EAAE;QACf,IAAI,YAAY,KAAK,SAAS,EAAE;YAC9B,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAG,YAAY,CAAC,CAAC;SACrC;IACH,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IAEnB,OAAO,CACL,oBAAC,eAAe,IACd,MAAM,EAAC,mBAAmB,EAC1B,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,KACR,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"TextInput.js","sourceRoot":"","sources":["../../../../src/components/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,SAAS,IAAI,eAAe,EAE5B,QAAQ,GACT,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAQpD,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAChC,CACE,EACE,mBAAmB,EACnB,eAAe,GAAG,GAAG,EACrB,cAAc,GAAG,IAAI,EACrB,KAAK,EACL,KAAK,EACL,GAAG,IAAI,EACR,EACD,GAAG,EACH,EAAE;IACF,MAAM,YAAY,GAAG,WAAW,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;IAEzD,WAAW,CAAC,GAAG,EAAE;QACf,IAAI,YAAY,KAAK,SAAS,EAAE;YAC9B,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAG,YAAY,CAAC,CAAC;SACrC;IACH,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IAEnB,OAAO,CACL,oBAAC,eAAe,IACd,MAAM,EAAC,mBAAmB,EAC1B,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE;YACL,iGAAiG;YACjG,QAAQ,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE;YACnE,KAAK;SACN,KACG,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,SAAS,CAAC"}