@jamadd/react-native-template-ui 0.7.17 → 0.8.0
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/module/components/button/AnimatedThemedPressable.js +3 -9
- package/lib/module/components/button/AnimatedThemedPressable.js.map +1 -1
- package/lib/module/components/button/ThemedPressable.js +2 -8
- package/lib/module/components/button/ThemedPressable.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetWrap.js +2 -2
- package/lib/module/components/overlay/actionSheet/ActionSheetWrap.js.map +1 -1
- package/lib/module/components/overlay/alert/AlertWrap.js +1 -1
- package/lib/module/components/overlay/alert/AlertWrap.js.map +1 -1
- package/lib/module/components/overlay/toast/ThemedToast.js +1 -1
- package/lib/module/components/overlay/toast/ThemedToast.js.map +1 -1
- package/lib/module/components/slider/Slider.js +2 -2
- package/lib/module/components/slider/Slider.js.map +1 -1
- package/lib/module/components/switch/ThemedSwitch.js +3 -4
- package/lib/module/components/switch/ThemedSwitch.js.map +1 -1
- package/lib/module/components/view/AnimatedThemedView.js +7 -5
- package/lib/module/components/view/AnimatedThemedView.js.map +1 -1
- package/lib/module/components/view/AnimatedView.js +8 -0
- package/lib/module/components/view/AnimatedView.js.map +1 -0
- package/lib/module/hooks/button.js +56 -32
- package/lib/module/hooks/button.js.map +1 -1
- package/lib/module/hooks/switch.js +0 -1
- package/lib/module/hooks/switch.js.map +1 -1
- package/lib/module/hooks/view.js +18 -0
- package/lib/module/hooks/view.js.map +1 -1
- package/lib/module/utils/button/const.js +1 -0
- package/lib/module/utils/button/const.js.map +1 -1
- package/lib/module/utils/theme/restyle.js +4 -1
- package/lib/module/utils/theme/restyle.js.map +1 -1
- package/lib/typescript/src/components/switch/ThemedSwitch.d.ts.map +1 -1
- package/lib/typescript/src/components/text/Text.d.ts +4 -4
- package/lib/typescript/src/components/view/AnimatedThemedView.d.ts.map +1 -1
- package/lib/typescript/src/components/view/AnimatedView.d.ts +3 -0
- package/lib/typescript/src/components/view/AnimatedView.d.ts.map +1 -0
- package/lib/typescript/src/components/view/Box.d.ts +2 -2
- package/lib/typescript/src/hooks/button.d.ts +5 -1645
- package/lib/typescript/src/hooks/button.d.ts.map +1 -1
- package/lib/typescript/src/hooks/view.d.ts +4 -0
- package/lib/typescript/src/hooks/view.d.ts.map +1 -1
- package/lib/typescript/src/types/button.d.ts +12 -12
- package/lib/typescript/src/types/button.d.ts.map +1 -1
- package/lib/typescript/src/types/switch.d.ts +0 -3
- package/lib/typescript/src/types/switch.d.ts.map +1 -1
- package/lib/typescript/src/types/view.d.ts +5 -3
- package/lib/typescript/src/types/view.d.ts.map +1 -1
- package/lib/typescript/src/utils/button/const.d.ts +2 -1
- package/lib/typescript/src/utils/button/const.d.ts.map +1 -1
- package/lib/typescript/src/utils/theme/restyle.d.ts +851 -84
- package/lib/typescript/src/utils/theme/restyle.d.ts.map +1 -1
- package/package.json +19 -19
- package/lib/module/components/view/AnimatedBox.js +0 -8
- package/lib/module/components/view/AnimatedBox.js.map +0 -1
- package/lib/typescript/src/components/view/AnimatedBox.d.ts +0 -3107
- package/lib/typescript/src/components/view/AnimatedBox.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/hooks/button.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/hooks/button.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAEV,4BAA4B,EAC5B,kBAAkB,EAClB,gBAAgB,EAEhB,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AASzB,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,gBAAgB,GAAG,IAAI,EAChC,kBAAkB,CAAC,EAAE,kBAAkB,oBAqDxC;AAgCD,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACP,UAAU,EACV,kBAAkB,EAClB,GAAG,KAAK,EACT,EAAE,oBAAoB,wBAetB;AAED,wBAAgB,0BAA0B,CAAC,EACzC,OAAO,EACP,kBAAkB,EAClB,aAAa,EACb,GAAG,KAAK,EACT,EAAE,4BAA4B;;UAmB9B"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import type { View } from 'react-native';
|
|
2
|
+
import type { AnimatedThemedViewProps } from '../types/view';
|
|
2
3
|
export declare function useViewRef(): import("react").RefObject<View | null>;
|
|
4
|
+
export declare function useAnimatedThemedView({ animatedStyle, ...props }: AnimatedThemedViewProps): Omit<import("react-native-reanimated").AnimatedProps<Readonly<import("react-native").ViewProps>>, "ref"> & {
|
|
5
|
+
ref?: (import("react-native-reanimated").AnimatedRef | import("react").Ref<View> | import("react-native-reanimated").AnimatedRef<typeof View>) | undefined;
|
|
6
|
+
};
|
|
3
7
|
//# sourceMappingURL=view.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../../src/hooks/view.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../../src/hooks/view.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAE,uBAAuB,EAAqB,MAAM,eAAe,CAAC;AAGhF,wBAAgB,UAAU,2CAEzB;AAED,wBAAgB,qBAAqB,CAAC,EACpC,aAAa,EACb,GAAG,KAAK,EACT,EAAE,uBAAuB;;EAczB"}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import type { PropsWithChildren } from 'react';
|
|
2
|
-
import type { GestureResponderEvent, PressableProps as RNPressableProps
|
|
3
|
-
import type {
|
|
1
|
+
import type { ComponentProps, PropsWithChildren } from 'react';
|
|
2
|
+
import type { GestureResponderEvent, PressableProps as RNPressableProps } from 'react-native';
|
|
3
|
+
import type { SharedValue } from 'react-native-reanimated';
|
|
4
|
+
import type AnimatedPressable from '../components/button/AnimatedPressable';
|
|
4
5
|
import type { ButtonScaleRatio, OnPressDelayType } from '../utils/button/const';
|
|
5
6
|
import type { CustomThemedIconProps } from './icon';
|
|
6
|
-
import type { StyleOrStyleProp } from './style';
|
|
7
7
|
import type { CustomThemedTextProps, IconTextProps } from './text';
|
|
8
8
|
import type { ThemeViewProps } from './theme';
|
|
9
|
-
import type { ThemedViewProps } from './view';
|
|
10
|
-
export type PressableOnPress = (event: GestureResponderEvent) => void
|
|
11
|
-
export type PressableStyle = RNPressableProps['style'];
|
|
9
|
+
import type { ThemedViewProps, ViewRefObj } from './view';
|
|
10
|
+
export type PressableOnPress = (event: GestureResponderEvent) => void | SharedValue<(event: GestureResponderEvent) => void>;
|
|
12
11
|
export type OnPressDelayConfig<T = OnPressDelayType> = {
|
|
13
12
|
type: T;
|
|
14
13
|
wait: number;
|
|
15
14
|
};
|
|
16
|
-
export type PressableProps = Omit<RNPressableProps, '
|
|
15
|
+
export type PressableProps = Omit<RNPressableProps, 'onPress'> & Required<Pick<RNPressableProps, 'onPress'>> & {
|
|
17
16
|
scaleRatio?: ButtonScaleRatio | number;
|
|
18
|
-
style?: StyleOrStyleProp<ViewStyle>;
|
|
19
17
|
onPressDelayConfig?: OnPressDelayConfig;
|
|
18
|
+
ref?: ViewRefObj;
|
|
20
19
|
};
|
|
21
|
-
export type ThemedPressableProps =
|
|
22
|
-
export type
|
|
23
|
-
|
|
20
|
+
export type ThemedPressableProps = PressableProps & ThemeViewProps;
|
|
21
|
+
export type AnimatedPressableProps = ComponentProps<typeof AnimatedPressable>;
|
|
22
|
+
export type AnimatedThemedPressableProps = Omit<ThemedPressableProps, 'ref' | 'scaleRatio'> & Omit<AnimatedPressableProps, 'key' | 'style'> & {
|
|
23
|
+
animatedStyle?: AnimatedPressableProps['style'];
|
|
24
24
|
};
|
|
25
25
|
type ButtonProps = PropsWithChildren<Omit<ThemedPressableProps, 'children'>>;
|
|
26
26
|
export type ThemedButtonProps = ButtonProps & CustomThemedTextProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/types/button.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/types/button.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,KAAK,EACV,qBAAqB,EACrB,cAAc,IAAI,gBAAgB,EACnC,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,iBAAiB,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAC;AACpD,OAAO,KAAK,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAE1D,MAAM,MAAM,gBAAgB,GAAG,CAC7B,KAAK,EAAE,qBAAqB,KACzB,IAAI,GAAG,WAAW,CAAC,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC,CAAC;AAEhE,MAAM,MAAM,kBAAkB,CAAC,CAAC,GAAG,gBAAgB,IAAI;IACrD,IAAI,EAAE,CAAC,CAAC;IACR,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,GAC5D,QAAQ,CAAC,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC,GAAG;IAC5C,UAAU,CAAC,EAAE,gBAAgB,GAAG,MAAM,CAAC;IACvC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,GAAG,CAAC,EAAE,UAAU,CAAC;CAClB,CAAC;AAEJ,MAAM,MAAM,oBAAoB,GAAG,cAAc,GAAG,cAAc,CAAC;AAEnE,MAAM,MAAM,sBAAsB,GAAG,cAAc,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE9E,MAAM,MAAM,4BAA4B,GAAG,IAAI,CAC7C,oBAAoB,EACpB,KAAK,GAAG,YAAY,CACrB,GACC,IAAI,CAAC,sBAAsB,EAAE,KAAK,GAAG,OAAO,CAAC,GAAG;IAC9C,aAAa,CAAC,EAAE,sBAAsB,CAAC,OAAO,CAAC,CAAC;CACjD,CAAC;AAEJ,KAAK,WAAW,GAAG,iBAAiB,CAAC,IAAI,CAAC,oBAAoB,EAAE,UAAU,CAAC,CAAC,CAAC;AAE7E,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG,qBAAqB,CAAC;AAEpE,MAAM,MAAM,qBAAqB,GAAG,WAAW,GAAG,qBAAqB,CAAC;AAExE,MAAM,MAAM,yBAAyB,GAAG,iBAAiB,CACvD,WAAW,GAAG,aAAa,GAAG;IAAE,aAAa,CAAC,EAAE,eAAe,CAAA;CAAE,CAClE,CAAC"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import type { ViewStyle } from 'react-native';
|
|
2
1
|
import type { SwitchSize } from '../utils/theme/const';
|
|
3
2
|
import type { AnimatedThemedPressableProps, OnPressDelayConfig } from './button';
|
|
4
3
|
import type { CustomAnimation } from './reanimated';
|
|
5
|
-
import type { StyleOrStyleProp } from './style';
|
|
6
4
|
import type { ThemeColors } from './theme';
|
|
7
5
|
import type { AnimatedThemedViewProps } from './view';
|
|
8
6
|
export type CustomSwitchColors = {
|
|
@@ -22,6 +20,5 @@ export type ThemedSwitchProps = Omit<AnimatedThemedPressableProps, 'onPress' | '
|
|
|
22
20
|
customDisableAnimation?: CustomAnimation<0>;
|
|
23
21
|
customColors?: CustomSwitchColors;
|
|
24
22
|
thumbProps?: AnimatedThemedViewProps;
|
|
25
|
-
style?: StyleOrStyleProp<ViewStyle>;
|
|
26
23
|
};
|
|
27
24
|
//# sourceMappingURL=switch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../../../src/types/switch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../../../src/types/switch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EACV,4BAA4B,EAC5B,kBAAkB,EACnB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,QAAQ,CAAC;AAEtD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,aAAa,CAAC,EAAE,WAAW,CAAC;IAC5B,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,iBAAiB,CAAC,EAAE,WAAW,CAAC;IAChC,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,YAAY,CAAC,EAAE,WAAW,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,4BAA4B,EAC5B,SAAS,GAAG,UAAU,CACvB,GAAG;IACF,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACpC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,qBAAqB,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAC3C,sBAAsB,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAC5C,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC,UAAU,CAAC,EAAE,uBAAuB,CAAC;CACtC,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { BoxProps } from '@shopify/restyle';
|
|
2
|
-
import type { DependencyList, ReactNode, RefObject } from 'react';
|
|
2
|
+
import type { ComponentProps, DependencyList, ReactNode, RefObject } from 'react';
|
|
3
3
|
import type { NativeScrollEvent, NativeSyntheticEvent, ScrollViewProps as RNScrollViewProps, ScrollView, View, ViewProps } from 'react-native';
|
|
4
4
|
import type { AnimatedRef } from 'react-native-reanimated';
|
|
5
|
+
import type AnimatedView from '../components/view/AnimatedView';
|
|
5
6
|
import type { InsetsStyleConfig } from './style';
|
|
6
7
|
import type { Theme } from './theme';
|
|
7
8
|
export type ViewRefObj = RefObject<View | null>;
|
|
@@ -12,8 +13,9 @@ export type OnContentSizeChange = (width: number, height: number) => void;
|
|
|
12
13
|
export type ThemedViewProps = ViewProps & BoxProps<Theme> & {
|
|
13
14
|
ref?: ViewRefObj;
|
|
14
15
|
};
|
|
15
|
-
export type
|
|
16
|
-
|
|
16
|
+
export type AnimatedViewProps = ComponentProps<typeof AnimatedView>;
|
|
17
|
+
export type AnimatedThemedViewProps = Omit<ThemedViewProps, 'ref'> & Omit<AnimatedViewProps, 'key' | 'style'> & {
|
|
18
|
+
animatedStyle?: AnimatedViewProps['style'];
|
|
17
19
|
};
|
|
18
20
|
export type ThemedScreenWrapProps = ThemedViewProps & InsetsStyleConfig & {
|
|
19
21
|
effectSetup?: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../../src/types/view.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,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C,eAAe,EAAE,KAAK,CAAC,GAChE,IAAI,CAAC,iBAAiB,EAAE,KAAK,GAAG,OAAO,CAAC,GAAG;IACzC,aAAa,CAAC,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;CAC5C,CAAC;AAEJ,MAAM,MAAM,qBAAqB,GAAG,eAAe,GACjD,iBAAiB,GAAG;IAClB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,kBAAkB,CAAC,EAAE,cAAc,CAAC;CACrC,CAAC;AAEJ,MAAM,MAAM,eAAe,GAAG,iBAAiB,GAC7C,iBAAiB,GAAG;IAAE,GAAG,CAAC,EAAE,gBAAgB,CAAA;CAAE,CAAC;AAEjD,MAAM,MAAM,qBAAqB,GAAG,eAAe,GACjD,IAAI,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;AAE/B,MAAM,MAAM,yBAAyB,CAAC,CAAC,GAAG,OAAO,IAAI,CAAC,GAAG;IACvD,QAAQ,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;CAClC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"const.d.ts","sourceRoot":"","sources":["../../../../../src/utils/button/const.ts"],"names":[],"mappings":"AAAA,oBAAY,gBAAgB;IAC1B,MAAM,MAAM;IACZ,SAAS,OAAO;
|
|
1
|
+
{"version":3,"file":"const.d.ts","sourceRoot":"","sources":["../../../../../src/utils/button/const.ts"],"names":[],"mappings":"AAAA,oBAAY,gBAAgB;IAC1B,MAAM,MAAM;IACZ,SAAS,OAAO;IAChB,IAAI,IAAI;CACT;AAED,oBAAY,gBAAgB;IAC1B,QAAQ,IAAA;IACR,QAAQ,IAAA;CACT"}
|