@0610studio/zs-ui 0.4.0 → 0.5.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.
Files changed (50) hide show
  1. package/README.md +5 -0
  2. package/build/index.d.ts +2 -2
  3. package/build/index.d.ts.map +1 -1
  4. package/build/index.js +2 -2
  5. package/build/index.js.map +1 -1
  6. package/build/model/useThemeProvider.d.ts +12 -0
  7. package/build/model/useThemeProvider.d.ts.map +1 -1
  8. package/build/model/useThemeProvider.js +15 -2
  9. package/build/model/useThemeProvider.js.map +1 -1
  10. package/build/model/utils.d.ts +1 -0
  11. package/build/model/utils.d.ts.map +1 -1
  12. package/build/model/utils.js +1 -0
  13. package/build/model/utils.js.map +1 -1
  14. package/build/overlay/AlertOverlay/index.d.ts.map +1 -1
  15. package/build/overlay/AlertOverlay/index.js +5 -5
  16. package/build/overlay/AlertOverlay/index.js.map +1 -1
  17. package/build/overlay/BottomSheetOverlay/index.d.ts.map +1 -1
  18. package/build/overlay/BottomSheetOverlay/index.js +5 -6
  19. package/build/overlay/BottomSheetOverlay/index.js.map +1 -1
  20. package/build/overlay/Modality/index.d.ts.map +1 -1
  21. package/build/overlay/Modality/index.js +9 -13
  22. package/build/overlay/Modality/index.js.map +1 -1
  23. package/build/overlay/PopOver/PopOverMenu.d.ts.map +1 -1
  24. package/build/overlay/PopOver/PopOverMenu.js +6 -8
  25. package/build/overlay/PopOver/PopOverMenu.js.map +1 -1
  26. package/build/overlay/ui/ModalBackground.d.ts +2 -2
  27. package/build/overlay/ui/ModalBackground.d.ts.map +1 -1
  28. package/build/overlay/ui/ModalBackground.js +2 -2
  29. package/build/overlay/ui/ModalBackground.js.map +1 -1
  30. package/build/theme/typography.js +1 -1
  31. package/build/theme/typography.js.map +1 -1
  32. package/build/ui/ZSContainer/index.d.ts +22 -17
  33. package/build/ui/ZSContainer/index.d.ts.map +1 -1
  34. package/build/ui/ZSContainer/index.js +19 -24
  35. package/build/ui/ZSContainer/index.js.map +1 -1
  36. package/build/ui/ZSContainer/ui/VariantView.d.ts +16 -0
  37. package/build/ui/ZSContainer/ui/VariantView.d.ts.map +1 -0
  38. package/build/ui/ZSContainer/ui/VariantView.js +12 -0
  39. package/build/ui/ZSContainer/ui/VariantView.js.map +1 -0
  40. package/build/ui/ZSTextField/ui/ErrorComponent.js +2 -2
  41. package/build/ui/ZSTextField/ui/ErrorComponent.js.map +1 -1
  42. package/build/ui/index.d.ts +1 -2
  43. package/build/ui/index.d.ts.map +1 -1
  44. package/build/ui/index.js +1 -2
  45. package/build/ui/index.js.map +1 -1
  46. package/package.json +1 -1
  47. package/build/ui/atoms/ScrollViewAtom.d.ts +0 -5
  48. package/build/ui/atoms/ScrollViewAtom.d.ts.map +0 -1
  49. package/build/ui/atoms/ScrollViewAtom.js +0 -9
  50. package/build/ui/atoms/ScrollViewAtom.js.map +0 -1
@@ -1,19 +1,17 @@
1
1
  import React, { useCallback, useEffect, useRef, useState } from "react";
2
- import { Dimensions, Pressable } from "react-native";
2
+ import { Pressable } from "react-native";
3
3
  import Animated, { FadeInUp, FadeOutUp } from "react-native-reanimated";
4
4
  import { usePopOver } from "../../model/useOverlay";
5
5
  import ModalBackground from "../ui/ModalBackground";
6
6
  import { useTheme } from "../../model";
7
7
  import { Z_INDEX_VALUE } from "../../model/utils";
