@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idealyst/components",
3
- "version": "1.2.47",
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.47",
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.47",
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 dialogContainer = (
151
- <TouchableWithoutFeedback onPress={(e: GestureResponderEvent) => e.stopPropagation()}>
152
- <Animated.View ref={ref as any} style={[containerStyle, style, containerAnimatedStyle]} nativeID={id} {...nativeA11yProps}>
153
- {(title || showCloseButton) && (
154
- <View style={headerStyle}>
155
- {title && (
156
- <Text style={titleStyle}>
157
- {title}
158
- </Text>
159
- )}
160
- {showCloseButton && (
161
- <TouchableOpacity
162
- style={closeButtonStyle}
163
- onPress={handleClosePress}
164
- accessibilityLabel="Close dialog"
165
- accessibilityRole="button"
166
- >
167
- <Text style={closeButtonTextStyle}>×</Text>
168
- </TouchableOpacity>
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
- </Animated.View>
176
- </TouchableWithoutFeedback>
170
+ )}
171
+ <View style={contentStyle}>
172
+ {children}
173
+ </View>
174
+ </Animated.View>
177
175
  );
178
176
 
179
- const modalContent = (
180
- <TouchableWithoutFeedback onPress={handleBackdropPress}>
181
- {BackdropComponent ? (
182
- <View style={customBackdropWrapperStyle}>
183
- <Animated.View style={[customBackdropContainerStyle, backdropAnimatedStyle]}>
184
- <BackdropComponent isVisible={open} />
185
- </Animated.View>
186
- {dialogContainer}
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
- <Animated.View style={[backdropStyle, backdropAnimatedStyle]}>
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
- {avoidKeyboard ? (
206
- <KeyboardAvoidingView
207
- style={{ flex: 1 }}
208
- behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
209
- >
210
- {modalContent}
211
- </KeyboardAvoidingView>
212
- ) : (
213
- modalContent
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
  });