@idealyst/components 1.2.47 → 1.2.49
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 +3 -3
- package/src/Dialog/Dialog.native.tsx +47 -48
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@idealyst/components",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.49",
|
|
4
4
|
"description": "Shared component library for React and React Native",
|
|
5
5
|
"documentation": "https://github.com/IdealystIO/idealyst-framework/tree/main/packages/components#readme",
|
|
6
6
|
"readme": "README.md",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"publish:npm": "npm publish"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@idealyst/theme": "^1.2.
|
|
59
|
+
"@idealyst/theme": "^1.2.49",
|
|
60
60
|
"@mdi/js": ">=7.0.0",
|
|
61
61
|
"@mdi/react": ">=1.0.0",
|
|
62
62
|
"@react-native-vector-icons/common": ">=12.0.0",
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
109
|
"@idealyst/blur": "^1.2.40",
|
|
110
|
-
"@idealyst/theme": "^1.2.
|
|
110
|
+
"@idealyst/theme": "^1.2.49",
|
|
111
111
|
"@idealyst/tooling": "^1.2.30",
|
|
112
112
|
"@mdi/react": "^1.6.1",
|
|
113
113
|
"@types/react": "^19.1.0",
|
|
@@ -147,48 +147,43 @@ const Dialog = forwardRef<View, DialogProps>(({
|
|
|
147
147
|
bottom: 0,
|
|
148
148
|
};
|
|
149
149
|
|
|
150
|
-
const
|
|
151
|
-
<
|
|
152
|
-
|
|
153
|
-
{
|
|
154
|
-
|
|
155
|
-
{
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
>
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
)}
|
|
170
|
-
</View>
|
|
171
|
-
)}
|
|
172
|
-
<View style={contentStyle}>
|
|
173
|
-
{children}
|
|
150
|
+
const dialogContent = (
|
|
151
|
+
<Animated.View ref={ref as any} style={[containerStyle, style, containerAnimatedStyle]} nativeID={id} {...nativeA11yProps}>
|
|
152
|
+
{(title || showCloseButton) && (
|
|
153
|
+
<View style={headerStyle}>
|
|
154
|
+
{title && (
|
|
155
|
+
<Text style={titleStyle}>
|
|
156
|
+
{title}
|
|
157
|
+
</Text>
|
|
158
|
+
)}
|
|
159
|
+
{showCloseButton && (
|
|
160
|
+
<TouchableOpacity
|
|
161
|
+
style={closeButtonStyle}
|
|
162
|
+
onPress={handleClosePress}
|
|
163
|
+
accessibilityLabel="Close dialog"
|
|
164
|
+
accessibilityRole="button"
|
|
165
|
+
>
|
|
166
|
+
<Text style={closeButtonTextStyle}>×</Text>
|
|
167
|
+
</TouchableOpacity>
|
|
168
|
+
)}
|
|
174
169
|
</View>
|
|
175
|
-
|
|
176
|
-
|
|
170
|
+
)}
|
|
171
|
+
<View style={contentStyle}>
|
|
172
|
+
{children}
|
|
173
|
+
</View>
|
|
174
|
+
</Animated.View>
|
|
177
175
|
);
|
|
178
176
|
|
|
179
|
-
const
|
|
180
|
-
<TouchableWithoutFeedback onPress={
|
|
181
|
-
{
|
|
182
|
-
<
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
</View>
|
|
177
|
+
const dialogContainer = (
|
|
178
|
+
<TouchableWithoutFeedback onPress={(e: GestureResponderEvent) => e.stopPropagation()}>
|
|
179
|
+
{avoidKeyboard ? (
|
|
180
|
+
<KeyboardAvoidingView
|
|
181
|
+
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
|
182
|
+
>
|
|
183
|
+
{dialogContent}
|
|
184
|
+
</KeyboardAvoidingView>
|
|
188
185
|
) : (
|
|
189
|
-
|
|
190
|
-
{dialogContainer}
|
|
191
|
-
</Animated.View>
|
|
186
|
+
dialogContent
|
|
192
187
|
)}
|
|
193
188
|
</TouchableWithoutFeedback>
|
|
194
189
|
);
|
|
@@ -202,16 +197,20 @@ const Dialog = forwardRef<View, DialogProps>(({
|
|
|
202
197
|
statusBarTranslucent
|
|
203
198
|
testID={testID}
|
|
204
199
|
>
|
|
205
|
-
{
|
|
206
|
-
|
|
207
|
-
style={
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
200
|
+
<TouchableWithoutFeedback onPress={handleBackdropPress}>
|
|
201
|
+
{BackdropComponent ? (
|
|
202
|
+
<View style={customBackdropWrapperStyle}>
|
|
203
|
+
<Animated.View style={[customBackdropContainerStyle, backdropAnimatedStyle]}>
|
|
204
|
+
<BackdropComponent isVisible={open} />
|
|
205
|
+
</Animated.View>
|
|
206
|
+
{dialogContainer}
|
|
207
|
+
</View>
|
|
208
|
+
) : (
|
|
209
|
+
<Animated.View style={[backdropStyle, backdropAnimatedStyle]}>
|
|
210
|
+
{dialogContainer}
|
|
211
|
+
</Animated.View>
|
|
212
|
+
)}
|
|
213
|
+
</TouchableWithoutFeedback>
|
|
215
214
|
</Modal>
|
|
216
215
|
);
|
|
217
216
|
});
|