@particle-network/ui-native 0.0.36 → 0.0.37
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.
|
@@ -3,7 +3,7 @@ import react, { forwardRef, useCallback, useEffect, useMemo, useRef, useState }
|
|
|
3
3
|
import { Animated, Dimensions, PanResponder, Platform, ScrollView, StyleSheet } from "react-native";
|
|
4
4
|
import { Modal, Portal } from "react-native-paper";
|
|
5
5
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
6
|
-
import {
|
|
6
|
+
import { useComponentConfig, useKeyboard, useMs, useTheme } from "../../hooks/index.js";
|
|
7
7
|
import { Box } from "../layout/Box/index.js";
|
|
8
8
|
import { Circle } from "../layout/Circle.js";
|
|
9
9
|
import { Flex } from "../layout/Flex/index.js";
|
|
@@ -15,7 +15,7 @@ const UXModal = /*#__PURE__*/ forwardRef((props, scrollViewRef)=>{
|
|
|
15
15
|
const { style, contentStyle, isOpen, title, topContent, titleAlign = 'left', onClose, onVisibleChange, children, disableCloseBySwipe, closeByLineOnly, wrapPortal, footer, modalName, tip, keyboardAvoidPosition = 'container', scrollViewProps } = props;
|
|
16
16
|
const { style: scrollViewStyle, ...restScrollViewProps } = scrollViewProps || {};
|
|
17
17
|
const { modal: modalConfig } = useComponentConfig();
|
|
18
|
-
const {
|
|
18
|
+
const { theme, colors } = useTheme();
|
|
19
19
|
const { ms } = useMs();
|
|
20
20
|
const insets = useSafeAreaInsets();
|
|
21
21
|
const { keyboardHeight } = useKeyboard();
|
|
@@ -153,7 +153,7 @@ const UXModal = /*#__PURE__*/ forwardRef((props, scrollViewRef)=>{
|
|
|
153
153
|
borderTopRightRadius: modalConfig.radius,
|
|
154
154
|
flex: 1,
|
|
155
155
|
gap: ms(20),
|
|
156
|
-
backgroundColor:
|
|
156
|
+
backgroundColor: colors[modalConfig.bg],
|
|
157
157
|
maxHeight: height - Math.max(insets.top, ms(40)),
|
|
158
158
|
transform: [
|
|
159
159
|
{
|
|
@@ -218,7 +218,7 @@ const UXModal = /*#__PURE__*/ forwardRef((props, scrollViewRef)=>{
|
|
|
218
218
|
],
|
|
219
219
|
theme: {
|
|
220
220
|
colors: {
|
|
221
|
-
backdrop:
|
|
221
|
+
backdrop: modalConfig.backdrop[theme]
|
|
222
222
|
}
|
|
223
223
|
},
|
|
224
224
|
visible: isOpen,
|
package/dist/config/config.ux.js
CHANGED
package/dist/types/theme.d.ts
CHANGED
|
@@ -24,7 +24,11 @@ export interface ComponentConfig {
|
|
|
24
24
|
input: Omit<CommonComponentConfig, 'color'>;
|
|
25
25
|
modal: {
|
|
26
26
|
radius: number;
|
|
27
|
-
|
|
27
|
+
bg: UXColor;
|
|
28
|
+
backdrop: {
|
|
29
|
+
light: string;
|
|
30
|
+
dark: string;
|
|
31
|
+
};
|
|
28
32
|
};
|
|
29
33
|
tabs: Pick<CommonComponentConfig, 'defaultProps' | 'fontSize'>;
|
|
30
34
|
chip: Pick<CommonComponentConfig, 'defaultProps'>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@particle-network/ui-native",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.37",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./entry.js",
|
|
6
6
|
"react-native": "./dist/index.js",
|
|
@@ -86,8 +86,8 @@
|
|
|
86
86
|
"unfetch": "^4.2.0",
|
|
87
87
|
"vite": "^6.3.5",
|
|
88
88
|
"zustand": "^5.0.8",
|
|
89
|
-
"@particle-network/
|
|
90
|
-
"@particle-network/
|
|
89
|
+
"@particle-network/icons": "0.0.19",
|
|
90
|
+
"@particle-network/eslint-config": "0.0.5"
|
|
91
91
|
},
|
|
92
92
|
"overrides": {
|
|
93
93
|
"react-docgen-typescript": "2.2.2",
|