@idealyst/components 1.2.51 → 1.2.52
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.
|
|
3
|
+
"version": "1.2.52",
|
|
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.52",
|
|
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.52",
|
|
111
111
|
"@idealyst/tooling": "^1.2.30",
|
|
112
112
|
"@mdi/react": "^1.6.1",
|
|
113
113
|
"@types/react": "^19.1.0",
|
|
@@ -19,6 +19,7 @@ const Dialog = forwardRef<View, DialogProps>(({
|
|
|
19
19
|
avoidKeyboard = false,
|
|
20
20
|
padding: paddingProp = 20,
|
|
21
21
|
maxContentHeight,
|
|
22
|
+
contentPadding = 24,
|
|
22
23
|
style,
|
|
23
24
|
testID,
|
|
24
25
|
id,
|
|
@@ -210,7 +211,9 @@ const Dialog = forwardRef<View, DialogProps>(({
|
|
|
210
211
|
)}
|
|
211
212
|
</View>
|
|
212
213
|
)}
|
|
213
|
-
{
|
|
214
|
+
<View style={contentPadding > 0 ? { padding: contentPadding } : undefined}>
|
|
215
|
+
{children}
|
|
216
|
+
</View>
|
|
214
217
|
</Animated.View>
|
|
215
218
|
);
|
|
216
219
|
|
|
@@ -247,6 +250,7 @@ const Dialog = forwardRef<View, DialogProps>(({
|
|
|
247
250
|
bottom: bottomOffset,
|
|
248
251
|
alignItems: 'center',
|
|
249
252
|
justifyContent: 'center',
|
|
253
|
+
zIndex: 1001,
|
|
250
254
|
}}
|
|
251
255
|
pointerEvents="box-none"
|
|
252
256
|
>
|
|
@@ -22,6 +22,7 @@ const Dialog = forwardRef<HTMLDivElement, DialogProps>(({
|
|
|
22
22
|
closeOnBackdropClick = true,
|
|
23
23
|
closeOnEscapeKey = true,
|
|
24
24
|
height,
|
|
25
|
+
contentPadding = 24,
|
|
25
26
|
style,
|
|
26
27
|
testID,
|
|
27
28
|
id,
|
|
@@ -156,6 +157,7 @@ const Dialog = forwardRef<HTMLDivElement, DialogProps>(({
|
|
|
156
157
|
const contentProps = getWebProps([
|
|
157
158
|
(dialogStyles.content as any)({}),
|
|
158
159
|
height !== undefined ? { flex: 1, overflow: 'auto' } : null,
|
|
160
|
+
contentPadding > 0 ? { padding: contentPadding } : null,
|
|
159
161
|
].filter(Boolean));
|
|
160
162
|
|
|
161
163
|
const mergedBackdropRef = useMergeRefs(ref, backdropProps.ref);
|
package/src/Dialog/types.ts
CHANGED
|
@@ -108,4 +108,11 @@ export interface DialogProps extends BaseProps, InteractiveAccessibilityProps {
|
|
|
108
108
|
* When set, children can use flex: 1 to fill the available space.
|
|
109
109
|
*/
|
|
110
110
|
height?: number | string;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Padding for the dialog content area.
|
|
114
|
+
* Set to 0 to disable padding for custom layouts.
|
|
115
|
+
* @default 24
|
|
116
|
+
*/
|
|
117
|
+
contentPadding?: number;
|
|
111
118
|
}
|