@nexara/nativeflow 0.1.1 → 0.1.4
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/lib/commonjs/components/Button/Button.js +61 -47
- package/lib/commonjs/components/Button/Button.js.map +1 -1
- package/lib/commonjs/components/CheckBox/CheckBox.js +39 -29
- package/lib/commonjs/components/CheckBox/CheckBox.js.map +1 -1
- package/lib/commonjs/components/Chip/Chip.js +2 -2
- package/lib/commonjs/components/Chip/Chip.js.map +1 -1
- package/lib/commonjs/components/Dialog/Dialog.js +53 -48
- package/lib/commonjs/components/Dialog/Dialog.js.map +1 -1
- package/lib/commonjs/components/Dialog/DialogBody.js +6 -8
- package/lib/commonjs/components/Dialog/DialogBody.js.map +1 -1
- package/lib/commonjs/components/Dialog/DialogDescription.js +5 -8
- package/lib/commonjs/components/Dialog/DialogDescription.js.map +1 -1
- package/lib/commonjs/components/Dialog/DialogFoot.js +13 -13
- package/lib/commonjs/components/Dialog/DialogFoot.js.map +1 -1
- package/lib/commonjs/components/Dialog/DialogHead.js +17 -16
- package/lib/commonjs/components/Dialog/DialogHead.js.map +1 -1
- package/lib/commonjs/components/Divider/Divider.js +5 -9
- package/lib/commonjs/components/Divider/Divider.js.map +1 -1
- package/lib/commonjs/components/Grid/Grid.js +0 -1
- package/lib/commonjs/components/Grid/Grid.js.map +1 -1
- package/lib/commonjs/components/Header/Header.js.map +1 -1
- package/lib/commonjs/components/Icon/Icon.js +9 -5
- package/lib/commonjs/components/Icon/Icon.js.map +1 -1
- package/lib/commonjs/components/IconButton/IconButton.js +6 -3
- package/lib/commonjs/components/IconButton/IconButton.js.map +1 -1
- package/lib/commonjs/components/Link/Link.js +13 -15
- package/lib/commonjs/components/Link/Link.js.map +1 -1
- package/lib/commonjs/components/Menu/Menu.js +51 -54
- package/lib/commonjs/components/Menu/Menu.js.map +1 -1
- package/lib/commonjs/components/Menu/MenuItem.js +0 -2
- package/lib/commonjs/components/Menu/MenuItem.js.map +1 -1
- package/lib/commonjs/components/Portal/Portal.js +1 -1
- package/lib/commonjs/components/Portal/Portal.js.map +1 -1
- package/lib/commonjs/components/Progress/Progress.js +25 -15
- package/lib/commonjs/components/Progress/Progress.js.map +1 -1
- package/lib/commonjs/components/Stack/HStack.js +9 -13
- package/lib/commonjs/components/Stack/HStack.js.map +1 -1
- package/lib/commonjs/components/Stack/VStack.js +5 -6
- package/lib/commonjs/components/Stack/VStack.js.map +1 -1
- package/lib/commonjs/components/StyledComponents/StyledText.js +11 -14
- package/lib/commonjs/components/StyledComponents/StyledText.js.map +1 -1
- package/lib/commonjs/components/StyledComponents/StyledView.js +14 -14
- package/lib/commonjs/components/StyledComponents/StyledView.js.map +1 -1
- package/lib/commonjs/components/Switch/Switch.js +4 -4
- package/lib/commonjs/components/Switch/Switch.js.map +1 -1
- package/lib/commonjs/components/TouchableRipple/TouchableRipple.js +90 -103
- package/lib/commonjs/components/TouchableRipple/TouchableRipple.js.map +1 -1
- package/lib/commonjs/components/UserInput/UserInput.js +31 -34
- package/lib/commonjs/components/UserInput/UserInput.js.map +1 -1
- package/lib/commonjs/helpers/LightenColorShades.js +18 -5
- package/lib/commonjs/helpers/LightenColorShades.js.map +1 -1
- package/lib/commonjs/helpers/ResponsiveCalculations.js +30 -4
- package/lib/commonjs/helpers/ResponsiveCalculations.js.map +1 -1
- package/lib/commonjs/helpers/index.js +16 -0
- package/lib/commonjs/helpers/index.js.map +1 -1
- package/lib/commonjs/index.js +0 -7
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/themes/LightTheme.js +1 -3
- package/lib/commonjs/themes/LightTheme.js.map +1 -1
- package/lib/commonjs/types/index.js +11 -0
- package/lib/commonjs/types/index.js.map +1 -1
- package/lib/commonjs/types/progress.type.js +2 -0
- package/lib/commonjs/types/progress.type.js.map +1 -0
- package/lib/module/components/Button/Button.js +62 -48
- package/lib/module/components/Button/Button.js.map +1 -1
- package/lib/module/components/CheckBox/CheckBox.js +41 -31
- package/lib/module/components/CheckBox/CheckBox.js.map +1 -1
- package/lib/module/components/Chip/Chip.js +2 -2
- package/lib/module/components/Chip/Chip.js.map +1 -1
- package/lib/module/components/Dialog/Dialog.js +53 -48
- package/lib/module/components/Dialog/Dialog.js.map +1 -1
- package/lib/module/components/Dialog/DialogBody.js +7 -9
- package/lib/module/components/Dialog/DialogBody.js.map +1 -1
- package/lib/module/components/Dialog/DialogDescription.js +6 -9
- package/lib/module/components/Dialog/DialogDescription.js.map +1 -1
- package/lib/module/components/Dialog/DialogFoot.js +13 -13
- package/lib/module/components/Dialog/DialogFoot.js.map +1 -1
- package/lib/module/components/Dialog/DialogHead.js +17 -16
- package/lib/module/components/Dialog/DialogHead.js.map +1 -1
- package/lib/module/components/Divider/Divider.js +5 -9
- package/lib/module/components/Divider/Divider.js.map +1 -1
- package/lib/module/components/Grid/Grid.js +0 -1
- package/lib/module/components/Grid/Grid.js.map +1 -1
- package/lib/module/components/Header/Header.js.map +1 -1
- package/lib/module/components/Icon/Icon.js +7 -4
- package/lib/module/components/Icon/Icon.js.map +1 -1
- package/lib/module/components/IconButton/IconButton.js +5 -3
- package/lib/module/components/IconButton/IconButton.js.map +1 -1
- package/lib/module/components/Link/Link.js +14 -16
- package/lib/module/components/Link/Link.js.map +1 -1
- package/lib/module/components/Menu/Menu.js +51 -54
- package/lib/module/components/Menu/Menu.js.map +1 -1
- package/lib/module/components/Menu/MenuItem.js +0 -2
- package/lib/module/components/Menu/MenuItem.js.map +1 -1
- package/lib/module/components/Portal/Portal.js +1 -1
- package/lib/module/components/Portal/Portal.js.map +1 -1
- package/lib/module/components/Progress/Progress.js +26 -16
- package/lib/module/components/Progress/Progress.js.map +1 -1
- package/lib/module/components/Stack/HStack.js +9 -13
- package/lib/module/components/Stack/HStack.js.map +1 -1
- package/lib/module/components/Stack/VStack.js +6 -7
- package/lib/module/components/Stack/VStack.js.map +1 -1
- package/lib/module/components/StyledComponents/StyledText.js +12 -15
- package/lib/module/components/StyledComponents/StyledText.js.map +1 -1
- package/lib/module/components/StyledComponents/StyledView.js +15 -15
- package/lib/module/components/StyledComponents/StyledView.js.map +1 -1
- package/lib/module/components/Switch/Switch.js +4 -4
- package/lib/module/components/Switch/Switch.js.map +1 -1
- package/lib/module/components/TouchableRipple/TouchableRipple.js +90 -96
- package/lib/module/components/TouchableRipple/TouchableRipple.js.map +1 -1
- package/lib/module/components/UserInput/UserInput.js +32 -37
- package/lib/module/components/UserInput/UserInput.js.map +1 -1
- package/lib/module/components/UserInput/UserInputV2.js.map +1 -1
- package/lib/module/helpers/LightenColorShades.js +18 -5
- package/lib/module/helpers/LightenColorShades.js.map +1 -1
- package/lib/module/helpers/ResponsiveCalculations.js +28 -3
- package/lib/module/helpers/ResponsiveCalculations.js.map +1 -1
- package/lib/module/helpers/index.js +1 -0
- package/lib/module/helpers/index.js.map +1 -1
- package/lib/module/index.js +5 -5
- package/lib/module/index.js.map +1 -2
- package/lib/module/themes/LightTheme.js +1 -2
- package/lib/module/themes/LightTheme.js.map +1 -1
- package/lib/module/types/index.js +1 -0
- package/lib/module/types/index.js.map +1 -1
- package/lib/module/types/progress.type.js +2 -0
- package/lib/module/types/progress.type.js.map +1 -0
- package/lib/typescript/commonjs/src/components/Button/Button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/CheckBox/CheckBox.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Dialog/Dialog.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Dialog/DialogBody.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Dialog/DialogFoot.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Dialog/DialogHead.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Divider/Divider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Grid/Grid.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Header/Header.d.ts +1 -0
- package/lib/typescript/commonjs/src/components/Header/Header.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Icon/Icon.d.ts +1 -1
- package/lib/typescript/commonjs/src/components/Icon/Icon.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/IconButton/IconButton.d.ts +2 -2
- package/lib/typescript/commonjs/src/components/IconButton/IconButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Link/Link.d.ts +4 -0
- package/lib/typescript/commonjs/src/components/Link/Link.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Menu/Menu.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Menu/MenuItem.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Portal/Portal.d.ts +1 -1
- package/lib/typescript/commonjs/src/components/Portal/Portal.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Progress/Progress.d.ts +1 -12
- package/lib/typescript/commonjs/src/components/Progress/Progress.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Stack/HStack.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Stack/VStack.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/StyledComponents/StyledText.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/StyledComponents/StyledView.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/TouchableRipple/TouchableRipple.d.ts +0 -10
- package/lib/typescript/commonjs/src/components/TouchableRipple/TouchableRipple.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/UserInput/UserInput.d.ts +1 -34
- package/lib/typescript/commonjs/src/components/UserInput/UserInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/UserInput/UserInputV2.d.ts +1 -1
- package/lib/typescript/commonjs/src/components/UserInput/UserInputV2.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/helpers/LightenColorShades.d.ts +1 -1
- package/lib/typescript/commonjs/src/helpers/LightenColorShades.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/helpers/ResponsiveCalculations.d.ts +1 -0
- package/lib/typescript/commonjs/src/helpers/ResponsiveCalculations.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/helpers/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/helpers/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +0 -2
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/themes/LightTheme.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/button.type.d.ts +3 -2
- package/lib/typescript/commonjs/src/types/button.type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/chip.type.d.ts +1 -0
- package/lib/typescript/commonjs/src/types/chip.type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/dialog.type.d.ts +4 -6
- package/lib/typescript/commonjs/src/types/dialog.type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/types/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/menu.type.d.ts +7 -2
- package/lib/typescript/commonjs/src/types/menu.type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/progress.type.d.ts +13 -0
- package/lib/typescript/commonjs/src/types/progress.type.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/stack.type.d.ts +6 -4
- package/lib/typescript/commonjs/src/types/stack.type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/styledComponents.type.d.ts +7 -1
- package/lib/typescript/commonjs/src/types/styledComponents.type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/userInput.type.d.ts +7 -1
- package/lib/typescript/commonjs/src/types/userInput.type.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Button/Button.d.ts.map +1 -1
- package/lib/typescript/module/src/components/CheckBox/CheckBox.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Dialog/Dialog.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Dialog/DialogBody.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Dialog/DialogFoot.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Dialog/DialogHead.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Divider/Divider.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Grid/Grid.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Header/Header.d.ts +1 -0
- package/lib/typescript/module/src/components/Header/Header.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Icon/Icon.d.ts +1 -1
- package/lib/typescript/module/src/components/Icon/Icon.d.ts.map +1 -1
- package/lib/typescript/module/src/components/IconButton/IconButton.d.ts +2 -2
- package/lib/typescript/module/src/components/IconButton/IconButton.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Link/Link.d.ts +4 -0
- package/lib/typescript/module/src/components/Link/Link.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Menu/Menu.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Menu/MenuItem.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Portal/Portal.d.ts +1 -1
- package/lib/typescript/module/src/components/Portal/Portal.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Progress/Progress.d.ts +1 -12
- package/lib/typescript/module/src/components/Progress/Progress.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Stack/HStack.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Stack/VStack.d.ts.map +1 -1
- package/lib/typescript/module/src/components/StyledComponents/StyledText.d.ts.map +1 -1
- package/lib/typescript/module/src/components/StyledComponents/StyledView.d.ts.map +1 -1
- package/lib/typescript/module/src/components/TouchableRipple/TouchableRipple.d.ts +0 -10
- package/lib/typescript/module/src/components/TouchableRipple/TouchableRipple.d.ts.map +1 -1
- package/lib/typescript/module/src/components/UserInput/UserInput.d.ts +1 -34
- package/lib/typescript/module/src/components/UserInput/UserInput.d.ts.map +1 -1
- package/lib/typescript/module/src/components/UserInput/UserInputV2.d.ts +1 -1
- package/lib/typescript/module/src/components/UserInput/UserInputV2.d.ts.map +1 -1
- package/lib/typescript/module/src/helpers/LightenColorShades.d.ts +1 -1
- package/lib/typescript/module/src/helpers/LightenColorShades.d.ts.map +1 -1
- package/lib/typescript/module/src/helpers/ResponsiveCalculations.d.ts +1 -0
- package/lib/typescript/module/src/helpers/ResponsiveCalculations.d.ts.map +1 -1
- package/lib/typescript/module/src/helpers/index.d.ts +1 -0
- package/lib/typescript/module/src/helpers/index.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +0 -2
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/themes/LightTheme.d.ts.map +1 -1
- package/lib/typescript/module/src/types/button.type.d.ts +3 -2
- package/lib/typescript/module/src/types/button.type.d.ts.map +1 -1
- package/lib/typescript/module/src/types/chip.type.d.ts +1 -0
- package/lib/typescript/module/src/types/chip.type.d.ts.map +1 -1
- package/lib/typescript/module/src/types/dialog.type.d.ts +4 -6
- package/lib/typescript/module/src/types/dialog.type.d.ts.map +1 -1
- package/lib/typescript/module/src/types/index.d.ts +1 -0
- package/lib/typescript/module/src/types/index.d.ts.map +1 -1
- package/lib/typescript/module/src/types/menu.type.d.ts +7 -2
- package/lib/typescript/module/src/types/menu.type.d.ts.map +1 -1
- package/lib/typescript/module/src/types/progress.type.d.ts +13 -0
- package/lib/typescript/module/src/types/progress.type.d.ts.map +1 -0
- package/lib/typescript/module/src/types/stack.type.d.ts +6 -4
- package/lib/typescript/module/src/types/stack.type.d.ts.map +1 -1
- package/lib/typescript/module/src/types/styledComponents.type.d.ts +7 -1
- package/lib/typescript/module/src/types/styledComponents.type.d.ts.map +1 -1
- package/lib/typescript/module/src/types/userInput.type.d.ts +7 -1
- package/lib/typescript/module/src/types/userInput.type.d.ts.map +1 -1
- package/package.json +29 -19
- package/src/components/Button/Button.tsx +122 -79
- package/src/components/CheckBox/CheckBox.tsx +61 -49
- package/src/components/Chip/Chip.tsx +2 -2
- package/src/components/Dialog/Dialog.tsx +55 -51
- package/src/components/Dialog/DialogBody.tsx +7 -9
- package/src/components/Dialog/DialogDescription.tsx +10 -10
- package/src/components/Dialog/DialogFoot.tsx +15 -13
- package/src/components/Dialog/DialogHead.tsx +20 -17
- package/src/components/Divider/Divider.tsx +5 -10
- package/src/components/Grid/Grid.tsx +0 -1
- package/src/components/Header/Header.tsx +1 -0
- package/src/components/Icon/Icon.tsx +8 -4
- package/src/components/IconButton/IconButton.tsx +6 -6
- package/src/components/Link/Link.tsx +24 -7
- package/src/components/Menu/Menu.tsx +51 -51
- package/src/components/Menu/MenuItem.tsx +0 -2
- package/src/components/Portal/Portal.tsx +2 -2
- package/src/components/Progress/Progress.tsx +32 -35
- package/src/components/Stack/HStack.tsx +12 -14
- package/src/components/Stack/VStack.tsx +10 -9
- package/src/components/StyledComponents/StyledText.tsx +4 -7
- package/src/components/StyledComponents/StyledView.tsx +6 -2
- package/src/components/Switch/Switch.tsx +4 -4
- package/src/components/TouchableRipple/TouchableRipple.tsx +83 -83
- package/src/components/UserInput/UserInput.tsx +45 -39
- package/src/components/UserInput/UserInputV2.tsx +2 -2
- package/src/helpers/LightenColorShades.ts +26 -6
- package/src/helpers/ResponsiveCalculations.ts +28 -3
- package/src/helpers/index.ts +2 -1
- package/src/index.ts +2 -2
- package/src/themes/LightTheme.ts +1 -2
- package/src/types/button.type.ts +3 -2
- package/src/types/chip.type.ts +1 -0
- package/src/types/dialog.type.ts +6 -8
- package/src/types/index.ts +2 -1
- package/src/types/menu.type.ts +8 -2
- package/src/types/progress.type.ts +16 -0
- package/src/types/stack.type.ts +6 -4
- package/src/types/styledComponents.type.ts +8 -1
- package/src/types/userInput.type.ts +8 -1
- package/src/index.tsx +0 -3
|
@@ -13,21 +13,21 @@ const Switch: React.FC<SwitchProps> = ({
|
|
|
13
13
|
activeTrackColor,
|
|
14
14
|
inactiveTrackColor = '#808080',
|
|
15
15
|
onChange,
|
|
16
|
-
...
|
|
16
|
+
...rest
|
|
17
17
|
}) => {
|
|
18
18
|
|
|
19
19
|
const theme: any = useTheme();
|
|
20
|
-
const switchColor = disabled ? '#808080' : color ?? theme.colors.
|
|
20
|
+
const switchColor = disabled ? '#808080' : color ?? theme.colors.primary;
|
|
21
21
|
|
|
22
22
|
return (<>
|
|
23
23
|
<NativeSwitch
|
|
24
24
|
value={checked}
|
|
25
|
-
trackColor={{ true: LightenColorShades(activeTrackColor ?? switchColor,
|
|
25
|
+
trackColor={{ true: LightenColorShades(activeTrackColor ?? switchColor, 50), false: LightenColorShades(inactiveTrackColor, 60) }}
|
|
26
26
|
thumbColor={switchColor}
|
|
27
27
|
onValueChange={onChange}
|
|
28
28
|
style={{ transform: [{ scaleX: moderateScale(size) }, { scaleY: moderateScale(size) }] }}
|
|
29
29
|
disabled={disabled}
|
|
30
|
-
{...
|
|
30
|
+
{...rest}
|
|
31
31
|
/>
|
|
32
32
|
</>)
|
|
33
33
|
}
|
|
@@ -1,92 +1,92 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Pressable, StyleSheet } from "react-native";
|
|
3
|
-
import type { ViewStyle, StyleProp, PressableProps } from "react-native";
|
|
4
|
-
import { Gesture, GestureDetector, GestureHandlerRootView } from 'react-native-gesture-handler';
|
|
5
|
-
import Animated, { useAnimatedStyle, useSharedValue, withTiming, } from 'react-native-reanimated';
|
|
6
|
-
import { StyledView } from '../StyledComponents';
|
|
1
|
+
// import React from 'react';
|
|
2
|
+
// import { Pressable, StyleSheet } from "react-native";
|
|
3
|
+
// import type { ViewStyle, StyleProp, PressableProps } from "react-native";
|
|
4
|
+
// import { Gesture, GestureDetector, GestureHandlerRootView } from 'react-native-gesture-handler';
|
|
5
|
+
// import Animated, { useAnimatedStyle, useSharedValue, withTiming, } from 'react-native-reanimated';
|
|
6
|
+
// import { StyledView } from '../StyledComponents';
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
type TouchableRippleProps = PressableProps & {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
9
|
+
// type TouchableRippleProps = PressableProps & {
|
|
10
|
+
// rippleColor?: string;
|
|
11
|
+
// style?: StyleProp<ViewStyle>;
|
|
12
|
+
// children?: React.ReactNode;
|
|
13
|
+
// }
|
|
14
14
|
|
|
15
|
-
const TouchableRipple: React.FC<TouchableRippleProps> = ({
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}) => {
|
|
15
|
+
// const TouchableRipple: React.FC<TouchableRippleProps> = ({
|
|
16
|
+
// rippleColor = '#b6b6b681',
|
|
17
|
+
// style,
|
|
18
|
+
// children,
|
|
19
|
+
// ...rest
|
|
20
|
+
// }) => {
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
// const positionX = useSharedValue(0);
|
|
23
|
+
// const positionY = useSharedValue(0);
|
|
24
|
+
// const overlayHeight = useSharedValue(0);
|
|
25
|
+
// const overlayWidth = useSharedValue(0);
|
|
26
|
+
// const scale = useSharedValue(0);
|
|
27
|
+
// const opacity = useSharedValue(1);
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
29
|
+
// const STYLES = StyleSheet.create({
|
|
30
|
+
// OVERLAY: {
|
|
31
|
+
// position: 'absolute',
|
|
32
|
+
// top: 0,
|
|
33
|
+
// left: 0,
|
|
34
|
+
// zIndex: -1
|
|
35
|
+
// }
|
|
36
|
+
// });
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
38
|
+
// const effectAnimatedStyle = useAnimatedStyle(() => {
|
|
39
|
+
// const radius = Math.sqrt(overlayWidth.value ** 2 + overlayHeight.value ** 2);
|
|
40
|
+
// return {
|
|
41
|
+
// height: radius * 2,
|
|
42
|
+
// width: radius * 2,
|
|
43
|
+
// opacity: opacity.value,
|
|
44
|
+
// borderRadius: radius,
|
|
45
|
+
// backgroundColor: rippleColor,
|
|
46
|
+
// transform: [
|
|
47
|
+
// { translateX: positionX.value - radius },
|
|
48
|
+
// { translateY: positionY.value - radius },
|
|
49
|
+
// {
|
|
50
|
+
// scale: scale.value
|
|
51
|
+
// }
|
|
52
|
+
// ]
|
|
53
|
+
// }
|
|
54
|
+
// });
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
56
|
+
// const onGesturePress = !props.disabled ? Gesture.Tap().runOnJS(true).onTouchesDown(({ allTouches }: { allTouches: any }) => {
|
|
57
|
+
// positionX.value = allTouches[0].x;
|
|
58
|
+
// positionY.value = allTouches[0].y;
|
|
59
|
+
// opacity.value = 1;
|
|
60
|
+
// scale.value = 0;
|
|
61
|
+
// scale.value = withTiming(1, { duration: 600 });
|
|
62
|
+
// }).onTouchesUp(() => {
|
|
63
|
+
// opacity.value = withTiming(0, { duration: 800 });
|
|
64
|
+
// }).onTouchesCancelled(() => {
|
|
65
|
+
// opacity.value = withTiming(0, { duration: 800 });
|
|
66
|
+
// }) : Gesture.Simultaneous();
|
|
67
67
|
|
|
68
68
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
};
|
|
91
|
-
export default TouchableRipple;
|
|
92
|
-
export type { TouchableRippleProps };
|
|
69
|
+
// return (<>
|
|
70
|
+
// <GestureHandlerRootView style={{ width: '100%' }}>
|
|
71
|
+
// <GestureDetector gesture={onGesturePress}>
|
|
72
|
+
// <Pressable
|
|
73
|
+
// {...rest}
|
|
74
|
+
// >
|
|
75
|
+
// <StyledView
|
|
76
|
+
// overflow='hidden'
|
|
77
|
+
// onLayout={({ nativeEvent: { layout: { height, width } } }) => {
|
|
78
|
+
// overlayHeight.value = height;
|
|
79
|
+
// overlayWidth.value = width;
|
|
80
|
+
// }}
|
|
81
|
+
// style={style}
|
|
82
|
+
// >
|
|
83
|
+
// {children}
|
|
84
|
+
// <Animated.View style={[STYLES.OVERLAY, effectAnimatedStyle]} />
|
|
85
|
+
// </StyledView>
|
|
86
|
+
// </Pressable>
|
|
87
|
+
// </GestureDetector>
|
|
88
|
+
// </GestureHandlerRootView>
|
|
89
|
+
// </>);
|
|
90
|
+
// };
|
|
91
|
+
// export default TouchableRipple;
|
|
92
|
+
// export type { TouchableRippleProps };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { TextInput, StyleSheet } from 'react-native';
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { TextInput, StyleSheet, type ViewStyle } from 'react-native';
|
|
3
|
+
import type { TextStyle } from 'react-native';
|
|
3
4
|
import { responsiveFontSize, verticalScale, horizontalScale } from '../../helpers/ResponsiveCalculations';
|
|
4
5
|
import { useTheme } from '../../hooks';
|
|
5
6
|
import { StyledText, StyledView } from '../StyledComponents';
|
|
6
7
|
import type { UserInputProps } from '../../types';
|
|
7
8
|
import generateColors from './generateColors';
|
|
8
9
|
|
|
9
|
-
const UserInput
|
|
10
|
+
const UserInput: React.FC<UserInputProps> = ({
|
|
10
11
|
variant = 'standard',
|
|
11
12
|
label,
|
|
12
13
|
bg,
|
|
@@ -32,8 +33,9 @@ const UserInput = forwardRef<TextInput, UserInputProps>(({
|
|
|
32
33
|
renderLeftIcon,
|
|
33
34
|
renderRightIcon,
|
|
34
35
|
styles,
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
ref,
|
|
37
|
+
...rest
|
|
38
|
+
}) => {
|
|
37
39
|
|
|
38
40
|
const theme: any = useTheme();
|
|
39
41
|
|
|
@@ -43,56 +45,50 @@ const UserInput = forwardRef<TextInput, UserInputProps>(({
|
|
|
43
45
|
computedLabelColor
|
|
44
46
|
} = useMemo(() => generateColors(theme, isError, cursorColor, placeholderColor, labelColor), [theme, isError, cursorColor, placeholderColor, labelColor]);
|
|
45
47
|
|
|
46
|
-
const
|
|
48
|
+
const dynamicStyles = {
|
|
47
49
|
INPUT_CONT: {
|
|
48
|
-
|
|
49
|
-
alignItems: multiline ? 'flex-start' : 'center',
|
|
50
|
+
alignItems: multiline ? 'flex-start' : 'center' as ViewStyle['alignItems'],
|
|
50
51
|
backgroundColor: disabled ? theme.colors.disable : bg ?? theme.colors.inputBgColor,
|
|
51
52
|
borderColor: isError ? theme.colors.error : strokeColor ?? theme.colors.outline,
|
|
52
53
|
borderWidth: variant === 'standard' ? 0 : stroke,
|
|
53
54
|
borderBottomWidth: stroke,
|
|
54
|
-
paddingHorizontal: horizontalScale(14),
|
|
55
55
|
borderRadius: verticalScale(br),
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
paddingVertical: multiline ? horizontalScale(10) : 'auto',
|
|
56
|
+
height: multiline ? undefined : verticalScale(48),
|
|
57
|
+
paddingVertical: multiline ? horizontalScale(10) : undefined,
|
|
59
58
|
},
|
|
60
59
|
INPUT: {
|
|
61
60
|
color: disabled ? theme.colors.textDisable : isError ? theme.colors.error : inputTextColor ?? theme.colors.textPrimary,
|
|
62
61
|
fontSize: responsiveFontSize(inputFs),
|
|
63
|
-
textAlignVertical: multiline ? 'top' : 'center',
|
|
64
|
-
minHeight: multiline ? 100 :
|
|
65
|
-
maxHeight: multiline ? 150 :
|
|
66
|
-
padding: 0,
|
|
67
|
-
flex: 1,
|
|
62
|
+
textAlignVertical: (multiline ? 'top' : 'center') as TextStyle['textAlignVertical'],
|
|
63
|
+
minHeight: multiline ? 100 : undefined,
|
|
64
|
+
maxHeight: multiline ? 150 : undefined,
|
|
68
65
|
},
|
|
69
66
|
ERROR_HELPER_TEXT: {
|
|
70
67
|
color: theme.colors.error,
|
|
71
|
-
paddingHorizontal: 5
|
|
72
68
|
}
|
|
73
|
-
}
|
|
69
|
+
};
|
|
74
70
|
|
|
75
71
|
return (<>
|
|
76
|
-
<StyledView gap={verticalScale(5)} style={styles?.mainContainer}>
|
|
72
|
+
<StyledView gap={verticalScale(5)} style={styles?.mainContainer} w='100%'>
|
|
77
73
|
{
|
|
78
74
|
label &&
|
|
79
75
|
<StyledText variant={textVariant?.label} fs={labelFs} color={computedLabelColor} style={styles?.label}>{label}</StyledText>
|
|
80
76
|
}
|
|
81
77
|
<StyledView
|
|
82
|
-
style={[STYLES.INPUT_CONT, styles?.inputContainer]}
|
|
78
|
+
style={[STYLES.INPUT_CONT, dynamicStyles.INPUT_CONT, styles?.inputContainer]}
|
|
83
79
|
>
|
|
84
80
|
{
|
|
85
81
|
renderLeftIcon
|
|
86
82
|
}
|
|
87
83
|
<TextInput
|
|
88
84
|
ref={ref}
|
|
89
|
-
style={[STYLES.INPUT, styles?.input]}
|
|
85
|
+
style={[STYLES.INPUT, dynamicStyles.INPUT, styles?.input]}
|
|
90
86
|
placeholder={placeholder}
|
|
91
87
|
placeholderTextColor={computedPlaceholderColor}
|
|
92
88
|
editable={!disabled}
|
|
93
89
|
multiline={multiline}
|
|
94
90
|
cursorColor={computedCursorColor}
|
|
95
|
-
{...
|
|
91
|
+
{...rest}
|
|
96
92
|
/>
|
|
97
93
|
{
|
|
98
94
|
renderRightIcon
|
|
@@ -100,25 +96,35 @@ const UserInput = forwardRef<TextInput, UserInputProps>(({
|
|
|
100
96
|
</StyledView>
|
|
101
97
|
{
|
|
102
98
|
(isError && helperText) &&
|
|
103
|
-
<StyledText
|
|
99
|
+
<StyledText
|
|
100
|
+
variant={textVariant?.helperText}
|
|
101
|
+
fs={helperTextFS}
|
|
102
|
+
style={[
|
|
103
|
+
STYLES.ERROR_HELPER_TEXT,
|
|
104
|
+
dynamicStyles.ERROR_HELPER_TEXT,
|
|
105
|
+
styles?.helperText
|
|
106
|
+
]}
|
|
107
|
+
>
|
|
108
|
+
{helperText}
|
|
109
|
+
</StyledText>
|
|
104
110
|
}
|
|
105
111
|
</StyledView>
|
|
106
112
|
</>)
|
|
107
|
-
}
|
|
113
|
+
};
|
|
108
114
|
export default UserInput;
|
|
109
115
|
export type { UserInputProps };
|
|
110
116
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
117
|
+
const STYLES = StyleSheet.create({
|
|
118
|
+
INPUT_CONT: {
|
|
119
|
+
flexDirection: 'row',
|
|
120
|
+
paddingHorizontal: horizontalScale(14),
|
|
121
|
+
gap: horizontalScale(10),
|
|
122
|
+
},
|
|
123
|
+
INPUT: {
|
|
124
|
+
padding: 0,
|
|
125
|
+
flex: 1,
|
|
126
|
+
},
|
|
127
|
+
ERROR_HELPER_TEXT: {
|
|
128
|
+
paddingHorizontal: 5
|
|
129
|
+
}
|
|
130
|
+
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { type JSX } from 'react';
|
|
2
2
|
import { StyleSheet, View } from 'react-native';
|
|
3
3
|
import type { TextInputProps, ViewStyle, TextStyle } from "react-native";
|
|
4
4
|
import { responsiveFontSize, verticalScale, horizontalScale } from '../../helpers/ResponsiveCalculations';
|
|
@@ -116,7 +116,7 @@ const UserInputV2: React.FC<UserInputV2Props> = ({
|
|
|
116
116
|
editable={!isDisabled}
|
|
117
117
|
multiline={multiline}
|
|
118
118
|
cursorColor={cursor}
|
|
119
|
-
{...
|
|
119
|
+
{...rest}
|
|
120
120
|
/> */}
|
|
121
121
|
<StyledText>Email</StyledText>
|
|
122
122
|
</View>
|
|
@@ -1,7 +1,27 @@
|
|
|
1
|
-
const LightenColorShades = (
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
const LightenColorShades = (color: string, amount: number): string => {
|
|
2
|
+
if (color.startsWith("#")) {
|
|
3
|
+
color = color.slice(1);
|
|
4
|
+
}
|
|
5
|
+
if (color.length === 3) {
|
|
6
|
+
color = color.split("").map(c => c + c).join("");
|
|
7
|
+
}
|
|
8
|
+
if (color.length !== 6) {
|
|
9
|
+
throw new Error("Invalid HEX color.");
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const getValidColorValue = (start: number): number => {
|
|
13
|
+
const value = parseInt(color.slice(start, start + 2), 16);
|
|
14
|
+
return Number.isNaN(value) ? 0 : Math.min(255, Math.max(0, value + amount));
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const r: number = getValidColorValue(0);
|
|
18
|
+
const g: number = getValidColorValue(2);
|
|
19
|
+
const b: number = getValidColorValue(4);
|
|
20
|
+
|
|
21
|
+
return `#${((1 << 24) + (r << 16) + (g << 8) + b)
|
|
22
|
+
.toString(16)
|
|
23
|
+
.slice(1)
|
|
24
|
+
.toUpperCase()}`;
|
|
25
|
+
};
|
|
26
|
+
|
|
7
27
|
export default LightenColorShades;
|
|
@@ -13,7 +13,11 @@ const guidelineBaseWidth = 350;
|
|
|
13
13
|
const guidelineBaseHeight = 680;
|
|
14
14
|
const [shortDimension, longDimension] = SCREEN_WIDTH < SCREEN_HEIGHT ? [SCREEN_WIDTH, SCREEN_HEIGHT] : [SCREEN_HEIGHT, SCREEN_WIDTH];
|
|
15
15
|
|
|
16
|
+
const scalingCache = new Map<'hScale' | 'vScale' | 'fs', object>();
|
|
16
17
|
|
|
18
|
+
export const fun = () => {
|
|
19
|
+
return scalingCache
|
|
20
|
+
}
|
|
17
21
|
const checkIsPhone = (size: number): number => {
|
|
18
22
|
if (SCREEN_WIDTH <= 430 && SCREEN_WIDTH >= 375) {
|
|
19
23
|
return size;
|
|
@@ -24,11 +28,18 @@ export const horizontalScale = (size: number): number => {
|
|
|
24
28
|
if (checkIsPhone(size)) {
|
|
25
29
|
return size;
|
|
26
30
|
}
|
|
31
|
+
const hScaleCache: any = scalingCache.get('hScale') || {};
|
|
32
|
+
if (hScaleCache?.[size]) {
|
|
33
|
+
return hScaleCache?.[size];
|
|
34
|
+
}
|
|
27
35
|
const slowDownRate = SCREEN_WIDTH < 375 ? 2 : 0.40;
|
|
28
36
|
let scale = (shortDimension / guidelineBaseHeight);
|
|
29
37
|
scale = 1 + (scale - 1) * slowDownRate;
|
|
30
38
|
let adjustedSize = size * Math.max(scale, 0.80);
|
|
31
|
-
|
|
39
|
+
const finalSize = Math.floor(PixelRatio.roundToNearestPixel(adjustedSize));
|
|
40
|
+
hScaleCache[size] = finalSize;
|
|
41
|
+
scalingCache.set('hScale', hScaleCache)
|
|
42
|
+
return finalSize;
|
|
32
43
|
}
|
|
33
44
|
|
|
34
45
|
|
|
@@ -36,11 +47,18 @@ export const verticalScale = (size: number): number => {
|
|
|
36
47
|
if (checkIsPhone(size)) {
|
|
37
48
|
return size;
|
|
38
49
|
}
|
|
50
|
+
const vScaleCache: any = scalingCache.get('vScale') || {};
|
|
51
|
+
if (vScaleCache?.[size]) {
|
|
52
|
+
return vScaleCache?.[size];
|
|
53
|
+
}
|
|
39
54
|
const slowDownRate = SCREEN_WIDTH < 375 ? 2 : 0.40;
|
|
40
55
|
let scale = (longDimension / guidelineBaseHeight);
|
|
41
56
|
scale = 1 + (scale - 1) * slowDownRate;
|
|
42
57
|
let adjustedSize = size * Math.max(scale, 0.80);
|
|
43
|
-
|
|
58
|
+
const finalSize = Math.floor(PixelRatio.roundToNearestPixel(adjustedSize));
|
|
59
|
+
vScaleCache[size] = finalSize;
|
|
60
|
+
scalingCache.set('vScale', vScaleCache)
|
|
61
|
+
return finalSize;
|
|
44
62
|
}
|
|
45
63
|
|
|
46
64
|
|
|
@@ -63,13 +81,20 @@ export const responsiveFontSize = (fontSize: number): number => {
|
|
|
63
81
|
if (checkIsPhone(fontSize)) {
|
|
64
82
|
return fontSize;
|
|
65
83
|
}
|
|
84
|
+
const fsCache: any = scalingCache.get('fs') || {};
|
|
85
|
+
if (fsCache?.[fontSize]) {
|
|
86
|
+
return fsCache?.[fontSize];
|
|
87
|
+
}
|
|
66
88
|
const slowDownRate = SCREEN_WIDTH < 375 ? 2 : 0.20
|
|
67
89
|
const screenDiagonal = Math.sqrt(SCREEN_WIDTH ** 2 + SCREEN_HEIGHT ** 2);
|
|
68
90
|
const baseScreenDiagonal = Math.sqrt(360 ** 2 + 640 ** 2);
|
|
69
91
|
let scale = screenDiagonal / baseScreenDiagonal;
|
|
70
92
|
scale = 1 + (scale - 1) * slowDownRate;
|
|
71
93
|
let adjustedFontSize = fontSize * Math.max(scale, 0.85);
|
|
72
|
-
|
|
94
|
+
const finalSize = Math.floor(PixelRatio.roundToNearestPixel(adjustedFontSize));
|
|
95
|
+
fsCache[fontSize] = finalSize;
|
|
96
|
+
scalingCache.set('vScale', fsCache)
|
|
97
|
+
return finalSize;
|
|
73
98
|
};
|
|
74
99
|
|
|
75
100
|
|
package/src/helpers/index.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -11,7 +11,7 @@ export { default as Progress } from './components/Progress/Progress';
|
|
|
11
11
|
export { default as Slider } from './components/Slider/Slider';
|
|
12
12
|
export { default as Surface } from './components/Surface/Surface';
|
|
13
13
|
export { default as Switch } from './components/Switch/Switch';
|
|
14
|
-
export { default as TouchableRipple } from './components/TouchableRipple/TouchableRipple';
|
|
14
|
+
// export { default as TouchableRipple } from './components/TouchableRipple/TouchableRipple';
|
|
15
15
|
export { Dialog, DialogHead, DialogBody, DialogFoot, DialogDescription } from './components/Dialog';
|
|
16
16
|
export { default as CheckBox } from './components/CheckBox/CheckBox';
|
|
17
17
|
export { default as Avatar } from './components/Avatar';
|
|
@@ -41,7 +41,7 @@ export type { ProgressProps } from './components/Progress/Progress';
|
|
|
41
41
|
export type { SliderProps } from './components/Slider/Slider';
|
|
42
42
|
export type { SurfaceProps } from './components/Surface/Surface';
|
|
43
43
|
export type { SwitchProps } from './components/Switch/Switch';
|
|
44
|
-
export type { TouchableRippleProps } from './components/TouchableRipple/TouchableRipple';
|
|
44
|
+
// export type { TouchableRippleProps } from './components/TouchableRipple/TouchableRipple';
|
|
45
45
|
export type { DialogProps, DialogHeadProps, DialogBodyProps, DialogFootProps, DialogDescriptionProps } from './components/Dialog';
|
|
46
46
|
export type { CheckBoxProps } from './components/CheckBox/CheckBox';
|
|
47
47
|
export type { AvatarTextProps, AvatarImageProps } from './components/Avatar';
|
package/src/themes/LightTheme.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import Color from "color";
|
|
2
1
|
import { dialogSizes, typographySizes } from "../constants";
|
|
3
2
|
import type { ThemeTypes } from "../types";
|
|
4
3
|
|
|
@@ -56,7 +55,7 @@ import type { ThemeTypes } from "../types";
|
|
|
56
55
|
// switchColor: '#353935',
|
|
57
56
|
// error: '#ED2939',
|
|
58
57
|
// })
|
|
59
|
-
console.log(Color('rgba(0, 0, 0, 1)').alpha(0.12).rgb().string())
|
|
58
|
+
// console.log(Color('rgba(0, 0, 0, 1)').alpha(0.12).rgb().string())
|
|
60
59
|
const LightTheme: ThemeTypes = {
|
|
61
60
|
isDark: false,
|
|
62
61
|
colors: {
|
package/src/types/button.type.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { StyleProp, TextStyle, TouchableOpacityProps, ViewStyle } from "react-native";
|
|
2
2
|
import type { ButtonVariant, TypographyVariant } from "./common.type";
|
|
3
|
+
import type { JSX } from "react";
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* @see https://rn-nativeflow-docs.onrender.com/docs/components/button
|
|
6
7
|
*/
|
|
7
|
-
export type ButtonProps =
|
|
8
|
+
export type ButtonProps = TouchableOpacityProps & {
|
|
8
9
|
/** Specifies the button style variant (e.g., 'contained', 'outlined') */
|
|
9
10
|
variant?: ButtonVariant;
|
|
10
11
|
|
package/src/types/chip.type.ts
CHANGED
package/src/types/dialog.type.ts
CHANGED
|
@@ -11,9 +11,6 @@ export type DialogProps = {
|
|
|
11
11
|
/** Defines the dialog style variant */
|
|
12
12
|
variant?: DialogVariant;
|
|
13
13
|
|
|
14
|
-
/** Controls the visibility of the dialog */
|
|
15
|
-
isVisible?: boolean;
|
|
16
|
-
|
|
17
14
|
/** Defines the horizontal size of the dialog */
|
|
18
15
|
size?: 'xs' | 'sm' | 'md' | 'lg' | 'full';
|
|
19
16
|
|
|
@@ -23,12 +20,12 @@ export type DialogProps = {
|
|
|
23
20
|
/** Background color of the backdrop */
|
|
24
21
|
backdropColor?: string;
|
|
25
22
|
|
|
26
|
-
/** Duration of the animation in milliseconds */
|
|
27
|
-
animationDuration?: number;
|
|
28
|
-
|
|
29
23
|
/** Callback function triggered when the dialog is closed */
|
|
30
24
|
onClose?: () => void;
|
|
31
25
|
|
|
26
|
+
/** Custom styles for the dialog container */
|
|
27
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
28
|
+
|
|
32
29
|
/** Content to be displayed inside the dialog */
|
|
33
30
|
children?: ReactNode;
|
|
34
31
|
};
|
|
@@ -46,12 +43,13 @@ export type DialogBodyProps = {
|
|
|
46
43
|
};
|
|
47
44
|
|
|
48
45
|
export type DialogDescriptionProps = {
|
|
49
|
-
/** Font size for the dialog description text */
|
|
50
|
-
fs?: number;
|
|
51
46
|
|
|
52
47
|
/** Variant of the typography to be applied to the text */
|
|
53
48
|
textVariant?: TypographyVariant;
|
|
54
49
|
|
|
50
|
+
/** Font size for the dialog description text */
|
|
51
|
+
fs?: number;
|
|
52
|
+
|
|
55
53
|
/** Style for the container wrapping the dialog description */
|
|
56
54
|
containerStyle?: StyleProp<ViewStyle>;
|
|
57
55
|
|
package/src/types/index.ts
CHANGED
package/src/types/menu.type.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
2
|
-
import type { StyleProp, TextStyle, TouchableOpacityProps, ViewStyle } from "react-native";
|
|
1
|
+
import type { JSX, ReactNode } from "react";
|
|
2
|
+
import type { StyleProp, TextStyle, TouchableOpacityProps, View, ViewStyle } from "react-native";
|
|
3
3
|
import type { TypographyVariant } from "./common.type";
|
|
4
4
|
|
|
5
5
|
|
|
@@ -52,6 +52,12 @@ export type MenuProps = {
|
|
|
52
52
|
* Child components to be rendered inside the menu.
|
|
53
53
|
*/
|
|
54
54
|
children?: ReactNode;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* A ref to access the underlying View component.
|
|
58
|
+
* This can be used for measuring layout, animations, or imperative interactions.
|
|
59
|
+
*/
|
|
60
|
+
ref?: React.RefObject<View | null>
|
|
55
61
|
};
|
|
56
62
|
|
|
57
63
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type ProgressProps = {
|
|
2
|
+
/** Current progress value (0-100) */
|
|
3
|
+
value?: number;
|
|
4
|
+
|
|
5
|
+
/** Thickness of the progress bar */
|
|
6
|
+
thickness?: number;
|
|
7
|
+
|
|
8
|
+
/** Border radius of the progress bar */
|
|
9
|
+
br?: number;
|
|
10
|
+
|
|
11
|
+
/** Background color of the track (unfilled part) */
|
|
12
|
+
trackColor?: string;
|
|
13
|
+
|
|
14
|
+
/** Color of the progress (filled part) */
|
|
15
|
+
progressColor?: string;
|
|
16
|
+
}
|