8
- const WINDOW_HEIGHT = Dimensions.get('window').height;
9
- const WINDOW_WIDTH = Dimensions.get('window').width;
10
8
  function PopOverMenu({ px, py, component }) {
9
+ const { palette, dimensions: { width: windowWidth, height: windowHeight } } = useTheme();
11
10
  const [isContentVisible, setIsContentVisible] = useState(false);
12
11
  const [contentWidth, setContentWidth] = useState(0);
13
12
  const [contentHeight, setContentHeight] = useState(0);
14
13
  const { popOverVisible, setPopOverVisible } = usePopOver();
15
14
  const timerRef = useRef(null);
16
- const { palette } = useTheme();
17
15
  useEffect(() => {
18
16
  if (popOverVisible) {
19
17
  if (timerRef.current) {
@@ -39,14 +37,14 @@ function PopOverMenu({ px, py, component }) {
39
37
  let adjustedX = px;
40
38
  let adjustedY = py;
41
39
  // 수평 방향 조정
42
- if (px + contentWidth > WINDOW_WIDTH) {
43
- adjustedX = WINDOW_WIDTH - contentWidth - 10; // 10px 여백
40
+ if (px + contentWidth > windowWidth) {
41
+ adjustedX = windowWidth - contentWidth - 10; // 10px 여백
44
42
  }
45
43
  if (adjustedX < 0) {
46
44
  adjustedX = 10; // 최소 10px 여백
47
45
  }
48
46
  // 수직 방향 조정
49
- if (py + contentHeight > WINDOW_HEIGHT) {
47
+ if (py + contentHeight > windowHeight) {
50
48
  adjustedY = py - contentHeight; // 위쪽으로 표시
51
49
  }
52
50
  if (adjustedY < 0) {
@@ -57,7 +55,7 @@ function PopOverMenu({ px, py, component }) {
57
55
  if (!popOverVisible)
58
56
  return null;
59
57
  const { adjustedX, adjustedY } = getAdjustedPosition();
60
- return (<ModalBackground zIndex={Z_INDEX_VALUE.POPOVER} key={popOverVisible ? 'visiblepo' : 'hiddenpo'} modalBgColor={palette.modalBgColor} isCenter={false} onPress={() => setPopOverVisible(false)}>
58
+ return (<ModalBackground zIndex={Z_INDEX_VALUE.POPOVER} key={popOverVisible ? 'visiblepo' : 'hiddenpo'} modalBgColor={palette.modalBgColor} position='pop' onPress={() => setPopOverVisible(false)}>
61
59
  {isContentVisible && (<Animated.View entering={FadeInUp} exiting={FadeOutUp}>
62
60
  <Pressable style={{
63
61
  position: 'absolute',
@@ -1 +1 @@
1
- {"version":3,"file":"PopOverMenu.js","sourceRoot":"","sources":["../../../src/overlay/PopOver/PopOverMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,EAAE,UAAU,EAAqB,SAAS,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,QAAQ,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO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,MAAM,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAC9B,GAAG,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC,CAC/C,YAAY,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,CACnC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAChB,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAExC;MAAA,CAAC,gBAAgB,IAAI,CACnB,CAAC,QAAQ,CAAC,IAAI,CACZ,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,OAAO,CAAC,CAAC,SAAS,CAAC,CAEnB;UAAA,CAAC,SAAS,CACR,KAAK,CAAC,CAAC;gBACL,QAAQ,EAAE,UAAU;gBACpB,IAAI,EAAE,SAAS;gBACf,GAAG,EAAE,SAAS;aACf,CAAC,CACF,QAAQ,CAAC,CAAC,YAAY,CAAC,CAEvB;YAAA,CAAC,SAAS,CACZ;UAAA,EAAE,SAAS,CACb;QAAA,EAAE,QAAQ,CAAC,IAAI,CAAC,CACjB,CACH;IAAA,EAAE,eAAe,CAAC,CACnB,CAAC;AACJ,CAAC;AAED,eAAe,WAAW,CAAC","sourcesContent":["import React, { useCallback, useEffect, useRef, useState } from \"react\";\nimport { Dimensions, LayoutChangeEvent, Pressable } from \"react-native\";\nimport Animated, { FadeInUp, FadeOutUp } from \"react-native-reanimated\";\nimport { usePopOver } from \"../../model/useOverlay\";\nimport ModalBackground from \"../ui/ModalBackground\";\nimport { PopOverMenuProps } from \"../../model/types\";\nimport { useTheme } from \"../../model\";\nimport { Z_INDEX_VALUE } from \"../../model/utils\";\n\nconst WINDOW_HEIGHT = Dimensions.get('window').height;\nconst WINDOW_WIDTH = Dimensions.get('window').width;\n\nfunction PopOverMenu({\n px,\n py,\n component\n}: PopOverMenuProps): JSX.Element | null {\n const [isContentVisible, setIsContentVisible] = useState<boolean>(false);\n const [contentWidth, setContentWidth] = useState<number>(0);\n const [contentHeight, setContentHeight] = useState<number>(0);\n const { popOverVisible, setPopOverVisible } = usePopOver();\n const timerRef = useRef<number | null>(null);\n const { palette } = useTheme();\n\n useEffect(() => {\n if (popOverVisible) {\n if (timerRef.current) {\n clearTimeout(timerRef.current);\n }\n\n timerRef.current = setTimeout(() => {\n setIsContentVisible(true);\n }, 200);\n }\n\n return () => {\n if (timerRef.current) {\n clearTimeout(timerRef.current);\n timerRef.current = null;\n }\n };\n }, [popOverVisible]);\n\n const handleLayout = useCallback((event: LayoutChangeEvent): void => {\n setContentWidth(event.nativeEvent.layout.width || 0);\n setContentHeight(event.nativeEvent.layout.height || 0);\n }, []);\n\n // 화면 경계를 벗어나는지 확인하고 위치 조정\n const getAdjustedPosition = () => {\n let adjustedX = px;\n let adjustedY = py;\n\n // 수평 방향 조정\n if (px + contentWidth > WINDOW_WIDTH) {\n adjustedX = WINDOW_WIDTH - contentWidth - 10; // 10px 여백\n }\n if (adjustedX < 0) {\n adjustedX = 10; // 최소 10px 여백\n }\n\n // 수직 방향 조정\n if (py + contentHeight > WINDOW_HEIGHT) {\n adjustedY = py - contentHeight; // 위쪽으로 표시\n }\n if (adjustedY < 0) {\n adjustedY = 10; // 최소 10px 여백\n }\n\n return { adjustedX, adjustedY };\n };\n\n if (!popOverVisible) return null;\n\n const { adjustedX, adjustedY } = getAdjustedPosition();\n\n return (\n <ModalBackground\n zIndex={Z_INDEX_VALUE.POPOVER}\n key={popOverVisible ? 'visiblepo' : 'hiddenpo'}\n modalBgColor={palette.modalBgColor}\n isCenter={false}\n onPress={() => setPopOverVisible(false)}\n >\n {isContentVisible && (\n <Animated.View\n entering={FadeInUp}\n exiting={FadeOutUp}\n >\n <Pressable\n style={{\n position: 'absolute',\n left: adjustedX,\n top: adjustedY,\n }}\n onLayout={handleLayout}\n >\n {component}\n </Pressable>\n </Animated.View>\n )}\n </ModalBackground>\n );\n}\n\nexport default PopOverMenu;"]}
1
+ {"version":3,"file":"PopOverMenu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AAO,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC;IAClC,CAAC,CAAC;IAEF,IAAI,CAAC,cAAc;QAAE,OAAO,IAAI,CAAC;IAEjC,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,mBAAmB,EAAE,CAAC;IAEvD,OAAO,CACL,CAAC,eAAe,CACd,MAAM,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAC9B,GAAG,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC,CAC/C,YAAY,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,CACnC,QAAQ,CAAC,KAAK,CACd,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAExC;MAAA,CAAC,gBAAgB,IAAI,CACnB,CAAC,QAAQ,CAAC,IAAI,CACZ,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,OAAO,CAAC,CAAC,SAAS,CAAC,CAEnB;UAAA,CAAC,SAAS,CACR,KAAK,CAAC,CAAC;gBACL,QAAQ,EAAE,UAAU;gBACpB,IAAI,EAAE,SAAS;gBACf,GAAG,EAAE,SAAS;aACf,CAAC,CACF,QAAQ,CAAC,CAAC,YAAY,CAAC,CAEvB;YAAA,CAAC,SAAS,CACZ;UAAA,EAAE,SAAS,CACb;QAAA,EAAE,QAAQ,CAAC,IAAI,CAAC,CACjB,CACH;IAAA,EAAE,eAAe,CAAC,CACnB,CAAC;AACJ,CAAC;AAED,eAAe,WAAW,CAAC","sourcesContent":["import React, { useCallback, useEffect, useRef, useState } from \"react\";\nimport { LayoutChangeEvent, Pressable } from \"react-native\";\nimport Animated, { FadeInUp, FadeOutUp } from \"react-native-reanimated\";\nimport { usePopOver } from \"../../model/useOverlay\";\nimport ModalBackground from \"../ui/ModalBackground\";\nimport { PopOverMenuProps } from \"../../model/types\";\nimport { useTheme } from \"../../model\";\nimport { Z_INDEX_VALUE } from \"../../model/utils\";\n\nfunction PopOverMenu({\n px,\n py,\n component\n}: PopOverMenuProps): JSX.Element | null {\n const { palette, dimensions: { width: windowWidth, height: windowHeight } } = useTheme();\n const [isContentVisible, setIsContentVisible] = useState<boolean>(false);\n const [contentWidth, setContentWidth] = useState<number>(0);\n const [contentHeight, setContentHeight] = useState<number>(0);\n const { popOverVisible, setPopOverVisible } = usePopOver();\n const timerRef = useRef<number | null>(null);\n\n useEffect(() => {\n if (popOverVisible) {\n if (timerRef.current) {\n clearTimeout(timerRef.current);\n }\n\n timerRef.current = setTimeout(() => {\n setIsContentVisible(true);\n }, 200);\n }\n\n return () => {\n if (timerRef.current) {\n clearTimeout(timerRef.current);\n timerRef.current = null;\n }\n };\n }, [popOverVisible]);\n\n const handleLayout = useCallback((event: LayoutChangeEvent): void => {\n setContentWidth(event.nativeEvent.layout.width || 0);\n setContentHeight(event.nativeEvent.layout.height || 0);\n }, []);\n\n // 화면 경계를 벗어나는지 확인하고 위치 조정\n const getAdjustedPosition = () => {\n let adjustedX = px;\n let adjustedY = py;\n\n // 수평 방향 조정\n if (px + contentWidth > windowWidth) {\n adjustedX = windowWidth - contentWidth - 10; // 10px 여백\n }\n if (adjustedX < 0) {\n adjustedX = 10; // 최소 10px 여백\n }\n\n // 수직 방향 조정\n if (py + contentHeight > windowHeight) {\n adjustedY = py - contentHeight; // 위쪽으로 표시\n }\n if (adjustedY < 0) {\n adjustedY = 10; // 최소 10px 여백\n }\n\n return { adjustedX, adjustedY };\n };\n\n if (!popOverVisible) return null;\n\n const { adjustedX, adjustedY } = getAdjustedPosition();\n\n return (\n <ModalBackground\n zIndex={Z_INDEX_VALUE.POPOVER}\n key={popOverVisible ? 'visiblepo' : 'hiddenpo'}\n modalBgColor={palette.modalBgColor}\n position='pop'\n onPress={() => setPopOverVisible(false)}\n >\n {isContentVisible && (\n <Animated.View\n entering={FadeInUp}\n exiting={FadeOutUp}\n >\n <Pressable\n style={{\n position: 'absolute',\n left: adjustedX,\n top: adjustedY,\n }}\n onLayout={handleLayout}\n >\n {component}\n </Pressable>\n </Animated.View>\n )}\n </ModalBackground>\n );\n}\n\nexport default PopOverMenu;"]}
@@ -2,10 +2,10 @@ import React from 'react';
2
2
  interface ModalBackgroundProps {
3
3
  zIndex?: number;
4
4
  modalBgColor: string;
5
- isCenter?: boolean;
5
+ position?: 'center' | 'left' | 'right' | 'pop';
6
6
  children: React.ReactNode;
7
7
  onPress?: () => void;
8
8
  }
9
- declare function ModalBackground({ modalBgColor, isCenter, children, onPress, zIndex }: ModalBackgroundProps): React.JSX.Element;
9
+ declare function ModalBackground({ modalBgColor, position, children, onPress, zIndex }: ModalBackgroundProps): React.JSX.Element;
10
10
  export default ModalBackground;
11
11
  //# sourceMappingURL=ModalBackground.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ModalBackground.d.ts","sourceRoot":"","sources":["../../../src/overlay/ui/ModalBackground.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAKvC,UAAU,oBAAoB;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,iBAAS,eAAe,CAAC,EAAE,YAAY,EAAE,QAAe,EAAE,QAAQ,EAAE,OAAO,EAAE,MAA8B,EAAE,EAAE,oBAAoB,qBAkBlI;AAeD,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"ModalBackground.d.ts","sourceRoot":"","sources":["../../../src/overlay/ui/ModalBackground.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAKvC,UAAU,oBAAoB;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,CAAC;IAC/C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,iBAAS,eAAe,CAAC,EAAE,YAAY,EAAE,QAAmB,EAAE,QAAQ,EAAE,OAAO,EAAE,MAA8B,EAAE,EAAE,oBAAoB,qBAkBtI;AAeD,eAAe,eAAe,CAAC"}
@@ -2,9 +2,9 @@ import React, { useMemo } from 'react';
2
2
  import { Pressable, StyleSheet } from 'react-native';
3
3
  import Animated, { FadeIn, FadeOut } from 'react-native-reanimated';
4
4
  import { Z_INDEX_VALUE } from '../../model/utils';
5
- function ModalBackground({ modalBgColor, isCenter = true, children, onPress, zIndex = Z_INDEX_VALUE.DEFAULT }) {
5
+ function ModalBackground({ modalBgColor, position = 'center', children, onPress, zIndex = Z_INDEX_VALUE.DEFAULT }) {
6
6
  const styles = useMemo(() => createStyles(modalBgColor), [modalBgColor]);
7
- return (<Animated.View style={[styles.modalBg, isCenter && { justifyContent: 'center', alignItems: 'center', zIndex }]} entering={FadeIn.duration(50)} exiting={FadeOut.duration(50)}>
7
+ return (<Animated.View style={[styles.modalBg, { zIndex }, position === 'center' && { justifyContent: 'center', alignItems: 'center' }, position === 'left' && { justifyContent: 'flex-start', alignItems: 'center' }, position === 'right' && { justifyContent: 'flex-end', alignItems: 'center' }]} entering={FadeIn.duration(50)} exiting={FadeOut.duration(50)}>
8
8
  <Pressable style={styles.fullScreen} onPress={onPress ?? (() => { })}>
9
9
  </Pressable>
10
10
 
@@ -1 +1 @@
1
- {"version":3,"file":"ModalBackground.js","sourceRoot":"","sources":["../../../src/overlay/ui/ModalBackground.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,QAAQ,EAAE,EAAE,MAAM,EAA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Content":["import React, { useMemo } from 'react';\nimport { Pressable, StyleSheet } from 'react-native';\nimport Animated, { FadeIn, FadeOut } from 'react-native-reanimated';\nimport { Z_INDEX_VALUE } from '../../model/utils';\n\ninterface ModalBackgroundProps {\n zIndex?: number;\n modalBgColor: string;\n isCenter?: boolean;\n children: React.ReactNode;\n onPress?: () => void;\n}\n\nfunction ModalBackground({ modalBgColor, isCenter = true, children, onPress, zIndex = Z_INDEX_VALUE.DEFAULT }: ModalBackgroundProps) {\n const styles = useMemo(() => createStyles(modalBgColor), [modalBgColor]);\n\n return (\n <Animated.View\n style={[styles.modalBg, isCenter && { justifyContent: 'center', alignItems: 'center', zIndex }]}\n entering={FadeIn.duration(50)}\n exiting={FadeOut.duration(50)}\n >\n <Pressable\n style={styles.fullScreen}\n onPress={onPress ?? (() => { })}\n >\n </Pressable>\n\n {children}\n </Animated.View>\n );\n}\n\nconst createStyles = (modalBgColor: string) =>\n StyleSheet.create({\n modalBg: {\n backgroundColor: modalBgColor,\n ...StyleSheet.absoluteFillObject,\n },\n fullScreen: {\n width: '100%',\n height: '100%',\n ...StyleSheet.absoluteFillObject,\n },\n });\n\nexport default ModalBackground;\n"]}
1
+ {"version":3,"file":"ModalBackground.js","sourceRoot":"","sources":["../../../src/overlay/ui/ModalBackground.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,QAAQ,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAUlD,SAAS,eAAe,CAAC,EAAE,YAAY,EAAE,QAAQ,GAAG,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,GAAG,aAAa,CAAC,OAAO,EAAwB;IACrI,MAAM,MAAM,GAAG,OAAO,CAAC,GA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port Animated, { FadeIn, FadeOut } from 'react-native-reanimated';\nimport { Z_INDEX_VALUE } from '../../model/utils';\n\ninterface ModalBackgroundProps {\n zIndex?: number;\n modalBgColor: string;\n position?: 'center' | 'left' | 'right' | 'pop'; // TODO: 'left' | 'right' 미구현\n children: React.ReactNode;\n onPress?: () => void;\n}\n\nfunction ModalBackground({ modalBgColor, position = 'center', children, onPress, zIndex = Z_INDEX_VALUE.DEFAULT }: ModalBackgroundProps) {\n const styles = useMemo(() => createStyles(modalBgColor), [modalBgColor]);\n\n return (\n <Animated.View\n style={[styles.modalBg, { zIndex }, position === 'center' && { justifyContent: 'center', alignItems: 'center' }, position === 'left' && { justifyContent: 'flex-start', alignItems: 'center' }, position === 'right' && { justifyContent: 'flex-end', alignItems: 'center' }]}\n entering={FadeIn.duration(50)}\n exiting={FadeOut.duration(50)}\n >\n <Pressable\n style={styles.fullScreen}\n onPress={onPress ?? (() => { })}\n >\n </Pressable>\n\n {children}\n </Animated.View>\n );\n}\n\nconst createStyles = (modalBgColor: string) =>\n StyleSheet.create({\n modalBg: {\n backgroundColor: modalBgColor,\n ...StyleSheet.absoluteFillObject,\n },\n fullScreen: {\n width: '100%',\n height: '100%',\n ...StyleSheet.absoluteFillObject,\n },\n });\n\nexport default ModalBackground;\n"]}
@@ -1,4 +1,4 @@
1
- const baseSize = 1;
1
+ const baseSize = 0;
2
2
  export default function typography({ themeFonts }) {
3
3
  return {
4
4
  themeFonts: themeFonts,
@@ -1 +1 @@
1
- {"version":3,"file":"typography.js","sourceRoot":"","sources":["../../src/theme/typography.ts"],"names":[],"mappings":"AAEA,MAAM,QAAQ,GAAG,CAAC,CAAC;AAEnB,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EAAE,UAAU,EAA+B;IAC1E,OAAO;QACH,UAAU,EAAE,UAAU;QACtB,OAAO,EAAE;YACL,CAAC,EAAE;gBACC,QAAQ,EAAE,QAAQ,GAAG,EAAE;gBACvB,UAAU,EAAE,UAAU,EAAE,CAAC,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gBAC7B,aAAa,EAAE,CAAC;aACnB;SACJ;KACJ,CAAA;AACL,CAAC","sourcesContent":["import { ThemeFonts, TypographyVariantsProps } from \"./types\";\n\nconst baseSize = 1;\n\nexport default function typography({ themeFonts }: { themeFonts?: ThemeFonts }): TypographyVariantsProps {\n return {\n themeFonts: themeFonts,\n heading: {\n 1: {\n fontSize: baseSize + 36,\n fontFamily: themeFonts?.[700],\n letterSpacing: 1\n },\n 2: {\n fontSize: baseSize + 32,\n fontFamily: themeFonts?.[700],\n letterSpacing: 1\n },\n 3: {\n fontSize: baseSize + 28,\n fontFamily: themeFonts?.[700],\n letterSpacing: 1\n },\n 4: {\n fontSize: baseSize + 24,\n fontFamily: themeFonts?.[700],\n letterSpacing: 1\n },\n 5: {\n fontSize: baseSize + 20,\n fontFamily: themeFonts?.[700],\n letterSpacing: 1\n },\n 6: {\n fontSize: baseSize + 18,\n fontFamily: themeFonts?.[700],\n letterSpacing: 1\n }\n },\n title: {\n 1: {\n fontSize: baseSize + 16,\n fontFamily: themeFonts?.[700],\n letterSpacing: 1\n },\n 2: {\n fontSize: baseSize + 14,\n fontFamily: themeFonts?.[700],\n letterSpacing: 1\n },\n 3: {\n fontSize: baseSize + 13,\n fontFamily: themeFonts?.[700],\n letterSpacing: 1\n },\n 4: {\n fontSize: baseSize + 12,\n fontFamily: themeFonts?.[700],\n letterSpacing: 1\n },\n 5: {\n fontSize: baseSize + 11,\n fontFamily: themeFonts?.[700],\n letterSpacing: 1\n },\n 6: {\n fontSize: baseSize + 10,\n fontFamily: themeFonts?.[700],\n letterSpacing: 1\n }\n },\n subTitle: {\n 1: {\n fontSize: baseSize + 16,\n fontFamily: themeFonts?.[600],\n letterSpacing: 1\n },\n 2: {\n fontSize: baseSize + 14,\n fontFamily: themeFonts?.[600],\n letterSpacing: 1\n },\n 3: {\n fontSize: baseSize + 13,\n fontFamily: themeFonts?.[600],\n letterSpacing: 1\n },\n 4: {\n fontSize: baseSize + 12,\n fontFamily: themeFonts?.[600],\n letterSpacing: 1\n },\n 5: {\n fontSize: baseSize + 11,\n fontFamily: themeFonts?.[600],\n letterSpacing: 1\n },\n 6: {\n fontSize: baseSize + 10,\n fontFamily: themeFonts?.[600],\n letterSpacing: 1\n }\n },\n label: {\n 1: {\n fontSize: baseSize + 16,\n fontFamily: themeFonts?.[500],\n letterSpacing: 1\n },\n 2: {\n fontSize: baseSize + 14,\n fontFamily: themeFonts?.[500],\n letterSpacing: 1\n },\n 3: {\n fontSize: baseSize + 13,\n fontFamily: themeFonts?.[500],\n letterSpacing: 1\n },\n 4: {\n fontSize: baseSize + 12,\n fontFamily: themeFonts?.[500],\n letterSpacing: 1\n },\n 5: {\n fontSize: baseSize + 11,\n fontFamily: themeFonts?.[500],\n letterSpacing: 1\n },\n 6: {\n fontSize: baseSize + 10,\n fontFamily: themeFonts?.[500],\n letterSpacing: 1\n }\n },\n body: {\n 1: {\n fontSize: baseSize + 16,\n fontFamily: themeFonts?.[400],\n letterSpacing: 1\n },\n 2: {\n fontSize: baseSize + 14,\n fontFamily: themeFonts?.[400],\n letterSpacing: 1\n },\n 3: {\n fontSize: baseSize + 13,\n fontFamily: themeFonts?.[400],\n letterSpacing: 1\n },\n 4: {\n fontSize: baseSize + 12,\n fontFamily: themeFonts?.[400],\n letterSpacing: 1\n },\n 5: {\n fontSize: baseSize + 11,\n fontFamily: themeFonts?.[400],\n letterSpacing: 1\n },\n 6: {\n fontSize: baseSize + 10,\n fontFamily: themeFonts?.[400],\n letterSpacing: 1\n }\n },\n caption: {\n 1: {\n fontSize: baseSize + 12,\n fontFamily: themeFonts?.[400],\n letterSpacing: 1\n },\n 2: {\n fontSize: baseSize + 11,\n fontFamily: themeFonts?.[400],\n letterSpacing: 1\n },\n 3: {\n fontSize: baseSize + 10,\n fontFamily: themeFonts?.[400],\n letterSpacing: 1\n },\n 4: {\n fontSize: baseSize + 9,\n fontFamily: themeFonts?.[400],\n letterSpacing: 1\n },\n 5: {\n fontSize: baseSize + 8,\n fontFamily: themeFonts?.[400],\n letterSpacing: 1\n },\n 6: {\n fontSize: baseSize + 7,\n fontFamily: themeFonts?.[400],\n letterSpacing: 1\n }\n },\n }\n}\n"]}
1
+ {"version":3,"file":"typography.js","sourceRoot":"","sources":["../../src/theme/typography.ts"],"names":[],"mappings":"AAEA,MAAM,QAAQ,GAAG,CAAC,CAAC;AAEnB,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EAAE,UAAU,EAA+B;IAC1E,OAAO;QACH,UAAU,EAAE,UAAU;QACtB,OAAO,EAAE;YACL,CAAC,EAAE;gBACC,QAAQ,EAAE,QAAQ,GAAG,EAAE;gBACvB,UAAU,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC;gBAC7B,aAAa,EAAE,CAAC;aACnB;YACD,CAAC,EAAE;gBACC,QAAQ,EAAE,QAAQ,GAAG,EAAE;gBACvB,UAAU,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC;gBAC7B,aAAa,EAAE,CAAC;aACnB;YACD,CAAC,EAAE;gBACC,QAAQ,EAAE,QAAQ,GAAG,EAAE;gBACvB,UAAU,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC;gBAC7B,aAAa,EAAE,CAAC;aACnB;YACD,CAAC,EAAE;gBACC,QAAQ,EAAE,QAAQ,GAAG,EAAE;gBACvB,UAAU,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC;gBAC7B,aAAa,EAAE,CAAC;aACnB;YACD,CAAC,EAAE;gBACC,QAAQ,EAAE,QAAQ,GAAG,EAAE;gBACvB,UAAU,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC;gBAC7B,aAAa,EAAE,CAAC;aACnB;YACD,CAAC,EAAE;gBACC,QAAQ,EAAE,QAAQ,GAAG,EAAE;gBACvB,UAAU,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC;gBAC7B,aAAa,EAAE,CAAC;aACnB;SACJ;QACD,KAAK,EAAE;YACH,CAAC,EAAE;gBACC,QAAQ,EAAE,QAAQ,GAAG,EAAE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,GAAG,CAAC;gBAC7B,aAAa,EAAE,CAAC;aACnB;YACD,CAAC,EAAE;gBACC,QAAQ,EAAE,QAAQ,GAAG,CAAC;gBACtB,UAAU,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC;gBAC7B,aAAa,EAAE,CAAC;aACnB;YACD,CAAC,EAAE;gBACC,QAAQ,EAAE,QAAQ,GAAG,CAAC;gBACtB,UAAU,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC;gBAC7B,aAAa,EAAE,CAAC;aACnB;YACD,CAAC,EAAE;gBACC,QAAQ,EAAE,QAAQ,GAAG,CAAC;gBACtB,UAAU,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC;gBAC7B,aAAa,EAAE,CAAC;aACnB;SACJ;KACJ,CAAA;AACL,CAAC","sourcesContent":["import { ThemeFonts, TypographyVariantsProps } from \"./types\";\n\nconst baseSize = 0;\n\nexport default function typography({ themeFonts }: { themeFonts?: ThemeFonts }): TypographyVariantsProps {\n return {\n themeFonts: themeFonts,\n heading: {\n 1: {\n fontSize: baseSize + 36,\n fontFamily: themeFonts?.[700],\n letterSpacing: 1\n },\n 2: {\n fontSize: baseSize + 32,\n fontFamily: themeFonts?.[700],\n letterSpacing: 1\n },\n 3: {\n fontSize: baseSize + 28,\n fontFamily: themeFonts?.[700],\n letterSpacing: 1\n },\n 4: {\n fontSize: baseSize + 24,\n fontFamily: themeFonts?.[700],\n letterSpacing: 1\n },\n 5: {\n fontSize: baseSize + 20,\n fontFamily: themeFonts?.[700],\n letterSpacing: 1\n },\n 6: {\n fontSize: baseSize + 18,\n fontFamily: themeFonts?.[700],\n letterSpacing: 1\n }\n },\n title: {\n 1: {\n fontSize: baseSize + 16,\n fontFamily: themeFonts?.[700],\n letterSpacing: 1\n },\n 2: {\n fontSize: baseSize + 14,\n fontFamily: themeFonts?.[700],\n letterSpacing: 1\n },\n 3: {\n fontSize: baseSize + 13,\n fontFamily: themeFonts?.[700],\n letterSpacing: 1\n },\n 4: {\n fontSize: baseSize + 12,\n fontFamily: themeFonts?.[700],\n letterSpacing: 1\n },\n 5: {\n fontSize: baseSize + 11,\n fontFamily: themeFonts?.[700],\n letterSpacing: 1\n },\n 6: {\n fontSize: baseSize + 10,\n fontFamily: themeFonts?.[700],\n letterSpacing: 1\n }\n },\n subTitle: {\n 1: {\n fontSize: baseSize + 16,\n fontFamily: themeFonts?.[600],\n letterSpacing: 1\n },\n 2: {\n fontSize: baseSize + 14,\n fontFamily: themeFonts?.[600],\n letterSpacing: 1\n },\n 3: {\n fontSize: baseSize + 13,\n fontFamily: themeFonts?.[600],\n letterSpacing: 1\n },\n 4: {\n fontSize: baseSize + 12,\n fontFamily: themeFonts?.[600],\n letterSpacing: 1\n },\n 5: {\n fontSize: baseSize + 11,\n fontFamily: themeFonts?.[600],\n letterSpacing: 1\n },\n 6: {\n fontSize: baseSize + 10,\n fontFamily: themeFonts?.[600],\n letterSpacing: 1\n }\n },\n label: {\n 1: {\n fontSize: baseSize + 16,\n fontFamily: themeFonts?.[500],\n letterSpacing: 1\n },\n 2: {\n fontSize: baseSize + 14,\n fontFamily: themeFonts?.[500],\n letterSpacing: 1\n },\n 3: {\n fontSize: baseSize + 13,\n fontFamily: themeFonts?.[500],\n letterSpacing: 1\n },\n 4: {\n fontSize: baseSize + 12,\n fontFamily: themeFonts?.[500],\n letterSpacing: 1\n },\n 5: {\n fontSize: baseSize + 11,\n fontFamily: themeFonts?.[500],\n letterSpacing: 1\n },\n 6: {\n fontSize: baseSize + 10,\n fontFamily: themeFonts?.[500],\n letterSpacing: 1\n }\n },\n body: {\n 1: {\n fontSize: baseSize + 16,\n fontFamily: themeFonts?.[400],\n letterSpacing: 1\n },\n 2: {\n fontSize: baseSize + 14,\n fontFamily: themeFonts?.[400],\n letterSpacing: 1\n },\n 3: {\n fontSize: baseSize + 13,\n fontFamily: themeFonts?.[400],\n letterSpacing: 1\n },\n 4: {\n fontSize: baseSize + 12,\n fontFamily: themeFonts?.[400],\n letterSpacing: 1\n },\n 5: {\n fontSize: baseSize + 11,\n fontFamily: themeFonts?.[400],\n letterSpacing: 1\n },\n 6: {\n fontSize: baseSize + 10,\n fontFamily: themeFonts?.[400],\n letterSpacing: 1\n }\n },\n caption: {\n 1: {\n fontSize: baseSize + 12,\n fontFamily: themeFonts?.[400],\n letterSpacing: 1\n },\n 2: {\n fontSize: baseSize + 11,\n fontFamily: themeFonts?.[400],\n letterSpacing: 1\n },\n 3: {\n fontSize: baseSize + 10,\n fontFamily: themeFonts?.[400],\n letterSpacing: 1\n },\n 4: {\n fontSize: baseSize + 9,\n fontFamily: themeFonts?.[400],\n letterSpacing: 1\n },\n 5: {\n fontSize: baseSize + 8,\n fontFamily: themeFonts?.[400],\n letterSpacing: 1\n },\n 6: {\n fontSize: baseSize + 7,\n fontFamily: themeFonts?.[400],\n letterSpacing: 1\n }\n },\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import React, { ReactNode } from 'react';
2
- import { ViewProps, ScrollView } from 'react-native';
2
+ import { ViewProps, ScrollView, NativeSyntheticEvent, NativeScrollEvent } from 'react-native';
3
3
  export type ZSContainerProps = ViewProps & {
4
4
  backgroundColor?: string;
5
5
  isLoader?: boolean;
@@ -17,14 +17,8 @@ export type ZSContainerProps = ViewProps & {
17
17
  automaticallyAdjustKeyboardInsets?: boolean;
18
18
  keyboardScrollExtraOffset?: number;
19
19
  translucent?: boolean;
20
- /**
21
- * 분할 레이아웃이 적용될 최소 화면 너비 (기본값: 700dp)
22
- * - 일반 스마트폰: ~430dp
23
- * - 폴더블 (펼쳤을 때): ~717dp
24
- * - 태블릿: 600dp ~ 1024dp
25
- */
26
- splitBreakpoint?: number;
27
- splitRatio?: number;
20
+ onScroll?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
21
+ scrollEventThrottle?: number;
28
22
  };
29
23
  export type ZSContainerRef = ScrollView;
30
24
  declare const ZSContainer: React.ForwardRefExoticComponent<ViewProps & {
@@ -44,14 +38,25 @@ declare const ZSContainer: React.ForwardRefExoticComponent<ViewProps & {
44
38
  automaticallyAdjustKeyboardInsets?: boolean;
45
39
  keyboardScrollExtraOffset?: number;
46
40
  translucent?: boolean;
47
- /**
48
- * 분할 레이아웃이 적용될 최소 화면 너비 (기본값: 700dp)
49
- * - 일반 스마트폰: ~430dp
50
- * - 폴더블 (펼쳤을 때): ~717dp
51
- * - 태블릿: 600dp ~ 1024dp
52
- */
53
- splitBreakpoint?: number;
54
- splitRatio?: number;
41
+ onScroll?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
42
+ scrollEventThrottle?: number;
55
43
  } & React.RefAttributes<ScrollView>>;
44
+ export declare const styles: {
45
+ flex1: {
46
+ flex: number;
47
+ };
48
+ scrollContainerStyle: {
49
+ flexGrow: number;
50
+ alignItems: "center";
51
+ };
52
+ splitContainer: {
53
+ flex: number;
54
+ flexDirection: "row";
55
+ width: "100%";
56
+ };
57
+ splitView: {
58
+ minHeight: "100%";
59
+ };
60
+ };
56
61
  export default ZSContainer;
57
62
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/ZSContainer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAgE,MAAM,OAAO,CAAC;AACvG,OAAO,EAAE,SAAS,EAA8E,UAAU,EAAgF,MAAM,cAAc,CAAC;AAK/M,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG;IACzC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,eAAe,GAAG,cAAc,CAAC;IAC5C,KAAK,CAAC,EAAE,KAAK,CAAC,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC,CAAC;IACnD,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,YAAY,CAAC,EAAE,SAAS,CAAC;IAC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C,iBAAiB,CAAC,KAAK,IAAI;0BAC7C,MAAM;oCAuJ5B,CAAC;AAEH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;CAcjB,CAAC;AAEH,eAAe,WAAW,CAAC"}
@@ -1,16 +1,15 @@
1
1
  import React, { useState, useEffect, useImperativeHandle, forwardRef, useRef } from 'react';
2
- import { KeyboardAvoidingView, StatusBar, StyleSheet, Dimensions, ActivityIndicator, Keyboard, View, useWindowDimensions } from 'react-native';
2
+ import { KeyboardAvoidingView, StatusBar, StyleSheet, ActivityIndicator, Keyboard, View } from 'react-native';
3
3
  import { SafeAreaView } from 'react-native-safe-area-context';
4
- import ScrollViewAtom from '../atoms/ScrollViewAtom';
5
4
  import { useTheme } from '../../model/useThemeProvider';
6
- const ZSContainer = forwardRef(function ZSContainer({ backgroundColor, isLoader = false, statusBarColor, barStyle, edges = ['top', 'bottom'], scrollViewDisabled = false, topComponent, bottomComponent, rightComponent, splitBreakpoint = 700, splitRatio = 0.5, showsVerticalScrollIndicator = true, loadingComponent = <ActivityIndicator />, keyboardVerticalOffset, behavior, automaticallyAdjustKeyboardInsets = true, keyboardScrollExtraOffset, translucent, ...props }, forwardedRef) {
7
- const { palette } = useTheme();
5
+ import VariantView from './ui/VariantView';
6
+ const ZSContainer = forwardRef(function ZSContainer({ backgroundColor, isLoader = false, statusBarColor, barStyle, edges = ['top', 'bottom'], scrollViewDisabled = false, topComponent, bottomComponent, rightComponent, showsVerticalScrollIndicator = true, loadingComponent = <ActivityIndicator />, keyboardVerticalOffset, behavior, automaticallyAdjustKeyboardInsets = true, keyboardScrollExtraOffset, translucent, scrollEventThrottle = 100, ...props }, forwardedRef) {
7
+ const { palette, splitBreakpoint, splitRatio, dimensions: { height: windowHeight, width: windowWidth }, isSplitView } = useTheme();
8
8
  const [isDelayed, setIsDelayed] = useState(true);
9
9
  const positionRef = useRef(0);
10
10
  const scrollViewRef = useRef(null);
11
11
  const lastTouchY = useRef(0);
12
- const { width: windowWidth } = useWindowDimensions();
13
- const isSplitView = (windowWidth >= splitBreakpoint) && rightComponent;
12
+ const splitEnabled = !!(isSplitView && (windowWidth >= splitBreakpoint) && rightComponent);
14
13
  useImperativeHandle(forwardedRef, () => scrollViewRef.current, []);
15
14
  useEffect(() => {
16
15
  const timer = setTimeout(() => {
@@ -21,7 +20,7 @@ const ZSContainer = forwardRef(function ZSContainer({ backgroundColor, isLoader
21
20
  useEffect(() => {
22
21
  const keyboardShowSubscription = Keyboard.addListener('keyboardDidShow', (e) => {
23
22
  if (scrollViewRef.current && keyboardScrollExtraOffset) {
24
- const screenHeight = Dimensions.get('window').height;
23
+ const screenHeight = windowHeight;
25
24
  const keyboardHeight = e.endCoordinates.height;
26
25
  const safeAreaBottom = 0;
27
26
  const availableScreenHeight = screenHeight - keyboardHeight - safeAreaBottom;
@@ -42,6 +41,8 @@ const ZSContainer = forwardRef(function ZSContainer({ backgroundColor, isLoader
42
41
  };
43
42
  }, [keyboardScrollExtraOffset]);
44
43
  const handleScroll = (event) => {
44
+ if (props.onScroll)
45
+ props.onScroll(event);
45
46
  if (keyboardScrollExtraOffset)
46
47
  positionRef.current = event.nativeEvent.contentOffset.y;
47
48
  };
@@ -52,28 +53,23 @@ const ZSContainer = forwardRef(function ZSContainer({ backgroundColor, isLoader
52
53
  const renderContent = () => {
53
54
  if (isLoader)
54
55
  return loadingComponent;
55
- const leftWidth = isSplitView ? windowWidth * splitRatio : windowWidth;
56
- const rightWidth = windowWidth * (1 - splitRatio);
57
- return (<View style={[styles.splitContainer]}>
58
- {scrollViewDisabled ? (<View style={[styles.flex1, props.style, { width: leftWidth }]}>
59
- {props.children}
60
- </View>) : (<ScrollViewAtom ref={scrollViewRef} style={[styles.flex1, { width: leftWidth }]} contentContainerStyle={styles.scrollContainerStyle} bounces={false} overScrollMode="never" showsVerticalScrollIndicator={showsVerticalScrollIndicator} keyboardShouldPersistTaps="handled" automaticallyAdjustKeyboardInsets={automaticallyAdjustKeyboardInsets} onScroll={handleScroll} onTouchStart={handleTouch}>
61
- <View style={[styles.splitView, props.style, { width: leftWidth }]}>
62
- {props.children}
63
- </View>
64
- </ScrollViewAtom>)}
56
+ const leftWidth = (splitEnabled ? `${splitRatio * 100}%` : '100%');
57
+ const rightWidth = `${(1 - splitRatio) * 100}%`;
58
+ return (<View style={styles.splitContainer}>
65
59
 
66
- {rightComponent && isSplitView && (<View style={[styles.splitView, { width: rightWidth }]}>
67
- {rightComponent}
68
- </View>)}
60
+ {/* 메인 컴포넌트 */}
61
+ <VariantView style={props.style} children={props.children} scrollViewRef={scrollViewRef} variantWidth={leftWidth} showsVerticalScrollIndicator={showsVerticalScrollIndicator} automaticallyAdjustKeyboardInsets={automaticallyAdjustKeyboardInsets} scrollViewDisabled={scrollViewDisabled} scrollEventThrottle={scrollEventThrottle} handleScroll={handleScroll} handleTouch={handleTouch}/>
62
+
63
+ {/* 폴드/태블릿 화면 오른쪽 컴포넌트 */}
64
+ {rightComponent && splitEnabled && (<VariantView style={styles.splitView} children={rightComponent} variantWidth={rightWidth} showsVerticalScrollIndicator={showsVerticalScrollIndicator} automaticallyAdjustKeyboardInsets={automaticallyAdjustKeyboardInsets} scrollViewDisabled={false} scrollEventThrottle={scrollEventThrottle}/>)}
69
65
  </View>);
70
66
  };
71
67
  return (<SafeAreaView style={[
72
68
  { backgroundColor: backgroundColor || palette.background.base },
73
69
  styles.flex1,
74
- styles.fullWidth,
70
+ { width: '100%' },
75
71
  ]} edges={edges}>
76
- {!isDelayed && (<KeyboardAvoidingView style={[styles.flex1, styles.fullWidth]} behavior={behavior} keyboardVerticalOffset={keyboardVerticalOffset}>
72
+ {!isDelayed && (<KeyboardAvoidingView style={[styles.flex1, { width: '100%' }]} behavior={behavior} keyboardVerticalOffset={keyboardVerticalOffset}>
77
73
  {topComponent && topComponent}
78
74
  {renderContent()}
79
75
  {!isLoader && bottomComponent && bottomComponent}
@@ -82,9 +78,8 @@ const ZSContainer = forwardRef(function ZSContainer({ backgroundColor, isLoader
82
78
  {(barStyle || statusBarColor || translucent) && (<StatusBar barStyle={barStyle} backgroundColor={statusBarColor || palette.background.base} translucent={translucent}/>)}
83
79
  </SafeAreaView>);
84
80
  });
85
- const styles = StyleSheet.create({
81
+ export const styles = StyleSheet.create({
86
82
  flex1: { flex: 1 },
87
- fullWidth: { width: Dimensions.get('window').width },
88
83
  scrollContainerStyle: {
89
84
  flexGrow: 1,
90
85
  alignItems: 'center',
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/ZSContainer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAa,QAAQ,EAAE,SAAS,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACvG,OAAO,EAAa,oBAAoB,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,iBAAiB,EAAuD,QAAQ,EAAE,IAAI,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAC/M,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,cAAc,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AA+BxD,MAAM,WAAW,GAAG,UAAU,CAAmC,SAAS,WAAW,CACnF,EACE,eAAe,EACf,QAAQ,GAAG,KAAK,EAChB,cAAc,EACd,QAAQ,EACR,KAAK,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC,EACzB,kBAAkB,GAAG,KAAK,EAC1B,YAAY,EACZ,eAAe,EACf,cAAc,EACd,eAAe,GAAG,GAAG,EACrB,UAAU,GAAG,GAAG,EAChB,4BAA4B,GAAG,IAAI,EACnC,gBAAgB,GAAG,CAAC,iBAAiB,CAAC,AAAD,EAAG,EACxC,sBAAsB,EACtB,QAAQ,EACR,iCAAiC,GAAG,IAAI,EACxC,yBAAyB,EACzB,WAAW,EACX,GAAG,KAAK,EACT,EACD,YAAY;IAEZ,MAAM,EAAE,OAA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,MAAM;KACd;IACD,SAAS,EAAE;QACT,SAAS,EAAE,MAAM;KAClB;CACF,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC","sourcesContent":["import React, { ReactNode, useState, useEffect, useImperativeHandle, forwardRef, useRef } from 'react';\r\nimport { ViewProps, KeyboardAvoidingView, StatusBar, StyleSheet, Dimensions, ActivityIndicator, ScrollView, NativeSyntheticEvent, NativeScrollEvent, Keyboard, View, useWindowDimensions } from 'react-native';\r\nimport { SafeAreaView } from 'react-native-safe-area-context';\r\nimport ScrollViewAtom from '../atoms/ScrollViewAtom';\r\nimport { useTheme } from '../../model/useThemeProvider';\r\n\r\nexport type ZSContainerProps = ViewProps & {\r\n backgroundColor?: string;\r\n isLoader?: boolean;\r\n statusBarColor?: string;\r\n barStyle?: 'light-content' | 'dark-content';\r\n edges?: Array<'top' | 'right' | 'bottom' | 'left'>;\r\n scrollViewDisabled?: boolean;\r\n topComponent?: ReactNode;\r\n bottomComponent?: ReactNode;\r\n rightComponent?: ReactNode;\r\n showsVerticalScrollIndicator?: boolean;\r\n loadingComponent?: React.ReactNode;\r\n keyboardVerticalOffset?: number;\r\n behavior?: 'padding' | 'height' | 'position';\r\n automaticallyAdjustKeyboardInsets?: boolean;\r\n keyboardScrollExtraOffset?: number;\r\n translucent?: boolean;\r\n /**\r\n * 분할 레이아웃이 적용될 최소 화면 너비 (기본값: 700dp)\r\n * - 일반 스마트폰: ~430dp\r\n * - 폴더블 (펼쳤을 때): ~717dp\r\n * - 태블릿: 600dp ~ 1024dp\r\n */\r\n splitBreakpoint?: number;\r\n splitRatio?: number;\r\n};\r\n\r\nexport type ZSContainerRef = ScrollView;\r\n\r\nconst ZSContainer = forwardRef<ZSContainerRef, ZSContainerProps>(function ZSContainer(\r\n {\r\n backgroundColor,\r\n isLoader = false,\r\n statusBarColor,\r\n barStyle,\r\n edges = ['top', 'bottom'],\r\n scrollViewDisabled = false,\r\n topComponent,\r\n bottomComponent,\r\n rightComponent,\r\n splitBreakpoint = 700,\r\n splitRatio = 0.5,\r\n showsVerticalScrollIndicator = true,\r\n loadingComponent = <ActivityIndicator />,\r\n keyboardVerticalOffset,\r\n behavior,\r\n automaticallyAdjustKeyboardInsets = true,\r\n keyboardScrollExtraOffset,\r\n translucent,\r\n ...props\r\n },\r\n forwardedRef\r\n) {\r\n const { palette } = useTheme();\r\n const [isDelayed, setIsDelayed] = useState(true);\r\n const positionRef = useRef<number | null>(0);\r\n const scrollViewRef = useRef<ScrollView>(null);\r\n const lastTouchY = useRef<number | null>(0);\r\n const { width: windowWidth } = useWindowDimensions();\r\n const isSplitView = (windowWidth >= splitBreakpoint) && rightComponent;\r\n\r\n useImperativeHandle(forwardedRef, () => scrollViewRef.current as ScrollView, []);\r\n\r\n useEffect(() => {\r\n const timer = setTimeout(() => {\r\n setIsDelayed(false);\r\n }, 200);\r\n return () => clearTimeout(timer);\r\n }, []);\r\n\r\n useEffect(() => {\r\n const keyboardShowSubscription = Keyboard.addListener('keyboardDidShow', (e) => {\r\n if (scrollViewRef.current && keyboardScrollExtraOffset) {\r\n const screenHeight = Dimensions.get('window').height;\r\n const keyboardHeight = e.endCoordinates.height;\r\n const safeAreaBottom = 0;\r\n const availableScreenHeight = screenHeight - keyboardHeight - safeAreaBottom;\r\n\r\n // 현재 터치 위치와 스크롤 위치를 기반으로 새로운 스크롤 위치 계산\r\n const currentScrollPosition = positionRef.current || 0;\r\n const touchPosition = lastTouchY.current || 0;\r\n\r\n const scrollOffset = touchPosition - availableScreenHeight + keyboardScrollExtraOffset;\r\n scrollViewRef.current.scrollTo({\r\n y: currentScrollPosition + scrollOffset,\r\n animated: true,\r\n });\r\n }\r\n });\r\n\r\n return () => {\r\n positionRef.current = null;\r\n lastTouchY.current = null;\r\n keyboardShowSubscription.remove();\r\n };\r\n }, [keyboardScrollExtraOffset]);\r\n\r\n const handleScroll = (event: NativeSyntheticEvent<NativeScrollEvent>) => {\r\n if (keyboardScrollExtraOffset) positionRef.current = event.nativeEvent.contentOffset.y;\r\n };\r\n\r\n const handleTouch = (evt: any) => {\r\n if (keyboardScrollExtraOffset) lastTouchY.current = evt.nativeEvent.pageY;\r\n };\r\n\r\n const renderContent = () => {\r\n if (isLoader) return loadingComponent;\r\n\r\n const leftWidth = isSplitView ? windowWidth * splitRatio : windowWidth;\r\n const rightWidth = windowWidth * (1 - splitRatio);\r\n\r\n return (\r\n <View style={[styles.splitContainer]}>\r\n {\r\n scrollViewDisabled ? (\r\n <View style={[styles.flex1, props.style, { width: leftWidth }]}>\r\n {props.children}\r\n </View>\r\n ) : (\r\n <ScrollViewAtom\r\n ref={scrollViewRef}\r\n style={[styles.flex1, { width: leftWidth }]}\r\n contentContainerStyle={styles.scrollContainerStyle}\r\n bounces={false}\r\n overScrollMode=\"never\"\r\n showsVerticalScrollIndicator={showsVerticalScrollIndicator}\r\n keyboardShouldPersistTaps=\"handled\"\r\n automaticallyAdjustKeyboardInsets={automaticallyAdjustKeyboardInsets}\r\n onScroll={handleScroll}\r\n onTouchStart={handleTouch}\r\n >\r\n <View style={[styles.splitView, props.style, { width: leftWidth }]}>\r\n {props.children}\r\n </View>\r\n </ScrollViewAtom>\r\n )\r\n }\r\n\r\n {rightComponent && isSplitView && (\r\n <View style={[styles.splitView, { width: rightWidth }]}>\r\n {rightComponent}\r\n </View>\r\n )}\r\n </View>\r\n );\r\n };\r\n\r\n return (\r\n <SafeAreaView\r\n style={[\r\n { backgroundColor: backgroundColor || palette.background.base },\r\n styles.flex1,\r\n styles.fullWidth,\r\n ]}\r\n edges={edges}\r\n >\r\n {!isDelayed && (\r\n <KeyboardAvoidingView\r\n style={[styles.flex1, styles.fullWidth]}\r\n behavior={behavior}\r\n keyboardVerticalOffset={keyboardVerticalOffset}\r\n >\r\n {topComponent && topComponent}\r\n {renderContent()}\r\n {!isLoader && bottomComponent && bottomComponent}\r\n </KeyboardAvoidingView>\r\n )}\r\n\r\n {\r\n (barStyle || statusBarColor || translucent) && (\r\n <StatusBar\r\n barStyle={barStyle}\r\n backgroundColor={statusBarColor || palette.background.base}\r\n translucent={translucent}\r\n />\r\n )\r\n }\r\n </SafeAreaView>\r\n );\r\n});\r\n\r\nconst styles = StyleSheet.create({\r\n flex1: { flex: 1 },\r\n fullWidth: { width: Dimensions.get('window').width },\r\n scrollContainerStyle: {\r\n flexGrow: 1,\r\n alignItems: 'center',\r\n },\r\n splitContainer: {\r\n flex: 1,\r\n flexDirection: 'row',\r\n width: '100%',\r\n },\r\n splitView: {\r\n minHeight: '100%',\r\n },\r\n});\r\n\r\nexport default ZSContainer;\r\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/ZSContainer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAa,QAAQ,EAAE,SAAS,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACvG,OAAO,EAAa,oBAAoB,EAAE,SAAS,EAAE,UAAU,EAAE,iBAAiB,EAAuD,QAAQ,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAC;AAC9L,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAyB3C,MAAM,WAAW,GAAG,UAAU,CAAmC,SAAS,WAAW,CACnF,EACE,eAAe,EACf,QAAQ,GAAG,KAAK,EAChB,cAAc,EACd,QAAQ,EACR,KAAK,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC,EACzB,kBAAkB,GAAG,KAAK,EAC1B,YAAY,EACZ,eAAe,EACf,cAAc,EACd,4BAA4B,GAAG,IAAI,EACnC,gBAAgB,GAAG,CAAC,iBAAiB,CAAC,AAAD,EAAG,EACxC,sBAAsB,EACtB,QAAQ,EACR,iCAAiC,GAAG,IAAI,EACxC,yBAAyB,EACzB,WAAW,EACX,mBAAmB,GAAG,GAAG,EACzB,GAAG,KAAK,EACT,EACD,YAA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AAC,CACF,KAAK,CAAC,CAAC,KAAK,CAAC,CAEb;MAAA,CAAC,CAAC,SAAS,IAAI,CACb,CAAC,oBAAoB,CACnB,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,CACzC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,sBAAsB,CAAC,CAAC,sBAAsB,CAAC,CAE/C;UAAA,CAAC,YAAY,IAAI,YAAY,CAC7B;UAAA,CAAC,aAAa,EAAE,CAChB;UAAA,CAAC,CAAC,QAAQ,IAAI,eAAe,IAAI,eAAe,CAClD;QAAA,EAAE,oBAAoB,CAAC,CACxB,CAED;;MAAA,CACE,CAAC,QAAQ,IAAI,cAAc,IAAI,WAAW,CAAC,IAAI,CAC7C,CAAC,SAAS,CACR,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,eAAe,CAAC,CAAC,cAAc,IAAI,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAC3D,WAAW,CAAC,CAAC,WAAW,CAAC,EACzB,CAEN,CACF;IAAA,EAAE,YAAY,CAAC,CAChB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IACtC,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;IAClB,oBAAoB,EAAE;QACpB,QAAQ,EAAE,CAAC;QACX,UAAU,EAAE,QAAQ;KACrB;IACD,cAAc,EAAE;QACd,IAAI,EAAE,CAAC;QACP,aAAa,EAAE,KAAK;QACpB,KAAK,EAAE,MAAM;KACd;IACD,SAAS,EAAE;QACT,SAAS,EAAE,MAAM;KAClB;CACF,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC","sourcesContent":["import React, { ReactNode, useState, useEffect, useImperativeHandle, forwardRef, useRef } from 'react';\r\nimport { ViewProps, KeyboardAvoidingView, StatusBar, StyleSheet, ActivityIndicator, ScrollView, NativeSyntheticEvent, NativeScrollEvent, Keyboard, View, DimensionValue } from 'react-native';\r\nimport { SafeAreaView } from 'react-native-safe-area-context';\r\nimport { useTheme } from '../../model/useThemeProvider';\r\nimport VariantView from './ui/VariantView';\r\n\r\nexport type ZSContainerProps = ViewProps & {\r\n backgroundColor?: string;\r\n isLoader?: boolean;\r\n statusBarColor?: string;\r\n barStyle?: 'light-content' | 'dark-content';\r\n edges?: Array<'top' | 'right' | 'bottom' | 'left'>;\r\n scrollViewDisabled?: boolean;\r\n topComponent?: ReactNode;\r\n bottomComponent?: ReactNode;\r\n rightComponent?: ReactNode;\r\n showsVerticalScrollIndicator?: boolean;\r\n loadingComponent?: React.ReactNode;\r\n keyboardVerticalOffset?: number;\r\n behavior?: 'padding' | 'height' | 'position';\r\n automaticallyAdjustKeyboardInsets?: boolean;\r\n keyboardScrollExtraOffset?: number;\r\n translucent?: boolean;\r\n onScroll?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;\r\n scrollEventThrottle?: number;\r\n};\r\n\r\nexport type ZSContainerRef = ScrollView;\r\n\r\nconst ZSContainer = forwardRef<ZSContainerRef, ZSContainerProps>(function ZSContainer(\r\n {\r\n backgroundColor,\r\n isLoader = false,\r\n statusBarColor,\r\n barStyle,\r\n edges = ['top', 'bottom'],\r\n scrollViewDisabled = false,\r\n topComponent,\r\n bottomComponent,\r\n rightComponent,\r\n showsVerticalScrollIndicator = true,\r\n loadingComponent = <ActivityIndicator />,\r\n keyboardVerticalOffset,\r\n behavior,\r\n automaticallyAdjustKeyboardInsets = true,\r\n keyboardScrollExtraOffset,\r\n translucent,\r\n scrollEventThrottle = 100,\r\n ...props\r\n },\r\n forwardedRef\r\n) {\r\n const { palette, splitBreakpoint, splitRatio, dimensions: { height: windowHeight, width: windowWidth }, isSplitView } = useTheme();\r\n const [isDelayed, setIsDelayed] = useState(true);\r\n const positionRef = useRef<number | null>(0);\r\n const scrollViewRef = useRef<ScrollView>(null);\r\n const lastTouchY = useRef<number | null>(0);\r\n const splitEnabled = !!(isSplitView && (windowWidth >= splitBreakpoint) && rightComponent);\r\n\r\n useImperativeHandle(forwardedRef, () => scrollViewRef.current as ScrollView, []);\r\n\r\n useEffect(() => {\r\n const timer = setTimeout(() => {\r\n setIsDelayed(false);\r\n }, 200);\r\n return () => clearTimeout(timer);\r\n }, []);\r\n\r\n useEffect(() => {\r\n const keyboardShowSubscription = Keyboard.addListener('keyboardDidShow', (e) => {\r\n if (scrollViewRef.current && keyboardScrollExtraOffset) {\r\n const screenHeight = windowHeight;\r\n const keyboardHeight = e.endCoordinates.height;\r\n const safeAreaBottom = 0;\r\n const availableScreenHeight = screenHeight - keyboardHeight - safeAreaBottom;\r\n\r\n // 현재 터치 위치와 스크롤 위치를 기반으로 새로운 스크롤 위치 계산\r\n const currentScrollPosition = positionRef.current || 0;\r\n const touchPosition = lastTouchY.current || 0;\r\n\r\n const scrollOffset = touchPosition - availableScreenHeight + keyboardScrollExtraOffset;\r\n scrollViewRef.current.scrollTo({\r\n y: currentScrollPosition + scrollOffset,\r\n animated: true,\r\n });\r\n }\r\n });\r\n\r\n return () => {\r\n positionRef.current = null;\r\n lastTouchY.current = null;\r\n keyboardShowSubscription.remove();\r\n };\r\n }, [keyboardScrollExtraOffset]);\r\n\r\n const handleScroll = (event: NativeSyntheticEvent<NativeScrollEvent>) => {\r\n if (props.onScroll) props.onScroll(event);\r\n if (keyboardScrollExtraOffset) positionRef.current = event.nativeEvent.contentOffset.y;\r\n };\r\n\r\n const handleTouch = (evt: any) => {\r\n if (keyboardScrollExtraOffset) lastTouchY.current = evt.nativeEvent.pageY;\r\n };\r\n\r\n const renderContent = () => {\r\n if (isLoader) return loadingComponent;\r\n\r\n const leftWidth = (splitEnabled ? `${splitRatio * 100}%` : '100%') as DimensionValue;\r\n const rightWidth = `${(1 - splitRatio) * 100}%` as DimensionValue;\r\n\r\n return (\r\n <View style={styles.splitContainer}>\r\n\r\n {/* 메인 컴포넌트 */}\r\n <VariantView\r\n style={props.style}\r\n children={props.children}\r\n scrollViewRef={scrollViewRef}\r\n variantWidth={leftWidth}\r\n showsVerticalScrollIndicator={showsVerticalScrollIndicator}\r\n automaticallyAdjustKeyboardInsets={automaticallyAdjustKeyboardInsets}\r\n scrollViewDisabled={scrollViewDisabled}\r\n scrollEventThrottle={scrollEventThrottle}\r\n handleScroll={handleScroll}\r\n handleTouch={handleTouch}\r\n />\r\n\r\n {/* 폴드/태블릿 화면 오른쪽 컴포넌트 */}\r\n {rightComponent && splitEnabled && (\r\n <VariantView\r\n style={styles.splitView}\r\n children={rightComponent}\r\n variantWidth={rightWidth}\r\n showsVerticalScrollIndicator={showsVerticalScrollIndicator}\r\n automaticallyAdjustKeyboardInsets={automaticallyAdjustKeyboardInsets}\r\n scrollViewDisabled={false}\r\n scrollEventThrottle={scrollEventThrottle}\r\n />\r\n )}\r\n </View>\r\n );\r\n };\r\n\r\n return (\r\n <SafeAreaView\r\n style={[\r\n { backgroundColor: backgroundColor || palette.background.base },\r\n styles.flex1,\r\n { width: '100%' },\r\n ]}\r\n edges={edges}\r\n >\r\n {!isDelayed && (\r\n <KeyboardAvoidingView\r\n style={[styles.flex1, { width: '100%' }]}\r\n behavior={behavior}\r\n keyboardVerticalOffset={keyboardVerticalOffset}\r\n >\r\n {topComponent && topComponent}\r\n {renderContent()}\r\n {!isLoader && bottomComponent && bottomComponent}\r\n </KeyboardAvoidingView>\r\n )}\r\n\r\n {\r\n (barStyle || statusBarColor || translucent) && (\r\n <StatusBar\r\n barStyle={barStyle}\r\n backgroundColor={statusBarColor || palette.background.base}\r\n translucent={translucent}\r\n />\r\n )\r\n }\r\n </SafeAreaView>\r\n );\r\n});\r\n\r\nexport const styles = StyleSheet.create({\r\n flex1: { flex: 1 },\r\n scrollContainerStyle: {\r\n flexGrow: 1,\r\n alignItems: 'center',\r\n },\r\n splitContainer: {\r\n flex: 1,\r\n flexDirection: 'row',\r\n width: '100%',\r\n },\r\n splitView: {\r\n minHeight: '100%',\r\n },\r\n});\r\n\r\nexport default ZSContainer;\r\n"]}
@@ -0,0 +1,16 @@
1
+ import { ScrollView, NativeSyntheticEvent, NativeScrollEvent, DimensionValue, StyleProp, ViewStyle } from 'react-native';
2
+ interface VariantViewProps {
3
+ children: React.ReactNode;
4
+ scrollViewDisabled?: boolean;
5
+ style: StyleProp<ViewStyle>;
6
+ scrollViewRef?: React.RefObject<ScrollView>;
7
+ variantWidth?: DimensionValue;
8
+ showsVerticalScrollIndicator?: boolean;
9
+ automaticallyAdjustKeyboardInsets?: boolean;
10
+ handleScroll?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
11
+ handleTouch?: (event: any) => void;
12
+ scrollEventThrottle?: number;
13
+ }
14
+ export default function VariantView({ children, scrollViewDisabled, style, scrollViewRef, variantWidth, showsVerticalScrollIndicator, automaticallyAdjustKeyboardInsets, handleScroll, handleTouch, scrollEventThrottle }: VariantViewProps): import("react").JSX.Element;
15
+ export {};
16
+ //# sourceMappingURL=VariantView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VariantView.d.ts","sourceRoot":"","sources":["../../../../src/ui/ZSContainer/ui/VariantView.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,iBAAiB,EAAQ,cAAc,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE/H,UAAU,gBAAgB;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,KAAK,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC5B,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC5C,YAAY,CAAC,EAAE,cAAc,CAAC;IAC9B,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,iCAAiC,CAAC,EAAE,OAAO,CAAC;IAC5C,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IACxE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IACnC,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAAE,QAAQ,EAAE,kBAAkB,EAAE,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,4BAA4B,EAAE,iCAAiC,EAAE,YAAY,EAAE,WAAW,EAAE,mBAAmB,EAAE,EAAE,gBAAgB,+BA0B1O"}
@@ -0,0 +1,12 @@
1
+ import { styles } from '..';
2
+ import { ScrollView, View } from 'react-native';
3
+ export default function VariantView({ children, scrollViewDisabled, style, scrollViewRef, variantWidth, showsVerticalScrollIndicator, automaticallyAdjustKeyboardInsets, handleScroll, handleTouch, scrollEventThrottle }) {
4
+ return (scrollViewDisabled ? (<View style={[style, { width: variantWidth }]}>
5
+ {children}
6
+ </View>) : (<ScrollView ref={scrollViewRef} style={{ width: variantWidth }} contentContainerStyle={styles.scrollContainerStyle} bounces={false} overScrollMode="never" showsVerticalScrollIndicator={showsVerticalScrollIndicator} keyboardShouldPersistTaps="handled" automaticallyAdjustKeyboardInsets={automaticallyAdjustKeyboardInsets} onScroll={handleScroll} onTouchStart={handleTouch} scrollEventThrottle={scrollEventThrottle}>
7
+ <View style={[styles.splitView, style, { width: '100%' }]}>
8
+ {children}
9
+ </View>
10
+ </ScrollView>));
11
+ }
12
+ //# sourceMappingURL=VariantView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VariantView.js","sourceRoot":"","sources":["../../../../src/ui/ZSContainer/ui/VariantView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AAC5B,OAAO,EAAE,UAAU,EAA2C,IAAI,EAAwC,MAAM,cAAc,CAAC;AAe/H,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAAE,QAAQ,EAAE,kBAAkB,EAAE,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,4BAA4B,EAAE,iCAAiC,EAAE,YAAY,EAAE,WAAW,EAAE,mBAAmB,EAAoB;IACzO,OAAO,CACL,kBAAkB,CAAC,CAAC,CAAC,CACnB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAE,KAAK,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,CAAC,CAC7C;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,IAAI,CAAC,CACR,CAAC,CAAC,CAAC,CACF,CAAC,UAAU,CACT,GAAG,CAAC,CAAC,aAAa,CAAC,CACnB,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,CAC/B,qBAAqB,CAAC,CAAC,MAAM,CAAC,oBAAoB,CAAC,CACnD,OAAO,CAAC,CAAC,KAAK,CAAC,CACf,cAAc,CAAC,OAAO,CACtB,4BAA4B,CAAC,CAAC,4BAA4B,CAAC,CAC3D,yBAAyB,CAAC,SAAS,CACnC,iCAAiC,CAAC,CAAC,iCAAiC,CAAC,CACrE,QAAQ,CAAC,CAAC,YAAY,CAAC,CACvB,YAAY,CAAC,CAAC,WAAW,CAAC,CAC1B,mBAAmB,CAAC,CAAC,mBAAmB,CAAC,CAEzC;QAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,CACxD;UAAA,CAAC,QAAQ,CACX;QAAA,EAAE,IAAI,CACR;MAAA,EAAE,UAAU,CAAC,CACd,CACF,CAAA;AACH,CAAC","sourcesContent":["import { styles } from '..';\nimport { ScrollView, NativeSyntheticEvent, NativeScrollEvent, View, DimensionValue, StyleProp, ViewStyle } from 'react-native';\n\ninterface VariantViewProps {\n children: React.ReactNode;\n scrollViewDisabled?: boolean;\n style: StyleProp<ViewStyle>;\n scrollViewRef?: React.RefObject<ScrollView>;\n variantWidth?: DimensionValue;\n showsVerticalScrollIndicator?: boolean;\n automaticallyAdjustKeyboardInsets?: boolean;\n handleScroll?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;\n handleTouch?: (event: any) => void;\n scrollEventThrottle?: number;\n}\n\nexport default function VariantView({ children, scrollViewDisabled, style, scrollViewRef, variantWidth, showsVerticalScrollIndicator, automaticallyAdjustKeyboardInsets, handleScroll, handleTouch, scrollEventThrottle }: VariantViewProps) {\n return (\n scrollViewDisabled ? (\n <View style={[ style, { width: variantWidth }]}>\n {children}\n </View>\n ) : (\n <ScrollView\n ref={scrollViewRef}\n style={{ width: variantWidth }}\n contentContainerStyle={styles.scrollContainerStyle}\n bounces={false}\n overScrollMode=\"never\"\n showsVerticalScrollIndicator={showsVerticalScrollIndicator}\n keyboardShouldPersistTaps=\"handled\"\n automaticallyAdjustKeyboardInsets={automaticallyAdjustKeyboardInsets}\n onScroll={handleScroll}\n onTouchStart={handleTouch}\n scrollEventThrottle={scrollEventThrottle}\n >\n <View style={[styles.splitView, style, { width: '100%' }]}>\n {children}\n </View>\n </ScrollView>\n )\n )\n}"]}
@@ -2,10 +2,10 @@ import Animated, { FadeInDown } from "react-native-reanimated";
2
2
  import ZSText from "../../ZSText";
3
3
  import SvgExclamation from "../../../assets/SvgExclamation";
4
4
  const ErrorComponent = ({ errorMessage, errorColor, }) => {
5
- return (<Animated.View entering={FadeInDown} style={{ width: '100%', flexDirection: 'row', alignItems: 'center', paddingLeft: 5, marginTop: 6 }}>
5
+ return (<Animated.View entering={FadeInDown} style={{ width: '100%', flexDirection: 'row', alignItems: 'center', paddingLeft: 5, paddingTop: 9 }}>
6
6
  <SvgExclamation size={16} backgroundColor={errorColor}/>
7
7
 
8
- <ZSText typo='body.4' style={{ marginLeft: 4, color: errorColor }}>
8
+ <ZSText typo='body.4' style={{ marginLeft: 5, color: errorColor }}>
9
9
  {errorMessage}
10
10
  </ZSText>
11
11
  </Animated.View>);
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorComponent.js","sourceRoot":"","sources":["../../../../src/ui/ZSTextField/ui/ErrorComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,QAAQ,EAAE,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,cAAc,MAAM,gCAAgC,CAAC;AAE5D,MAAM,cAAc,GAAG,CAAC,EACtB,YAAY,EACZ,UAAU,GAIX,EAAE,EAAE;IACH,OAAO,CACL,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CACtI;MAAA,CAAC,cAAc,CACb,IAAI,CAAC,CAAC,EAAE,CAAC,CACT,eAAe,CAAC,CAAC,UAAU,CAAC,EAG9B;;MAAA,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAChE;QAAA,CAAC,YAAY,CACf;MAAA,EAAE,MAAM,CACV;IAAA,EAAE,QAAQ,CAAC,IAAI,CAAC,CACjB,CAAA;AACH,CAAC,CAAA;AAED,eAAe,cAAc,CAAC","sourcesContent":["import Animated, { FadeInDown } from \"react-native-reanimated\";\nimport ZSText from \"../../ZSText\";\nimport SvgExclamation from \"../../../assets/SvgExclamation\";\n\nconst ErrorComponent = ({\n errorMessage,\n errorColor,\n}: {\n errorMessage: string;\n errorColor: string;\n}) => {\n return (\n <Animated.View entering={FadeInDown} style={{ width: '100%', flexDirection: 'row', alignItems: 'center', paddingLeft: 5, marginTop: 6 }}>\n <SvgExclamation\n size={16}\n backgroundColor={errorColor}\n />\n\n <ZSText typo='body.4' style={{ marginLeft: 4, color: errorColor }}>\n {errorMessage}\n </ZSText>\n </Animated.View>\n )\n}\n\nexport default ErrorComponent;"]}
1
+ {"version":3,"file":"ErrorComponent.js","sourceRoot":"","sources":["../../../../src/ui/ZSTextField/ui/ErrorComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,QAAQ,EAAE,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,cAAc,MAAM,gCAAgC,CAAC;AAE5D,MAAM,cAAc,GAAG,CAAC,EACtB,YAAY,EACZ,UAAU,GAIX,EAAE,EAAE;IACH,OAAO,CACL,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,CACvI;MAAA,CAAC,cAAc,CACb,IAAI,CAAC,CAAC,EAAE,CAAC,CACT,eAAe,CAAC,CAAC,UAAU,CAAC,EAG9B;;MAAA,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAChE;QAAA,CAAC,YAAY,CACf;MAAA,EAAE,MAAM,CACV;IAAA,EAAE,QAAQ,CAAC,IAAI,CAAC,CACjB,CAAA;AACH,CAAC,CAAA;AAED,eAAe,cAAc,CAAC","sourcesContent":["import Animated, { FadeInDown } from \"react-native-reanimated\";\nimport ZSText from \"../../ZSText\";\nimport SvgExclamation from \"../../../assets/SvgExclamation\";\n\nconst ErrorComponent = ({\n errorMessage,\n errorColor,\n}: {\n errorMessage: string;\n errorColor: string;\n}) => {\n return (\n <Animated.View entering={FadeInDown} style={{ width: '100%', flexDirection: 'row', alignItems: 'center', paddingLeft: 5, paddingTop: 9 }}>\n <SvgExclamation\n size={16}\n backgroundColor={errorColor}\n />\n\n <ZSText typo='body.4' style={{ marginLeft: 5, color: errorColor }}>\n {errorMessage}\n </ZSText>\n </Animated.View>\n )\n}\n\nexport default ErrorComponent;"]}
@@ -1,7 +1,6 @@
1
1
  import ZSView from './ZSView';
2
2
  import AnimatedWrapper from './atoms/AnimatedWrapper';
3
3
  import TextAtom from './atoms/TextAtom';
4
- import ScrollViewAtom from './atoms/ScrollViewAtom';
5
4
  import ZSContainer from './ZSContainer';
6
5
  import ZSPressable from './ZSPressable';
7
6
  import ZSText from './ZSText';
@@ -10,5 +9,5 @@ import ZSTextField from './ZSTextField';
10
9
  import ZSRadioGroup from './ZSRadioGroup';
11
10
  import ZSBottomButton from './ZSBottomButton';
12
11
  import * as types from './types';
13
- export { ZSView, AnimatedWrapper, TextAtom, ScrollViewAtom, ZSContainer, ZSPressable, ZSText, ThrottleButton, ZSTextField, ZSRadioGroup, ZSBottomButton, types };
12
+ export { ZSView, AnimatedWrapper, TextAtom, ZSContainer, ZSPressable, ZSText, ThrottleButton, ZSTextField, ZSRadioGroup, ZSBottomButton, types };
14
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,eAAe,MAAM,yBAAyB,CAAC;AACtD,OAAO,QAAQ,MAAM,kBAAkB,CAAC;AACxC,OAAO,cAAc,MAAM,wBAAwB,CAAC;AACpD,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AAEjC,OAAO,EACL,MAAM,EACN,eAAe,EACf,QAAQ,EACR,cAAc,EACd,WAAW,EACX,WAAW,EACX,MAAM,EACN,cAAc,EACd,WAAW,EACX,YAAY,EACZ,cAAc,EACd,KAAK,EACN,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,eAAe,MAAM,yBAAyB,CAAC;AACtD,OAAO,QAAQ,MAAM,kBAAkB,CAAC;AACxC,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AAEjC,OAAO,EACL,MAAM,EACN,eAAe,EACf,QAAQ,EACR,WAAW,EACX,WAAW,EACX,MAAM,EACN,cAAc,EACd,WAAW,EACX,YAAY,EACZ,cAAc,EACd,KAAK,EACN,CAAC"}
package/build/ui/index.js CHANGED
@@ -1,7 +1,6 @@
1
1
  import ZSView from './ZSView';
2
2
  import AnimatedWrapper from './atoms/AnimatedWrapper';
3
3
  import TextAtom from './atoms/TextAtom';
4
- import ScrollViewAtom from './atoms/ScrollViewAtom';
5
4
  import ZSContainer from './ZSContainer';
6
5
  import ZSPressable from './ZSPressable';
7
6
  import ZSText from './ZSText';
@@ -10,5 +9,5 @@ import ZSTextField from './ZSTextField';
10
9
  import ZSRadioGroup from './ZSRadioGroup';
11
10
  import ZSBottomButton from './ZSBottomButton';
12
11
  import * as types from './types';
13
- export { ZSView, AnimatedWrapper, TextAtom, ScrollViewAtom, ZSContainer, ZSPressable, ZSText, ThrottleButton, ZSTextField, ZSRadioGroup, ZSBottomButton, types };
12
+ export { ZSView, AnimatedWrapper, TextAtom, ZSContainer, ZSPressable, ZSText, ThrottleButton, ZSTextField, ZSRadioGroup, ZSBottomButton, types };
14
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,eAAe,MAAM,yBAAyB,CAAC;AACtD,OAAO,QAAQ,MAAM,kBAAkB,CAAC;AACxC,OAAO,cAAc,MAAM,wBAAwB,CAAC;AACpD,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AAEjC,OAAO,EACL,MAAM,EACN,eAAe,EACf,QAAQ,EACR,cAAc,EACd,WAAW,EACX,WAAW,EACX,MAAM,EACN,cAAc,EACd,WAAW,EACX,YAAY,EACZ,cAAc,EACd,KAAK,EACN,CAAC","sourcesContent":["import ZSView from './ZSView';\nimport AnimatedWrapper from './atoms/AnimatedWrapper';\nimport TextAtom from './atoms/TextAtom';\nimport ScrollViewAtom from './atoms/ScrollViewAtom';\nimport ZSContainer from './ZSContainer';\nimport ZSPressable from './ZSPressable';\nimport ZSText from './ZSText';\nimport ThrottleButton from './ThrottleButton';\nimport ZSTextField from './ZSTextField';\nimport ZSRadioGroup from './ZSRadioGroup';\nimport ZSBottomButton from './ZSBottomButton';\nimport * as types from './types';\n\nexport {\n ZSView,\n AnimatedWrapper,\n TextAtom,\n ScrollViewAtom,\n ZSContainer,\n ZSPressable,\n ZSText,\n ThrottleButton,\n ZSTextField,\n ZSRadioGroup,\n ZSBottomButton,\n types\n};"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,eAAe,MAAM,yBAAyB,CAAC;AACtD,OAAO,QAAQ,MAAM,kBAAkB,CAAC;AACxC,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AAEjC,OAAO,EACL,MAAM,EACN,eAAe,EACf,QAAQ,EACR,WAAW,EACX,WAAW,EACX,MAAM,EACN,cAAc,EACd,WAAW,EACX,YAAY,EACZ,cAAc,EACd,KAAK,EACN,CAAC","sourcesContent":["import ZSView from './ZSView';\nimport AnimatedWrapper from './atoms/AnimatedWrapper';\nimport TextAtom from './atoms/TextAtom';\nimport ZSContainer from './ZSContainer';\nimport ZSPressable from './ZSPressable';\nimport ZSText from './ZSText';\nimport ThrottleButton from './ThrottleButton';\nimport ZSTextField from './ZSTextField';\nimport ZSRadioGroup from './ZSRadioGroup';\nimport ZSBottomButton from './ZSBottomButton';\nimport * as types from './types';\n\nexport {\n ZSView,\n AnimatedWrapper,\n TextAtom,\n ZSContainer,\n ZSPressable,\n ZSText,\n ThrottleButton,\n ZSTextField,\n ZSRadioGroup,\n ZSBottomButton,\n types\n};"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0610studio/zs-ui",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "private": false,
5
5
  "description": "EXPO ZS-UI",
6
6
  "type": "module",
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import { ScrollView, ScrollViewProps } from 'react-native';
3
- declare const ScrollViewAtom: React.ForwardRefExoticComponent<ScrollViewProps & React.RefAttributes<ScrollView>>;
4
- export default ScrollViewAtom;
5
- //# sourceMappingURL=ScrollViewAtom.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ScrollViewAtom.d.ts","sourceRoot":"","sources":["../../../src/ui/atoms/ScrollViewAtom.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAI3D,QAAA,MAAM,cAAc,oFAQlB,CAAC;AAEH,eAAe,cAAc,CAAC"}
@@ -1,9 +0,0 @@
1
- import React, { forwardRef } from 'react';
2
- import { ScrollView } from 'react-native';
3
- const ScrollViewAtom = forwardRef(function ScrollViewAtom({ children, style, ...props }, ref) {
4
- return (<ScrollView ref={ref} {...props} style={style}>
5
- {children}
6
- </ScrollView>);
7
- });
8
- export default ScrollViewAtom;
9
- //# sourceMappingURL=ScrollViewAtom.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ScrollViewAtom.js","sourceRoot":"","sources":["../../../src/ui/atoms/ScrollViewAtom.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAmB,MAAM,cAAc,CAAC;AAI3D,MAAM,cAAc,GAAG,UAAU,CAAkC,SAAS,cAAc,CACxF,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG;IAElC,OAAO,CACL,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAC5C;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,cAAc,CAAC","sourcesContent":["import React, { forwardRef } from 'react';\nimport { ScrollView, ScrollViewProps } from 'react-native';\n\ntype ScrollViewAtomProps = ScrollViewProps;\n\nconst ScrollViewAtom = forwardRef<ScrollView, ScrollViewAtomProps>(function ScrollViewAtom(\n { children, style, ...props }, ref\n) {\n return (\n <ScrollView ref={ref} {...props} style={style}>\n {children}\n </ScrollView>\n );\n});\n\nexport default ScrollViewAtom;\n"]}