@fountain-ui/core 2.0.0-beta.52 → 2.0.0-beta.53

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.
@@ -28,17 +28,12 @@ const styles = _styles.StyleSheet.create({
28
28
  },
29
29
  divider: {
30
30
  flexGrow: 1
31
- },
32
- borderBottom: {
33
- borderBottomWidth: 1
34
- },
35
- borderRight: {
36
- borderRightWidth: 1
37
31
  }
38
32
  });
39
33
 
40
34
  function Divider(props) {
41
35
  const {
36
+ borderWidth = 1,
42
37
  children: childrenProp,
43
38
  color = 'divider',
44
39
  inset = 0,
@@ -73,7 +68,11 @@ function Divider(props) {
73
68
  const borderColorStyle = {
74
69
  borderColor
75
70
  };
76
- const borderWidthStyle = vertical ? styles.borderRight : styles.borderBottom;
71
+ const borderWidthStyle = vertical ? {
72
+ borderRightWidth: borderWidth
73
+ } : {
74
+ borderBottomWidth: borderWidth
75
+ };
77
76
  const containerStyle = (0, _styles.css)([insetStyle, marginStyle, styles.container, vertical ? styles.column : styles.row, childrenProp ? undefined : borderColorStyle, childrenProp ? undefined : borderWidthStyle, style]);
78
77
  const dividerStyle = (0, _styles.css)([borderColorStyle, borderWidthStyle, styles.divider]);
79
78
  const dividerMarginSize = theme.spacing(marginBetweenChildren);
@@ -1 +1 @@
1
- {"version":3,"names":["styles","StyleSheet","create","container","alignSelf","alignItems","row","flexDirection","column","divider","flexGrow","borderBottom","borderBottomWidth","borderRight","borderRightWidth","Divider","props","children","childrenProp","color","inset","marginBetweenChildren","style","vertical","otherProps","theme","useTheme","fontColor","palette","text","secondary","borderColor","main","marginSize","spacing","insetSize","marginLeft","marginRight","marginTop","marginBottom","marginStyle","insetStyle","borderColorStyle","borderWidthStyle","containerStyle","css","undefined","dividerStyle","dividerMarginSize","startDividerStyle","endDividerStyle","fontStyle","createFontStyle","selector","typo","caption2","element"],"sources":["Divider.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { createFontStyle, css, StyleSheet, useTheme } from '../styles';\nimport type DividerProps from './DividerProps';\n\nconst styles = StyleSheet.create({\n container: {\n alignSelf: 'stretch',\n alignItems: 'center',\n },\n row: {\n flexDirection: 'row',\n },\n column: {\n flexDirection: 'column',\n },\n divider: {\n flexGrow: 1,\n },\n borderBottom: {\n borderBottomWidth: 1,\n },\n borderRight: {\n borderRightWidth: 1,\n },\n});\n\nexport default function Divider(props: DividerProps) {\n const {\n children: childrenProp,\n color = 'divider',\n inset = 0,\n marginBetweenChildren = 2,\n style,\n vertical = false,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const fontColor = theme.palette.text.secondary;\n const borderColor = color === 'divider'\n ? theme.palette.divider\n : theme.palette[color].main;\n const marginSize = theme.spacing(1);\n const insetSize = theme.spacing(inset);\n\n const marginLeft = marginSize;\n const marginRight = marginSize;\n const marginTop = marginSize;\n const marginBottom = marginSize;\n\n const marginStyle = vertical\n ? { marginLeft, marginRight }\n : { marginTop, marginBottom };\n\n const insetStyle = vertical\n ? { marginTop: insetSize, marginBottom: insetSize }\n : { marginLeft: insetSize, marginRight: insetSize };\n\n const borderColorStyle = { borderColor };\n const borderWidthStyle = (vertical ? styles.borderRight : styles.borderBottom);\n\n const containerStyle = css([\n insetStyle,\n marginStyle,\n styles.container,\n vertical ? styles.column : styles.row,\n childrenProp ? undefined : borderColorStyle,\n childrenProp ? undefined : borderWidthStyle,\n style,\n ]);\n\n const dividerStyle = css([\n borderColorStyle,\n borderWidthStyle,\n styles.divider,\n ]);\n\n const dividerMarginSize = theme.spacing(marginBetweenChildren);\n const startDividerStyle = vertical ? { marginBottom: dividerMarginSize } : { marginRight: dividerMarginSize };\n const endDividerStyle = vertical ? { marginTop: dividerMarginSize } : { marginLeft: dividerMarginSize };\n\n const fontStyle = createFontStyle(theme, {\n selector: (typo) => typo.caption2,\n color: fontColor,\n });\n\n const element = typeof childrenProp === 'string'\n ? <Text style={css(fontStyle)}>{childrenProp}</Text>\n : childrenProp;\n\n const children = childrenProp ? (\n <>\n <View style={css([dividerStyle, startDividerStyle])}/>\n {element}\n <View style={css([dividerStyle, endDividerStyle])}/>\n </>\n ) : null;\n\n return (\n <View\n style={containerStyle}\n {...otherProps}\n >\n {children}\n </View>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;AAGA,MAAMA,MAAM,GAAGC,kBAAA,CAAWC,MAAX,CAAkB;EAC7BC,SAAS,EAAE;IACPC,SAAS,EAAE,SADJ;IAEPC,UAAU,EAAE;EAFL,CADkB;EAK7BC,GAAG,EAAE;IACDC,aAAa,EAAE;EADd,CALwB;EAQ7BC,MAAM,EAAE;IACJD,aAAa,EAAE;EADX,CARqB;EAW7BE,OAAO,EAAE;IACLC,QAAQ,EAAE;EADL,CAXoB;EAc7BC,YAAY,EAAE;IACVC,iBAAiB,EAAE;EADT,CAde;EAiB7BC,WAAW,EAAE;IACTC,gBAAgB,EAAE;EADT;AAjBgB,CAAlB,CAAf;;AAsBe,SAASC,OAAT,CAAiBC,KAAjB,EAAsC;EACjD,MAAM;IACFC,QAAQ,EAAEC,YADR;IAEFC,KAAK,GAAG,SAFN;IAGFC,KAAK,GAAG,CAHN;IAIFC,qBAAqB,GAAG,CAJtB;IAKFC,KALE;IAMFC,QAAQ,GAAG,KANT;IAOF,GAAGC;EAPD,IAQFR,KARJ;EAUA,MAAMS,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,MAAMC,SAAS,GAAGF,KAAK,CAACG,OAAN,CAAcC,IAAd,CAAmBC,SAArC;EACA,MAAMC,WAAW,GAAGZ,KAAK,KAAK,SAAV,GACdM,KAAK,CAACG,OAAN,CAAcnB,OADA,GAEdgB,KAAK,CAACG,OAAN,CAAcT,KAAd,EAAqBa,IAF3B;EAGA,MAAMC,UAAU,GAAGR,KAAK,CAACS,OAAN,CAAc,CAAd,CAAnB;EACA,MAAMC,SAAS,GAAGV,KAAK,CAACS,OAAN,CAAcd,KAAd,CAAlB;EAEA,MAAMgB,UAAU,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EAAd,CAAtE;EAEA,MAAMG,SAAS,GAAG,IAAAC,uBAAA,EAAgB3B,KAAhB,EAAuB;IACrC4B,QAAQ,EAAGC,IAAD,IAAUA,IAAI,CAACC,QADY;IAErCpC,KAAK,EAAEQ;EAF8B,CAAvB,CAAlB;EAKA,MAAM6B,OAAO,GAAG,OAAOtC,YAAP,KAAwB,QAAxB,gBACV,6BAAC,iBAAD;IAAM,KAAK,EAAE,IAAA2B,WAAA,EAAIM,SAAJ;EAAb,GAA8BjC,YAA9B,CADU,GAEVA,YAFN;EAIA,MAAMD,QAAQ,GAAGC,YAAY,gBACzB,yEACI,6BAAC,iBAAD;IAAM,KAAK,EAAE,IAAA2B,WAAA,EAAI,CAACE,YAAD,EAAeE,iBAAf,CAAJ;EAAb,EADJ,EAEKO,OAFL,eAGI,6BAAC,iBAAD;IAAM,KAAK,EAAE,IAAAX,WAAA,EAAI,CAACE,YAAD,EAAeG,eAAf,CAAJ;EAAb,EAHJ,CADyB,GAMzB,IANJ;EAQA,oBACI,6BAAC,iBAAD;IACI,KAAK,EAAEN;EADX,GAEQpB,UAFR,GAIKP,QAJL,CADJ;AAQH;;AAAA"}
1
+ {"version":3,"names":["styles","StyleSheet","create","container","alignSelf","alignItems","row","flexDirection","column","divider","flexGrow","Divider","props","borderWidth","children","childrenProp","color","inset","marginBetweenChildren","style","vertical","otherProps","theme","useTheme","fontColor","palette","text","secondary","borderColor","main","marginSize","spacing","insetSize","marginLeft","marginRight","marginTop","marginBottom","marginStyle","insetStyle","borderColorStyle","borderWidthStyle","borderRightWidth","borderBottomWidth","containerStyle","css","undefined","dividerStyle","dividerMarginSize","startDividerStyle","endDividerStyle","fontStyle","createFontStyle","selector","typo","caption2","element"],"sources":["Divider.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { createFontStyle, css, StyleSheet, useTheme } from '../styles';\nimport type DividerProps from './DividerProps';\n\nconst styles = StyleSheet.create({\n container: {\n alignSelf: 'stretch',\n alignItems: 'center',\n },\n row: {\n flexDirection: 'row',\n },\n column: {\n flexDirection: 'column',\n },\n divider: {\n flexGrow: 1,\n },\n});\n\nexport default function Divider(props: DividerProps) {\n const {\n borderWidth = 1,\n children: childrenProp,\n color = 'divider',\n inset = 0,\n marginBetweenChildren = 2,\n style,\n vertical = false,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const fontColor = theme.palette.text.secondary;\n const borderColor = color === 'divider'\n ? theme.palette.divider\n : theme.palette[color].main;\n const marginSize = theme.spacing(1);\n const insetSize = theme.spacing(inset);\n\n const marginLeft = marginSize;\n const marginRight = marginSize;\n const marginTop = marginSize;\n const marginBottom = marginSize;\n\n const marginStyle = vertical\n ? { marginLeft, marginRight }\n : { marginTop, marginBottom };\n\n const insetStyle = vertical\n ? { marginTop: insetSize, marginBottom: insetSize }\n : { marginLeft: insetSize, marginRight: insetSize };\n\n const borderColorStyle = { borderColor };\n const borderWidthStyle = (vertical ? { borderRightWidth: borderWidth } : { borderBottomWidth: borderWidth });\n\n const containerStyle = css([\n insetStyle,\n marginStyle,\n styles.container,\n vertical ? styles.column : styles.row,\n childrenProp ? undefined : borderColorStyle,\n childrenProp ? undefined : borderWidthStyle,\n style,\n ]);\n\n const dividerStyle = css([\n borderColorStyle,\n borderWidthStyle,\n styles.divider,\n ]);\n\n const dividerMarginSize = theme.spacing(marginBetweenChildren);\n const startDividerStyle = vertical ? { marginBottom: dividerMarginSize } : { marginRight: dividerMarginSize };\n const endDividerStyle = vertical ? { marginTop: dividerMarginSize } : { marginLeft: dividerMarginSize };\n\n const fontStyle = createFontStyle(theme, {\n selector: (typo) => typo.caption2,\n color: fontColor,\n });\n\n const element = typeof childrenProp === 'string'\n ? <Text style={css(fontStyle)}>{childrenProp}</Text>\n : childrenProp;\n\n const children = childrenProp ? (\n <>\n <View style={css([dividerStyle, startDividerStyle])}/>\n {element}\n <View style={css([dividerStyle, endDividerStyle])}/>\n </>\n ) : null;\n\n return (\n <View\n style={containerStyle}\n {...otherProps}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+B,OAAO,GAAG,OAAOxC,YAAP,KAAwB,QAAxB,gBACV,6BAAC,iBAAD;IAAM,KAAK,EAAE,IAAA6B,WAAA,EAAIM,SAAJ;EAAb,GAA8BnC,YAA9B,CADU,GAEVA,YAFN;EAIA,MAAMD,QAAQ,GAAGC,YAAY,gBACzB,yEACI,6BAAC,iBAAD;IAAM,KAAK,EAAE,IAAA6B,WAAA,EAAI,CAACE,YAAD,EAAeE,iBAAf,CAAJ;EAAb,EADJ,EAEKO,OAFL,eAGI,6BAAC,iBAAD;IAAM,KAAK,EAAE,IAAAX,WAAA,EAAI,CAACE,YAAD,EAAeG,eAAf,CAAJ;EAAb,EAHJ,CADyB,GAMzB,IANJ;EAQA,oBACI,6BAAC,iBAAD;IACI,KAAK,EAAEN;EADX,GAEQtB,UAFR,GAIKP,QAJL,CADJ;AAQH;;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["DividerProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ViewProps } from 'react-native';\nimport type { CommonComponentColor, OverridableComponentProps } from '../types';\n\nexport type DividerColor = 'divider' | CommonComponentColor;\n\nexport default interface DividerProps extends OverridableComponentProps<ViewProps, {\n /**\n * The content of the component.\n */\n children?: React.ReactNode;\n\n /**\n * The size of the inset. It works as a multiplier factor based on spacing system.\n * @default 0\n */\n inset?: number;\n\n /**\n * If `true`, the divider orientation is set to vertical.\n * @default false\n */\n vertical?: boolean;\n\n /**\n * The color of divider. It supports default divider color and those theme colors that make sense for this component.\n * @default 'divider'\n */\n color?: DividerColor;\n\n /**\n * The size of margin between child element and the divider. It works as a multiplier factor based on spacing system.\n * @default 2\n */\n marginBetweenChildren?: number;\n}> {}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["DividerProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ViewProps } from 'react-native';\nimport type { CommonComponentColor, OverridableComponentProps } from '../types';\n\nexport type DividerColor = 'divider' | CommonComponentColor;\n\nexport default interface DividerProps extends OverridableComponentProps<ViewProps, {\n /**\n * The content of the component.\n */\n children?: React.ReactNode;\n\n /**\n * The size of the inset. It works as a multiplier factor based on spacing system.\n * @default 0\n */\n inset?: number;\n\n /**\n * If `true`, the divider orientation is set to vertical.\n * @default false\n */\n vertical?: boolean;\n\n /**\n * The color of divider. It supports default divider color and those theme colors that make sense for this component.\n * @default 'divider'\n */\n color?: DividerColor;\n\n /**\n * The size of margin between child element and the divider. It works as a multiplier factor based on spacing system.\n * @default 2\n */\n marginBetweenChildren?: number;\n\n /**\n * The size of border width. It works as an actual pixel-based border width value of a divider.\n * @default 1\n */\n borderWidth?: number;\n}> {}\n"],"mappings":""}
@@ -156,8 +156,18 @@ const TextField = /*#__PURE__*/_react.default.forwardRef(function TextField(prop
156
156
  var _innerRef$current4;
157
157
 
158
158
  (_innerRef$current4 = innerRef.current) === null || _innerRef$current4 === void 0 ? void 0 : _innerRef$current4.focus();
159
- };
159
+ }; // react-native TextInput font family issue at android
160
+
160
161
 
162
+ (0, _react.useEffect)(() => {
163
+ var _innerRef$current5;
164
+
165
+ (_innerRef$current5 = innerRef.current) === null || _innerRef$current5 === void 0 ? void 0 : _innerRef$current5.setNativeProps({
166
+ style: {
167
+ fontFamily: 'Inter-Regular'
168
+ }
169
+ });
170
+ }, []);
161
171
  return /*#__PURE__*/_react.default.createElement(_OutlinedTextField.default, {
162
172
  animatedError: animatedError,
163
173
  animatedLabel: animatedLabel,
@@ -1 +1 @@
1
- {"version":3,"names":["TextField","React","forwardRef","props","ref","disabled","error","keyboardType","icon","label","onBlur","onChangeText","onFocus","onIconPress","onSubmitEditing","placeholder","placeholderProp","secureTextEntry","value","style","styleProp","innerRef","useRef","useImperativeHandle","focus","current","isFocused","clear","blur","animatedLabel","useAnimatedValue","animatedError","focused","setFocused","useState","setPlaceholder","labelLayout","setLabelLayout","measured","width","height","minimizeLabel","Animated","timing","toValue","duration","blurAnimationDuration","useNativeDriver","start","restoreLabel","focusAnimationDuration","showError","hideError","showPlaceholder","hidePlaceholder","useEffect","handleFocus","event","handleBlur","css","opacity","handleLayoutAnimatedText","nativeEvent","layout","forceFocus"],"sources":["TextField.tsx"],"sourcesContent":["import React, { useImperativeHandle, useRef } from 'react';\nimport { Animated, LayoutChangeEvent, NativeSyntheticEvent, TargetedEvent, TextInput } from 'react-native';\nimport { css } from '../styles';\nimport { useAnimatedValue } from '../hooks';\nimport OutlinedTextField from './OutlinedTextField';\nimport TextFieldProps from './TextFieldProps';\nimport { blurAnimationDuration, focusAnimationDuration } from './utils';\n\nconst TextField = React.forwardRef<TextInput, TextFieldProps>(function TextField(props, ref) {\n const {\n disabled = false,\n error = false,\n keyboardType = 'default',\n icon,\n label,\n onBlur,\n onChangeText,\n onFocus,\n onIconPress,\n onSubmitEditing,\n placeholder: placeholderProp,\n secureTextEntry = false,\n value,\n style: styleProp,\n } = props;\n\n const innerRef = useRef<TextInput | null>(null);\n //@ts-ignore\n useImperativeHandle(ref, () => ({\n focus: () => {\n innerRef.current?.focus();\n },\n isFocused: () => {\n const current = innerRef.current;\n return current ? current.isFocused() : false;\n },\n clear: () => {\n innerRef.current?.clear();\n },\n blur: () => {\n innerRef.current?.blur();\n },\n }));\n\n const animatedLabel = useAnimatedValue(value ? 0 : 1);\n const animatedError = useAnimatedValue(error ? 1 : 0);\n const [focused, setFocused] = React.useState(false);\n const [placeholder, setPlaceholder] = React.useState('');\n const [labelLayout, setLabelLayout] = React.useState({\n measured: false,\n width: 0,\n height: 0,\n });\n\n const minimizeLabel = () => {\n Animated.timing(animatedLabel, {\n toValue: 0,\n duration: blurAnimationDuration,\n useNativeDriver: false,\n }).start();\n };\n\n const restoreLabel = () => {\n Animated.timing(animatedLabel, {\n toValue: 1,\n duration: focusAnimationDuration,\n useNativeDriver: false,\n }).start();\n };\n\n const showError = () => {\n Animated.timing(animatedError, {\n toValue: 1,\n duration: focusAnimationDuration,\n useNativeDriver: false,\n }).start();\n };\n\n const hideError = () => {\n Animated.timing(animatedError, {\n toValue: 0,\n duration: blurAnimationDuration,\n useNativeDriver: false,\n }).start();\n };\n\n const showPlaceholder = () => {\n placeholderProp && setPlaceholder(placeholderProp);\n };\n\n const hidePlaceholder = () => setPlaceholder('');\n\n React.useEffect(() => {\n value || focused ? minimizeLabel() : restoreLabel();\n }, [focused, value, labelLayout]);\n\n React.useEffect(() => {\n animatedError ? showError() : hideError();\n }, [animatedError]);\n\n React.useEffect(() => {\n focused || !label ? showPlaceholder() : hidePlaceholder();\n }, [focused, label]);\n\n const handleFocus = (event: NativeSyntheticEvent<TargetedEvent>) => {\n if (disabled) {\n return;\n }\n\n setFocused(true);\n onFocus?.(event);\n };\n\n const handleBlur = (event: NativeSyntheticEvent<TargetedEvent>) => {\n setFocused(false);\n onBlur?.(event);\n };\n\n const style = css([\n { opacity: disabled ? 0.3 : 1 },\n styleProp,\n ]);\n\n const handleLayoutAnimatedText = (event: LayoutChangeEvent) => {\n setLabelLayout({\n width: event.nativeEvent.layout.width,\n height: event.nativeEvent.layout.height,\n measured: true,\n });\n };\n\n const forceFocus = () => {\n innerRef.current?.focus();\n };\n\n return (\n <OutlinedTextField\n animatedError={animatedError}\n animatedLabel={animatedLabel}\n disabled={disabled}\n error={error}\n focused={focused}\n forceFocus={forceFocus}\n icon={icon}\n keyboardType={keyboardType}\n label={label}\n labelLayout={labelLayout}\n onFocus={handleFocus}\n onBlur={handleBlur}\n onChangeText={onChangeText}\n onIconPress={onIconPress}\n onLayoutAnimatedText={handleLayoutAnimatedText}\n onSubmitEditing={onSubmitEditing}\n placeholder={placeholder}\n ref={innerRef}\n secureTextEntry={secureTextEntry}\n style={style}\n value={value}\n />\n );\n});\n\nexport default TextField;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;;;;;AAEA,MAAMA,SAAS,gBAAGC,cAAA,CAAMC,UAAN,CAA4C,SAASF,SAAT,CAAmBG,KAAnB,EAA0BC,GAA1B,EAA+B;EACzF,MAAM;IACFC,QAAQ,GAAG,KADT;IAEFC,KAAK,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B;IAGI,QAAQ,EAAExB,QAHd;IAII,KAAK,EAAEC,KAJX;IAKI,OAAO,EAAE0B,OALb;IAMI,UAAU,EAAEgC,UANhB;IAOI,IAAI,EAAExD,IAPV;IAQI,YAAY,EAAED,YARlB;IASI,KAAK,EAAEE,KATX;IAUI,WAAW,EAAE2B,WAVjB;IAWI,OAAO,EAAEoB,WAXb;IAYI,MAAM,EAAEE,UAZZ;IAaI,YAAY,EAAE/C,YAblB;IAcI,WAAW,EAAEE,WAdjB;IAeI,oBAAoB,EAAEgD,wBAf1B;IAgBI,eAAe,EAAE/C,eAhBrB;IAiBI,WAAW,EAAEC,WAjBjB;IAkBI,GAAG,EAAEM,QAlBT;IAmBI,eAAe,EAAEJ,eAnBrB;IAoBI,KAAK,EAAEE,KApBX;IAqBI,KAAK,EAAED;EArBX,EADJ;AAyBH,CAxJiB,CAAlB;;eA0JelB,S"}
1
+ {"version":3,"names":["TextField","React","forwardRef","props","ref","disabled","error","keyboardType","icon","label","onBlur","onChangeText","onFocus","onIconPress","onSubmitEditing","placeholder","placeholderProp","secureTextEntry","value","style","styleProp","innerRef","useRef","useImperativeHandle","focus","current","isFocused","clear","blur","animatedLabel","useAnimatedValue","animatedError","focused","setFocused","useState","setPlaceholder","labelLayout","setLabelLayout","measured","width","height","minimizeLabel","Animated","timing","toValue","duration","blurAnimationDuration","useNativeDriver","start","restoreLabel","focusAnimationDuration","showError","hideError","showPlaceholder","hidePlaceholder","useEffect","handleFocus","event","handleBlur","css","opacity","handleLayoutAnimatedText","nativeEvent","layout","forceFocus","setNativeProps","fontFamily"],"sources":["TextField.tsx"],"sourcesContent":["import React, { useEffect, useImperativeHandle, useRef } from 'react';\nimport { Animated, LayoutChangeEvent, NativeSyntheticEvent, TargetedEvent, TextInput } from 'react-native';\nimport { css } from '../styles';\nimport { useAnimatedValue } from '../hooks';\nimport OutlinedTextField from './OutlinedTextField';\nimport TextFieldProps from './TextFieldProps';\nimport { blurAnimationDuration, focusAnimationDuration } from './utils';\n\nconst TextField = React.forwardRef<TextInput, TextFieldProps>(function TextField(props, ref) {\n const {\n disabled = false,\n error = false,\n keyboardType = 'default',\n icon,\n label,\n onBlur,\n onChangeText,\n onFocus,\n onIconPress,\n onSubmitEditing,\n placeholder: placeholderProp,\n secureTextEntry = false,\n value,\n style: styleProp,\n } = props;\n\n const innerRef = useRef<TextInput | null>(null);\n //@ts-ignore\n useImperativeHandle(ref, () => ({\n focus: () => {\n innerRef.current?.focus();\n },\n isFocused: () => {\n const current = innerRef.current;\n return current ? current.isFocused() : false;\n },\n clear: () => {\n innerRef.current?.clear();\n },\n blur: () => {\n innerRef.current?.blur();\n },\n }));\n\n const animatedLabel = useAnimatedValue(value ? 0 : 1);\n const animatedError = useAnimatedValue(error ? 1 : 0);\n const [focused, setFocused] = React.useState(false);\n const [placeholder, setPlaceholder] = React.useState('');\n const [labelLayout, setLabelLayout] = React.useState({\n measured: false,\n width: 0,\n height: 0,\n });\n\n const minimizeLabel = () => {\n Animated.timing(animatedLabel, {\n toValue: 0,\n duration: blurAnimationDuration,\n useNativeDriver: false,\n }).start();\n };\n\n const restoreLabel = () => {\n Animated.timing(animatedLabel, {\n toValue: 1,\n duration: focusAnimationDuration,\n useNativeDriver: false,\n }).start();\n };\n\n const showError = () => {\n Animated.timing(animatedError, {\n toValue: 1,\n duration: focusAnimationDuration,\n useNativeDriver: false,\n }).start();\n };\n\n const hideError = () => {\n Animated.timing(animatedError, {\n toValue: 0,\n duration: blurAnimationDuration,\n useNativeDriver: false,\n }).start();\n };\n\n const showPlaceholder = () => {\n placeholderProp && setPlaceholder(placeholderProp);\n };\n\n const hidePlaceholder = () => setPlaceholder('');\n\n React.useEffect(() => {\n value || focused ? minimizeLabel() : restoreLabel();\n }, [focused, value, labelLayout]);\n\n React.useEffect(() => {\n animatedError ? showError() : hideError();\n }, [animatedError]);\n\n React.useEffect(() => {\n focused || !label ? showPlaceholder() : hidePlaceholder();\n }, [focused, label]);\n\n const handleFocus = (event: NativeSyntheticEvent<TargetedEvent>) => {\n if (disabled) {\n return;\n }\n\n setFocused(true);\n onFocus?.(event);\n };\n\n const handleBlur = (event: NativeSyntheticEvent<TargetedEvent>) => {\n setFocused(false);\n onBlur?.(event);\n };\n\n const style = css([\n { opacity: disabled ? 0.3 : 1 },\n styleProp,\n ]);\n\n const handleLayoutAnimatedText = (event: LayoutChangeEvent) => {\n setLabelLayout({\n width: event.nativeEvent.layout.width,\n height: event.nativeEvent.layout.height,\n measured: true,\n });\n };\n\n const forceFocus = () => {\n innerRef.current?.focus();\n };\n\n // react-native TextInput font family issue at android\n useEffect(() => {\n innerRef.current?.setNativeProps({\n style: { fontFamily: 'Inter-Regular' },\n });\n }, []);\n\n return (\n <OutlinedTextField\n animatedError={animatedError}\n animatedLabel={animatedLabel}\n disabled={disabled}\n error={error}\n focused={focused}\n forceFocus={forceFocus}\n icon={icon}\n keyboardType={keyboardType}\n label={label}\n labelLayout={labelLayout}\n onFocus={handleFocus}\n onBlur={handleBlur}\n onChangeText={onChangeText}\n onIconPress={onIconPress}\n onLayoutAnimatedText={handleLayoutAnimatedText}\n onSubmitEditing={onSubmitEditing}\n placeholder={placeholder}\n ref={innerRef}\n secureTextEntry={secureTextEntry}\n style={style}\n value={value}\n />\n );\n});\n\nexport default TextField;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;;;;;AAEA,MAAMA,SAAS,gBAAGC,cAAA,CAAMC,UAAN,CAA4C,SAASF,SAAT,CAAmBG,KAAnB,EAA0BC,GAA1B,EAA+B;EACzF,MAAM;IACFC,QAAQ,GAAG,KADT;IAEFC,KAAK,GAAG,KAFN;IAGFC,YAAY,GAAG,SAHb;IAIFC,IAJE;IAKFC,KALE;IAMFC,MANE;IAOFC,YAPE;IAQFC,OARE;IASFC,WATE;IAUFC,eAVE;IAWFC,WAAW,EAAEC,eAXX;IAYFC,eAAe,GAAG,KAZhB;IAaFC,KAbE;IAcFC,KAAK,EAAEC;EAdL,IAeFjB,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B,QAHd;IAII,KAAK,EAAEC,KAJX;IAKI,OAAO,EAAE0B,OALb;IAMI,UAAU,EAAEgC,UANhB;IAOI,IAAI,EAAExD,IAPV;IAQI,YAAY,EAAED,YARlB;IASI,KAAK,EAAEE,KATX;IAUI,WAAW,EAAE2B,WAVjB;IAWI,OAAO,EAAEoB,WAXb;IAYI,MAAM,EAAEE,UAZZ;IAaI,YAAY,EAAE/C,YAblB;IAcI,WAAW,EAAEE,WAdjB;IAeI,oBAAoB,EAAEgD,wBAf1B;IAgBI,eAAe,EAAE/C,eAhBrB;IAiBI,WAAW,EAAEC,WAjBjB;IAkBI,GAAG,EAAEM,QAlBT;IAmBI,eAAe,EAAEJ,eAnBrB;IAoBI,KAAK,EAAEE,KApBX;IAqBI,KAAK,EAAED;EArBX,EADJ;AAyBH,CA/JiB,CAAlB;;eAiKelB,S"}
@@ -16,16 +16,11 @@ const styles = StyleSheet.create({
16
16
  },
17
17
  divider: {
18
18
  flexGrow: 1
19
- },
20
- borderBottom: {
21
- borderBottomWidth: 1
22
- },
23
- borderRight: {
24
- borderRightWidth: 1
25
19
  }
26
20
  });
27
21
  export default function Divider(props) {
28
22
  const {
23
+ borderWidth = 1,
29
24
  children: childrenProp,
30
25
  color = 'divider',
31
26
  inset = 0,
@@ -60,7 +55,11 @@ export default function Divider(props) {
60
55
  const borderColorStyle = {
61
56
  borderColor
62
57
  };
63
- const borderWidthStyle = vertical ? styles.borderRight : styles.borderBottom;
58
+ const borderWidthStyle = vertical ? {
59
+ borderRightWidth: borderWidth
60
+ } : {
61
+ borderBottomWidth: borderWidth
62
+ };
64
63
  const containerStyle = css([insetStyle, marginStyle, styles.container, vertical ? styles.column : styles.row, childrenProp ? undefined : borderColorStyle, childrenProp ? undefined : borderWidthStyle, style]);
65
64
  const dividerStyle = css([borderColorStyle, borderWidthStyle, styles.divider]);
66
65
  const dividerMarginSize = theme.spacing(marginBetweenChildren);
@@ -1 +1 @@
1
- {"version":3,"names":["React","Text","View","createFontStyle","css","StyleSheet","useTheme","styles","create","container","alignSelf","alignItems","row","flexDirection","column","divider","flexGrow","borderBottom","borderBottomWidth","borderRight","borderRightWidth","Divider","props","children","childrenProp","color","inset","marginBetweenChildren","style","vertical","otherProps","theme","fontColor","palette","text","secondary","borderColor","main","marginSize","spacing","insetSize","marginLeft","marginRight","marginTop","marginBottom","marginStyle","insetStyle","borderColorStyle","borderWidthStyle","containerStyle","undefined","dividerStyle","dividerMarginSize","startDividerStyle","endDividerStyle","fontStyle","selector","typo","caption2","element"],"sources":["Divider.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { createFontStyle, css, StyleSheet, useTheme } from '../styles';\nimport type DividerProps from './DividerProps';\n\nconst styles = StyleSheet.create({\n container: {\n alignSelf: 'stretch',\n alignItems: 'center',\n },\n row: {\n flexDirection: 'row',\n },\n column: {\n flexDirection: 'column',\n },\n divider: {\n flexGrow: 1,\n },\n borderBottom: {\n borderBottomWidth: 1,\n },\n borderRight: {\n borderRightWidth: 1,\n },\n});\n\nexport default function Divider(props: DividerProps) {\n const {\n children: childrenProp,\n color = 'divider',\n inset = 0,\n marginBetweenChildren = 2,\n style,\n vertical = false,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const fontColor = theme.palette.text.secondary;\n const borderColor = color === 'divider'\n ? theme.palette.divider\n : theme.palette[color].main;\n const marginSize = theme.spacing(1);\n const insetSize = theme.spacing(inset);\n\n const marginLeft = marginSize;\n const marginRight = marginSize;\n const marginTop = marginSize;\n const marginBottom = marginSize;\n\n const marginStyle = vertical\n ? { marginLeft, marginRight }\n : { marginTop, marginBottom };\n\n const insetStyle = vertical\n ? { marginTop: insetSize, marginBottom: insetSize }\n : { marginLeft: insetSize, marginRight: insetSize };\n\n const borderColorStyle = { borderColor };\n const borderWidthStyle = (vertical ? styles.borderRight : styles.borderBottom);\n\n const containerStyle = css([\n insetStyle,\n marginStyle,\n styles.container,\n vertical ? styles.column : styles.row,\n childrenProp ? undefined : borderColorStyle,\n childrenProp ? undefined : borderWidthStyle,\n style,\n ]);\n\n const dividerStyle = css([\n borderColorStyle,\n borderWidthStyle,\n styles.divider,\n ]);\n\n const dividerMarginSize = theme.spacing(marginBetweenChildren);\n const startDividerStyle = vertical ? { marginBottom: dividerMarginSize } : { marginRight: dividerMarginSize };\n const endDividerStyle = vertical ? { marginTop: dividerMarginSize } : { marginLeft: dividerMarginSize };\n\n const fontStyle = createFontStyle(theme, {\n selector: (typo) => typo.caption2,\n color: fontColor,\n });\n\n const element = typeof childrenProp === 'string'\n ? <Text style={css(fontStyle)}>{childrenProp}</Text>\n : childrenProp;\n\n const children = childrenProp ? (\n <>\n <View style={css([dividerStyle, startDividerStyle])}/>\n {element}\n <View style={css([dividerStyle, endDividerStyle])}/>\n </>\n ) : null;\n\n return (\n <View\n style={containerStyle}\n {...otherProps}\n >\n {children}\n </View>\n );\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,EAAeC,IAAf,QAA2B,cAA3B;AACA,SAASC,eAAT,EAA0BC,GAA1B,EAA+BC,UAA/B,EAA2CC,QAA3C,QAA2D,WAA3D;AAGA,MAAMC,MAAM,GAAGF,UAAU,CAACG,MAAX,CAAkB;EAC7BC,SAAS,EAAE;IACPC,SAAS,EAAE,SADJ;IAEPC,UAAU,EAAE;EAFL,CADkB;EAK7BC,GAAG,EAAE;IACDC,aAAa,EAAE;EADd,CALwB;EAQ7BC,MAAM,EAAE;IACJD,aAAa,EAAE;EADX,CARqB;EAW7BE,OAAO,EAAE;IACLC,QAAQ,EAAE;EADL,CAXoB;EAc7BC,YAAY,EAAE;IACVC,iBAAiB,EAAE;EADT,CAde;EAiB7BC,WAAW,EAAE;IACTC,gBAAgB,EAAE;EADT;AAjBgB,CAAlB,CAAf;AAsBA,eAAe,SAASC,OAAT,CAAiBC,KAAjB,EAAsC;EACjD,MAAM;IACFC,QAAQ,EAAEC,YADR;IAEFC,KAAK,GAAG,SAFN;IAGFC,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StyleSheet","useTheme","styles","create","container","alignSelf","alignItems","row","flexDirection","column","divider","flexGrow","Divider","props","borderWidth","children","childrenProp","color","inset","marginBetweenChildren","style","vertical","otherProps","theme","fontColor","palette","text","secondary","borderColor","main","marginSize","spacing","insetSize","marginLeft","marginRight","marginTop","marginBottom","marginStyle","insetStyle","borderColorStyle","borderWidthStyle","borderRightWidth","borderBottomWidth","containerStyle","undefined","dividerStyle","dividerMarginSize","startDividerStyle","endDividerStyle","fontStyle","selector","typo","caption2","element"],"sources":["Divider.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { createFontStyle, css, StyleSheet, useTheme } from '../styles';\nimport type DividerProps from './DividerProps';\n\nconst styles = StyleSheet.create({\n container: {\n alignSelf: 'stretch',\n alignItems: 'center',\n },\n row: {\n flexDirection: 'row',\n },\n column: {\n flexDirection: 'column',\n },\n divider: {\n flexGrow: 1,\n },\n});\n\nexport default function Divider(props: DividerProps) {\n const {\n borderWidth = 1,\n children: childrenProp,\n color = 'divider',\n inset = 0,\n marginBetweenChildren = 2,\n style,\n vertical = false,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const fontColor = theme.palette.text.secondary;\n const borderColor = color === 'divider'\n ? theme.palette.divider\n : theme.palette[color].main;\n const marginSize = theme.spacing(1);\n const insetSize = theme.spacing(inset);\n\n const marginLeft = marginSize;\n const marginRight = marginSize;\n const marginTop = marginSize;\n const marginBottom = marginSize;\n\n const marginStyle = vertical\n ? { marginLeft, marginRight }\n : { marginTop, marginBottom };\n\n const insetStyle = vertical\n ? { marginTop: insetSize, marginBottom: insetSize }\n : { marginLeft: insetSize, marginRight: insetSize };\n\n const borderColorStyle = { borderColor };\n const borderWidthStyle = (vertical ? { borderRightWidth: borderWidth } : { borderBottomWidth: borderWidth });\n\n const containerStyle = css([\n insetStyle,\n marginStyle,\n styles.container,\n vertical ? styles.column : styles.row,\n childrenProp ? undefined : borderColorStyle,\n childrenProp ? undefined : borderWidthStyle,\n style,\n ]);\n\n const dividerStyle = css([\n borderColorStyle,\n borderWidthStyle,\n styles.divider,\n ]);\n\n const dividerMarginSize = theme.spacing(marginBetweenChildren);\n const startDividerStyle = vertical ? { marginBottom: dividerMarginSize } : { marginRight: dividerMarginSize };\n const endDividerStyle = vertical ? { marginTop: dividerMarginSize } : { marginLeft: dividerMarginSize };\n\n const fontStyle = createFontStyle(theme, {\n selector: (typo) => typo.caption2,\n color: fontColor,\n });\n\n const element = typeof childrenProp === 'string'\n ? <Text style={css(fontStyle)}>{childrenProp}</Text>\n : childrenProp;\n\n const children = childrenProp ? (\n <>\n <View style={css([dividerStyle, startDividerStyle])}/>\n {element}\n <View style={css([dividerStyle, endDividerStyle])}/>\n </>\n ) : null;\n\n return (\n <View\n style={containerStyle}\n {...otherProps}\n >\n {children}\n </View>\n );\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,EAAeC,IAAf,QAA2B,cAA3B;AACA,SAASC,eAAT,EAA0BC,GAA1B,EAA+BC,UAA/B,EAA2CC,QAA3C,QAA2D,WAA3D;AAGA,MAAMC,MAAM,GAAGF,UAAU,CAACG,MAAX,CAAkB;EAC7BC,SAAS,EAAE;IACPC,SAAS,EAAE,SADJ;IAEPC,UAAU,EAAE;EAFL,CADkB;EAK7BC,GAAG,EAAE;IACDC,aAAa,EAAE;EADd,CALwB;EAQ7BC,MAAM,EAAE;IACJD,aAAa,EAAE;EADX,CARqB;EAW7BE,OAAO,EAAE;IACLC,QAAQ,EAAE;EADL;AAXoB,CAAlB,CAAf;AAgBA,eAAe,SAASC,OAAT,CAAiBC,KAAjB,EAAsC;EACjD,MAAM;IACFC,WAAW,GAAG,CADZ;IAEFC,QAAQ,EAAEC,YAFR;IAGFC,KAAK,GAAG,SAHN;IAIFC,KAAK,GAAG,CAJN;IAKFC,qBAAqB,GAAG,CALtB;IAMFC,KANE;IAOFC,QAAQ,GAAG,KAPT;IAQF,GAAGC;EARD,IASFT,KATJ;EA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B,CAAD,CAA1B;EAUA,MAAMyB,YAAY,GAAG9C,GAAG,CAAC,CACrBwC,gBADqB,EAErBC,gBAFqB,EAGrBtC,MAAM,CAACQ,OAHc,CAAD,CAAxB;EAMA,MAAMoC,iBAAiB,GAAGvB,KAAK,CAACQ,OAAN,CAAcZ,qBAAd,CAA1B;EACA,MAAM4B,iBAAiB,GAAG1B,QAAQ,GAAG;IAAEe,YAAY,EAAEU;EAAhB,CAAH,GAAyC;IAAEZ,WAAW,EAAEY;EAAf,CAA3E;EACA,MAAME,eAAe,GAAG3B,QAAQ,GAAG;IAAEc,SAAS,EAAEW;EAAb,CAAH,GAAsC;IAAEb,UAAU,EAAEa;EAAd,CAAtE;EAEA,MAAMG,SAAS,GAAGnD,eAAe,CAACyB,KAAD,EAAQ;IACrC2B,QAAQ,EAAGC,IAAD,IAAUA,IAAI,CAACC,QADY;IAErCnC,KAAK,EAAEO;EAF8B,CAAR,CAAjC;EAKA,MAAM6B,OAAO,GAAG,OAAOrC,YAAP,KAAwB,QAAxB,gBACV,oBAAC,IAAD;IAAM,KAAK,EAAEjB,GAAG,CAACkD,SAAD;EAAhB,GAA8BjC,YAA9B,CADU,GAEVA,YAFN;EAIA,MAAMD,QAAQ,GAAGC,YAAY,gBACzB,uDACI,oBAAC,IAAD;IAAM,KAAK,EAAEjB,GAAG,CAAC,CAAC8C,YAAD,EAAeE,iBAAf,CAAD;EAAhB,EADJ,EAEKM,OAFL,eAGI,oBAAC,IAAD;IAAM,KAAK,EAAEtD,GAAG,CAAC,CAAC8C,YAAD,EAAeG,eAAf,CAAD;EAAhB,EAHJ,CADyB,GAMzB,IANJ;EAQA,oBACI,oBAAC,IAAD;IACI,KAAK,EAAEL;EADX,GAEQrB,UAFR,GAIKP,QAJL,CADJ;AAQH;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["DividerProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ViewProps } from 'react-native';\nimport type { CommonComponentColor, OverridableComponentProps } from '../types';\n\nexport type DividerColor = 'divider' | CommonComponentColor;\n\nexport default interface DividerProps extends OverridableComponentProps<ViewProps, {\n /**\n * The content of the component.\n */\n children?: React.ReactNode;\n\n /**\n * The size of the inset. It works as a multiplier factor based on spacing system.\n * @default 0\n */\n inset?: number;\n\n /**\n * If `true`, the divider orientation is set to vertical.\n * @default false\n */\n vertical?: boolean;\n\n /**\n * The color of divider. It supports default divider color and those theme colors that make sense for this component.\n * @default 'divider'\n */\n color?: DividerColor;\n\n /**\n * The size of margin between child element and the divider. It works as a multiplier factor based on spacing system.\n * @default 2\n */\n marginBetweenChildren?: number;\n}> {}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["DividerProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ViewProps } from 'react-native';\nimport type { CommonComponentColor, OverridableComponentProps } from '../types';\n\nexport type DividerColor = 'divider' | CommonComponentColor;\n\nexport default interface DividerProps extends OverridableComponentProps<ViewProps, {\n /**\n * The content of the component.\n */\n children?: React.ReactNode;\n\n /**\n * The size of the inset. It works as a multiplier factor based on spacing system.\n * @default 0\n */\n inset?: number;\n\n /**\n * If `true`, the divider orientation is set to vertical.\n * @default false\n */\n vertical?: boolean;\n\n /**\n * The color of divider. It supports default divider color and those theme colors that make sense for this component.\n * @default 'divider'\n */\n color?: DividerColor;\n\n /**\n * The size of margin between child element and the divider. It works as a multiplier factor based on spacing system.\n * @default 2\n */\n marginBetweenChildren?: number;\n\n /**\n * The size of border width. It works as an actual pixel-based border width value of a divider.\n * @default 1\n */\n borderWidth?: number;\n}> {}\n"],"mappings":""}
@@ -1,4 +1,4 @@
1
- import React, { useImperativeHandle, useRef } from 'react';
1
+ import React, { useEffect, useImperativeHandle, useRef } from 'react';
2
2
  import { Animated } from 'react-native';
3
3
  import { css } from '../styles';
4
4
  import { useAnimatedValue } from '../hooks';
@@ -132,8 +132,18 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(props, ref) {
132
132
  var _innerRef$current4;
133
133
 
134
134
  (_innerRef$current4 = innerRef.current) === null || _innerRef$current4 === void 0 ? void 0 : _innerRef$current4.focus();
135
- };
135
+ }; // react-native TextInput font family issue at android
136
+
136
137
 
138
+ useEffect(() => {
139
+ var _innerRef$current5;
140
+
141
+ (_innerRef$current5 = innerRef.current) === null || _innerRef$current5 === void 0 ? void 0 : _innerRef$current5.setNativeProps({
142
+ style: {
143
+ fontFamily: 'Inter-Regular'
144
+ }
145
+ });
146
+ }, []);
137
147
  return /*#__PURE__*/React.createElement(OutlinedTextField, {
138
148
  animatedError: animatedError,
139
149
  animatedLabel: animatedLabel,
@@ -1 +1 @@
1
- {"version":3,"names":["React","useImperativeHandle","useRef","Animated","css","useAnimatedValue","OutlinedTextField","blurAnimationDuration","focusAnimationDuration","TextField","forwardRef","props","ref","disabled","error","keyboardType","icon","label","onBlur","onChangeText","onFocus","onIconPress","onSubmitEditing","placeholder","placeholderProp","secureTextEntry","value","style","styleProp","innerRef","focus","current","isFocused","clear","blur","animatedLabel","animatedError","focused","setFocused","useState","setPlaceholder","labelLayout","setLabelLayout","measured","width","height","minimizeLabel","timing","toValue","duration","useNativeDriver","start","restoreLabel","showError","hideError","showPlaceholder","hidePlaceholder","useEffect","handleFocus","event","handleBlur","opacity","handleLayoutAnimatedText","nativeEvent","layout","forceFocus"],"sources":["TextField.tsx"],"sourcesContent":["import React, { useImperativeHandle, useRef } from 'react';\nimport { Animated, LayoutChangeEvent, NativeSyntheticEvent, TargetedEvent, TextInput } from 'react-native';\nimport { css } from '../styles';\nimport { useAnimatedValue } from '../hooks';\nimport OutlinedTextField from './OutlinedTextField';\nimport TextFieldProps from './TextFieldProps';\nimport { blurAnimationDuration, focusAnimationDuration } from './utils';\n\nconst TextField = React.forwardRef<TextInput, TextFieldProps>(function TextField(props, ref) {\n const {\n disabled = false,\n error = false,\n keyboardType = 'default',\n icon,\n label,\n onBlur,\n onChangeText,\n onFocus,\n onIconPress,\n onSubmitEditing,\n placeholder: placeholderProp,\n secureTextEntry = false,\n value,\n style: styleProp,\n } = props;\n\n const innerRef = useRef<TextInput | null>(null);\n //@ts-ignore\n useImperativeHandle(ref, () => ({\n focus: () => {\n innerRef.current?.focus();\n },\n isFocused: () => {\n const current = innerRef.current;\n return current ? current.isFocused() : false;\n },\n clear: () => {\n innerRef.current?.clear();\n },\n blur: () => {\n innerRef.current?.blur();\n },\n }));\n\n const animatedLabel = useAnimatedValue(value ? 0 : 1);\n const animatedError = useAnimatedValue(error ? 1 : 0);\n const [focused, setFocused] = React.useState(false);\n const [placeholder, setPlaceholder] = React.useState('');\n const [labelLayout, setLabelLayout] = React.useState({\n measured: false,\n width: 0,\n height: 0,\n });\n\n const minimizeLabel = () => {\n Animated.timing(animatedLabel, {\n toValue: 0,\n duration: blurAnimationDuration,\n useNativeDriver: false,\n }).start();\n };\n\n const restoreLabel = () => {\n Animated.timing(animatedLabel, {\n toValue: 1,\n duration: focusAnimationDuration,\n useNativeDriver: false,\n }).start();\n };\n\n const showError = () => {\n Animated.timing(animatedError, {\n toValue: 1,\n duration: focusAnimationDuration,\n useNativeDriver: false,\n }).start();\n };\n\n const hideError = () => {\n Animated.timing(animatedError, {\n toValue: 0,\n duration: blurAnimationDuration,\n useNativeDriver: false,\n }).start();\n };\n\n const showPlaceholder = () => {\n placeholderProp && setPlaceholder(placeholderProp);\n };\n\n const hidePlaceholder = () => setPlaceholder('');\n\n React.useEffect(() => {\n value || focused ? minimizeLabel() : restoreLabel();\n }, [focused, value, labelLayout]);\n\n React.useEffect(() => {\n animatedError ? showError() : hideError();\n }, [animatedError]);\n\n React.useEffect(() => {\n focused || !label ? showPlaceholder() : hidePlaceholder();\n }, [focused, label]);\n\n const handleFocus = (event: NativeSyntheticEvent<TargetedEvent>) => {\n if (disabled) {\n return;\n }\n\n setFocused(true);\n onFocus?.(event);\n };\n\n const handleBlur = (event: NativeSyntheticEvent<TargetedEvent>) => {\n setFocused(false);\n onBlur?.(event);\n };\n\n const style = css([\n { opacity: disabled ? 0.3 : 1 },\n styleProp,\n ]);\n\n const handleLayoutAnimatedText = (event: LayoutChangeEvent) => {\n setLabelLayout({\n width: event.nativeEvent.layout.width,\n height: event.nativeEvent.layout.height,\n measured: true,\n });\n };\n\n const forceFocus = () => {\n innerRef.current?.focus();\n };\n\n return (\n <OutlinedTextField\n animatedError={animatedError}\n animatedLabel={animatedLabel}\n disabled={disabled}\n error={error}\n focused={focused}\n forceFocus={forceFocus}\n icon={icon}\n keyboardType={keyboardType}\n label={label}\n labelLayout={labelLayout}\n onFocus={handleFocus}\n onBlur={handleBlur}\n onChangeText={onChangeText}\n onIconPress={onIconPress}\n onLayoutAnimatedText={handleLayoutAnimatedText}\n onSubmitEditing={onSubmitEditing}\n placeholder={placeholder}\n ref={innerRef}\n secureTextEntry={secureTextEntry}\n style={style}\n value={value}\n />\n );\n});\n\nexport default TextField;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,mBAAhB,EAAqCC,MAArC,QAAmD,OAAnD;AACA,SAASC,QAAT,QAA4F,cAA5F;AACA,SAASC,GAAT,QAAoB,WAApB;AACA,SAASC,gBAAT,QAAiC,UAAjC;AACA,OAAOC,iBAAP,MAA8B,qBAA9B;AAEA,SAASC,qBAAT,EAAgCC,sBAAhC,QAA8D,SAA9D;AAEA,MAAMC,SAAS,gBAAGT,KAAK,CAACU,UAAN,CAA4C,SAASD,SAAT,CAAmBE,KAAnB,EAA0BC,GAA1B,EAA+B;EACzF,MAAM;IACFC,QAAQ,GAAG,KADT;IAEFC,KAAK,GAAG,KAFN;IAGFC,YAAY,GAAG,SAHb;IAIFC,IAJE;IAKFC,KALE;IAMFC,MANE;IAOFC,YAPE;IAQFC,OARE;IASFC,WATE;IAUFC,eAVE;IAWFC,WAAW,EAAEC,eAXX;IAYFC,eAAe,GAAG,KAZhB;IAaFC,KAbE;IAcFC,KAAK,EAAEC;EAdL,IAeFjB,KAfJ;EAiBA,MAAMkB,QAAQ,GAAG3B,MAAM,CAAmB,IAAnB,CAAvB,CAlByF,CAmBzF;;E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Af1B;IAgBI,eAAe,EAAExC,eAhBrB;IAiBI,WAAW,EAAEC,WAjBjB;IAkBI,GAAG,EAAEM,QAlBT;IAmBI,eAAe,EAAEJ,eAnBrB;IAoBI,KAAK,EAAEE,KApBX;IAqBI,KAAK,EAAED;EArBX,EADJ;AAyBH,CAxJiB,CAAlB;AA0JA,eAAejB,SAAf"}
1
+ {"version":3,"names":["React","useEffect","useImperativeHandle","useRef","Animated","css","useAnimatedValue","OutlinedTextField","blurAnimationDuration","focusAnimationDuration","TextField","forwardRef","props","ref","disabled","error","keyboardType","icon","label","onBlur","onChangeText","onFocus","onIconPress","onSubmitEditing","placeholder","placeholderProp","secureTextEntry","value","style","styleProp","innerRef","focus","current","isFocused","clear","blur","animatedLabel","animatedError","focused","setFocused","useState","setPlaceholder","labelLayout","setLabelLayout","measured","width","height","minimizeLabel","timing","toValue","duration","useNativeDriver","start","restoreLabel","showError","hideError","showPlaceholder","hidePlaceholder","handleFocus","event","handleBlur","opacity","handleLayoutAnimatedText","nativeEvent","layout","forceFocus","setNativeProps","fontFamily"],"sources":["TextField.tsx"],"sourcesContent":["import React, { useEffect, useImperativeHandle, useRef } from 'react';\nimport { Animated, LayoutChangeEvent, NativeSyntheticEvent, TargetedEvent, TextInput } from 'react-native';\nimport { css } from '../styles';\nimport { useAnimatedValue } from '../hooks';\nimport OutlinedTextField from './OutlinedTextField';\nimport TextFieldProps from './TextFieldProps';\nimport { blurAnimationDuration, focusAnimationDuration } from './utils';\n\nconst TextField = React.forwardRef<TextInput, TextFieldProps>(function TextField(props, ref) {\n const {\n disabled = false,\n error = false,\n keyboardType = 'default',\n icon,\n label,\n onBlur,\n onChangeText,\n onFocus,\n onIconPress,\n onSubmitEditing,\n placeholder: placeholderProp,\n secureTextEntry = false,\n value,\n style: styleProp,\n } = props;\n\n const innerRef = useRef<TextInput | null>(null);\n //@ts-ignore\n useImperativeHandle(ref, () => ({\n focus: () => {\n innerRef.current?.focus();\n },\n isFocused: () => {\n const current = innerRef.current;\n return current ? current.isFocused() : false;\n },\n clear: () => {\n innerRef.current?.clear();\n },\n blur: () => {\n innerRef.current?.blur();\n },\n }));\n\n const animatedLabel = useAnimatedValue(value ? 0 : 1);\n const animatedError = useAnimatedValue(error ? 1 : 0);\n const [focused, setFocused] = React.useState(false);\n const [placeholder, setPlaceholder] = React.useState('');\n const [labelLayout, setLabelLayout] = React.useState({\n measured: false,\n width: 0,\n height: 0,\n });\n\n const minimizeLabel = () => {\n Animated.timing(animatedLabel, {\n toValue: 0,\n duration: blurAnimationDuration,\n useNativeDriver: false,\n }).start();\n };\n\n const restoreLabel = () => {\n Animated.timing(animatedLabel, {\n toValue: 1,\n duration: focusAnimationDuration,\n useNativeDriver: false,\n }).start();\n };\n\n const showError = () => {\n Animated.timing(animatedError, {\n toValue: 1,\n duration: focusAnimationDuration,\n useNativeDriver: false,\n }).start();\n };\n\n const hideError = () => {\n Animated.timing(animatedError, {\n toValue: 0,\n duration: blurAnimationDuration,\n useNativeDriver: false,\n }).start();\n };\n\n const showPlaceholder = () => {\n placeholderProp && setPlaceholder(placeholderProp);\n };\n\n const hidePlaceholder = () => setPlaceholder('');\n\n React.useEffect(() => {\n value || focused ? minimizeLabel() : restoreLabel();\n }, [focused, value, labelLayout]);\n\n React.useEffect(() => {\n animatedError ? showError() : hideError();\n }, [animatedError]);\n\n React.useEffect(() => {\n focused || !label ? showPlaceholder() : hidePlaceholder();\n }, [focused, label]);\n\n const handleFocus = (event: NativeSyntheticEvent<TargetedEvent>) => {\n if (disabled) {\n return;\n }\n\n setFocused(true);\n onFocus?.(event);\n };\n\n const handleBlur = (event: NativeSyntheticEvent<TargetedEvent>) => {\n setFocused(false);\n onBlur?.(event);\n };\n\n const style = css([\n { opacity: disabled ? 0.3 : 1 },\n styleProp,\n ]);\n\n const handleLayoutAnimatedText = (event: LayoutChangeEvent) => {\n setLabelLayout({\n width: event.nativeEvent.layout.width,\n height: event.nativeEvent.layout.height,\n measured: true,\n });\n };\n\n const forceFocus = () => {\n innerRef.current?.focus();\n };\n\n // react-native TextInput font family issue at android\n useEffect(() => {\n innerRef.current?.setNativeProps({\n style: { fontFamily: 'Inter-Regular' },\n });\n }, []);\n\n return (\n <OutlinedTextField\n animatedError={animatedError}\n animatedLabel={animatedLabel}\n disabled={disabled}\n error={error}\n focused={focused}\n forceFocus={forceFocus}\n icon={icon}\n keyboardType={keyboardType}\n label={label}\n labelLayout={labelLayout}\n onFocus={handleFocus}\n onBlur={handleBlur}\n onChangeText={onChangeText}\n onIconPress={onIconPress}\n onLayoutAnimatedText={handleLayoutAnimatedText}\n onSubmitEditing={onSubmitEditing}\n placeholder={placeholder}\n ref={innerRef}\n secureTextEntry={secureTextEntry}\n style={style}\n value={value}\n />\n );\n});\n\nexport default TextField;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,SAAhB,EAA2BC,mBAA3B,EAAgDC,MAAhD,QAA8D,OAA9D;AACA,SAASC,QAAT,QAA4F,cAA5F;AACA,SAASC,GAAT,QAAoB,WAApB;AACA,SAASC,gBAAT,QAAiC,UAAjC;AACA,OAAOC,iBAAP,MAA8B,qBAA9B;AAEA,SAASC,qBAAT,EAAgCC,sBAAhC,QAA8D,SAA9D;AAEA,MAAMC,SAAS,gBAAGV,KAAK,CAACW,UAAN,CAA4C,SAASD,SAAT,CAAmBE,KAAnB,EAA0BC,GAA1B,EAA+B;EACzF,MAAM;IACFC,QAAQ,GAAG,KADT;IAEFC,KAAK,GAAG,KAFN;IAGFC,YAAY,GAAG,SAHb;IAIFC,IAJE;IAKFC,KALE;IAMFC,MANE;IAOFC,YAPE;IAQFC,OARE;IASFC,WATE;IAUFC,eAVE;IAWFC,WAAW,EAAEC,eAXX;IAYFC,eAAe,GAAG,KAZhB;IAaFC,KAbE;IAcFC,KAAK,EAAEC;EAdL,IAeFjB,KAfJ;EAiBA,MAAMkB,QAAQ,GAAG3B,MAAM,CAAmB,IAAnB,CAAvB,CAlByF,CAmBzF;;EACAD,mBAAmB,CAACW,GAAD,E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AAK,EAAEE,KATX;IAUI,WAAW,EAAEwB,WAVjB;IAWI,OAAO,EAAEgB,WAXb;IAYI,MAAM,EAAEE,UAZZ;IAaI,YAAY,EAAExC,YAblB;IAcI,WAAW,EAAEE,WAdjB;IAeI,oBAAoB,EAAEwC,wBAf1B;IAgBI,eAAe,EAAEvC,eAhBrB;IAiBI,WAAW,EAAEC,WAjBjB;IAkBI,GAAG,EAAEM,QAlBT;IAmBI,eAAe,EAAEJ,eAnBrB;IAoBI,KAAK,EAAEE,KApBX;IAqBI,KAAK,EAAED;EArBX,EADJ;AAyBH,CA/JiB,CAAlB;AAiKA,eAAejB,SAAf"}
@@ -27,5 +27,10 @@ export default interface DividerProps extends OverridableComponentProps<ViewProp
27
27
  * @default 2
28
28
  */
29
29
  marginBetweenChildren?: number;
30
+ /**
31
+ * The size of border width. It works as an actual pixel-based border width value of a divider.
32
+ * @default 1
33
+ */
34
+ borderWidth?: number;
30
35
  }> {
31
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fountain-ui/core",
3
- "version": "2.0.0-beta.52",
3
+ "version": "2.0.0-beta.53",
4
4
  "author": "Fountain-UI Team",
5
5
  "description": "React components that implement Tappytoon's Fountain Design.",
6
6
  "license": "MIT",
@@ -67,5 +67,5 @@
67
67
  "publishConfig": {
68
68
  "access": "public"
69
69
  },
70
- "gitHead": "0fc9a9c4db15a8c83560130af2f76d83e91d235c"
70
+ "gitHead": "dff14bb159b46ca2c19473bd7d252d2aaa64040c"
71
71
  }
@@ -17,16 +17,11 @@ const styles = StyleSheet.create({
17
17
  divider: {
18
18
  flexGrow: 1,
19
19
  },
20
- borderBottom: {
21
- borderBottomWidth: 1,
22
- },
23
- borderRight: {
24
- borderRightWidth: 1,
25
- },
26
20
  });
27
21
 
28
22
  export default function Divider(props: DividerProps) {
29
23
  const {
24
+ borderWidth = 1,
30
25
  children: childrenProp,
31
26
  color = 'divider',
32
27
  inset = 0,
@@ -59,7 +54,7 @@ export default function Divider(props: DividerProps) {
59
54
  : { marginLeft: insetSize, marginRight: insetSize };
60
55
 
61
56
  const borderColorStyle = { borderColor };
62
- const borderWidthStyle = (vertical ? styles.borderRight : styles.borderBottom);
57
+ const borderWidthStyle = (vertical ? { borderRightWidth: borderWidth } : { borderBottomWidth: borderWidth });
63
58
 
64
59
  const containerStyle = css([
65
60
  insetStyle,
@@ -33,4 +33,10 @@ export default interface DividerProps extends OverridableComponentProps<ViewProp
33
33
  * @default 2
34
34
  */
35
35
  marginBetweenChildren?: number;
36
+
37
+ /**
38
+ * The size of border width. It works as an actual pixel-based border width value of a divider.
39
+ * @default 1
40
+ */
41
+ borderWidth?: number;
36
42
  }> {}
@@ -1,4 +1,4 @@
1
- import React, { useImperativeHandle, useRef } from 'react';
1
+ import React, { useEffect, useImperativeHandle, useRef } from 'react';
2
2
  import { Animated, LayoutChangeEvent, NativeSyntheticEvent, TargetedEvent, TextInput } from 'react-native';
3
3
  import { css } from '../styles';
4
4
  import { useAnimatedValue } from '../hooks';
@@ -133,6 +133,13 @@ const TextField = React.forwardRef<TextInput, TextFieldProps>(function TextField
133
133
  innerRef.current?.focus();
134
134
  };
135
135
 
136
+ // react-native TextInput font family issue at android
137
+ useEffect(() => {
138
+ innerRef.current?.setNativeProps({
139
+ style: { fontFamily: 'Inter-Regular' },
140
+ });
141
+ }, []);
142
+
136
143
  return (
137
144
  <OutlinedTextField
138
145
  animatedError={animatedError}