@0610studio/zs-ui 0.0.1

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 (250) hide show
  1. package/.eslintrc.js +5 -0
  2. package/README.md +3 -0
  3. package/android/.gradle/8.9/checksums/checksums.lock +0 -0
  4. package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
  5. package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
  6. package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
  7. package/android/.gradle/8.9/gc.properties +0 -0
  8. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  9. package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
  10. package/android/.gradle/vcs-1/gc.properties +0 -0
  11. package/android/build.gradle +43 -0
  12. package/android/src/main/AndroidManifest.xml +2 -0
  13. package/android/src/main/java/kr/co/studio0610/zsui/ZsUiModule.kt +47 -0
  14. package/android/src/main/java/kr/co/studio0610/zsui/ZsUiView.kt +7 -0
  15. package/build/ZsUi.types.d.ts +7 -0
  16. package/build/ZsUi.types.d.ts.map +1 -0
  17. package/build/ZsUi.types.js +2 -0
  18. package/build/ZsUi.types.js.map +1 -0
  19. package/build/ZsUiModule.d.ts +3 -0
  20. package/build/ZsUiModule.d.ts.map +1 -0
  21. package/build/ZsUiModule.js +5 -0
  22. package/build/ZsUiModule.js.map +1 -0
  23. package/build/ZsUiModule.web.d.ts +7 -0
  24. package/build/ZsUiModule.web.d.ts.map +1 -0
  25. package/build/ZsUiModule.web.js +12 -0
  26. package/build/ZsUiModule.web.js.map +1 -0
  27. package/build/ZsUiView.d.ts +4 -0
  28. package/build/ZsUiView.d.ts.map +1 -0
  29. package/build/ZsUiView.js +7 -0
  30. package/build/ZsUiView.js.map +1 -0
  31. package/build/ZsUiView.web.d.ts +4 -0
  32. package/build/ZsUiView.web.d.ts.map +1 -0
  33. package/build/ZsUiView.web.js +7 -0
  34. package/build/ZsUiView.web.js.map +1 -0
  35. package/build/assets/SvgCheck.d.ts +7 -0
  36. package/build/assets/SvgCheck.d.ts.map +1 -0
  37. package/build/assets/SvgCheck.js +8 -0
  38. package/build/assets/SvgCheck.js.map +1 -0
  39. package/build/assets/SvgX.d.ts +6 -0
  40. package/build/assets/SvgX.d.ts.map +1 -0
  41. package/build/assets/SvgX.js +14 -0
  42. package/build/assets/SvgX.js.map +1 -0
  43. package/build/index.d.ts +5 -0
  44. package/build/index.d.ts.map +1 -0
  45. package/build/index.js +10 -0
  46. package/build/index.js.map +1 -0
  47. package/build/model/types.d.ts +84 -0
  48. package/build/model/types.d.ts.map +1 -0
  49. package/build/model/types.js +11 -0
  50. package/build/model/types.js.map +1 -0
  51. package/build/model/useNotify.d.ts +5 -0
  52. package/build/model/useNotify.d.ts.map +1 -0
  53. package/build/model/useNotify.js +11 -0
  54. package/build/model/useNotify.js.map +1 -0
  55. package/build/model/useNotifyProvider.d.ts +3 -0
  56. package/build/model/useNotifyProvider.d.ts.map +1 -0
  57. package/build/model/useNotifyProvider.js +165 -0
  58. package/build/model/useNotifyProvider.js.map +1 -0
  59. package/build/model/useThemeProvider.d.ts +19 -0
  60. package/build/model/useThemeProvider.d.ts.map +1 -0
  61. package/build/model/useThemeProvider.js +73 -0
  62. package/build/model/useThemeProvider.js.map +1 -0
  63. package/build/model/utils.d.ts +12 -0
  64. package/build/model/utils.d.ts.map +1 -0
  65. package/build/model/utils.js +26 -0
  66. package/build/model/utils.js.map +1 -0
  67. package/build/notify/AlertNotify/index.d.ts +5 -0
  68. package/build/notify/AlertNotify/index.d.ts.map +1 -0
  69. package/build/notify/AlertNotify/index.js +109 -0
  70. package/build/notify/AlertNotify/index.js.map +1 -0
  71. package/build/notify/BottomSheetNotify/index.d.ts +19 -0
  72. package/build/notify/BottomSheetNotify/index.d.ts.map +1 -0
  73. package/build/notify/BottomSheetNotify/index.js +90 -0
  74. package/build/notify/BottomSheetNotify/index.js.map +1 -0
  75. package/build/notify/BottomSheetNotify/model/useBottomSheetNotify.d.ts +43 -0
  76. package/build/notify/BottomSheetNotify/model/useBottomSheetNotify.d.ts.map +1 -0
  77. package/build/notify/BottomSheetNotify/model/useBottomSheetNotify.js +222 -0
  78. package/build/notify/BottomSheetNotify/model/useBottomSheetNotify.js.map +1 -0
  79. package/build/notify/BottomSheetNotify/types/index.d.ts +4 -0
  80. package/build/notify/BottomSheetNotify/types/index.d.ts.map +1 -0
  81. package/build/notify/BottomSheetNotify/types/index.js +2 -0
  82. package/build/notify/BottomSheetNotify/types/index.js.map +1 -0
  83. package/build/notify/BottomSheetNotify/ui/BSTextInput/index.d.ts +4 -0
  84. package/build/notify/BottomSheetNotify/ui/BSTextInput/index.d.ts.map +1 -0
  85. package/build/notify/BottomSheetNotify/ui/BSTextInput/index.js +14 -0
  86. package/build/notify/BottomSheetNotify/ui/BSTextInput/index.js.map +1 -0
  87. package/build/notify/BottomSheetNotify/ui/ContentsComponent/index.d.ts +19 -0
  88. package/build/notify/BottomSheetNotify/ui/ContentsComponent/index.d.ts.map +1 -0
  89. package/build/notify/BottomSheetNotify/ui/ContentsComponent/index.js +33 -0
  90. package/build/notify/BottomSheetNotify/ui/ContentsComponent/index.js.map +1 -0
  91. package/build/notify/LoadingNotify/index.d.ts +6 -0
  92. package/build/notify/LoadingNotify/index.d.ts.map +1 -0
  93. package/build/notify/LoadingNotify/index.js +28 -0
  94. package/build/notify/LoadingNotify/index.js.map +1 -0
  95. package/build/notify/PopOver/PopOverButton.d.ts +11 -0
  96. package/build/notify/PopOver/PopOverButton.d.ts.map +1 -0
  97. package/build/notify/PopOver/PopOverButton.js +31 -0
  98. package/build/notify/PopOver/PopOverButton.js.map +1 -0
  99. package/build/notify/PopOver/PopOverMenu.d.ts +4 -0
  100. package/build/notify/PopOver/PopOverMenu.d.ts.map +1 -0
  101. package/build/notify/PopOver/PopOverMenu.js +69 -0
  102. package/build/notify/PopOver/PopOverMenu.js.map +1 -0
  103. package/build/notify/SnackbarNotify/index.d.ts +7 -0
  104. package/build/notify/SnackbarNotify/index.d.ts.map +1 -0
  105. package/build/notify/SnackbarNotify/index.js +24 -0
  106. package/build/notify/SnackbarNotify/index.js.map +1 -0
  107. package/build/notify/SnackbarNotify/ui/SnackbarItem.d.ts +9 -0
  108. package/build/notify/SnackbarNotify/ui/SnackbarItem.d.ts.map +1 -0
  109. package/build/notify/SnackbarNotify/ui/SnackbarItem.js +72 -0
  110. package/build/notify/SnackbarNotify/ui/SnackbarItem.js.map +1 -0
  111. package/build/notify/index.d.ts +11 -0
  112. package/build/notify/index.d.ts.map +1 -0
  113. package/build/notify/index.js +11 -0
  114. package/build/notify/index.js.map +1 -0
  115. package/build/notify/ui/ModalBackground.d.ts +9 -0
  116. package/build/notify/ui/ModalBackground.d.ts.map +1 -0
  117. package/build/notify/ui/ModalBackground.js +27 -0
  118. package/build/notify/ui/ModalBackground.js.map +1 -0
  119. package/build/theme/index.d.ts +4 -0
  120. package/build/theme/index.d.ts.map +1 -0
  121. package/build/theme/index.js +4 -0
  122. package/build/theme/index.js.map +1 -0
  123. package/build/theme/palette.d.ts +62 -0
  124. package/build/theme/palette.d.ts.map +1 -0
  125. package/build/theme/palette.js +353 -0
  126. package/build/theme/palette.js.map +1 -0
  127. package/build/theme/types.d.ts +101 -0
  128. package/build/theme/types.d.ts.map +1 -0
  129. package/build/theme/types.js +5 -0
  130. package/build/theme/types.js.map +1 -0
  131. package/build/theme/typography.d.ts +5 -0
  132. package/build/theme/typography.d.ts.map +1 -0
  133. package/build/theme/typography.js +198 -0
  134. package/build/theme/typography.js.map +1 -0
  135. package/build/ui/ThrottleButton/index.d.ts +15 -0
  136. package/build/ui/ThrottleButton/index.d.ts.map +1 -0
  137. package/build/ui/ThrottleButton/index.js +74 -0
  138. package/build/ui/ThrottleButton/index.js.map +1 -0
  139. package/build/ui/ZSBottomButton/index.d.ts +16 -0
  140. package/build/ui/ZSBottomButton/index.d.ts.map +1 -0
  141. package/build/ui/ZSBottomButton/index.js +89 -0
  142. package/build/ui/ZSBottomButton/index.js.map +1 -0
  143. package/build/ui/ZSContainer/index.d.ts +19 -0
  144. package/build/ui/ZSContainer/index.d.ts.map +1 -0
  145. package/build/ui/ZSContainer/index.js +37 -0
  146. package/build/ui/ZSContainer/index.js.map +1 -0
  147. package/build/ui/ZSPressable/index.d.ts +17 -0
  148. package/build/ui/ZSPressable/index.d.ts.map +1 -0
  149. package/build/ui/ZSPressable/index.js +35 -0
  150. package/build/ui/ZSPressable/index.js.map +1 -0
  151. package/build/ui/ZSRadioGroup/index.d.ts +18 -0
  152. package/build/ui/ZSRadioGroup/index.d.ts.map +1 -0
  153. package/build/ui/ZSRadioGroup/index.js +82 -0
  154. package/build/ui/ZSRadioGroup/index.js.map +1 -0
  155. package/build/ui/ZSText/index.d.ts +11 -0
  156. package/build/ui/ZSText/index.d.ts.map +1 -0
  157. package/build/ui/ZSText/index.js +10 -0
  158. package/build/ui/ZSText/index.js.map +1 -0
  159. package/build/ui/ZSTextField/index.d.ts +31 -0
  160. package/build/ui/ZSTextField/index.d.ts.map +1 -0
  161. package/build/ui/ZSTextField/index.js +102 -0
  162. package/build/ui/ZSTextField/index.js.map +1 -0
  163. package/build/ui/ZSTextField/ui/ButtonClose.d.ts +6 -0
  164. package/build/ui/ZSTextField/ui/ButtonClose.d.ts.map +1 -0
  165. package/build/ui/ZSTextField/ui/ButtonClose.js +9 -0
  166. package/build/ui/ZSTextField/ui/ButtonClose.js.map +1 -0
  167. package/build/ui/ZSTextField/ui/ErrorComponent.d.ts +7 -0
  168. package/build/ui/ZSTextField/ui/ErrorComponent.d.ts.map +1 -0
  169. package/build/ui/ZSTextField/ui/ErrorComponent.js +16 -0
  170. package/build/ui/ZSTextField/ui/ErrorComponent.js.map +1 -0
  171. package/build/ui/ZSView/index.d.ts +8 -0
  172. package/build/ui/ZSView/index.d.ts.map +1 -0
  173. package/build/ui/ZSView/index.js +17 -0
  174. package/build/ui/ZSView/index.js.map +1 -0
  175. package/build/ui/atoms/AnimatedWrapper.d.ts +12 -0
  176. package/build/ui/atoms/AnimatedWrapper.d.ts.map +1 -0
  177. package/build/ui/atoms/AnimatedWrapper.js +61 -0
  178. package/build/ui/atoms/AnimatedWrapper.js.map +1 -0
  179. package/build/ui/atoms/ScrollViewAtom.d.ts +5 -0
  180. package/build/ui/atoms/ScrollViewAtom.d.ts.map +1 -0
  181. package/build/ui/atoms/ScrollViewAtom.js +10 -0
  182. package/build/ui/atoms/ScrollViewAtom.js.map +1 -0
  183. package/build/ui/atoms/TextAtom.d.ts +6 -0
  184. package/build/ui/atoms/TextAtom.d.ts.map +1 -0
  185. package/build/ui/atoms/TextAtom.js +9 -0
  186. package/build/ui/atoms/TextAtom.js.map +1 -0
  187. package/build/ui/atoms/ViewAtom.d.ts +6 -0
  188. package/build/ui/atoms/ViewAtom.d.ts.map +1 -0
  189. package/build/ui/atoms/ViewAtom.js +9 -0
  190. package/build/ui/atoms/ViewAtom.js.map +1 -0
  191. package/build/ui/index.d.ts +14 -0
  192. package/build/ui/index.d.ts.map +1 -0
  193. package/build/ui/index.js +14 -0
  194. package/build/ui/index.js.map +1 -0
  195. package/build/ui/types.d.ts +14 -0
  196. package/build/ui/types.d.ts.map +1 -0
  197. package/build/ui/types.js +2 -0
  198. package/build/ui/types.js.map +1 -0
  199. package/expo-module.config.json +9 -0
  200. package/ios/ZsUi.podspec +27 -0
  201. package/ios/ZsUiModule.swift +44 -0
  202. package/ios/ZsUiView.swift +7 -0
  203. package/package.json +54 -0
  204. package/src/ZsUi.types.ts +7 -0
  205. package/src/ZsUiModule.ts +5 -0
  206. package/src/ZsUiModule.web.ts +13 -0
  207. package/src/ZsUiView.tsx +11 -0
  208. package/src/ZsUiView.web.tsx +11 -0
  209. package/src/assets/SvgCheck.tsx +16 -0
  210. package/src/assets/SvgX.tsx +22 -0
  211. package/src/index.ts +52 -0
  212. package/src/model/types.ts +102 -0
  213. package/src/model/useNotify.ts +14 -0
  214. package/src/model/useNotifyProvider.tsx +251 -0
  215. package/src/model/useThemeProvider.tsx +99 -0
  216. package/src/model/utils.ts +31 -0
  217. package/src/notify/AlertNotify/index.tsx +177 -0
  218. package/src/notify/BottomSheetNotify/index.tsx +177 -0
  219. package/src/notify/BottomSheetNotify/model/useBottomSheetNotify.tsx +270 -0
  220. package/src/notify/BottomSheetNotify/types/index.ts +3 -0
  221. package/src/notify/BottomSheetNotify/ui/BSTextInput/index.tsx +28 -0
  222. package/src/notify/BottomSheetNotify/ui/ContentsComponent/index.tsx +76 -0
  223. package/src/notify/LoadingNotify/index.tsx +46 -0
  224. package/src/notify/PopOver/PopOverButton.tsx +56 -0
  225. package/src/notify/PopOver/PopOverMenu.tsx +95 -0
  226. package/src/notify/SnackbarNotify/index.tsx +43 -0
  227. package/src/notify/SnackbarNotify/ui/SnackbarItem.tsx +103 -0
  228. package/src/notify/index.ts +21 -0
  229. package/src/notify/ui/ModalBackground.tsx +46 -0
  230. package/src/theme/index.ts +3 -0
  231. package/src/theme/palette.ts +374 -0
  232. package/src/theme/types.ts +150 -0
  233. package/src/theme/typography.ts +199 -0
  234. package/src/ui/ThrottleButton/index.tsx +119 -0
  235. package/src/ui/ZSBottomButton/index.tsx +151 -0
  236. package/src/ui/ZSContainer/index.tsx +92 -0
  237. package/src/ui/ZSPressable/index.tsx +82 -0
  238. package/src/ui/ZSRadioGroup/index.tsx +141 -0
  239. package/src/ui/ZSText/index.tsx +22 -0
  240. package/src/ui/ZSTextField/index.tsx +200 -0
  241. package/src/ui/ZSTextField/ui/ButtonClose.tsx +20 -0
  242. package/src/ui/ZSTextField/ui/ErrorComponent.tsx +25 -0
  243. package/src/ui/ZSView/index.tsx +30 -0
  244. package/src/ui/atoms/AnimatedWrapper.tsx +89 -0
  245. package/src/ui/atoms/ScrollViewAtom.tsx +17 -0
  246. package/src/ui/atoms/TextAtom.tsx +15 -0
  247. package/src/ui/atoms/ViewAtom.tsx +15 -0
  248. package/src/ui/index.ts +27 -0
  249. package/src/ui/types.ts +12 -0
  250. package/tsconfig.json +9 -0
