@idealyst/components 1.2.51 → 1.2.53
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.53",
|
|
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.53",
|
|
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.53",
|
|
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,
|
|
@@ -192,7 +193,7 @@ const Dialog = forwardRef<View, DialogProps>(({
|
|
|
192
193
|
const dialogContainer = (
|
|
193
194
|
<Animated.View ref={ref as any} style={[dialogContainerStyle, style, containerAnimatedStyle]} nativeID={id} {...nativeA11yProps}>
|
|
194
195
|
{(title || showCloseButton) && (
|
|
195
|
-
<View style={headerStyle}>
|
|
196
|
+
<View style={[headerStyle, { flexShrink: 0 }]}>
|
|
196
197
|
{title && (
|
|
197
198
|
<Text style={titleStyle}>
|
|
198
199
|
{title}
|
|
@@ -210,7 +211,9 @@ const Dialog = forwardRef<View, DialogProps>(({
|
|
|
210
211
|
)}
|
|
211
212
|
</View>
|
|
212
213
|
)}
|
|
213
|
-
{
|
|
214
|
+
<View style={[{ flex: 1, minHeight: 0 }, 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,17 @@ 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;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Padding around the dialog container
|
|
121
|
+
* @default 20
|
|
122
|
+
*/
|
|
123
|
+
padding?: number;
|
|
111
124
|
}
|
|
@@ -94,9 +94,13 @@ export const textInputStyles = defineStyle('TextInput', (theme: Theme) => ({
|
|
|
94
94
|
input: (_props: TextInputDynamicProps) => ({
|
|
95
95
|
flex: 1,
|
|
96
96
|
minWidth: 0,
|
|
97
|
+
height: '100%',
|
|
98
|
+
padding: 0,
|
|
99
|
+
margin: 0,
|
|
97
100
|
backgroundColor: 'transparent' as const,
|
|
98
101
|
color: theme.colors.text.primary,
|
|
99
102
|
fontWeight: '400' as const,
|
|
103
|
+
textAlignVertical: 'center' as const,
|
|
100
104
|
variants: {
|
|
101
105
|
size: {
|
|
102
106
|
fontSize: theme.sizes.$input.fontSize,
|
|
@@ -106,6 +110,9 @@ export const textInputStyles = defineStyle('TextInput', (theme: Theme) => ({
|
|
|
106
110
|
border: 'none',
|
|
107
111
|
outline: 'none',
|
|
108
112
|
fontFamily: 'inherit',
|
|
113
|
+
height: '100%',
|
|
114
|
+
padding: 0,
|
|
115
|
+
margin: 0,
|
|
109
116
|
},
|
|
110
117
|
}),
|
|
111
118
|
|