@draftbit/core 43.4.14-4e4fc8.0 → 43.4.15-21e84b.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/ActionSheet/ActionSheetItem.js.map +1 -1
- package/lib/commonjs/components/RadioButton/RadioButtonGroup.js +10 -6
- package/lib/commonjs/components/RadioButton/RadioButtonGroup.js.map +1 -1
- package/lib/commonjs/components/Surface.js +19 -7
- package/lib/commonjs/components/Surface.js.map +1 -1
- package/lib/module/components/RadioButton/RadioButtonGroup.js +10 -6
- package/lib/module/components/RadioButton/RadioButtonGroup.js.map +1 -1
- package/lib/module/components/Surface.js +20 -8
- package/lib/module/components/Surface.js.map +1 -1
- package/lib/typescript/src/components/RadioButton/RadioButtonGroup.d.ts +1 -1
- package/package.json +2 -2
- package/src/components/RadioButton/RadioButtonGroup.js +10 -6
- package/src/components/RadioButton/RadioButtonGroup.tsx +12 -8
- package/src/components/Surface.js +19 -10
- package/src/components/Surface.tsx +32 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ActionSheetItem.
|
|
1
|
+
{"version":3,"sources":["ActionSheetItem.tsx"],"names":["ActionSheetItem","label","style","color","onPress","textStyles","viewStyles","styles","wrapper","StyleSheet","create","borderBottomWidth","hairlineWidth","borderBottomColor","backgroundColor","minHeight","overflow","display","justifyContent","fontSize","textAlign","fontWeight","paddingHorizontal","paddingVertical","alignSelf"],"mappings":";;;;;;;AAAA;;AACA;;AAQA;;;;AASA,MAAMA,eAAgC,GAAG,QAAsC;AAAA,MAArC;AAAEC,IAAAA,KAAF;AAASC,IAAAA,KAAT;AAAgBC,IAAAA,KAAhB;AAAuBC,IAAAA;AAAvB,GAAqC;AAC7E,QAAM;AAAEC,IAAAA,UAAF;AAAcC,IAAAA;AAAd,MAA6B,8BAAcJ,KAAd,CAAnC;AACA,sBACE,6BAAC,6BAAD;AACE,IAAA,aAAa,EAAE,GADjB;AAEE,IAAA,KAAK,EAAE,CAACK,MAAM,CAACC,OAAR,EAAiBF,UAAjB,CAFT;AAGE,IAAA,OAAO,EAAEF;AAHX,kBAKE,6BAAC,iBAAD;AAAM,IAAA,KAAK,EAAE,CAACG,MAAM,CAACN,KAAR,EAAeI,UAAf,EAA2B;AAAEF,MAAAA;AAAF,KAA3B;AAAb,KAAqDF,KAArD,CALF,CADF;AASD,CAXD;;AAaA,MAAMM,MAAM,GAAGE,wBAAWC,MAAX,CAAkB;AAC/BF,EAAAA,OAAO,EAAE;AACPG,IAAAA,iBAAiB,EAAEF,wBAAWG,aADvB;AAEPC,IAAAA,iBAAiB,EAAE,SAFZ;AAGPC,IAAAA,eAAe,EAAE,SAHV;AAIPC,IAAAA,SAAS,EAAE,EAJJ;AAKPC,IAAAA,QAAQ,EAAE,QALH;AAMPC,IAAAA,OAAO,EAAE,MANF;AAOPC,IAAAA,cAAc,EAAE;AAPT,GADsB;AAU/BjB,EAAAA,KAAK,EAAE;AACLkB,IAAAA,QAAQ,EAAE,EADL;AAELC,IAAAA,SAAS,EAAE,QAFN;AAGLjB,IAAAA,KAAK,EAAE,SAHF;AAILkB,IAAAA,UAAU,EAAE,KAJP;AAKLL,IAAAA,QAAQ,EAAE,QALL;AAMLM,IAAAA,iBAAiB,EAAE,EANd;AAOLC,IAAAA,eAAe,EAAE,EAPZ;AAQLC,IAAAA,SAAS,EAAE;AARN;AAVwB,CAAlB,CAAf;;eAsBexB,e","sourcesContent":["import React from \"react\";\nimport {\n Text,\n StyleSheet,\n StyleProp,\n TouchableOpacity,\n ViewStyle,\n TextStyle,\n} from \"react-native\";\nimport { extractStyles } from \"../../utilities\";\n\ntype Props = {\n label: string;\n color: string;\n style?: StyleProp<ViewStyle | TextStyle>;\n onPress?: () => void;\n};\n\nconst ActionSheetItem: React.FC<Props> = ({ label, style, color, onPress }) => {\n const { textStyles, viewStyles } = extractStyles(style);\n return (\n <TouchableOpacity\n activeOpacity={0.7}\n style={[styles.wrapper, viewStyles]}\n onPress={onPress}\n >\n <Text style={[styles.label, textStyles, { color }]}>{label}</Text>\n </TouchableOpacity>\n );\n};\n\nconst styles = StyleSheet.create({\n wrapper: {\n borderBottomWidth: StyleSheet.hairlineWidth,\n borderBottomColor: \"#CCCCCC\",\n backgroundColor: \"#F1F1F1\",\n minHeight: 50,\n overflow: \"hidden\",\n display: \"flex\",\n justifyContent: \"center\",\n },\n label: {\n fontSize: 16,\n textAlign: \"center\",\n color: \"#0A84FF\",\n fontWeight: \"500\",\n overflow: \"hidden\",\n paddingHorizontal: 20,\n paddingVertical: 10,\n alignSelf: \"center\",\n },\n});\n\nexport default ActionSheetItem;\n"]}
|
|
@@ -28,19 +28,23 @@ const RadioButtonGroup = _ref => {
|
|
|
28
28
|
direction = _context.Direction.Vertical,
|
|
29
29
|
value = "",
|
|
30
30
|
onValueChange,
|
|
31
|
-
defaultValue
|
|
31
|
+
defaultValue,
|
|
32
32
|
style,
|
|
33
33
|
children,
|
|
34
34
|
...rest
|
|
35
35
|
} = _ref;
|
|
36
36
|
const [internalValue, setInternalValue] = React.useState("");
|
|
37
37
|
React.useEffect(() => {
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
if (value != null) {
|
|
39
|
+
const realValue = (0, _utilities.getValueForRadioButton)(value);
|
|
40
|
+
setInternalValue(realValue);
|
|
41
|
+
}
|
|
40
42
|
}, [value]);
|
|
41
43
|
React.useEffect(() => {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
if (defaultValue != null) {
|
|
45
|
+
const realDefaultValue = (0, _utilities.getValueForRadioButton)(defaultValue);
|
|
46
|
+
setInternalValue(realDefaultValue);
|
|
47
|
+
}
|
|
44
48
|
}, [defaultValue]);
|
|
45
49
|
|
|
46
50
|
const handleValueChange = newValue => {
|
|
@@ -65,7 +69,7 @@ const RadioButtonGroup = _ref => {
|
|
|
65
69
|
}, style]
|
|
66
70
|
}, rest), /*#__PURE__*/React.createElement(Provider, {
|
|
67
71
|
value: {
|
|
68
|
-
value: internalValue
|
|
72
|
+
value: internalValue,
|
|
69
73
|
onValueChange: handleValueChange,
|
|
70
74
|
direction
|
|
71
75
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["RadioButtonGroup.tsx"],"names":["Provider","radioButtonGroupContext","RadioButtonGroup","direction","Direction","Vertical","value","onValueChange","defaultValue","style","children","rest","internalValue","setInternalValue","React","useState","useEffect","realValue","realDefaultValue","handleValueChange","newValue","realNewValue","_containerStyle","flexDirection","Horizontal","push","alignItems","minHeight"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;AAWA,MAAM;AAAEA,EAAAA;AAAF,IAAeC,gCAArB;;AAEA,MAAMC,gBAAiD,GAAG,QAQpD;AAAA,MARqD;AACzDC,IAAAA,SAAS,GAAGC,mBAAUC,QADmC;AAEzDC,IAAAA,KAAK,GAAG,EAFiD;AAGzDC,IAAAA,aAHyD;AAIzDC,IAAAA,
|
|
1
|
+
{"version":3,"sources":["RadioButtonGroup.tsx"],"names":["Provider","radioButtonGroupContext","RadioButtonGroup","direction","Direction","Vertical","value","onValueChange","defaultValue","style","children","rest","internalValue","setInternalValue","React","useState","useEffect","realValue","realDefaultValue","handleValueChange","newValue","realNewValue","_containerStyle","flexDirection","Horizontal","push","alignItems","minHeight"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;AAWA,MAAM;AAAEA,EAAAA;AAAF,IAAeC,gCAArB;;AAEA,MAAMC,gBAAiD,GAAG,QAQpD;AAAA,MARqD;AACzDC,IAAAA,SAAS,GAAGC,mBAAUC,QADmC;AAEzDC,IAAAA,KAAK,GAAG,EAFiD;AAGzDC,IAAAA,aAHyD;AAIzDC,IAAAA,YAJyD;AAKzDC,IAAAA,KALyD;AAMzDC,IAAAA,QANyD;AAOzD,OAAGC;AAPsD,GAQrD;AACJ,QAAM,CAACC,aAAD,EAAgBC,gBAAhB,IAAoCC,KAAK,CAACC,QAAN,CAAe,EAAf,CAA1C;AAEAD,EAAAA,KAAK,CAACE,SAAN,CAAgB,MAAM;AACpB,QAAIV,KAAK,IAAI,IAAb,EAAmB;AACjB,YAAMW,SAAS,GAAG,uCAAuBX,KAAvB,CAAlB;AAEAO,MAAAA,gBAAgB,CAACI,SAAD,CAAhB;AACD;AACF,GAND,EAMG,CAACX,KAAD,CANH;AAQAQ,EAAAA,KAAK,CAACE,SAAN,CAAgB,MAAM;AACpB,QAAIR,YAAY,IAAI,IAApB,EAA0B;AACxB,YAAMU,gBAAgB,GAAG,uCAAuBV,YAAvB,CAAzB;AAEAK,MAAAA,gBAAgB,CAACK,gBAAD,CAAhB;AACD;AACF,GAND,EAMG,CAACV,YAAD,CANH;;AAQA,QAAMW,iBAAiB,GAAIC,QAAD,IAA+B;AACvD,UAAMC,YAAY,GAAG,uCAAuBD,QAAvB,CAArB;AAEAP,IAAAA,gBAAgB,CAACQ,YAAD,CAAhB;AACAd,IAAAA,aAAa,SAAb,IAAAA,aAAa,WAAb,YAAAA,aAAa,CAAGc,YAAH,CAAb;AACD,GALD;;AAOA,QAAMC,eAAqC,GAAG,CAC5C;AACEC,IAAAA,aAAa,EAAEpB,SAAS,KAAKC,mBAAUoB,UAAxB,GAAqC,KAArC,GAA6C;AAD9D,GAD4C,CAA9C;;AAMA,MAAIrB,SAAS,KAAKC,mBAAUC,QAA5B,EAAsC;AACpCiB,IAAAA,eAAe,CAACG,IAAhB,CAAqB;AACnBC,MAAAA,UAAU,EAAE;AADO,KAArB;AAGD;;AAED,sBACE,oBAAC,iBAAD;AAAM,IAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,SAAS,EAAE;AAAb,KAAD,EAAoBlB,KAApB;AAAb,KAA6CE,IAA7C,gBACE,oBAAC,QAAD;AACE,IAAA,KAAK,EAAE;AACLL,MAAAA,KAAK,EAAEM,aADF;AAELL,MAAAA,aAAa,EAAEY,iBAFV;AAGLhB,MAAAA;AAHK;AADT,kBAOE,oBAAC,iBAAD;AAAM,IAAA,KAAK,EAAEmB;AAAb,KAA+BZ,QAA/B,CAPF,CADF,CADF;AAaD,CA3DD;;eA6DeR,gB","sourcesContent":["import * as React from \"react\";\nimport { View, StyleProp, ViewStyle } from \"react-native\";\nimport type { Theme } from \"../../styles/DefaultTheme\";\nimport { getValueForRadioButton } from \"../../utilities\";\nimport { radioButtonGroupContext, Direction } from \"./context\";\nexport interface RadioButtonGroupProps {\n direction?: Direction;\n style?: StyleProp<ViewStyle>;\n value: string | number;\n onValueChange?: (value: string) => void;\n defaultValue?: string | number;\n theme: Theme;\n children: React.ReactNode;\n}\n\nconst { Provider } = radioButtonGroupContext;\n\nconst RadioButtonGroup: React.FC<RadioButtonGroupProps> = ({\n direction = Direction.Vertical,\n value = \"\",\n onValueChange,\n defaultValue,\n style,\n children,\n ...rest\n}) => {\n const [internalValue, setInternalValue] = React.useState(\"\");\n\n React.useEffect(() => {\n if (value != null) {\n const realValue = getValueForRadioButton(value);\n\n setInternalValue(realValue);\n }\n }, [value]);\n\n React.useEffect(() => {\n if (defaultValue != null) {\n const realDefaultValue = getValueForRadioButton(defaultValue);\n\n setInternalValue(realDefaultValue);\n }\n }, [defaultValue]);\n\n const handleValueChange = (newValue: string | number) => {\n const realNewValue = getValueForRadioButton(newValue);\n\n setInternalValue(realNewValue);\n onValueChange?.(realNewValue);\n };\n\n const _containerStyle: StyleProp<ViewStyle> = [\n {\n flexDirection: direction === Direction.Horizontal ? \"row\" : \"column\",\n },\n ];\n\n if (direction !== Direction.Vertical) {\n _containerStyle.push({\n alignItems: \"center\",\n });\n }\n\n return (\n <View style={[{ minHeight: 40 }, style]} {...rest}>\n <Provider\n value={{\n value: internalValue,\n onValueChange: handleValueChange,\n direction,\n }}\n >\n <View style={_containerStyle}>{children}</View>\n </Provider>\n </View>\n );\n};\n\nexport default RadioButtonGroup;\n"]}
|
|
@@ -25,7 +25,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
25
25
|
|
|
26
26
|
const Surface = _ref => {
|
|
27
27
|
let {
|
|
28
|
-
elevation,
|
|
28
|
+
elevation: propElevation,
|
|
29
29
|
style,
|
|
30
30
|
theme,
|
|
31
31
|
children,
|
|
@@ -33,21 +33,33 @@ const Surface = _ref => {
|
|
|
33
33
|
} = _ref;
|
|
34
34
|
const {
|
|
35
35
|
elevation: styleElevation = 3,
|
|
36
|
-
borderRadius
|
|
36
|
+
borderRadius,
|
|
37
|
+
overflow,
|
|
38
|
+
height,
|
|
39
|
+
width
|
|
37
40
|
} = _reactNative.StyleSheet.flatten(style) || {};
|
|
38
41
|
const {
|
|
39
42
|
dark: isDarkTheme,
|
|
40
43
|
mode,
|
|
41
44
|
colors
|
|
42
45
|
} = theme;
|
|
43
|
-
const
|
|
44
|
-
const
|
|
46
|
+
const elevation = propElevation || styleElevation;
|
|
47
|
+
const evalationStyles = elevation ? (0, _shadow.default)(elevation) : {};
|
|
45
48
|
return /*#__PURE__*/React.createElement(_reactNative.Animated.View, _extends({}, rest, {
|
|
49
|
+
style: [style, {
|
|
50
|
+
backgroundColor: isDarkTheme && mode === "adaptive" ? (0, _overlay.default)(elevation, colors.surface) : colors.surface,
|
|
51
|
+
overflow: _reactNative.Platform.OS === "web" ? "hidden" : "visible",
|
|
52
|
+
elevation,
|
|
53
|
+
...evalationStyles
|
|
54
|
+
}]
|
|
55
|
+
}), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
46
56
|
style: [{
|
|
57
|
+
overflow,
|
|
47
58
|
borderRadius,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
59
|
+
height,
|
|
60
|
+
width
|
|
61
|
+
}]
|
|
62
|
+
}, children));
|
|
51
63
|
};
|
|
52
64
|
|
|
53
65
|
var _default = (0, _theming.withTheme)(Surface);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Surface.tsx"],"names":["Surface","elevation","style","theme","children","rest","styleElevation","borderRadius","
|
|
1
|
+
{"version":3,"sources":["Surface.tsx"],"names":["Surface","elevation","propElevation","style","theme","children","rest","styleElevation","borderRadius","overflow","height","width","StyleSheet","flatten","dark","isDarkTheme","mode","colors","evalationStyles","backgroundColor","surface","Platform","OS"],"mappings":";;;;;;;AACA;;AACA;;AASA;;AACA;;AACA;;;;;;;;;;AASA,MAAMA,OAAwB,GAAG,QAM3B;AAAA,MAN4B;AAChCC,IAAAA,SAAS,EAAEC,aADqB;AAEhCC,IAAAA,KAFgC;AAGhCC,IAAAA,KAHgC;AAIhCC,IAAAA,QAJgC;AAKhC,OAAGC;AAL6B,GAM5B;AACJ,QAAM;AACJL,IAAAA,SAAS,EAAEM,cAAc,GAAG,CADxB;AAEJC,IAAAA,YAFI;AAGJC,IAAAA,QAHI;AAIJC,IAAAA,MAJI;AAKJC,IAAAA;AALI,MAMDC,wBAAWC,OAAX,CAAmBV,KAAnB,KAA6B,EANlC;AAQA,QAAM;AAAEW,IAAAA,IAAI,EAAEC,WAAR;AAAqBC,IAAAA,IAArB;AAA2BC,IAAAA;AAA3B,MAAsCb,KAA5C;AAEA,QAAMH,SAAS,GAAGC,aAAa,IAAIK,cAAnC;AAEA,QAAMW,eAAe,GAAGjB,SAAS,GAAG,qBAAOA,SAAP,CAAH,GAAuB,EAAxD;AAEA,sBACE,oBAAC,qBAAD,CAAU,IAAV,eACMK,IADN;AAEE,IAAA,KAAK,EAAE,CACLH,KADK,EAEL;AACEgB,MAAAA,eAAe,EACbJ,WAAW,IAAIC,IAAI,KAAK,UAAxB,GACI,sBAAQf,SAAR,EAAmBgB,MAAM,CAACG,OAA1B,CADJ,GAEIH,MAAM,CAACG,OAJf;AAKEX,MAAAA,QAAQ,EAAEY,sBAASC,EAAT,KAAgB,KAAhB,GAAwB,QAAxB,GAAmC,SAL/C;AAMErB,MAAAA,SANF;AAOE,SAAGiB;AAPL,KAFK;AAFT,mBAeE,oBAAC,iBAAD;AACE,IAAA,KAAK,EAAE,CACL;AACET,MAAAA,QADF;AAEED,MAAAA,YAFF;AAGEE,MAAAA,MAHF;AAIEC,MAAAA;AAJF,KADK;AADT,KAUGN,QAVH,CAfF,CADF;AA8BD,CAnDD;;eAqDe,wBAAUL,OAAV,C","sourcesContent":["/* Copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx */\nimport * as React from \"react\";\nimport {\n Animated,\n StyleSheet,\n ViewProps,\n StyleProp,\n ViewStyle,\n View,\n Platform,\n} from \"react-native\";\nimport shadow from \"../styles/shadow\";\nimport overlay from \"../styles/overlay\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\n\ntype Props = {\n elevation?: number;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & ViewProps;\n\nconst Surface: React.FC<Props> = ({\n elevation: propElevation,\n style,\n theme,\n children,\n ...rest\n}) => {\n const {\n elevation: styleElevation = 3,\n borderRadius,\n overflow,\n height,\n width,\n } = (StyleSheet.flatten(style) || {}) as ViewStyle;\n\n const { dark: isDarkTheme, mode, colors } = theme;\n\n const elevation = propElevation || styleElevation;\n\n const evalationStyles = elevation ? shadow(elevation) : {};\n\n return (\n <Animated.View\n {...rest}\n style={[\n style,\n {\n backgroundColor:\n isDarkTheme && mode === \"adaptive\"\n ? overlay(elevation, colors.surface)\n : colors.surface,\n overflow: Platform.OS === \"web\" ? \"hidden\" : \"visible\",\n elevation,\n ...evalationStyles,\n },\n ]}\n >\n <View\n style={[\n {\n overflow,\n borderRadius,\n height,\n width,\n },\n ]}\n >\n {children}\n </View>\n </Animated.View>\n );\n};\n\nexport default withTheme(Surface);\n"]}
|
|
@@ -13,19 +13,23 @@ const RadioButtonGroup = _ref => {
|
|
|
13
13
|
direction = Direction.Vertical,
|
|
14
14
|
value = "",
|
|
15
15
|
onValueChange,
|
|
16
|
-
defaultValue
|
|
16
|
+
defaultValue,
|
|
17
17
|
style,
|
|
18
18
|
children,
|
|
19
19
|
...rest
|
|
20
20
|
} = _ref;
|
|
21
21
|
const [internalValue, setInternalValue] = React.useState("");
|
|
22
22
|
React.useEffect(() => {
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
if (value != null) {
|
|
24
|
+
const realValue = getValueForRadioButton(value);
|
|
25
|
+
setInternalValue(realValue);
|
|
26
|
+
}
|
|
25
27
|
}, [value]);
|
|
26
28
|
React.useEffect(() => {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
if (defaultValue != null) {
|
|
30
|
+
const realDefaultValue = getValueForRadioButton(defaultValue);
|
|
31
|
+
setInternalValue(realDefaultValue);
|
|
32
|
+
}
|
|
29
33
|
}, [defaultValue]);
|
|
30
34
|
|
|
31
35
|
const handleValueChange = newValue => {
|
|
@@ -50,7 +54,7 @@ const RadioButtonGroup = _ref => {
|
|
|
50
54
|
}, style]
|
|
51
55
|
}, rest), /*#__PURE__*/React.createElement(Provider, {
|
|
52
56
|
value: {
|
|
53
|
-
value: internalValue
|
|
57
|
+
value: internalValue,
|
|
54
58
|
onValueChange: handleValueChange,
|
|
55
59
|
direction
|
|
56
60
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["RadioButtonGroup.tsx"],"names":["React","View","getValueForRadioButton","radioButtonGroupContext","Direction","Provider","RadioButtonGroup","direction","Vertical","value","onValueChange","defaultValue","style","children","rest","internalValue","setInternalValue","useState","useEffect","realValue","realDefaultValue","handleValueChange","newValue","realNewValue","_containerStyle","flexDirection","Horizontal","push","alignItems","minHeight"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAT,QAA2C,cAA3C;AAEA,SAASC,sBAAT,QAAuC,iBAAvC;AACA,SAASC,uBAAT,EAAkCC,SAAlC,QAAmD,WAAnD;AAWA,MAAM;AAAEC,EAAAA;AAAF,IAAeF,uBAArB;;AAEA,MAAMG,gBAAiD,GAAG,QAQpD;AAAA,MARqD;AACzDC,IAAAA,SAAS,GAAGH,SAAS,CAACI,QADmC;AAEzDC,IAAAA,KAAK,GAAG,EAFiD;AAGzDC,IAAAA,aAHyD;AAIzDC,IAAAA,
|
|
1
|
+
{"version":3,"sources":["RadioButtonGroup.tsx"],"names":["React","View","getValueForRadioButton","radioButtonGroupContext","Direction","Provider","RadioButtonGroup","direction","Vertical","value","onValueChange","defaultValue","style","children","rest","internalValue","setInternalValue","useState","useEffect","realValue","realDefaultValue","handleValueChange","newValue","realNewValue","_containerStyle","flexDirection","Horizontal","push","alignItems","minHeight"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAT,QAA2C,cAA3C;AAEA,SAASC,sBAAT,QAAuC,iBAAvC;AACA,SAASC,uBAAT,EAAkCC,SAAlC,QAAmD,WAAnD;AAWA,MAAM;AAAEC,EAAAA;AAAF,IAAeF,uBAArB;;AAEA,MAAMG,gBAAiD,GAAG,QAQpD;AAAA,MARqD;AACzDC,IAAAA,SAAS,GAAGH,SAAS,CAACI,QADmC;AAEzDC,IAAAA,KAAK,GAAG,EAFiD;AAGzDC,IAAAA,aAHyD;AAIzDC,IAAAA,YAJyD;AAKzDC,IAAAA,KALyD;AAMzDC,IAAAA,QANyD;AAOzD,OAAGC;AAPsD,GAQrD;AACJ,QAAM,CAACC,aAAD,EAAgBC,gBAAhB,IAAoChB,KAAK,CAACiB,QAAN,CAAe,EAAf,CAA1C;AAEAjB,EAAAA,KAAK,CAACkB,SAAN,CAAgB,MAAM;AACpB,QAAIT,KAAK,IAAI,IAAb,EAAmB;AACjB,YAAMU,SAAS,GAAGjB,sBAAsB,CAACO,KAAD,CAAxC;AAEAO,MAAAA,gBAAgB,CAACG,SAAD,CAAhB;AACD;AACF,GAND,EAMG,CAACV,KAAD,CANH;AAQAT,EAAAA,KAAK,CAACkB,SAAN,CAAgB,MAAM;AACpB,QAAIP,YAAY,IAAI,IAApB,EAA0B;AACxB,YAAMS,gBAAgB,GAAGlB,sBAAsB,CAACS,YAAD,CAA/C;AAEAK,MAAAA,gBAAgB,CAACI,gBAAD,CAAhB;AACD;AACF,GAND,EAMG,CAACT,YAAD,CANH;;AAQA,QAAMU,iBAAiB,GAAIC,QAAD,IAA+B;AACvD,UAAMC,YAAY,GAAGrB,sBAAsB,CAACoB,QAAD,CAA3C;AAEAN,IAAAA,gBAAgB,CAACO,YAAD,CAAhB;AACAb,IAAAA,aAAa,SAAb,IAAAA,aAAa,WAAb,YAAAA,aAAa,CAAGa,YAAH,CAAb;AACD,GALD;;AAOA,QAAMC,eAAqC,GAAG,CAC5C;AACEC,IAAAA,aAAa,EAAElB,SAAS,KAAKH,SAAS,CAACsB,UAAxB,GAAqC,KAArC,GAA6C;AAD9D,GAD4C,CAA9C;;AAMA,MAAInB,SAAS,KAAKH,SAAS,CAACI,QAA5B,EAAsC;AACpCgB,IAAAA,eAAe,CAACG,IAAhB,CAAqB;AACnBC,MAAAA,UAAU,EAAE;AADO,KAArB;AAGD;;AAED,sBACE,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,SAAS,EAAE;AAAb,KAAD,EAAoBjB,KAApB;AAAb,KAA6CE,IAA7C,gBACE,oBAAC,QAAD;AACE,IAAA,KAAK,EAAE;AACLL,MAAAA,KAAK,EAAEM,aADF;AAELL,MAAAA,aAAa,EAAEW,iBAFV;AAGLd,MAAAA;AAHK;AADT,kBAOE,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAEiB;AAAb,KAA+BX,QAA/B,CAPF,CADF,CADF;AAaD,CA3DD;;AA6DA,eAAeP,gBAAf","sourcesContent":["import * as React from \"react\";\nimport { View, StyleProp, ViewStyle } from \"react-native\";\nimport type { Theme } from \"../../styles/DefaultTheme\";\nimport { getValueForRadioButton } from \"../../utilities\";\nimport { radioButtonGroupContext, Direction } from \"./context\";\nexport interface RadioButtonGroupProps {\n direction?: Direction;\n style?: StyleProp<ViewStyle>;\n value: string | number;\n onValueChange?: (value: string) => void;\n defaultValue?: string | number;\n theme: Theme;\n children: React.ReactNode;\n}\n\nconst { Provider } = radioButtonGroupContext;\n\nconst RadioButtonGroup: React.FC<RadioButtonGroupProps> = ({\n direction = Direction.Vertical,\n value = \"\",\n onValueChange,\n defaultValue,\n style,\n children,\n ...rest\n}) => {\n const [internalValue, setInternalValue] = React.useState(\"\");\n\n React.useEffect(() => {\n if (value != null) {\n const realValue = getValueForRadioButton(value);\n\n setInternalValue(realValue);\n }\n }, [value]);\n\n React.useEffect(() => {\n if (defaultValue != null) {\n const realDefaultValue = getValueForRadioButton(defaultValue);\n\n setInternalValue(realDefaultValue);\n }\n }, [defaultValue]);\n\n const handleValueChange = (newValue: string | number) => {\n const realNewValue = getValueForRadioButton(newValue);\n\n setInternalValue(realNewValue);\n onValueChange?.(realNewValue);\n };\n\n const _containerStyle: StyleProp<ViewStyle> = [\n {\n flexDirection: direction === Direction.Horizontal ? \"row\" : \"column\",\n },\n ];\n\n if (direction !== Direction.Vertical) {\n _containerStyle.push({\n alignItems: \"center\",\n });\n }\n\n return (\n <View style={[{ minHeight: 40 }, style]} {...rest}>\n <Provider\n value={{\n value: internalValue,\n onValueChange: handleValueChange,\n direction,\n }}\n >\n <View style={_containerStyle}>{children}</View>\n </Provider>\n </View>\n );\n};\n\nexport default RadioButtonGroup;\n"]}
|
|
@@ -2,14 +2,14 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
2
2
|
|
|
3
3
|
/* Copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx */
|
|
4
4
|
import * as React from "react";
|
|
5
|
-
import { Animated, StyleSheet } from "react-native";
|
|
5
|
+
import { Animated, StyleSheet, View, Platform } from "react-native";
|
|
6
6
|
import shadow from "../styles/shadow";
|
|
7
7
|
import overlay from "../styles/overlay";
|
|
8
8
|
import { withTheme } from "../theming";
|
|
9
9
|
|
|
10
10
|
const Surface = _ref => {
|
|
11
11
|
let {
|
|
12
|
-
elevation,
|
|
12
|
+
elevation: propElevation,
|
|
13
13
|
style,
|
|
14
14
|
theme,
|
|
15
15
|
children,
|
|
@@ -17,21 +17,33 @@ const Surface = _ref => {
|
|
|
17
17
|
} = _ref;
|
|
18
18
|
const {
|
|
19
19
|
elevation: styleElevation = 3,
|
|
20
|
-
borderRadius
|
|
20
|
+
borderRadius,
|
|
21
|
+
overflow,
|
|
22
|
+
height,
|
|
23
|
+
width
|
|
21
24
|
} = StyleSheet.flatten(style) || {};
|
|
22
25
|
const {
|
|
23
26
|
dark: isDarkTheme,
|
|
24
27
|
mode,
|
|
25
28
|
colors
|
|
26
29
|
} = theme;
|
|
27
|
-
const
|
|
28
|
-
const
|
|
30
|
+
const elevation = propElevation || styleElevation;
|
|
31
|
+
const evalationStyles = elevation ? shadow(elevation) : {};
|
|
29
32
|
return /*#__PURE__*/React.createElement(Animated.View, _extends({}, rest, {
|
|
33
|
+
style: [style, {
|
|
34
|
+
backgroundColor: isDarkTheme && mode === "adaptive" ? overlay(elevation, colors.surface) : colors.surface,
|
|
35
|
+
overflow: Platform.OS === "web" ? "hidden" : "visible",
|
|
36
|
+
elevation,
|
|
37
|
+
...evalationStyles
|
|
38
|
+
}]
|
|
39
|
+
}), /*#__PURE__*/React.createElement(View, {
|
|
30
40
|
style: [{
|
|
41
|
+
overflow,
|
|
31
42
|
borderRadius,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
43
|
+
height,
|
|
44
|
+
width
|
|
45
|
+
}]
|
|
46
|
+
}, children));
|
|
35
47
|
};
|
|
36
48
|
|
|
37
49
|
export default withTheme(Surface);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Surface.tsx"],"names":["React","Animated","StyleSheet","shadow","overlay","withTheme","Surface","elevation","style","theme","children","rest","styleElevation","borderRadius","
|
|
1
|
+
{"version":3,"sources":["Surface.tsx"],"names":["React","Animated","StyleSheet","View","Platform","shadow","overlay","withTheme","Surface","elevation","propElevation","style","theme","children","rest","styleElevation","borderRadius","overflow","height","width","flatten","dark","isDarkTheme","mode","colors","evalationStyles","backgroundColor","surface","OS"],"mappings":";;AAAA;AACA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SACEC,QADF,EAEEC,UAFF,EAMEC,IANF,EAOEC,QAPF,QAQO,cARP;AASA,OAAOC,MAAP,MAAmB,kBAAnB;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,SAASC,SAAT,QAA0B,YAA1B;;AASA,MAAMC,OAAwB,GAAG,QAM3B;AAAA,MAN4B;AAChCC,IAAAA,SAAS,EAAEC,aADqB;AAEhCC,IAAAA,KAFgC;AAGhCC,IAAAA,KAHgC;AAIhCC,IAAAA,QAJgC;AAKhC,OAAGC;AAL6B,GAM5B;AACJ,QAAM;AACJL,IAAAA,SAAS,EAAEM,cAAc,GAAG,CADxB;AAEJC,IAAAA,YAFI;AAGJC,IAAAA,QAHI;AAIJC,IAAAA,MAJI;AAKJC,IAAAA;AALI,MAMDjB,UAAU,CAACkB,OAAX,CAAmBT,KAAnB,KAA6B,EANlC;AAQA,QAAM;AAAEU,IAAAA,IAAI,EAAEC,WAAR;AAAqBC,IAAAA,IAArB;AAA2BC,IAAAA;AAA3B,MAAsCZ,KAA5C;AAEA,QAAMH,SAAS,GAAGC,aAAa,IAAIK,cAAnC;AAEA,QAAMU,eAAe,GAAGhB,SAAS,GAAGJ,MAAM,CAACI,SAAD,CAAT,GAAuB,EAAxD;AAEA,sBACE,oBAAC,QAAD,CAAU,IAAV,eACMK,IADN;AAEE,IAAA,KAAK,EAAE,CACLH,KADK,EAEL;AACEe,MAAAA,eAAe,EACbJ,WAAW,IAAIC,IAAI,KAAK,UAAxB,GACIjB,OAAO,CAACG,SAAD,EAAYe,MAAM,CAACG,OAAnB,CADX,GAEIH,MAAM,CAACG,OAJf;AAKEV,MAAAA,QAAQ,EAAEb,QAAQ,CAACwB,EAAT,KAAgB,KAAhB,GAAwB,QAAxB,GAAmC,SAL/C;AAMEnB,MAAAA,SANF;AAOE,SAAGgB;AAPL,KAFK;AAFT,mBAeE,oBAAC,IAAD;AACE,IAAA,KAAK,EAAE,CACL;AACER,MAAAA,QADF;AAEED,MAAAA,YAFF;AAGEE,MAAAA,MAHF;AAIEC,MAAAA;AAJF,KADK;AADT,KAUGN,QAVH,CAfF,CADF;AA8BD,CAnDD;;AAqDA,eAAeN,SAAS,CAACC,OAAD,CAAxB","sourcesContent":["/* Copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx */\nimport * as React from \"react\";\nimport {\n Animated,\n StyleSheet,\n ViewProps,\n StyleProp,\n ViewStyle,\n View,\n Platform,\n} from \"react-native\";\nimport shadow from \"../styles/shadow\";\nimport overlay from \"../styles/overlay\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\n\ntype Props = {\n elevation?: number;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & ViewProps;\n\nconst Surface: React.FC<Props> = ({\n elevation: propElevation,\n style,\n theme,\n children,\n ...rest\n}) => {\n const {\n elevation: styleElevation = 3,\n borderRadius,\n overflow,\n height,\n width,\n } = (StyleSheet.flatten(style) || {}) as ViewStyle;\n\n const { dark: isDarkTheme, mode, colors } = theme;\n\n const elevation = propElevation || styleElevation;\n\n const evalationStyles = elevation ? shadow(elevation) : {};\n\n return (\n <Animated.View\n {...rest}\n style={[\n style,\n {\n backgroundColor:\n isDarkTheme && mode === \"adaptive\"\n ? overlay(elevation, colors.surface)\n : colors.surface,\n overflow: Platform.OS === \"web\" ? \"hidden\" : \"visible\",\n elevation,\n ...evalationStyles,\n },\n ]}\n >\n <View\n style={[\n {\n overflow,\n borderRadius,\n height,\n width,\n },\n ]}\n >\n {children}\n </View>\n </Animated.View>\n );\n};\n\nexport default withTheme(Surface);\n"]}
|
|
@@ -5,7 +5,7 @@ import { Direction } from "./context";
|
|
|
5
5
|
export interface RadioButtonGroupProps {
|
|
6
6
|
direction?: Direction;
|
|
7
7
|
style?: StyleProp<ViewStyle>;
|
|
8
|
-
value: string;
|
|
8
|
+
value: string | number;
|
|
9
9
|
onValueChange?: (value: string) => void;
|
|
10
10
|
defaultValue?: string | number;
|
|
11
11
|
theme: Theme;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "43.4.
|
|
3
|
+
"version": "43.4.15-21e84b.0+21e84b08",
|
|
4
4
|
"description": "Core (non-native) Components",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
]
|
|
81
81
|
]
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "21e84b08135a14b8335ab36292f48ad7db3aac60"
|
|
84
84
|
}
|
|
@@ -3,15 +3,19 @@ import { View } from "react-native";
|
|
|
3
3
|
import { getValueForRadioButton } from "../../utilities";
|
|
4
4
|
import { radioButtonGroupContext, Direction } from "./context";
|
|
5
5
|
const { Provider } = radioButtonGroupContext;
|
|
6
|
-
const RadioButtonGroup = ({ direction = Direction.Vertical, value = "", onValueChange, defaultValue
|
|
6
|
+
const RadioButtonGroup = ({ direction = Direction.Vertical, value = "", onValueChange, defaultValue, style, children, ...rest }) => {
|
|
7
7
|
const [internalValue, setInternalValue] = React.useState("");
|
|
8
8
|
React.useEffect(() => {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
if (value != null) {
|
|
10
|
+
const realValue = getValueForRadioButton(value);
|
|
11
|
+
setInternalValue(realValue);
|
|
12
|
+
}
|
|
11
13
|
}, [value]);
|
|
12
14
|
React.useEffect(() => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
if (defaultValue != null) {
|
|
16
|
+
const realDefaultValue = getValueForRadioButton(defaultValue);
|
|
17
|
+
setInternalValue(realDefaultValue);
|
|
18
|
+
}
|
|
15
19
|
}, [defaultValue]);
|
|
16
20
|
const handleValueChange = (newValue) => {
|
|
17
21
|
const realNewValue = getValueForRadioButton(newValue);
|
|
@@ -30,7 +34,7 @@ const RadioButtonGroup = ({ direction = Direction.Vertical, value = "", onValueC
|
|
|
30
34
|
}
|
|
31
35
|
return (React.createElement(View, { style: [{ minHeight: 40 }, style], ...rest },
|
|
32
36
|
React.createElement(Provider, { value: {
|
|
33
|
-
value: internalValue
|
|
37
|
+
value: internalValue,
|
|
34
38
|
onValueChange: handleValueChange,
|
|
35
39
|
direction,
|
|
36
40
|
} },
|
|
@@ -6,7 +6,7 @@ import { radioButtonGroupContext, Direction } from "./context";
|
|
|
6
6
|
export interface RadioButtonGroupProps {
|
|
7
7
|
direction?: Direction;
|
|
8
8
|
style?: StyleProp<ViewStyle>;
|
|
9
|
-
value: string;
|
|
9
|
+
value: string | number;
|
|
10
10
|
onValueChange?: (value: string) => void;
|
|
11
11
|
defaultValue?: string | number;
|
|
12
12
|
theme: Theme;
|
|
@@ -19,23 +19,27 @@ const RadioButtonGroup: React.FC<RadioButtonGroupProps> = ({
|
|
|
19
19
|
direction = Direction.Vertical,
|
|
20
20
|
value = "",
|
|
21
21
|
onValueChange,
|
|
22
|
-
defaultValue
|
|
22
|
+
defaultValue,
|
|
23
23
|
style,
|
|
24
24
|
children,
|
|
25
25
|
...rest
|
|
26
26
|
}) => {
|
|
27
|
-
const [internalValue, setInternalValue] = React.useState
|
|
27
|
+
const [internalValue, setInternalValue] = React.useState("");
|
|
28
28
|
|
|
29
29
|
React.useEffect(() => {
|
|
30
|
-
|
|
30
|
+
if (value != null) {
|
|
31
|
+
const realValue = getValueForRadioButton(value);
|
|
31
32
|
|
|
32
|
-
|
|
33
|
+
setInternalValue(realValue);
|
|
34
|
+
}
|
|
33
35
|
}, [value]);
|
|
34
36
|
|
|
35
37
|
React.useEffect(() => {
|
|
36
|
-
|
|
38
|
+
if (defaultValue != null) {
|
|
39
|
+
const realDefaultValue = getValueForRadioButton(defaultValue);
|
|
37
40
|
|
|
38
|
-
|
|
41
|
+
setInternalValue(realDefaultValue);
|
|
42
|
+
}
|
|
39
43
|
}, [defaultValue]);
|
|
40
44
|
|
|
41
45
|
const handleValueChange = (newValue: string | number) => {
|
|
@@ -61,7 +65,7 @@ const RadioButtonGroup: React.FC<RadioButtonGroupProps> = ({
|
|
|
61
65
|
<View style={[{ minHeight: 40 }, style]} {...rest}>
|
|
62
66
|
<Provider
|
|
63
67
|
value={{
|
|
64
|
-
value: internalValue
|
|
68
|
+
value: internalValue,
|
|
65
69
|
onValueChange: handleValueChange,
|
|
66
70
|
direction,
|
|
67
71
|
}}
|
|
@@ -1,23 +1,32 @@
|
|
|
1
1
|
/* Copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx */
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import { Animated, StyleSheet, } from "react-native";
|
|
3
|
+
import { Animated, StyleSheet, View, Platform, } from "react-native";
|
|
4
4
|
import shadow from "../styles/shadow";
|
|
5
5
|
import overlay from "../styles/overlay";
|
|
6
6
|
import { withTheme } from "../theming";
|
|
7
|
-
const Surface = ({ elevation, style, theme, children, ...rest }) => {
|
|
8
|
-
const { elevation: styleElevation = 3, borderRadius
|
|
7
|
+
const Surface = ({ elevation: propElevation, style, theme, children, ...rest }) => {
|
|
8
|
+
const { elevation: styleElevation = 3, borderRadius, overflow, height, width, } = (StyleSheet.flatten(style) || {});
|
|
9
9
|
const { dark: isDarkTheme, mode, colors } = theme;
|
|
10
|
-
const
|
|
11
|
-
const
|
|
10
|
+
const elevation = propElevation || styleElevation;
|
|
11
|
+
const evalationStyles = elevation ? shadow(elevation) : {};
|
|
12
12
|
return (React.createElement(Animated.View, { ...rest, style: [
|
|
13
|
+
style,
|
|
13
14
|
{
|
|
14
|
-
borderRadius,
|
|
15
15
|
backgroundColor: isDarkTheme && mode === "adaptive"
|
|
16
|
-
? overlay(
|
|
16
|
+
? overlay(elevation, colors.surface)
|
|
17
17
|
: colors.surface,
|
|
18
|
+
overflow: Platform.OS === "web" ? "hidden" : "visible",
|
|
19
|
+
elevation,
|
|
20
|
+
...evalationStyles,
|
|
18
21
|
},
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
] },
|
|
23
|
+
React.createElement(View, { style: [
|
|
24
|
+
{
|
|
25
|
+
overflow,
|
|
26
|
+
borderRadius,
|
|
27
|
+
height,
|
|
28
|
+
width,
|
|
29
|
+
},
|
|
30
|
+
] }, children)));
|
|
22
31
|
};
|
|
23
32
|
export default withTheme(Surface);
|
|
@@ -6,6 +6,8 @@ import {
|
|
|
6
6
|
ViewProps,
|
|
7
7
|
StyleProp,
|
|
8
8
|
ViewStyle,
|
|
9
|
+
View,
|
|
10
|
+
Platform,
|
|
9
11
|
} from "react-native";
|
|
10
12
|
import shadow from "../styles/shadow";
|
|
11
13
|
import overlay from "../styles/overlay";
|
|
@@ -19,34 +21,54 @@ type Props = {
|
|
|
19
21
|
} & ViewProps;
|
|
20
22
|
|
|
21
23
|
const Surface: React.FC<Props> = ({
|
|
22
|
-
elevation,
|
|
24
|
+
elevation: propElevation,
|
|
23
25
|
style,
|
|
24
26
|
theme,
|
|
25
27
|
children,
|
|
26
28
|
...rest
|
|
27
29
|
}) => {
|
|
28
|
-
const {
|
|
29
|
-
|
|
30
|
+
const {
|
|
31
|
+
elevation: styleElevation = 3,
|
|
32
|
+
borderRadius,
|
|
33
|
+
overflow,
|
|
34
|
+
height,
|
|
35
|
+
width,
|
|
36
|
+
} = (StyleSheet.flatten(style) || {}) as ViewStyle;
|
|
37
|
+
|
|
30
38
|
const { dark: isDarkTheme, mode, colors } = theme;
|
|
31
|
-
|
|
32
|
-
const
|
|
39
|
+
|
|
40
|
+
const elevation = propElevation || styleElevation;
|
|
41
|
+
|
|
42
|
+
const evalationStyles = elevation ? shadow(elevation) : {};
|
|
33
43
|
|
|
34
44
|
return (
|
|
35
45
|
<Animated.View
|
|
36
46
|
{...rest}
|
|
37
47
|
style={[
|
|
48
|
+
style,
|
|
38
49
|
{
|
|
39
|
-
borderRadius,
|
|
40
50
|
backgroundColor:
|
|
41
51
|
isDarkTheme && mode === "adaptive"
|
|
42
|
-
? overlay(
|
|
52
|
+
? overlay(elevation, colors.surface)
|
|
43
53
|
: colors.surface,
|
|
54
|
+
overflow: Platform.OS === "web" ? "hidden" : "visible",
|
|
55
|
+
elevation,
|
|
56
|
+
...evalationStyles,
|
|
44
57
|
},
|
|
45
|
-
elevation ? shadow(elevation) : null,
|
|
46
|
-
style,
|
|
47
58
|
]}
|
|
48
59
|
>
|
|
49
|
-
|
|
60
|
+
<View
|
|
61
|
+
style={[
|
|
62
|
+
{
|
|
63
|
+
overflow,
|
|
64
|
+
borderRadius,
|
|
65
|
+
height,
|
|
66
|
+
width,
|
|
67
|
+
},
|
|
68
|
+
]}
|
|
69
|
+
>
|
|
70
|
+
{children}
|
|
71
|
+
</View>
|
|
50
72
|
</Animated.View>
|
|
51
73
|
);
|
|
52
74
|
};
|