@@ -0,0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CAAC,YAAY,CAAC,EAE/B;YAAA,EAAE,eAAe,CACnB;UAAA,EAAE,QAAQ,CAAC,IAAI,CACjB;QAAA,EAAE,eAAe,CACnB;MAAA,EAAE,sBAAsB,CAC1B;IAAA,EAAE,QAAQ,CAAC,IAAI,CAAC,CACjB,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAGD,MAAM,YAAY,GAAG,CAAC,EACpB,UAAU,EACV,IAAI,EACJ,OAAO,EACP,YAAY,GAMb,EAAE,EAAE,CACH,UAAU,CAAC,MAAM,CAAC;IAChB,OAAO,EAAE;QACP,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,KAAK;QACrC,MAAM,EAAE,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,MAAM;QACvC,MAAM,EAAE,CAAC;KACV;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,UAAU;QACpB,MAAM,EAAE,IAAI;QACZ,QAAQ,EAAE,QAAQ;KACnB;IACD,eAAe,EAAE;QACf,KAAK,EAAE,MAAM;QACb,UAAU,EAAE,QAAQ;QACpB,UAAU,EAAE,EAAE;KACf;IACD,MAAM,EAAE;QACN,eAAe,EAAE,UAAU,CAAC,MAAM;QAClC,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,CAAC;QACT,YAAY,EAAE,CAAC;KAChB;IACD,eAAe,EAAE;QACf,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,MAAM;KACf;CACF,CAAC,CAAC;AAEL,eAAe,UAAU,CAAC,iBAAiB,CAAC,CAAC","sourcesContent":["import React, { forwardRef, useImperativeHandle, useMemo } from 'react';\nimport { StyleSheet, Dimensions, ViewProps, Keyboard } from 'react-native';\nimport { GestureDetector, GestureHandlerRootView } from 'react-native-gesture-handler';\nimport Animated, { FadeIn, FadeOut } from 'react-native-reanimated';\nimport useBottomSheetNotify from './model/useBottomSheetNotify';\nimport { BottomSheetNotifyRef } from './types';\nimport ContentsComponent from './ui/ContentsComponent';\nimport { useTheme } from '../../model/useThemeProvider';\nimport { ColorPalette, ThemeBackground, ThemeTextType } from '../../theme';\nimport ViewAtom from '../../ui/atoms/ViewAtom';\nimport { ZSView } from '../../ui';\n\nconst DEFAULT_BORDER_RADIUS = 24;\nconst BS_MAX_HEIGHT = Dimensions.get('window').height - 120;\n\ninterface Props extends ViewProps {\n marginBottomBS?: number;\n bottomSheetBackgroundColor?: string;\n bottomSheetPadding?: number;\n closeOffset?: number;\n contentsGestureEnable?: boolean;\n isHandleVisible?: boolean;\n bottomSheetMarginX?: number;\n isBottomRadius?: boolean;\n maxHeight?: number;\n isScrollView?: boolean;\n bottomSheetComponent: React.ReactNode;\n}\n\nfunction BottomSheetNotify(props: Props, ref: React.Ref<BottomSheetNotifyRef>) {\n const {\n marginBottomBS = 15,\n bottomSheetPadding = 20,\n bottomSheetBackgroundColor,\n closeOffset = Dimensions.get('window').height,\n contentsGestureEnable = true,\n isHandleVisible = true,\n bottomSheetMarginX = 10,\n isBottomRadius = true,\n isScrollView = true,\n maxHeight = BS_MAX_HEIGHT,\n bottomSheetComponent\n } = props;\n\n const {\n HANDLE_HEIGHT,\n bottomSheetVisible,\n bsAnimatedStyle,\n onGestureEvent,\n handleVisible,\n onTapEvent,\n openPosition,\n screenWidth,\n screenHeight,\n panGestureRef,\n listScrollPosition,\n bsModalBgStyle,\n backgroundPressHandler\n } = useBottomSheetNotify({\n bottomSheetPadding,\n closeOffset,\n contentsGestureEnable,\n bottomSheetMarginX,\n isHandleVisible,\n });\n\n const { palette: { background, text, primary, modalBgColor } } = useTheme();\n\n const styles = useMemo(\n () => createStyles({ background, text, primary, modalBgColor }),\n [background, text, primary, modalBgColor]\n );\n\n useImperativeHandle(ref, () => ({\n handleVisible,\n }));\n\n return bottomSheetVisible && bottomSheetComponent ? (\n <Animated.View\n style={[styles.modalBg, bsModalBgStyle]}\n entering={FadeIn.duration(50)}\n exiting={FadeOut.duration(50)}\n onTouchEnd={backgroundPressHandler} // 외부 터치 시 시트 닫기\n >\n <GestureHandlerRootView style={styles.rootViewWrapper}>\n <GestureDetector gesture={onGestureEvent}>\n <Animated.View\n onTouchEnd={(e) => {\n e.stopPropagation();\n Keyboard.dismiss(); // 키보드 숨김\n }}\n style={[\n styles.sheet,\n {\n width: screenWidth,\n height: screenHeight,\n paddingHorizontal: bottomSheetPadding,\n left: bottomSheetMarginX,\n right: bottomSheetMarginX,\n borderTopLeftRadius: DEFAULT_BORDER_RADIUS,\n borderTopRightRadius: DEFAULT_BORDER_RADIUS,\n borderBottomLeftRadius: isBottomRadius ? DEFAULT_BORDER_RADIUS : 0,\n borderBottomRightRadius: isBottomRadius ? DEFAULT_BORDER_RADIUS : 0,\n backgroundColor: bottomSheetBackgroundColor || background.base,\n },\n bsAnimatedStyle, // 애니메이션 스타일 적용\n ]}\n >\n {isHandleVisible && (\n <ZSView style={[styles.handleContainer, { height: HANDLE_HEIGHT }]}>\n <ViewAtom style={styles.handle} />\n </ZSView>\n )}\n\n <GestureDetector gesture={onTapEvent}>\n <ContentsComponent\n HANDLE_HEIGHT={HANDLE_HEIGHT}\n panGestureRef={panGestureRef}\n listScrollPosition={listScrollPosition}\n openPosition={openPosition}\n marginBottomBS={marginBottomBS}\n screenHeight={screenHeight}\n bottomSheetComponent={bottomSheetComponent}\n bottomSheetPadding={bottomSheetPadding}\n maxHeight={maxHeight}\n isScrollView={isScrollView}\n />\n </GestureDetector>\n </Animated.View>\n </GestureDetector>\n </GestureHandlerRootView>\n </Animated.View>\n ) : null;\n}\n\n\nconst createStyles = ({\n background,\n text,\n primary,\n modalBgColor,\n}: {\n background: ThemeBackground;\n text: ThemeTextType;\n primary: ColorPalette;\n modalBgColor: string;\n}) =>\n StyleSheet.create({\n modalBg: {\n position: 'absolute',\n width: Dimensions.get('window').width,\n height: Dimensions.get('window').height,\n bottom: 0,\n },\n sheet: {\n position: 'absolute',\n zIndex: 9000,\n overflow: 'hidden',\n },\n handleContainer: {\n width: '100%',\n alignItems: 'center',\n paddingTop: 13,\n },\n handle: {\n backgroundColor: background.layer2,\n width: 50,\n height: 4,\n borderRadius: 2,\n },\n rootViewWrapper: {\n width: '100%',\n height: '100%',\n },\n });\n\nexport default forwardRef(BottomSheetNotify);\n"]}
@@ -0,0 +1,43 @@
1
+ import { GestureType } from 'react-native-gesture-handler';
2
+ interface Props {
3
+ bottomSheetPadding: number;
4
+ closeOffset: number;
5
+ contentsGestureEnable: boolean;
6
+ isHandleVisible: boolean;
7
+ bottomSheetMarginX: number;
8
+ }
9
+ declare function useBottomSheetNotify({ bottomSheetPadding, closeOffset, contentsGestureEnable, bottomSheetMarginX, isHandleVisible, }: Props): {
10
+ HANDLE_HEIGHT: number;
11
+ bottomSheetVisible: boolean;
12
+ bsAnimatedStyle: {
13
+ transform: ({
14
+ translateX: number;
15
+ translateY?: undefined;
16
+ scale?: undefined;
17
+ } | {
18
+ translateY: number;
19
+ translateX?: undefined;
20
+ scale?: undefined;
21
+ } | {
22
+ scale: number;
23
+ translateX?: undefined;
24
+ translateY?: undefined;
25
+ })[];
26
+ };
27
+ onGestureEvent: import("react-native-gesture-handler/lib/typescript/handlers/gestures/panGesture").PanGesture;
28
+ handleVisible: (isOpen: boolean) => void;
29
+ screenWidth: import("react-native-reanimated").SharedValue<number>;
30
+ screenHeight: import("react-native-reanimated").SharedValue<number>;
31
+ handleHeight: number;
32
+ openPosition: import("react-native-reanimated").SharedValue<number>;
33
+ bottomSheetPadding: number;
34
+ onTapEvent: import("react-native-gesture-handler/lib/typescript/handlers/gestures/tapGesture").TapGesture;
35
+ panGestureRef: import("react").MutableRefObject<GestureType>;
36
+ listScrollPosition: import("react-native-reanimated").SharedValue<number>;
37
+ bsModalBgStyle: {
38
+ backgroundColor: string;
39
+ };
40
+ backgroundPressHandler: () => void;
41
+ };
42
+ export default useBottomSheetNotify;
43
+ //# sourceMappingURL=useBottomSheetNotify.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useBottomSheetNotify.d.ts","sourceRoot":"","sources":["../../../../src/notify/BottomSheetNotify/model/useBottomSheetNotify.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAW,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAoBpE,UAAU,KAAK;IACb,kBAAkB,EAAE,MAAM,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,eAAe,EAAE,OAAO,CAAC;IACzB,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED,iBAAS,oBAAoB,CAAC,EAC5B,kBAAkB,EAClB,WAAW,EACX,qBAAqB,EACrB,kBAAkB,EAClB,eAAe,GAChB,EAAE,KAAK;;;;;;;;;;;;;;;;;;;4BAiJK,OAAO;;;;;;;;;;;;;EAsFnB;AAED,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,222 @@
1
+ import { useCallback, useEffect, useRef, useState } from 'react';
2
+ import { BackHandler, Dimensions, Keyboard, Platform, useWindowDimensions } from 'react-native';
3
+ import { Gesture } from 'react-native-gesture-handler';
4
+ import { useSharedValue, useAnimatedStyle, withTiming, Easing, runOnJS, useDerivedValue } from 'react-native-reanimated';
5
+ const DIMENSIONS_HEIGHT = Dimensions.get('window').height;
6
+ const INPUT_HEIGHT_CORRECTION = 40; // 인풋 높이 보정
7
+ const NATURAL_GESTURE_TOP = -17; // 자연스러운 제스쳐를 위해 상단 여유 공간 추가
8
+ const NATURAL_GESTURE_X = 8;
9
+ const DEFAULT_BG_OPACITY = 40;
10
+ const HANDLE_HEIGHT = 35;
11
+ const timingConfig100 = {
12
+ duration: 100,
13
+ easing: Easing.inOut(Easing.quad),
14
+ };
15
+ const timingConfig200 = {
16
+ duration: 200,
17
+ easing: Easing.inOut(Easing.quad),
18
+ };
19
+ function useBottomSheetNotify({ bottomSheetPadding, closeOffset, contentsGestureEnable, bottomSheetMarginX, isHandleVisible, }) {
20
+ const handleHeight = isHandleVisible ? HANDLE_HEIGHT : 0;
21
+ const { width: windowWidth } = useWindowDimensions();
22
+ const panGestureRef = useRef(Gesture.Pan());
23
+ const listScrollPosition = useSharedValue(0);
24
+ const gestureComponent = useSharedValue('');
25
+ const tabAbsoluteY = useSharedValue(0);
26
+ const screenWidth = useSharedValue(Dimensions.get('window').width);
27
+ const screenHeight = useSharedValue(1);
28
+ const openPosition = useSharedValue(0);
29
+ const bsScale = useSharedValue(1);
30
+ const bgOpacity = useSharedValue(DEFAULT_BG_OPACITY);
31
+ const translateX = useSharedValue(0);
32
+ const translateY = useSharedValue(closeOffset);
33
+ const fullScreen = useSharedValue(false);
34
+ const [isKeyboardVisible, setIsKeyboardVisible] = useState(false);
35
+ const [bottomSheetVisible, setBottomSheetVisible] = useState(false);
36
+ // ** 바텀시트 백그라운드 애니메이션 스타일 정의
37
+ const bsModalBgStyle = useAnimatedStyle(() => ({
38
+ backgroundColor: `#1E1E1E${bgOpacity.value}`,
39
+ }));
40
+ // ** 바텀시트 애니메이션 스타일 정의
41
+ const bsAnimatedStyle = useAnimatedStyle(() => ({
42
+ transform: [
43
+ { translateX: translateX.value },
44
+ { translateY: translateY.value },
45
+ { scale: bsScale.value },
46
+ ],
47
+ }));
48
+ // ** 화면 너비 설정
49
+ useEffect(() => {
50
+ screenWidth.value = windowWidth - (bottomSheetMarginX ? bottomSheetMarginX * 2 : 0);
51
+ }, [windowWidth, bottomSheetMarginX]);
52
+ // ** 바텀시트 초기화
53
+ const initBottomSheet = useCallback(() => {
54
+ screenHeight.value = 1;
55
+ openPosition.value = 0;
56
+ }, [screenHeight, openPosition]);
57
+ // ** 백버튼 핸들러 정의 (안드로이드 전용)
58
+ const backPressHandler = useCallback(() => {
59
+ if (bottomSheetVisible) {
60
+ setBottomSheetVisible(false);
61
+ return true;
62
+ }
63
+ return false;
64
+ }, [bottomSheetVisible]);
65
+ // ** 백버튼 이벤트 리스너 설정
66
+ useEffect(() => {
67
+ const backHandler = BackHandler.addEventListener('hardwareBackPress', backPressHandler);
68
+ return () => backHandler.remove();
69
+ }, [backPressHandler]);
70
+ // ** 바텀시트 보이기 상태 감지 후 초기화
71
+ useEffect(() => {
72
+ if (!bottomSheetVisible)
73
+ initBottomSheet();
74
+ }, [bottomSheetVisible, initBottomSheet]);
75
+ // ** 백그라운드 클릭시 키보드나 바텀시트 닫기
76
+ const backgroundPressHandler = useCallback(() => {
77
+ if (isKeyboardVisible) {
78
+ Keyboard.dismiss();
79
+ }
80
+ else {
81
+ handleVisible(false);
82
+ }
83
+ }, [isKeyboardVisible]);
84
+ // ** 키보드 닫기
85
+ const dismissKeyboard = useCallback(() => {
86
+ Keyboard.dismiss();
87
+ }, []);
88
+ // ** 애니메이션을 사용한 바텀시트 초기 크기 설정
89
+ const initSize = useCallback(() => {
90
+ bsScale.value = withTiming(1, timingConfig100);
91
+ translateX.value = withTiming(0, timingConfig100);
92
+ bgOpacity.value = DEFAULT_BG_OPACITY;
93
+ }, [bsScale, translateX, bgOpacity]);
94
+ // ** 소프트 키보드 핸들링 (보이기, 숨기기)
95
+ useEffect(() => {
96
+ const keyboardDidShowListener = Keyboard.addListener(Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow', (event) => {
97
+ setIsKeyboardVisible(true);
98
+ if (!fullScreen.value)
99
+ return;
100
+ const tabAbsoluteYValue = tabAbsoluteY.value;
101
+ const screenTopToTarget = tabAbsoluteYValue - openPosition.value; // 모달 상단에서 인풋까지 거리
102
+ const keyboardHeight = event.endCoordinates.height; // 키보드 높이
103
+ const keyboardLine = DIMENSIONS_HEIGHT - keyboardHeight;
104
+ translateY.value = withTiming(keyboardLine - screenTopToTarget - INPUT_HEIGHT_CORRECTION, timingConfig200);
105
+ });
106
+ const keyboardDidHideListener = Keyboard.addListener(Platform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide', () => {
107
+ setIsKeyboardVisible(false);
108
+ // 키보드가 사라질 때 화면의 높이를 원래대로 돌립니다.
109
+ if (!fullScreen.value)
110
+ return;
111
+ handleVisible(true);
112
+ });
113
+ return () => {
114
+ keyboardDidShowListener.remove();
115
+ keyboardDidHideListener.remove();
116
+ };
117
+ }, [fullScreen, openPosition, tabAbsoluteY, translateY]);
118
+ // ** 바텀시트 열기 함수
119
+ const openBottomSheet = useCallback(() => {
120
+ setTimeout(() => {
121
+ if (screenHeight.value === 1)
122
+ return openBottomSheet();
123
+ translateY.value = withTiming(openPosition.value, timingConfig200);
124
+ fullScreen.value = true;
125
+ }, 200);
126
+ }, [screenHeight, openPosition, translateY]);
127
+ // ** 바텀시트 위치 변경
128
+ const onOpenPositionChange = useCallback((value) => {
129
+ if (fullScreen.value && screenHeight.value !== 1) {
130
+ translateY.value = withTiming(value, timingConfig200);
131
+ }
132
+ }, [fullScreen, screenHeight, translateY]);
133
+ // ** 애니메이션 값이 변경될 때 처리
134
+ useDerivedValue(() => {
135
+ runOnJS(onOpenPositionChange)(openPosition.value);
136
+ return openPosition.value;
137
+ }, [openPosition]);
138
+ // ** 바텀시트 상태 관리 (열기/닫기)
139
+ const handleVisible = useCallback((isOpen) => {
140
+ if (isOpen) {
141
+ setBottomSheetVisible(true);
142
+ openBottomSheet();
143
+ }
144
+ else {
145
+ translateY.value = withTiming(closeOffset, timingConfig200);
146
+ fullScreen.value = false;
147
+ setTimeout(() => {
148
+ setBottomSheetVisible(false);
149
+ }, 200);
150
+ }
151
+ }, [closeOffset, fullScreen, openBottomSheet, translateY]);
152
+ // ** 탭 제스처 설정
153
+ const onTapEvent = Gesture.Tap().onStart((event) => {
154
+ tabAbsoluteY.value = event.absoluteY;
155
+ });
156
+ // ** 팬 제스처 설정
157
+ const onGestureEvent = Gesture.Pan()
158
+ .onStart((event) => {
159
+ 'worklet';
160
+ runOnJS(dismissKeyboard)();
161
+ // 제스쳐 영역 판단
162
+ if (openPosition.value + handleHeight > event.absoluteY) {
163
+ gestureComponent.value = 'Handler';
164
+ bsScale.value = withTiming(0.98, timingConfig100);
165
+ }
166
+ else {
167
+ gestureComponent.value = 'Contents';
168
+ if (contentsGestureEnable)
169
+ bsScale.value = withTiming(0.98, timingConfig100);
170
+ }
171
+ })
172
+ .onUpdate((event) => {
173
+ 'worklet';
174
+ // 제스처 제어 로직
175
+ if (!contentsGestureEnable && gestureComponent.value === 'Contents')
176
+ return;
177
+ const translateXValue = event.translationX;
178
+ const translateYValue = event.translationY;
179
+ const calcBg = Math.round(DEFAULT_BG_OPACITY + translateYValue * -1);
180
+ // 백그라운드 컬러 업데이트
181
+ if (calcBg < 70 && calcBg > DEFAULT_BG_OPACITY) {
182
+ bgOpacity.value = calcBg;
183
+ }
184
+ // 자연스러운 X축 움직임
185
+ if (NATURAL_GESTURE_X > translateXValue && translateXValue > -NATURAL_GESTURE_X && bsScale.value !== 1) {
186
+ translateX.value = translateXValue;
187
+ }
188
+ // 상단 제스처 제한
189
+ if (fullScreen.value && translateYValue < NATURAL_GESTURE_TOP)
190
+ return;
191
+ if (!fullScreen.value && translateYValue > 0 && translateY.value === closeOffset)
192
+ return;
193
+ const result = translateYValue + (fullScreen.value ? openPosition.value : 30);
194
+ translateY.value = result;
195
+ })
196
+ .onEnd(() => {
197
+ 'worklet';
198
+ runOnJS(initSize)();
199
+ const shouldOpen = translateY.value < openPosition.value + screenHeight.value / 2;
200
+ runOnJS(handleVisible)(shouldOpen);
201
+ })
202
+ .withRef(panGestureRef);
203
+ return {
204
+ HANDLE_HEIGHT,
205
+ bottomSheetVisible,
206
+ bsAnimatedStyle,
207
+ onGestureEvent,
208
+ handleVisible,
209
+ screenWidth,
210
+ screenHeight,
211
+ handleHeight,
212
+ openPosition,
213
+ bottomSheetPadding,
214
+ onTapEvent,
215
+ panGestureRef,
216
+ listScrollPosition,
217
+ bsModalBgStyle,
218
+ backgroundPressHandler,
219
+ };
220
+ }
221
+ export default useBottomSheetNotify;
222
+ //# sourceMappingURL=useBottomSheetNotify.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useBottomSheetNotify.js","sourceRoot":"","sources":["../../../../src/notify/BottomSheetNotify/model/useBottomSheetNotify.tsx"],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E,CAAC,CAAC;QAC9E,UAAU,CAAC,KAAK,GAAG,MAAM,CAAC;IAC5B,CAAC,CAAC;SACD,KAAK,CAAC,GAAG,EAAE;QACV,SAAS,CAAC;QACV,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QACpB,MAAM,UAAU,GAAG,UAAU,CAAC,KAAK,GAAG,YAAY,CAAC,KAAK,GAAG,YAAY,CAAC,KAAK,GAAG,CAAC,CAAC;QAClF,OAAO,CAAC,aAAa,CAAC,CAAC,UAAU,CAAC,CAAC;IACrC,CAAC,CAAC;SACD,OAAO,CAAC,aAAa,CAAC,CAAC;IAE1B,OAAO;QACL,aAAa;QACb,kBAAkB;QAClB,eAAe;QACf,cAAc;QACd,aAAa;QACb,WAAW;QACX,YAAY;QACZ,YAAY;QACZ,YAAY;QACZ,kBAAkB;QAClB,UAAU;QACV,aAAa;QACb,kBAAkB;QAClB,cAAc;QACd,sBAAsB;KACvB,CAAC;AACJ,CAAC;AAED,eAAe,oBAAoB,CAAC","sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react';\nimport { BackHandler, Dimensions, Keyboard, Platform, useWindowDimensions } from 'react-native';\nimport { Gesture, GestureType } from 'react-native-gesture-handler';\nimport { useSharedValue, useAnimatedStyle, withTiming, Easing, runOnJS, useDerivedValue } from 'react-native-reanimated';\n\nconst DIMENSIONS_HEIGHT = Dimensions.get('window').height;\nconst INPUT_HEIGHT_CORRECTION = 40; // 인풋 높이 보정\nconst NATURAL_GESTURE_TOP = -17; // 자연스러운 제스쳐를 위해 상단 여유 공간 추가\nconst NATURAL_GESTURE_X = 8;\nconst DEFAULT_BG_OPACITY = 40;\nconst HANDLE_HEIGHT = 35;\n\nconst timingConfig100 = {\n duration: 100,\n easing: Easing.inOut(Easing.quad),\n};\n\nconst timingConfig200 = {\n duration: 200,\n easing: Easing.inOut(Easing.quad),\n};\n\ninterface Props {\n bottomSheetPadding: number;\n closeOffset: number;\n contentsGestureEnable: boolean;\n isHandleVisible: boolean;\n bottomSheetMarginX: number;\n}\n\nfunction useBottomSheetNotify({\n bottomSheetPadding,\n closeOffset,\n contentsGestureEnable,\n bottomSheetMarginX,\n isHandleVisible,\n}: Props) {\n const handleHeight = isHandleVisible ? HANDLE_HEIGHT : 0;\n const { width: windowWidth } = useWindowDimensions();\n const panGestureRef = useRef<GestureType>(Gesture.Pan());\n const listScrollPosition = useSharedValue(0);\n const gestureComponent = useSharedValue('');\n const tabAbsoluteY = useSharedValue(0);\n const screenWidth = useSharedValue(Dimensions.get('window').width);\n const screenHeight = useSharedValue(1);\n const openPosition = useSharedValue(0);\n const bsScale = useSharedValue(1);\n const bgOpacity = useSharedValue(DEFAULT_BG_OPACITY);\n const translateX = useSharedValue(0);\n const translateY = useSharedValue(closeOffset);\n const fullScreen = useSharedValue(false);\n const [isKeyboardVisible, setIsKeyboardVisible] = useState(false);\n const [bottomSheetVisible, setBottomSheetVisible] = useState(false);\n\n // ** 바텀시트 백그라운드 애니메이션 스타일 정의\n const bsModalBgStyle = useAnimatedStyle(() => ({\n backgroundColor: `#1E1E1E${bgOpacity.value}`,\n }));\n\n // ** 바텀시트 애니메이션 스타일 정의\n const bsAnimatedStyle = useAnimatedStyle(() => ({\n transform: [\n { translateX: translateX.value },\n { translateY: translateY.value },\n { scale: bsScale.value },\n ],\n }));\n\n // ** 화면 너비 설정\n useEffect(() => {\n screenWidth.value = windowWidth - (bottomSheetMarginX ? bottomSheetMarginX * 2 : 0);\n }, [windowWidth, bottomSheetMarginX]);\n\n // ** 바텀시트 초기화\n const initBottomSheet = useCallback(() => {\n screenHeight.value = 1;\n openPosition.value = 0;\n }, [screenHeight, openPosition]);\n\n // ** 백버튼 핸들러 정의 (안드로이드 전용)\n const backPressHandler = useCallback(() => {\n if (bottomSheetVisible) {\n setBottomSheetVisible(false);\n return true;\n }\n return false;\n }, [bottomSheetVisible]);\n\n // ** 백버튼 이벤트 리스너 설정\n useEffect(() => {\n const backHandler = BackHandler.addEventListener('hardwareBackPress', backPressHandler);\n\n return () => backHandler.remove();\n }, [backPressHandler]);\n\n // ** 바텀시트 보이기 상태 감지 후 초기화\n useEffect(() => {\n if (!bottomSheetVisible) initBottomSheet();\n }, [bottomSheetVisible, initBottomSheet]);\n\n // ** 백그라운드 클릭시 키보드나 바텀시트 닫기\n const backgroundPressHandler = useCallback(() => {\n if (isKeyboardVisible) {\n Keyboard.dismiss();\n } else {\n handleVisible(false);\n }\n }, [isKeyboardVisible]);\n\n // ** 키보드 닫기\n const dismissKeyboard = useCallback(() => {\n Keyboard.dismiss();\n }, []);\n\n // ** 애니메이션을 사용한 바텀시트 초기 크기 설정\n const initSize = useCallback(() => {\n bsScale.value = withTiming(1, timingConfig100);\n translateX.value = withTiming(0, timingConfig100);\n bgOpacity.value = DEFAULT_BG_OPACITY;\n }, [bsScale, translateX, bgOpacity]);\n\n // ** 소프트 키보드 핸들링 (보이기, 숨기기)\n useEffect(() => {\n const keyboardDidShowListener = Keyboard.addListener(\n Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow',\n (event) => {\n setIsKeyboardVisible(true);\n if (!fullScreen.value) return;\n const tabAbsoluteYValue = tabAbsoluteY.value;\n const screenTopToTarget = tabAbsoluteYValue - openPosition.value; // 모달 상단에서 인풋까지 거리\n const keyboardHeight = event.endCoordinates.height; // 키보드 높이\n const keyboardLine = DIMENSIONS_HEIGHT - keyboardHeight;\n\n translateY.value = withTiming(keyboardLine - screenTopToTarget - INPUT_HEIGHT_CORRECTION, timingConfig200);\n }\n );\n\n const keyboardDidHideListener = Keyboard.addListener(\n Platform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide',\n () => {\n setIsKeyboardVisible(false);\n\n // 키보드가 사라질 때 화면의 높이를 원래대로 돌립니다.\n if (!fullScreen.value) return;\n handleVisible(true);\n }\n );\n\n return () => {\n keyboardDidShowListener.remove();\n keyboardDidHideListener.remove();\n };\n }, [fullScreen, openPosition, tabAbsoluteY, translateY]);\n\n // ** 바텀시트 열기 함수\n const openBottomSheet = useCallback(() => {\n setTimeout(() => {\n if (screenHeight.value === 1) return openBottomSheet();\n translateY.value = withTiming(openPosition.value, timingConfig200);\n fullScreen.value = true;\n }, 200);\n }, [screenHeight, openPosition, translateY]);\n\n // ** 바텀시트 위치 변경\n const onOpenPositionChange = useCallback(\n (value: number) => {\n if (fullScreen.value && screenHeight.value !== 1) {\n translateY.value = withTiming(value, timingConfig200);\n }\n },\n [fullScreen, screenHeight, translateY]\n );\n\n // ** 애니메이션 값이 변경될 때 처리\n useDerivedValue(() => {\n runOnJS(onOpenPositionChange)(openPosition.value);\n return openPosition.value;\n }, [openPosition]);\n\n // ** 바텀시트 상태 관리 (열기/닫기)\n const handleVisible = useCallback(\n (isOpen: boolean) => {\n if (isOpen) {\n setBottomSheetVisible(true);\n openBottomSheet();\n } else {\n translateY.value = withTiming(closeOffset, timingConfig200);\n fullScreen.value = false;\n setTimeout(() => {\n setBottomSheetVisible(false);\n }, 200);\n }\n },\n [closeOffset, fullScreen, openBottomSheet, translateY]\n );\n\n // ** 탭 제스처 설정\n const onTapEvent = Gesture.Tap().onStart((event) => {\n tabAbsoluteY.value = event.absoluteY;\n });\n\n // ** 팬 제스처 설정\n const onGestureEvent = Gesture.Pan()\n .onStart((event) => {\n 'worklet';\n runOnJS(dismissKeyboard)();\n\n // 제스쳐 영역 판단\n if (openPosition.value + handleHeight > event.absoluteY) {\n gestureComponent.value = 'Handler';\n bsScale.value = withTiming(0.98, timingConfig100);\n } else {\n gestureComponent.value = 'Contents';\n if (contentsGestureEnable) bsScale.value = withTiming(0.98, timingConfig100);\n }\n })\n .onUpdate((event) => {\n 'worklet';\n // 제스처 제어 로직\n if (!contentsGestureEnable && gestureComponent.value === 'Contents') return;\n\n const translateXValue = event.translationX;\n const translateYValue = event.translationY;\n const calcBg = Math.round(DEFAULT_BG_OPACITY + translateYValue * -1);\n\n // 백그라운드 컬러 업데이트\n if (calcBg < 70 && calcBg > DEFAULT_BG_OPACITY) {\n bgOpacity.value = calcBg;\n }\n\n // 자연스러운 X축 움직임\n if (NATURAL_GESTURE_X > translateXValue && translateXValue > -NATURAL_GESTURE_X && bsScale.value !== 1) {\n translateX.value = translateXValue;\n }\n\n // 상단 제스처 제한\n if (fullScreen.value && translateYValue < NATURAL_GESTURE_TOP) return;\n if (!fullScreen.value && translateYValue > 0 && translateY.value === closeOffset) return;\n\n const result = translateYValue + (fullScreen.value ? openPosition.value : 30);\n translateY.value = result;\n })\n .onEnd(() => {\n 'worklet';\n runOnJS(initSize)();\n const shouldOpen = translateY.value < openPosition.value + screenHeight.value / 2;\n runOnJS(handleVisible)(shouldOpen);\n })\n .withRef(panGestureRef);\n\n return {\n HANDLE_HEIGHT,\n bottomSheetVisible,\n bsAnimatedStyle,\n onGestureEvent,\n handleVisible,\n screenWidth,\n screenHeight,\n handleHeight,\n openPosition,\n bottomSheetPadding,\n onTapEvent,\n panGestureRef,\n listScrollPosition,\n bsModalBgStyle,\n backgroundPressHandler,\n };\n}\n\nexport default useBottomSheetNotify;\n"]}
@@ -0,0 +1,4 @@
1
+ export interface BottomSheetNotifyRef {
2
+ handleVisible: (isOpen: boolean) => void;
3
+ }
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/notify/BottomSheetNotify/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACjC,aAAa,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5C"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/notify/BottomSheetNotify/types/index.ts"],"names":[],"mappings":"","sourcesContent":["export interface BottomSheetNotifyRef {\n handleVisible: (isOpen: boolean) => void;\n}"]}
@@ -0,0 +1,4 @@
1
+ type Props = {};
2
+ declare const BSTextInput: ({ ...props }: Props) => import("react").JSX.Element;
3
+ export default BSTextInput;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/notify/BottomSheetNotify/ui/BSTextInput/index.tsx"],"names":[],"mappings":"AAIA,KAAK,KAAK,GAAG,EACZ,CAAC;AAEF,QAAA,MAAM,WAAW,iBAAkB,KAAK,gCAkBvC,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { useRef } from "react";
2
+ import { Platform, Pressable } from "react-native";
3
+ import { TextInput } from "react-native-gesture-handler";
4
+ const BSTextInput = ({ ...props }) => {
5
+ const textInputRef = useRef(null);
6
+ return (Platform.OS === 'ios' ?
7
+ <Pressable onPress={() => { textInputRef?.current?.focus(); }}>
8
+ <TextInput ref={textInputRef} pointerEvents='none' {...props}/>
9
+ </Pressable>
10
+ :
11
+ <TextInput ref={textInputRef} {...props}/>);
12
+ };
13
+ export default BSTextInput;
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/notify/BottomSheetNotify/ui/BSTextInput/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAKzD,MAAM,WAAW,GAAG,CAAC,EAAE,GAAG,KAAK,EAAS,EAAE,EAAE;IACxC,MAAM,YAAY,GAAG,MAAM,CAAY,IAAI,CAAC,CAAC;IAE7C,OAAO,CACH,QAAQ,CAAC,EAAE,KAAK,KAAK,CAAC,CAAC;QACnB,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAC1D;gBAAA,CAAC,SAAS,CACN,GAAG,CAAC,CAAC,YAAY,CAAC,CAClB,aAAa,CAAC,MAAM,CACpB,IAAI,KAAK,CAAC,EAElB;YAAA,EAAE,SAAS,CAAC;QACZ,CAAC;YACD,CAAC,SAAS,CACN,GAAG,CAAC,CAAC,YAAY,CAAC,CAClB,IAAI,KAAK,CAAC,EACZ,CACT,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { useRef } from \"react\";\nimport { Platform, Pressable } from \"react-native\";\nimport { TextInput } from \"react-native-gesture-handler\";\n\ntype Props = {\n};\n\nconst BSTextInput = ({ ...props }: Props) => {\n const textInputRef = useRef<TextInput>(null);\n\n return (\n Platform.OS === 'ios' ?\n <Pressable onPress={() => { textInputRef?.current?.focus(); }}>\n <TextInput\n ref={textInputRef}\n pointerEvents='none'\n {...props}\n />\n </Pressable>\n :\n <TextInput\n ref={textInputRef}\n {...props}\n />\n );\n};\n\nexport default BSTextInput;\n"]}
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import { GestureType } from 'react-native-gesture-handler';
3
+ import { SharedValue } from 'react-native-reanimated';
4
+ interface Props {
5
+ HANDLE_HEIGHT: number;
6
+ panGestureRef: React.MutableRefObject<GestureType>;
7
+ listScrollPosition: SharedValue<number>;
8
+ openPosition: SharedValue<number>;
9
+ marginBottomBS: number;
10
+ screenHeight: SharedValue<number>;
11
+ bottomSheetComponent: React.ReactNode;
12
+ bottomSheetPadding: number;
13
+ maxHeight: number;
14
+ isScrollView: boolean;
15
+ }
16
+ declare function ContentsComponent({ HANDLE_HEIGHT, panGestureRef, listScrollPosition, openPosition, marginBottomBS, screenHeight, bottomSheetComponent, bottomSheetPadding, maxHeight, isScrollView }: Props): React.JSX.Element;
17
+ declare const _default: React.MemoExoticComponent<typeof ContentsComponent>;
18
+ export default _default;
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/notify/BottomSheetNotify/ui/ContentsComponent/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAE3C,OAAO,EAAE,WAAW,EAAc,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAOtD,UAAU,KAAK;IACX,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,KAAK,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;IACnD,kBAAkB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACxC,YAAY,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAClC,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAClC,oBAAoB,EAAE,KAAK,CAAC,SAAS,CAAC;IACtC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;CACzB;AAGD,iBAAS,iBAAiB,CAAC,EACvB,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,oBAAoB,EACpB,kBAAkB,EAClB,SAAS,EACT,YAAY,EACf,EAAE,KAAK,qBAsCP;;AAED,wBAA6C"}
@@ -0,0 +1,33 @@
1
+ import React, { useCallback } from 'react';
2
+ import { Dimensions } from 'react-native';
3
+ import { ScrollView } from 'react-native-gesture-handler';
4
+ import { useSafeAreaInsets } from 'react-native-safe-area-context';
5
+ import { ZSView } from '../../../../ui';
6
+ // const ANDROID_STATUS_BAR_HEIGHT = Platform.OS === 'android' ? 25 : 0;
7
+ const ANDROID_STATUS_BAR_HEIGHT = 0;
8
+ // 화살표 함수 대신 일반 함수 사용
9
+ function ContentsComponent({ HANDLE_HEIGHT, panGestureRef, listScrollPosition, openPosition, marginBottomBS, screenHeight, bottomSheetComponent, bottomSheetPadding, maxHeight, isScrollView }) {
10
+ const { bottom } = useSafeAreaInsets();
11
+ // onLayout 함수를 useCallback으로 최적화
12
+ const onLayout = useCallback((event) => {
13
+ const { height } = event.nativeEvent.layout;
14
+ const contentMaxHeight = maxHeight + HANDLE_HEIGHT;
15
+ const resultHeight = Math.min(height, contentMaxHeight); // 더 간결하게 변경
16
+ // 성능 문제 방지를 위해 runOnUI 사용
17
+ screenHeight.value = resultHeight + HANDLE_HEIGHT;
18
+ openPosition.value = Dimensions.get('window').height - resultHeight - marginBottomBS - bottom - ANDROID_STATUS_BAR_HEIGHT - HANDLE_HEIGHT;
19
+ }, [maxHeight, HANDLE_HEIGHT, screenHeight, openPosition, marginBottomBS, bottom]);
20
+ // 현재 스크롤 위치를 관리하는 함수
21
+ const handleScroll = useCallback((event) => {
22
+ listScrollPosition.value = event.nativeEvent.contentOffset.y;
23
+ }, [listScrollPosition]);
24
+ return isScrollView ? (<ScrollView simultaneousHandlers={[panGestureRef]} onScroll={handleScroll} style={{ maxHeight }} keyboardShouldPersistTaps="handled" bounces={false} bouncesZoom={false} showsVerticalScrollIndicator={false} scrollEventThrottle={16}>
25
+ <ZSView style={{ width: '100%', minHeight: 1, paddingBottom: bottomSheetPadding }} onLayout={onLayout}>
26
+ {bottomSheetComponent}
27
+ </ZSView>
28
+ </ScrollView>) : (<ZSView style={{ width: '100%', minHeight: 1, paddingBottom: bottomSheetPadding, maxHeight }} onLayout={onLayout}>
29
+ {bottomSheetComponent}
30
+ </ZSView>);
31
+ }
32
+ export default React.memo(ContentsComponent); // React.memo로 성능 최적화
33
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/notify/BottomSheetNotify/ui/ContentsComponent/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,UAAU,EAA8D,MAAM,cAAc,CAAC;AACtG,OAAO,EAAe,UAAU,EAAE,MAAM,8BAA8B,CAAC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,CAAC,CAAC,CAAC,CAClB,CAAC,UAAU,CACP,oBAAoB,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CACtC,QAAQ,CAAC,CAAC,YAAY,CAAC,CACvB,KAAK,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CACrB,yBAAyB,CAAC,SAAS,CACnC,OAAO,CAAC,CAAC,KAAK,CAAC,CACf,WAAW,CAAC,CAAC,KAAK,CAAC,CACnB,4BAA4B,CAAC,CAAC,KAAK,CAAC,CACpC,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAExB;YAAA,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,EAAE,aAAa,EAAE,kBAAkB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAClG;gBAAA,CAAC,oBAAoB,CACzB;YAAA,EAAE,MAAM,CACZ;QAAA,EAAE,UAAU,CAAC,CAChB,CAAC,CAAC,CAAC,CACA,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,EAAE,aAAa,EAAE,kBAAkB,EAAE,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAC7G;YAAA,CAAC,oBAAoB,CACzB;QAAA,EAAE,MAAM,CAAC,CACZ,CAAC;AACN,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,qBAAqB","sourcesContent":["import React, { useCallback } from 'react';\nimport { Dimensions, LayoutChangeEvent, NativeScrollEvent, NativeSyntheticEvent } from 'react-native';\nimport { GestureType, ScrollView } from 'react-native-gesture-handler';\nimport { SharedValue } from 'react-native-reanimated';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\nimport { ZSView } from '../../../../ui';\n\n// const ANDROID_STATUS_BAR_HEIGHT = Platform.OS === 'android' ? 25 : 0;\nconst ANDROID_STATUS_BAR_HEIGHT = 0;\n\ninterface Props {\n HANDLE_HEIGHT: number;\n panGestureRef: React.MutableRefObject<GestureType>;\n listScrollPosition: SharedValue<number>;\n openPosition: SharedValue<number>;\n marginBottomBS: number;\n screenHeight: SharedValue<number>;\n bottomSheetComponent: React.ReactNode;\n bottomSheetPadding: number;\n maxHeight: number;\n isScrollView: boolean;\n}\n\n// 화살표 함수 대신 일반 함수 사용\nfunction ContentsComponent({\n HANDLE_HEIGHT,\n panGestureRef,\n listScrollPosition,\n openPosition,\n marginBottomBS,\n screenHeight,\n bottomSheetComponent,\n bottomSheetPadding,\n maxHeight,\n isScrollView\n}: Props) {\n const { bottom } = useSafeAreaInsets();\n\n // onLayout 함수를 useCallback으로 최적화\n const onLayout = useCallback((event: LayoutChangeEvent) => {\n const { height } = event.nativeEvent.layout;\n const contentMaxHeight = maxHeight + HANDLE_HEIGHT;\n const resultHeight = Math.min(height, contentMaxHeight); // 더 간결하게 변경\n // 성능 문제 방지를 위해 runOnUI 사용\n screenHeight.value = resultHeight + HANDLE_HEIGHT;\n openPosition.value = Dimensions.get('window').height - resultHeight - marginBottomBS - bottom - ANDROID_STATUS_BAR_HEIGHT - HANDLE_HEIGHT;\n }, [maxHeight, HANDLE_HEIGHT, screenHeight, openPosition, marginBottomBS, bottom]);\n\n // 현재 스크롤 위치를 관리하는 함수\n const handleScroll = useCallback((event: NativeSyntheticEvent<NativeScrollEvent>) => {\n listScrollPosition.value = event.nativeEvent.contentOffset.y;\n }, [listScrollPosition]);\n\n return isScrollView ? (\n <ScrollView\n simultaneousHandlers={[panGestureRef]}\n onScroll={handleScroll}\n style={{ maxHeight }}\n keyboardShouldPersistTaps=\"handled\"\n bounces={false}\n bouncesZoom={false}\n showsVerticalScrollIndicator={false}\n scrollEventThrottle={16}\n >\n <ZSView style={{ width: '100%', minHeight: 1, paddingBottom: bottomSheetPadding }} onLayout={onLayout}>\n {bottomSheetComponent}\n </ZSView>\n </ScrollView>\n ) : (\n <ZSView style={{ width: '100%', minHeight: 1, paddingBottom: bottomSheetPadding, maxHeight }} onLayout={onLayout}>\n {bottomSheetComponent}\n </ZSView>\n );\n}\n\nexport default React.memo(ContentsComponent); // React.memo로 성능 최적화\n"]}
@@ -0,0 +1,6 @@
1
+ import React, { ReactNode } from "react";
2
+ declare function LoadingNotify({ loaderComponent, }: {
3
+ loaderComponent?: () => ReactNode;
4
+ }): React.JSX.Element | null;
5
+ export default LoadingNotify;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/notify/LoadingNotify/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,SAAS,EAA0B,MAAM,OAAO,CAAC;AAKjE,iBAAS,aAAa,CAAC,EACrB,eAAe,GAChB,EAAE;IACD,eAAe,CAAC,EAAE,MAAM,SAAS,CAAC;CACnC,4BAiCA;AAED,eAAe,aAAa,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { ActivityIndicator, BackHandler } from "react-native";
2
+ import React, { useEffect, useCallback } from "react";
3
+ import { useNotify } from "../../model/useNotify";
4
+ import ModalBackground from "../ui/ModalBackground";
5
+ // 함수 선언식으로 변경
6
+ function LoadingNotify({ loaderComponent, }) {
7
+ const { loaderVisible } = useNotify();
8
+ // BackHandler 이벤트 처리 최적화
9
+ useEffect(() => {
10
+ const handleBackPressed = () => {
11
+ if (loaderVisible)
12
+ return true; // 로더가 보이는 경우 뒤로가기 방지
13
+ return false;
14
+ };
15
+ const handler = BackHandler.addEventListener("hardwareBackPress", handleBackPressed);
16
+ // cleanup 함수 추가
17
+ return () => handler.remove();
18
+ }, [loaderVisible]);
19
+ // loaderComponent를 메모이제이션
20
+ const renderLoader = useCallback(() => {
21
+ return loaderComponent ? (loaderComponent()) : (<ActivityIndicator size="large" color="#fff"/>);
22
+ }, [loaderComponent]);
23
+ return loaderVisible ? (<ModalBackground>
24
+ {renderLoader()}
25
+ </ModalBackground>) : null;
26
+ }
27
+ export default LoadingNotify;
28
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/notify/LoadingNotify/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,KAAK,EAAE,EAAa,SAAS,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,eAAe,MAAM,uBAAuB,CAAC;AAEpD,cAAc;AACd,SAAS,aAAa,CAAC,EACrB,eAAe,GAGhB;IACC,MAAM,EAAE,aAAa,EAAE,GAAG,SAAS,EAAE,CAAC;IAEtC,yBAAyB;IACzB,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,iBAAiB,GAAG,GAAG,EAAE;YAC7B,IAAI,aAAa;gBAAE,OAAO,IAAI,CAAC,CAAC,qBAAqB;YACrD,OAAO,KAAK,CAAC;QACf,CAAC,CAAC;QAEF,MAAM,OAAO,GAAG,WAAW,CAAC,gBAAgB,CAC1C,mBAAmB,EACnB,iBAAiB,CAClB,CAAC;QAEF,gBAAgB;QAChB,OAAO,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;IAChC,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,0BAA0B;IAC1B,MAAM,YAAY,GAAG,WAAW,CAAC,GAAG,EAAE;QACpC,OAAO,eAAe,CAAC,CAAC,CAAC,CACvB,eAAe,EAAE,CAClB,CAAC,CAAC,CAAC,CACF,CAAC,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,EAAG,CAChD,CAAC;IACJ,CAAC,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC;IAEtB,OAAO,aAAa,CAAC,CAAC,CAAC,CACrB,CAAC,eAAe,CACd;MAAA,CAAC,YAAY,EAAE,CACjB;IAAA,EAAE,eAAe,CAAC,CACnB,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAED,eAAe,aAAa,CAAC","sourcesContent":["import { ActivityIndicator, BackHandler } from \"react-native\";\nimport React, { ReactNode, useEffect, useCallback } from \"react\";\nimport { useNotify } from \"../../model/useNotify\";\nimport ModalBackground from \"../ui/ModalBackground\";\n\n// 함수 선언식으로 변경\nfunction LoadingNotify({\n loaderComponent,\n}: {\n loaderComponent?: () => ReactNode;\n}) {\n const { loaderVisible } = useNotify();\n\n // BackHandler 이벤트 처리 최적화\n useEffect(() => {\n const handleBackPressed = () => {\n if (loaderVisible) return true; // 로더가 보이는 경우 뒤로가기 방지\n return false;\n };\n\n const handler = BackHandler.addEventListener(\n \"hardwareBackPress\",\n handleBackPressed\n );\n\n // cleanup 함수 추가\n return () => handler.remove();\n }, [loaderVisible]);\n\n // loaderComponent를 메모이제이션\n const renderLoader = useCallback(() => {\n return loaderComponent ? (\n loaderComponent()\n ) : (\n <ActivityIndicator size=\"large\" color=\"#fff\" />\n );\n }, [loaderComponent]);\n\n return loaderVisible ? (\n <ModalBackground>\n {renderLoader()}\n </ModalBackground>\n ) : null;\n}\n\nexport default LoadingNotify;\n"]}
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { ViewProps } from 'react-native';
3
+ interface PopOverButtonProps extends ViewProps {
4
+ width: number;
5
+ height: number;
6
+ backgroundColor?: string;
7
+ popOverMenuComponent: React.ReactNode;
8
+ }
9
+ declare const PopOverButton: React.FC<PopOverButtonProps>;
10
+ export default PopOverButton;
11
+ //# sourceMappingURL=PopOverButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PopOverButton.d.ts","sourceRoot":"","sources":["../../../src/notify/PopOver/PopOverButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AACnD,OAAO,EAAmB,SAAS,EAAc,MAAM,cAAc,CAAC;AAGtE,UAAU,kBAAmB,SAAQ,SAAS;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oBAAoB,EAAE,KAAK,CAAC,SAAS,CAAC;CACvC;AAED,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAiC/C,CAAC;AAWF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,31 @@
1
+ import React, { useRef, useCallback } from 'react';
2
+ import { View, Pressable, StyleSheet } from 'react-native';
3
+ import { useNotify } from '../../model/useNotify';
4
+ const PopOverButton = ({ width, height, backgroundColor = 'transparent', popOverMenuComponent, children, ...props }) => {
5
+ const buttonRef = useRef(null);
6
+ const { showPopOverMenu } = useNotify();
7
+ const handlePress = useCallback(() => {
8
+ buttonRef.current?.measure((fx, fy, measuredWidth, measuredHeight, pageX, pageY) => {
9
+ if (pageX !== undefined && pageY !== undefined) {
10
+ const rbX = pageX + measuredWidth;
11
+ const rbY = pageY + measuredHeight;
12
+ showPopOverMenu({ px: rbX, py: rbY, component: popOverMenuComponent });
13
+ }
14
+ });
15
+ }, [showPopOverMenu, popOverMenuComponent]);
16
+ return (<Pressable onPress={handlePress} style={styles.pressable}>
17
+ <View ref={buttonRef} style={[styles.button, { width, height, backgroundColor }]} {...props}>
18
+ {children}
19
+ </View>
20
+ </Pressable>);
21
+ };
22
+ const styles = StyleSheet.create({
23
+ pressable: {
24
+ alignItems: 'flex-start',
25
+ },
26
+ button: {
27
+ justifyContent: 'center',
28
+ },
29
+ });
30
+ export default PopOverButton;
31
+ //# sourceMappingURL=PopOverButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PopOverButton.js","sourceRoot":"","sources":["../../../src/notify/PopOver/PopOverButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,SAAS,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AAI,CACR;IAAA,EAAE,SAAS,CAAC,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,UAAU,EAAE,YAAY;KACzB;IACD,MAAM,EAAE;QACN,cAAc,EAAE,QAAQ;KACzB;CACF,CAAC,CAAC;AAEH,eAAe,aAAa,CAAC","sourcesContent":["import React, { useRef, useCallback } from 'react';\nimport { View, Pressable, ViewProps, StyleSheet } from 'react-native';\nimport { useNotify } from '../../model/useNotify';\n\ninterface PopOverButtonProps extends ViewProps {\n width: number;\n height: number;\n backgroundColor?: string;\n popOverMenuComponent: React.ReactNode;\n}\n\nconst PopOverButton: React.FC<PopOverButtonProps> = ({\n width,\n height,\n backgroundColor = 'transparent',\n popOverMenuComponent,\n children,\n ...props\n}) => {\n const buttonRef = useRef<View>(null);\n const { showPopOverMenu } = useNotify();\n\n const handlePress = useCallback(() => {\n buttonRef.current?.measure((fx, fy, measuredWidth, measuredHeight, pageX, pageY) => {\n if (pageX !== undefined && pageY !== undefined) {\n const rbX = pageX + measuredWidth;\n const rbY = pageY + measuredHeight;\n\n showPopOverMenu({ px: rbX, py: rbY, component: popOverMenuComponent });\n }\n });\n }, [showPopOverMenu, popOverMenuComponent]);\n\n return (\n <Pressable onPress={handlePress} style={styles.pressable}>\n <View\n ref={buttonRef}\n style={[styles.button, { width, height, backgroundColor }]}\n {...props}\n >\n {children}\n </View>\n </Pressable>\n );\n};\n\nconst styles = StyleSheet.create({\n pressable: {\n alignItems: 'flex-start',\n },\n button: {\n justifyContent: 'center',\n },\n});\n\nexport default PopOverButton;\n"]}
@@ -0,0 +1,4 @@
1
+ import { PopOverMenuProps } from "../../model/types";
2
+ declare function PopOverMenu({ px, py, component }: PopOverMenuProps): JSX.Element | null;
3
+ export default PopOverMenu;
4
+ //# sourceMappingURL=PopOverMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PopOverMenu.d.ts","sourceRoot":"","sources":["../../../src/notify/PopOver/PopOverMenu.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAKrD,iBAAS,WAAW,CAAC,EACnB,EAAE,EACF,EAAE,EACF,SAAS,EACV,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CA8EvC;AAED,eAAe,WAAW,CAAC"}