@0610studio/zs-ui 0.0.13 → 0.0.15

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.
Files changed (77) hide show
  1. package/build/index.d.ts +2 -1
  2. package/build/index.d.ts.map +1 -1
  3. package/build/index.js +4 -1
  4. package/build/index.js.map +1 -1
  5. package/build/model/index.d.ts +4 -0
  6. package/build/model/index.d.ts.map +1 -0
  7. package/build/model/index.js +4 -0
  8. package/build/model/index.js.map +1 -0
  9. package/build/types/index.d.ts +9 -0
  10. package/build/types/index.d.ts.map +1 -0
  11. package/build/types/index.js +2 -0
  12. package/build/types/index.js.map +1 -0
  13. package/package.json +6 -1
  14. package/.eslintrc.js +0 -5
  15. package/android/.gradle/8.9/checksums/checksums.lock +0 -0
  16. package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
  17. package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
  18. package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
  19. package/android/.gradle/8.9/gc.properties +0 -0
  20. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  21. package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
  22. package/android/.gradle/vcs-1/gc.properties +0 -0
  23. package/android/build.gradle +0 -43
  24. package/android/src/main/AndroidManifest.xml +0 -2
  25. package/android/src/main/java/kr/co/studio0610/zsui/ZsUiModule.kt +0 -47
  26. package/android/src/main/java/kr/co/studio0610/zsui/ZsUiView.kt +0 -7
  27. package/expo-module.config.json +0 -9
  28. package/ios/ZsUi.podspec +0 -27
  29. package/ios/ZsUiModule.swift +0 -44
  30. package/ios/ZsUiView.swift +0 -7
  31. package/src/ZsUi.types.ts +0 -7
  32. package/src/ZsUiModule.ts +0 -5
  33. package/src/ZsUiModule.web.ts +0 -13
  34. package/src/ZsUiView.tsx +0 -11
  35. package/src/ZsUiView.web.tsx +0 -11
  36. package/src/assets/SvgCheck.tsx +0 -16
  37. package/src/assets/SvgX.tsx +0 -22
  38. package/src/index.ts +0 -52
  39. package/src/model/types.ts +0 -104
  40. package/src/model/useNotify.ts +0 -14
  41. package/src/model/useNotifyProvider.tsx +0 -259
  42. package/src/model/useThemeProvider.tsx +0 -99
  43. package/src/model/utils.ts +0 -31
  44. package/src/notify/AlertNotify/index.tsx +0 -172
  45. package/src/notify/BottomSheetNotify/index.tsx +0 -177
  46. package/src/notify/BottomSheetNotify/model/useBottomSheetNotify.tsx +0 -270
  47. package/src/notify/BottomSheetNotify/types/index.ts +0 -3
  48. package/src/notify/BottomSheetNotify/ui/BSTextInput/index.tsx +0 -28
  49. package/src/notify/BottomSheetNotify/ui/ContentsComponent/index.tsx +0 -86
  50. package/src/notify/LoadingNotify/index.tsx +0 -46
  51. package/src/notify/PopOver/PopOverButton.tsx +0 -56
  52. package/src/notify/PopOver/PopOverMenu.tsx +0 -95
  53. package/src/notify/SnackbarNotify/index.tsx +0 -43
  54. package/src/notify/SnackbarNotify/ui/SnackbarItem.tsx +0 -103
  55. package/src/notify/index.ts +0 -21
  56. package/src/notify/ui/ModalBackground.tsx +0 -46
  57. package/src/theme/index.ts +0 -3
  58. package/src/theme/palette.ts +0 -384
  59. package/src/theme/types.ts +0 -170
  60. package/src/theme/typography.ts +0 -199
  61. package/src/ui/ThrottleButton/index.tsx +0 -119
  62. package/src/ui/ZSBottomButton/index.tsx +0 -151
  63. package/src/ui/ZSContainer/index.tsx +0 -92
  64. package/src/ui/ZSPressable/index.tsx +0 -82
  65. package/src/ui/ZSRadioGroup/index.tsx +0 -141
  66. package/src/ui/ZSText/index.tsx +0 -22
  67. package/src/ui/ZSTextField/index.tsx +0 -200
  68. package/src/ui/ZSTextField/ui/ButtonClose.tsx +0 -20
  69. package/src/ui/ZSTextField/ui/ErrorComponent.tsx +0 -25
  70. package/src/ui/ZSView/index.tsx +0 -30
  71. package/src/ui/atoms/AnimatedWrapper.tsx +0 -90
  72. package/src/ui/atoms/ScrollViewAtom.tsx +0 -17
  73. package/src/ui/atoms/TextAtom.tsx +0 -15
  74. package/src/ui/atoms/ViewAtom.tsx +0 -15
  75. package/src/ui/index.ts +0 -27
  76. package/src/ui/types.ts +0 -12
  77. package/tsconfig.json +0 -9
