@fto-consult/expo-ui 6.67.4 → 6.67.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
@@ -1103,29 +1103,27 @@ class DropdownComponent extends AppComponent {
|
|
1103
1103
|
self.selectItem({value,valueKey,select:!multiple?true:select});
|
1104
1104
|
};
|
1105
1105
|
return (
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
<TouchableRipple
|
1113
|
-
testID={testID+"Container"}
|
1114
|
-
style={{
|
1115
|
-
flexDirection: "row",
|
1116
|
-
height : '100%',
|
1117
|
-
fontWeight : _isSelected ? 'bold' : 'normal',
|
1118
|
-
alignItems: "center",
|
1119
|
-
}}
|
1106
|
+
<>
|
1107
|
+
<Tooltip key={key}
|
1108
|
+
title = {content}
|
1109
|
+
testID = {testID+"_DropdownTooltipContainer"}
|
1110
|
+
//style = {[[theme.styles.h100]]}
|
1111
|
+
tooltipProps = {{style:[theme.styles.h100,theme.styles.w100],testID:testID+"_DropdownTooltipPopoverContainer"}}
|
1120
1112
|
onPress={onItemPress}
|
1113
|
+
Component={TouchableRipple}
|
1114
|
+
//testID={testID+"Container"}
|
1115
|
+
style={[
|
1116
|
+
styles.itemContainer,{minHeight:!isBigList?MIN_HEIGHT:undefined},
|
1117
|
+
_isSelected && styles.itemContainerBold
|
1118
|
+
]}
|
1121
1119
|
>
|
1122
|
-
|
1120
|
+
<>
|
1123
1121
|
{_isSelected ? <Icon onPress={onItemPress} name={isNonNullString(checkedIcon)?checkedIcon : (multiple || _isIos?"check":'radiobox-marked')} style={[styles.checkedIcon]} color={selectedColor} /> : null}
|
1124
1122
|
{content}
|
1125
|
-
|
1126
|
-
|
1127
|
-
|
1128
|
-
|
1123
|
+
</>
|
1124
|
+
</Tooltip>
|
1125
|
+
<Divider disabled={isDisabled}/>
|
1126
|
+
</>
|
1129
1127
|
)}}
|
1130
1128
|
/>
|
1131
1129
|
</View>
|
@@ -1151,6 +1149,10 @@ const styles = StyleSheet.create({
|
|
1151
1149
|
flex : 1,
|
1152
1150
|
alignItems : 'center',
|
1153
1151
|
paddingHorizontal : 8,
|
1152
|
+
fontWeight : "normal",
|
1153
|
+
},
|
1154
|
+
itemContainerBold : {
|
1155
|
+
fontWeight : "bold",
|
1154
1156
|
},
|
1155
1157
|
left : {
|
1156
1158
|
paddingHorizontal:0,
|
@@ -7,9 +7,10 @@ import Label from "$ecomponents/Label";
|
|
7
7
|
import { TIPPY_THEME } from '$theme/updateNative/utils';
|
8
8
|
import {isDOMElement} from "$cutils/dom";
|
9
9
|
import {uniqid,defaultStr,defaultObj} from "$cutils";
|
10
|
+
import {Pressable} from "react-native";
|
10
11
|
|
11
|
-
const TippyTooltipComponent = React.forwardRef((
|
12
|
-
|
12
|
+
const TippyTooltipComponent = React.forwardRef(({children,onPress,onPressOut,content,onPressIn,onLongPress,testID,...rest},ref)=>{
|
13
|
+
const hasPress = onPress || onPressOut || onPressIn || onLongPress;
|
13
14
|
testID = defaultStr(testID,"RN_TooltipPopoverComponent")
|
14
15
|
const instanceIdRef = React.useRef(uniqid("tippy-instance-id"));
|
15
16
|
const buttonRef = React.useRef(null);
|
@@ -46,12 +47,21 @@ const TippyTooltipComponent = React.forwardRef((props,ref)=>{
|
|
46
47
|
...defaultObj(rest),
|
47
48
|
id:instanceIdRef.current,
|
48
49
|
}
|
49
|
-
|
50
|
-
|
50
|
+
const isChildF = typeof children =='function';
|
51
|
+
children = isChildF ? children(cProps,innerRef) : children;
|
52
|
+
if(!hasPress){
|
53
|
+
if(isChildF) return children;
|
54
|
+
return <Label {...cProps} testID={testID} ref={innerRef}>
|
55
|
+
{children}
|
56
|
+
</Label>
|
51
57
|
}
|
52
|
-
|
58
|
+
if(!React.isValidElement(children)){
|
59
|
+
return null;
|
60
|
+
}
|
61
|
+
return <Pressable {...{onPress,onLongPress,onPressIn,onPressOut}} {...cProps} testID={testID} ref={innerRef}>
|
53
62
|
{children}
|
54
|
-
</
|
63
|
+
</Pressable>
|
64
|
+
return
|
55
65
|
});
|
56
66
|
TippyTooltipComponent.propTypes = {
|
57
67
|
content: PropTypes.any, //le contenu du tooltip
|