@particle-network/ui-native 0.0.35 → 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.
@@ -16,10 +16,10 @@ export interface TextProps extends RNTextProps, UseBoxProps {
16
16
  * | body1Bold | 14px | 500 |
17
17
  * | body2 | 12px | 400 |
18
18
  * | body2Bold | 12px | 500 |
19
- * | body3 | 10px | 400 |
20
- * | body3Bold | 10px | 500 |
21
- * | caption1 | 8px | 400 |
22
- * | caption1Bold | 8px | 500 |
19
+ * | body3 | 11px | 400 |
20
+ * | body3Bold | 11px | 500 |
21
+ * | caption1 | 10px | 400 |
22
+ * | caption1Bold | 10px | 500 |
23
23
  */
24
24
  variant?: TextVariant;
25
25
  /**
@@ -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 { useColors, useComponentConfig, useKeyboard, useMs } from "../../hooks/index.js";
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 { getColor } = useColors();
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: getColor('overlay'),
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: getColor(modalConfig.backdrop, 0.7)
221
+ backdrop: modalConfig.backdrop[theme]
222
222
  }
223
223
  },
224
224
  visible: isOpen,
@@ -37,7 +37,11 @@ const defaultComponentConfig = {
37
37
  },
38
38
  modal: {
39
39
  radius: 24,
40
- backdrop: 'bg-default'
40
+ bg: 'overlay',
41
+ backdrop: {
42
+ light: '#00000050',
43
+ dark: '#00000050'
44
+ }
41
45
  },
42
46
  tabs: {
43
47
  defaultProps: {},
@@ -41,7 +41,11 @@ const uxComponentConfig = {
41
41
  },
42
42
  modal: {
43
43
  radius: 34,
44
- backdrop: 'bg-200'
44
+ bg: 'bg-default',
45
+ backdrop: {
46
+ light: '#00000050',
47
+ dark: '#1f1f2370'
48
+ }
45
49
  },
46
50
  tabs: {
47
51
  defaultProps: {
@@ -24,7 +24,11 @@ export interface ComponentConfig {
24
24
  input: Omit<CommonComponentConfig, 'color'>;
25
25
  modal: {
26
26
  radius: number;
27
- backdrop: UXColor;
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.35",
3
+ "version": "0.0.37",
4
4
  "license": "MIT",
5
5
  "main": "./entry.js",
6
6
  "react-native": "./dist/index.js",
@@ -44,8 +44,7 @@
44
44
  "react-native-paper": "^5.14.5",
45
45
  "react-native-size-matters": "^0.4.2",
46
46
  "react-native-toast-message": "^2.3.3",
47
- "@particle-network/ui-shared": "0.0.7",
48
- "@particle-network/icons": "0.0.17"
47
+ "@particle-network/ui-shared": "0.0.7"
49
48
  },
50
49
  "devDependencies": {
51
50
  "@babel/core": "^7.24.0",
@@ -87,6 +86,7 @@
87
86
  "unfetch": "^4.2.0",
88
87
  "vite": "^6.3.5",
89
88
  "zustand": "^5.0.8",
89
+ "@particle-network/icons": "0.0.19",
90
90
  "@particle-network/eslint-config": "0.0.5"
91
91
  },
92
92
  "overrides": {