@@ -1,90 +0,0 @@
1
- import React, { useMemo, useCallback } from 'react';
2
- import { View, ViewProps, Platform } from 'react-native';
3
- import Animated, { FadeInDown, FadeOut, useAnimatedStyle, withTiming, useSharedValue, runOnJS } from 'react-native-reanimated';
4
- import { useTheme } from '../../model/useThemeProvider';
5
- import { ShadowLevel, ShadowStyle } from '../types';
6
-
7
- const DEFAULT_DURATION = 200 as const;
8
- const SHADOW_DURATION = 50 as const;
9
- const IOS_SHADOW: readonly ShadowStyle[] = [
10
- { shadowOffset: { width: 0, height: 0 }, shadowOpacity: 0, shadowRadius: 0 },
11
- { shadowOffset: { width: 0, height: 1 }, shadowOpacity: 1, shadowRadius: 1.00 },
12
- { shadowOffset: { width: 0, height: 1 }, shadowOpacity: 1, shadowRadius: 1.41 },
13
- { shadowOffset: { width: 0, height: 1 }, shadowOpacity: 1, shadowRadius: 2.22 },
14
- { shadowOffset: { width: 0, height: 2 }, shadowOpacity: 1, shadowRadius: 2.62 },
15
- { shadowOffset: { width: 0, height: 2 }, shadowOpacity: 1, shadowRadius: 3.84 },
16
- { shadowOffset: { width: 0, height: 3 }, shadowOpacity: 1, shadowRadius: 4.65 },
17
- { shadowOffset: { width: 0, height: 3 }, shadowOpacity: 1, shadowRadius: 4.65 },
18
- { shadowOffset: { width: 0, height: 4 }, shadowOpacity: 1, shadowRadius: 4.65 },
19
- { shadowOffset: { width: 0, height: 4 }, shadowOpacity: 1, shadowRadius: 5.46 },
20
- { shadowOffset: { width: 0, height: 5 }, shadowOpacity: 1, shadowRadius: 6.27 },
21
- ] as const;
22
-
23
- interface AnimatedWrapperProps extends ViewProps {
24
- isAnimation: boolean;
25
- elevationLevel?: ShadowLevel;
26
- duration?: number;
27
- }
28
-
29
- function AnimatedWrapper({
30
- isAnimation = true,
31
- elevationLevel = 0,
32
- duration = DEFAULT_DURATION,
33
- style,
34
- children,
35
- ...props
36
- }: AnimatedWrapperProps) {
37
- const { palette } = useTheme();
38
- const opacity = useSharedValue(0);
39
-
40
- // 그림자 및 기타 스타일을 플랫폼에 맞게 미리 계산
41
- const staticStyle = useMemo(() => {
42
- if (Platform.OS === 'ios') {
43
- const { shadowOpacity, ...rest } = IOS_SHADOW[elevationLevel];
44
- return { shadowColor: palette.elevationShadow[elevationLevel], ...rest };
45
- }
46
- return { shadowColor: palette.elevationShadow[elevationLevel] };
47
- }, [elevationLevel, palette]);
48
-
49
- // 애니메이션 스타일 정의 (iOS 그림자 및 Android elevation 처리)
50
- const animatedStyle = useAnimatedStyle(() => {
51
- if (Platform.OS === 'ios') {
52
- return { shadowOpacity: opacity.value * IOS_SHADOW[elevationLevel].shadowOpacity };
53
- }
54
- return { elevation: opacity.value * elevationLevel };
55
- }, [elevationLevel]);
56
-
57
- // 컴포넌트가 등장할 때 애니메이션 핸들링
58
- const onEntering = useCallback(() => {
59
- opacity.value = withTiming(1, { duration: SHADOW_DURATION });
60
- }, [opacity]);
61
-
62
- // 애니메이션 속성 메모이제이션
63
- const animationProps = useMemo(() => ({
64
- entering: FadeInDown.duration(duration).withCallback((finished) => {
65
- 'worklet';
66
- if (finished) {
67
- runOnJS(onEntering)();
68
- }
69
- }),
70
- exiting: FadeOut.duration(50),
71
- }), [duration, onEntering]);
72
-
73
- // 애니메이션이 비활성화된 경우 기본 View로 렌더링
74
- if (!isAnimation) {
75
- return <View style={[style, staticStyle]} {...props}>{children}</View>;
76
- }
77
-
78
- // 애니메이션이 적용된 View로 렌더링
79
- return (
80
- <Animated.View
81
- style={[style, staticStyle, animatedStyle]}
82
- {...animationProps}
83
- {...props}
84
- >
85
- {children}
86
- </Animated.View>
87
- );
88
- }
89
-
90
- export default React.memo(AnimatedWrapper);
@@ -1,17 +0,0 @@
1
- import React, { forwardRef } from 'react';
2
- import { ScrollView, ScrollViewProps } from 'react-native';
3
-
4
- type ScrollViewAtomProps = ScrollViewProps;
5
-
6
- // scrollViewRef를 제거하고 ref로 대체합니다.
7
- const ScrollViewAtom = forwardRef<ScrollView, ScrollViewAtomProps>(function ScrollViewAtom(
8
- { children, style, ...props }, ref
9
- ) {
10
- return (
11
- <ScrollView ref={ref} {...props} style={style}>
12
- {children}
13
- </ScrollView>
14
- );
15
- });
16
-
17
- export default ScrollViewAtom;
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
- import { Text, TextProps } from 'react-native';
3
-
4
- type TextAtomProps = TextProps & {
5
- };
6
-
7
- function TextAtom({ children, ...props }: TextAtomProps) {
8
- return (
9
- <Text {...props}>
10
- {children}
11
- </Text>
12
- );
13
- }
14
-
15
- export default TextAtom;
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
- import { View, ViewProps } from 'react-native';
3
-
4
- type ViewAtomProps = ViewProps & {
5
- };
6
-
7
- function ViewAtom({ children, ...props }: ViewAtomProps) {
8
- return (
9
- <View {...props}>
10
- {children}
11
- </View>
12
- );
13
- }
14
-
15
- export default ViewAtom;
package/src/ui/index.ts DELETED
@@ -1,27 +0,0 @@
1
- import ZSView from './ZSView';
2
- import AnimatedWrapper from './atoms/AnimatedWrapper';
3
- import TextAtom from './atoms/TextAtom';
4
- import ScrollViewAtom from './atoms/ScrollViewAtom';
5
- import ZSContainer from './ZSContainer';
6
- import ZSPressable from './ZSPressable';
7
- import ZSText from './ZSText';
8
- import ThrottleButton from './ThrottleButton';
9
- import ZSTextField from './ZSTextField';
10
- import ZSRadioGroup from './ZSRadioGroup';
11
- import ZSBottomButton from './ZSBottomButton';
12
- import * as types from './types';
13
-
14
- export {
15
- ZSView,
16
- AnimatedWrapper,
17
- TextAtom,
18
- ScrollViewAtom,
19
- ZSContainer,
20
- ZSPressable,
21
- ZSText,
22
- ThrottleButton,
23
- ZSTextField,
24
- ZSRadioGroup,
25
- ZSBottomButton,
26
- types
27
- };
package/src/ui/types.ts DELETED
@@ -1,12 +0,0 @@
1
- export interface RadioOption {
2
- value: string;
3
- index: string;
4
- }
5
-
6
- export type ShadowLevel = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
7
-
8
- export interface ShadowStyle {
9
- shadowOffset: { width: number; height: number };
10
- shadowOpacity: number;
11
- shadowRadius: number;
12
- }
package/tsconfig.json DELETED
@@ -1,9 +0,0 @@
1
- // @generated by expo-module-scripts
2
- {
3
- "extends": "expo-module-scripts/tsconfig.base",
4
- "compilerOptions": {
5
- "outDir": "./build"
6
- },
7
- "include": ["./src"],
8
- "exclude": ["**/__mocks__/*", "**/__tests__/*"]
9
- }