@rific/auto-paper 0.6.0 → 0.6.2
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/dist/index.js +4 -2
- package/dist/index.mjs +4 -2
- package/package.json +9 -9
- package/src/components/Dialog.tsx +4 -2
package/dist/index.js
CHANGED
|
@@ -711,7 +711,7 @@ function DialogComponent({ blur: blurProp, visible, onDismiss, children, style,
|
|
|
711
711
|
}
|
|
712
712
|
}, [visible]);
|
|
713
713
|
if (!blur) {
|
|
714
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native_paper9.Dialog, { visible, onDismiss, style, ...rest, children });
|
|
714
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native_paper9.Dialog, { visible, onDismiss, style: [styles2.sized, style], ...rest, children });
|
|
715
715
|
}
|
|
716
716
|
if (!mounted) return null;
|
|
717
717
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native_paper9.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_native6.Animated.View, { style: [import_react_native6.StyleSheet.absoluteFill, { opacity }], pointerEvents: visible ? "box-none" : "none", children: [
|
|
@@ -725,7 +725,9 @@ DialogComponent.Actions = import_react_native_paper9.Dialog.Actions;
|
|
|
725
725
|
DialogComponent.ScrollArea = import_react_native_paper9.Dialog.ScrollArea;
|
|
726
726
|
var Dialog = DialogComponent;
|
|
727
727
|
var styles2 = import_react_native6.StyleSheet.create({
|
|
728
|
-
card
|
|
728
|
+
// Width cap keeps dialogs card-sized on wide viewports (web/tablet); no effect on phones.
|
|
729
|
+
card: { alignSelf: "center", maxWidth: 400, overflow: "hidden", width: "100%" },
|
|
730
|
+
sized: { alignSelf: "center", maxWidth: 400, width: "100%" },
|
|
729
731
|
wrapper: { flex: 1, justifyContent: "center", paddingHorizontal: 26 }
|
|
730
732
|
});
|
|
731
733
|
|
package/dist/index.mjs
CHANGED
|
@@ -658,7 +658,7 @@ function DialogComponent({ blur: blurProp, visible, onDismiss, children, style,
|
|
|
658
658
|
}
|
|
659
659
|
}, [visible]);
|
|
660
660
|
if (!blur) {
|
|
661
|
-
return /* @__PURE__ */ jsx8(PaperDialog, { visible, onDismiss, style, ...rest, children });
|
|
661
|
+
return /* @__PURE__ */ jsx8(PaperDialog, { visible, onDismiss, style: [styles2.sized, style], ...rest, children });
|
|
662
662
|
}
|
|
663
663
|
if (!mounted) return null;
|
|
664
664
|
return /* @__PURE__ */ jsx8(Portal, { children: /* @__PURE__ */ jsxs4(Animated.View, { style: [StyleSheet3.absoluteFill, { opacity }], pointerEvents: visible ? "box-none" : "none", children: [
|
|
@@ -672,7 +672,9 @@ DialogComponent.Actions = PaperDialog.Actions;
|
|
|
672
672
|
DialogComponent.ScrollArea = PaperDialog.ScrollArea;
|
|
673
673
|
var Dialog = DialogComponent;
|
|
674
674
|
var styles2 = StyleSheet3.create({
|
|
675
|
-
card
|
|
675
|
+
// Width cap keeps dialogs card-sized on wide viewports (web/tablet); no effect on phones.
|
|
676
|
+
card: { alignSelf: "center", maxWidth: 400, overflow: "hidden", width: "100%" },
|
|
677
|
+
sized: { alignSelf: "center", maxWidth: 400, width: "100%" },
|
|
676
678
|
wrapper: { flex: 1, justifyContent: "center", paddingHorizontal: 26 }
|
|
677
679
|
});
|
|
678
680
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rific/auto-paper",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "Adaptive react-native-paper theming: triadic palette from a seed color + system/light/dark appearance",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
".": {
|
|
34
34
|
"react-native": "./src/index.ts",
|
|
35
35
|
"types": "./dist/index.d.ts",
|
|
36
|
-
"import": "./dist/index.
|
|
36
|
+
"import": "./dist/index.js",
|
|
37
37
|
"require": "./dist/index.js"
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
"main": "dist/index.js",
|
|
41
|
-
"module": "dist/index.
|
|
41
|
+
"module": "dist/index.js",
|
|
42
42
|
"types": "dist/index.d.ts",
|
|
43
43
|
"files": [
|
|
44
44
|
"dist",
|
|
@@ -99,12 +99,6 @@
|
|
|
99
99
|
"react-native": ">=0.76.0",
|
|
100
100
|
"react-native-paper": ">=5.0.0"
|
|
101
101
|
},
|
|
102
|
-
"optionalDependencies": {
|
|
103
|
-
"@reduxjs/toolkit": "^2.0.0"
|
|
104
|
-
},
|
|
105
|
-
"publishConfig": {
|
|
106
|
-
"access": "public"
|
|
107
|
-
},
|
|
108
102
|
"peerDependenciesMeta": {
|
|
109
103
|
"expo-blur": {
|
|
110
104
|
"optional": true
|
|
@@ -112,5 +106,11 @@
|
|
|
112
106
|
"expo-navigation-bar": {
|
|
113
107
|
"optional": true
|
|
114
108
|
}
|
|
109
|
+
},
|
|
110
|
+
"optionalDependencies": {
|
|
111
|
+
"@reduxjs/toolkit": "^2.0.0"
|
|
112
|
+
},
|
|
113
|
+
"publishConfig": {
|
|
114
|
+
"access": "public"
|
|
115
115
|
}
|
|
116
116
|
}
|
|
@@ -26,7 +26,7 @@ function DialogComponent({ blur: blurProp, visible, onDismiss, children, style,
|
|
|
26
26
|
|
|
27
27
|
if (!blur) {
|
|
28
28
|
return (
|
|
29
|
-
<PaperDialog visible={visible} onDismiss={onDismiss} style={style} {...rest}>
|
|
29
|
+
<PaperDialog visible={visible} onDismiss={onDismiss} style={[styles.sized, style]} {...rest}>
|
|
30
30
|
{children}
|
|
31
31
|
</PaperDialog>
|
|
32
32
|
)
|
|
@@ -56,6 +56,8 @@ DialogComponent.ScrollArea = PaperDialog.ScrollArea as React.FC<DialogScrollArea
|
|
|
56
56
|
export const Dialog = DialogComponent
|
|
57
57
|
|
|
58
58
|
const styles = StyleSheet.create({
|
|
59
|
-
card
|
|
59
|
+
// Width cap keeps dialogs card-sized on wide viewports (web/tablet); no effect on phones.
|
|
60
|
+
card: { alignSelf: 'center', maxWidth: 400, overflow: 'hidden', width: '100%' },
|
|
61
|
+
sized: { alignSelf: 'center', maxWidth: 400, width: '100%' },
|
|
60
62
|
wrapper: { flex: 1, justifyContent: 'center', paddingHorizontal: 26 }
|
|
61
63
|
})
|