@0610studio/zs-ui 0.17.1 → 0.18.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 (138) hide show
  1. package/android/build.gradle +3 -3
  2. package/build/ZsUiModule.d.ts.map +1 -1
  3. package/build/ZsUiModule.js +0 -2
  4. package/build/ZsUiModule.js.map +1 -1
  5. package/build/ZsUiView.js +2 -2
  6. package/build/ZsUiView.js.map +1 -1
  7. package/build/ZsUiView.web.js +2 -4
  8. package/build/ZsUiView.web.js.map +1 -1
  9. package/build/assets/SvgCheck.js +2 -4
  10. package/build/assets/SvgCheck.js.map +1 -1
  11. package/build/assets/SvgExclamation.d.ts.map +1 -1
  12. package/build/assets/SvgExclamation.js +2 -9
  13. package/build/assets/SvgExclamation.js.map +1 -1
  14. package/build/assets/SvgX.js +3 -5
  15. package/build/assets/SvgX.js.map +1 -1
  16. package/build/context/OverlayContext.d.ts.map +1 -1
  17. package/build/context/OverlayContext.js +12 -42
  18. package/build/context/OverlayContext.js.map +1 -1
  19. package/build/context/ThemeContext.d.ts +9 -0
  20. package/build/context/ThemeContext.d.ts.map +1 -1
  21. package/build/context/ThemeContext.js +13 -19
  22. package/build/context/ThemeContext.js.map +1 -1
  23. package/build/index.d.ts +2 -2
  24. package/build/index.d.ts.map +1 -1
  25. package/build/index.js +1 -7
  26. package/build/index.js.map +1 -1
  27. package/build/model/globalOverlay.d.ts +0 -8
  28. package/build/model/globalOverlay.d.ts.map +1 -1
  29. package/build/model/globalOverlay.js +0 -9
  30. package/build/model/globalOverlay.js.map +1 -1
  31. package/build/model/types.d.ts +1 -1
  32. package/build/model/types.d.ts.map +1 -1
  33. package/build/model/types.js.map +1 -1
  34. package/build/model/useKeyboard.d.ts.map +1 -1
  35. package/build/model/useKeyboard.js +8 -4
  36. package/build/model/useKeyboard.js.map +1 -1
  37. package/build/model/utils.d.ts +1 -1
  38. package/build/model/utils.d.ts.map +1 -1
  39. package/build/model/utils.js +2 -1
  40. package/build/model/utils.js.map +1 -1
  41. package/build/overlay/AlertOverlay/index.d.ts.map +1 -1
  42. package/build/overlay/AlertOverlay/index.js +10 -27
  43. package/build/overlay/AlertOverlay/index.js.map +1 -1
  44. package/build/overlay/BottomSheetOverlay/index.d.ts.map +1 -1
  45. package/build/overlay/BottomSheetOverlay/index.js +21 -25
  46. package/build/overlay/BottomSheetOverlay/index.js.map +1 -1
  47. package/build/overlay/LoadingNotify/index.js +4 -5
  48. package/build/overlay/LoadingNotify/index.js.map +1 -1
  49. package/build/overlay/Modality/index.d.ts.map +1 -1
  50. package/build/overlay/Modality/index.js +21 -36
  51. package/build/overlay/Modality/index.js.map +1 -1
  52. package/build/overlay/PopOver/PopOverButton.js +3 -6
  53. package/build/overlay/PopOver/PopOverButton.js.map +1 -1
  54. package/build/overlay/PopOver/PopOverMenu.d.ts.map +1 -1
  55. package/build/overlay/PopOver/PopOverMenu.js +10 -18
  56. package/build/overlay/PopOver/PopOverMenu.js.map +1 -1
  57. package/build/overlay/SnackbarNotify/index.d.ts +3 -3
  58. package/build/overlay/SnackbarNotify/index.d.ts.map +1 -1
  59. package/build/overlay/SnackbarNotify/index.js +8 -9
  60. package/build/overlay/SnackbarNotify/index.js.map +1 -1
  61. package/build/overlay/SnackbarNotify/ui/SnackbarItem.d.ts +3 -3
  62. package/build/overlay/SnackbarNotify/ui/SnackbarItem.d.ts.map +1 -1
  63. package/build/overlay/SnackbarNotify/ui/SnackbarItem.js +9 -16
  64. package/build/overlay/SnackbarNotify/ui/SnackbarItem.js.map +1 -1
  65. package/build/overlay/ZSPortal/index.d.ts.map +1 -1
  66. package/build/overlay/ZSPortal/index.js +16 -9
  67. package/build/overlay/ZSPortal/index.js.map +1 -1
  68. package/build/overlay/ui/ModalBackground.js +5 -9
  69. package/build/overlay/ui/ModalBackground.js.map +1 -1
  70. package/build/theme/elevation.d.ts +94 -10
  71. package/build/theme/elevation.d.ts.map +1 -1
  72. package/build/theme/elevation.js +39 -35
  73. package/build/theme/elevation.js.map +1 -1
  74. package/build/theme/palette.d.ts +1 -5
  75. package/build/theme/palette.d.ts.map +1 -1
  76. package/build/theme/palette.js +3 -12
  77. package/build/theme/palette.js.map +1 -1
  78. package/build/theme/resolveColor.d.ts +4 -0
  79. package/build/theme/resolveColor.d.ts.map +1 -0
  80. package/build/theme/resolveColor.js +29 -0
  81. package/build/theme/resolveColor.js.map +1 -0
  82. package/build/ui/ZSAboveKeyboard/index.js +2 -5
  83. package/build/ui/ZSAboveKeyboard/index.js.map +1 -1
  84. package/build/ui/ZSBlockButton/index.d.ts +4 -2
  85. package/build/ui/ZSBlockButton/index.d.ts.map +1 -1
  86. package/build/ui/ZSBlockButton/index.js +44 -96
  87. package/build/ui/ZSBlockButton/index.js.map +1 -1
  88. package/build/ui/ZSContainer/index.d.ts +20 -0
  89. package/build/ui/ZSContainer/index.d.ts.map +1 -1
  90. package/build/ui/ZSContainer/index.js +30 -50
  91. package/build/ui/ZSContainer/index.js.map +1 -1
  92. package/build/ui/ZSPressable/index.d.ts.map +1 -1
  93. package/build/ui/ZSPressable/index.js +2 -11
  94. package/build/ui/ZSPressable/index.js.map +1 -1
  95. package/build/ui/ZSRadioGroup/index.d.ts +3 -2
  96. package/build/ui/ZSRadioGroup/index.d.ts.map +1 -1
  97. package/build/ui/ZSRadioGroup/index.js +67 -78
  98. package/build/ui/ZSRadioGroup/index.js.map +1 -1
  99. package/build/ui/ZSSkeleton/index.d.ts +2 -1
  100. package/build/ui/ZSSkeleton/index.d.ts.map +1 -1
  101. package/build/ui/ZSSkeleton/index.js +3 -12
  102. package/build/ui/ZSSkeleton/index.js.map +1 -1
  103. package/build/ui/ZSSkeletonBox/index.d.ts +2 -1
  104. package/build/ui/ZSSkeletonBox/index.d.ts.map +1 -1
  105. package/build/ui/ZSSkeletonBox/index.js +13 -18
  106. package/build/ui/ZSSkeletonBox/index.js.map +1 -1
  107. package/build/ui/ZSSwitch/index.d.ts +2 -1
  108. package/build/ui/ZSSwitch/index.d.ts.map +1 -1
  109. package/build/ui/ZSSwitch/index.js +3 -7
  110. package/build/ui/ZSSwitch/index.js.map +1 -1
  111. package/build/ui/ZSText/index.d.ts +3 -2
  112. package/build/ui/ZSText/index.d.ts.map +1 -1
  113. package/build/ui/ZSText/index.js +5 -16
  114. package/build/ui/ZSText/index.js.map +1 -1
  115. package/build/ui/ZSTextField/index.d.ts.map +1 -1
  116. package/build/ui/ZSTextField/index.js +42 -42
  117. package/build/ui/ZSTextField/index.js.map +1 -1
  118. package/build/ui/ZSTextField/ui/ButtonClose.js +2 -3
  119. package/build/ui/ZSTextField/ui/ButtonClose.js.map +1 -1
  120. package/build/ui/ZSTextField/ui/ErrorComponent.js +2 -7
  121. package/build/ui/ZSTextField/ui/ErrorComponent.js.map +1 -1
  122. package/build/ui/ZSView/index.d.ts +3 -2
  123. package/build/ui/ZSView/index.d.ts.map +1 -1
  124. package/build/ui/ZSView/index.js +9 -11
  125. package/build/ui/ZSView/index.js.map +1 -1
  126. package/build/ui/atoms/AnimatedWrapper.d.ts.map +1 -1
  127. package/build/ui/atoms/AnimatedWrapper.js +36 -44
  128. package/build/ui/atoms/AnimatedWrapper.js.map +1 -1
  129. package/build/ui/atoms/TextAtom.d.ts +1 -2
  130. package/build/ui/atoms/TextAtom.d.ts.map +1 -1
  131. package/build/ui/atoms/TextAtom.js +2 -4
  132. package/build/ui/atoms/TextAtom.js.map +1 -1
  133. package/build/ui/atoms/ViewAtom.d.ts +1 -2
  134. package/build/ui/atoms/ViewAtom.d.ts.map +1 -1
  135. package/build/ui/atoms/ViewAtom.js +2 -4
  136. package/build/ui/atoms/ViewAtom.js.map +1 -1
  137. package/ios/ZsUi.podspec +1 -1
  138. package/package.json +30 -28
package/build/index.js CHANGED
@@ -19,11 +19,5 @@ import { AlertOverlay, BottomSheetOverlay, SnackbarNotify, useOverlay, PopOverBu
19
19
  import ZSBlockButton from './ui/ZSBlockButton';
20
20
  import ZSSkeleton from './ui/ZSSkeleton';
21
21
  import ZSSkeletonBox from './ui/ZSSkeletonBox';
22
- export { useTheme, useFoldingState, ThemeProvider, OverlayProvider, themeFactory,
23
- // ---
24
- ZSView, AnimatedWrapper, TextAtom, ZSContainer, ZSPressable, ZSText, ZSTextField, ZSRadioGroup, ZSSwitch, ErrorComponent, ZSAboveKeyboard, ZSBlockButton, ZSSkeleton, ZSSkeletonBox,
25
- // ---
26
- AlertOverlay, BottomSheetOverlay, SnackbarNotify, useOverlay, PopOverButton, PopOverMenu, ZSPortal,
27
- // Global overlay functions
28
- GlobalOverlay, useStyleSheetCreate, };
22
+ export { useTheme, useFoldingState, ThemeProvider, OverlayProvider, themeFactory, ZSView, AnimatedWrapper, TextAtom, ZSContainer, ZSPressable, ZSText, ZSTextField, ZSRadioGroup, ZSSwitch, ErrorComponent, ZSAboveKeyboard, ZSBlockButton, ZSSkeleton, ZSSkeletonBox, AlertOverlay, BottomSheetOverlay, SnackbarNotify, useOverlay, PopOverButton, PopOverMenu, ZSPortal, GlobalOverlay, useStyleSheetCreate, };
29
23
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,cAAc,MAAM,oCAAoC,CAAC;AAChE,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAC7C,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,eAAe,MAAM,4BAA4B,CAAC;AACzD,OAAO,QAAQ,MAAM,qBAAqB,CAAC;AAC3C,OAAO,eAAe,MAAM,sBAAsB,CAAC;AAInD,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,cAAc,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC/H,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EACL,QAAQ,EACR,eAAe,EACf,aAAa,EACb,eAAe,EACf,YAAY;AACZ,MAAM;AACN,MAAM,EACN,eAAe,EACf,QAAQ,EACR,WAAW,EACX,WAAW,EACX,MAAM,EACN,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,cAAc,EACd,eAAe,EACf,aAAa,EACb,UAAU,EACV,aAAa;AACb,MAAM;AACN,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,aAAa,EACb,WAAW,EACX,QAAQ;AACR,2BAA2B;AAC3B,aAAa,EACb,mBAAmB,GACpB,CAAC","sourcesContent":["import { GlobalOverlay } from './model/globalOverlay'\nimport { useStyleSheetCreate } from './model/useStyleSheetCreate'\nimport { OverlayProvider } from \"./context/OverlayContext\";\nimport { ThemeProvider, useTheme } from \"./context/ThemeContext\";\nimport { useFoldingState } from './model/useFoldingState'\nimport { themeFactory } from './theme/palette';\nimport ErrorComponent from './ui/ZSTextField/ui/ErrorComponent';\nimport ZSContainer from './ui/ZSContainer';\nimport ZSPressable from './ui/ZSPressable';\nimport ZSText from './ui/ZSText';\nimport ZSTextField from './ui/ZSTextField';\nimport ZSRadioGroup from './ui/ZSRadioGroup';\nimport ZSSwitch from './ui/ZSSwitch';\nimport ZSView from './ui/ZSView';\nimport AnimatedWrapper from './ui/atoms/AnimatedWrapper';\nimport TextAtom from './ui/atoms/TextAtom';\nimport ZSAboveKeyboard from \"./ui/ZSAboveKeyboard\";\nimport { ZSContainerRef } from \"./ui/ZSContainer\";\nimport { ZSTextProps } from \"./ui/ZSText\";\nimport { BoxStyle, ZSTextFieldRef } from \"./ui/ZSTextField\";\nimport { AlertOverlay, BottomSheetOverlay, SnackbarNotify, useOverlay, PopOverButton, PopOverMenu, ZSPortal } from './overlay';\nimport ZSBlockButton from './ui/ZSBlockButton';\nimport ZSSkeleton from './ui/ZSSkeleton';\nimport ZSSkeletonBox from './ui/ZSSkeletonBox';\n\nexport {\n useTheme,\n useFoldingState,\n ThemeProvider,\n OverlayProvider,\n themeFactory,\n // ---\n ZSView,\n AnimatedWrapper,\n TextAtom,\n ZSContainer,\n ZSPressable,\n ZSText,\n ZSTextField,\n ZSRadioGroup,\n ZSSwitch,\n ErrorComponent,\n ZSAboveKeyboard,\n ZSBlockButton,\n ZSSkeleton,\n ZSSkeletonBox,\n // ---\n AlertOverlay,\n BottomSheetOverlay,\n SnackbarNotify,\n useOverlay,\n PopOverButton,\n PopOverMenu,\n ZSPortal,\n // Global overlay functions\n GlobalOverlay,\n useStyleSheetCreate,\n};\n\n// ------------------------------------------------------\n\nimport type { ThemeProviderProps, ThemeProps, Palette } from \"./context/ThemeContext\";\nimport {\n ColorPalette,\n ColorPaletteExtend,\n ThemeTextType,\n ThemeBackground,\n MainColors,\n Theme,\n TypographyVariants,\n ThemeFonts,\n TypoNumber,\n TypographyVariantsProps,\n TypoStyle,\n TypoOptions,\n TypoSubStyle,\n TypoColorOptions,\n ShadowLevel,\n ShadowStyle,\n} from \"./theme/types\";\nimport { ThemeFactoryColors, ThemeFactoryConfig } from \"./theme/palette\";\nimport {\n SnackItem,\n ShowAlertProps,\n ShowSnackBarProps,\n ShowBottomSheetProps,\n PopOverMenuProps,\n CustomSnackbarProps,\n OverlayProviderProps,\n AlertAction,\n AlertActions,\n SnackType,\n HideOption,\n BottomSheetOptions,\n FoldingStateInfo\n} from \"./model/types\";\nimport { RadioOption } from \"./ui/types\";\n\nexport type {\n ThemeProviderProps,\n ThemeProps,\n Palette,\n ZSTextProps,\n BoxStyle,\n ZSTextFieldRef,\n ColorPalette,\n ColorPaletteExtend,\n ThemeTextType,\n ThemeBackground,\n MainColors,\n Theme,\n TypographyVariants,\n ThemeFonts,\n TypoNumber,\n TypographyVariantsProps,\n TypoStyle,\n TypoOptions,\n TypoSubStyle,\n TypoColorOptions,\n ThemeFactoryColors,\n ThemeFactoryConfig,\n SnackItem,\n ShowAlertProps,\n ShowSnackBarProps,\n ShowBottomSheetProps,\n PopOverMenuProps,\n CustomSnackbarProps,\n OverlayProviderProps,\n AlertAction,\n AlertActions,\n SnackType,\n HideOption,\n BottomSheetOptions,\n RadioOption,\n ShadowLevel,\n ShadowStyle,\n ZSContainerRef,\n FoldingStateInfo,\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,cAAc,MAAM,oCAAoC,CAAC;AAChE,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAC7C,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,eAAe,MAAM,4BAA4B,CAAC;AACzD,OAAO,QAAQ,MAAM,qBAAqB,CAAC;AAC3C,OAAO,eAAe,MAAM,sBAAsB,CAAC;AAInD,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,cAAc,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC/H,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EACL,QAAQ,EACR,eAAe,EACf,aAAa,EACb,eAAe,EACf,YAAY,EACZ,MAAM,EACN,eAAe,EACf,QAAQ,EACR,WAAW,EACX,WAAW,EACX,MAAM,EACN,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,cAAc,EACd,eAAe,EACf,aAAa,EACb,UAAU,EACV,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,aAAa,EACb,WAAW,EACX,QAAQ,EACR,aAAa,EACb,mBAAmB,GACpB,CAAC","sourcesContent":["import { GlobalOverlay } from './model/globalOverlay'\nimport { useStyleSheetCreate } from './model/useStyleSheetCreate'\nimport { OverlayProvider } from \"./context/OverlayContext\";\nimport { ThemeProvider, useTheme } from \"./context/ThemeContext\";\nimport { useFoldingState } from './model/useFoldingState'\nimport { themeFactory } from './theme/palette';\nimport ErrorComponent from './ui/ZSTextField/ui/ErrorComponent';\nimport ZSContainer from './ui/ZSContainer';\nimport ZSPressable from './ui/ZSPressable';\nimport ZSText from './ui/ZSText';\nimport ZSTextField from './ui/ZSTextField';\nimport ZSRadioGroup from './ui/ZSRadioGroup';\nimport ZSSwitch from './ui/ZSSwitch';\nimport ZSView from './ui/ZSView';\nimport AnimatedWrapper from './ui/atoms/AnimatedWrapper';\nimport TextAtom from './ui/atoms/TextAtom';\nimport ZSAboveKeyboard from \"./ui/ZSAboveKeyboard\";\nimport { ZSContainerRef } from \"./ui/ZSContainer\";\nimport { ZSTextProps } from \"./ui/ZSText\";\nimport { BoxStyle, ZSTextFieldRef } from \"./ui/ZSTextField\";\nimport { AlertOverlay, BottomSheetOverlay, SnackbarNotify, useOverlay, PopOverButton, PopOverMenu, ZSPortal } from './overlay';\nimport ZSBlockButton from './ui/ZSBlockButton';\nimport ZSSkeleton from './ui/ZSSkeleton';\nimport ZSSkeletonBox from './ui/ZSSkeletonBox';\n\nexport {\n useTheme,\n useFoldingState,\n ThemeProvider,\n OverlayProvider,\n themeFactory,\n ZSView,\n AnimatedWrapper,\n TextAtom,\n ZSContainer,\n ZSPressable,\n ZSText,\n ZSTextField,\n ZSRadioGroup,\n ZSSwitch,\n ErrorComponent,\n ZSAboveKeyboard,\n ZSBlockButton,\n ZSSkeleton,\n ZSSkeletonBox,\n AlertOverlay,\n BottomSheetOverlay,\n SnackbarNotify,\n useOverlay,\n PopOverButton,\n PopOverMenu,\n ZSPortal,\n GlobalOverlay,\n useStyleSheetCreate,\n};\n\nimport type { ThemeProviderProps, ThemeProps, Palette, FoldableConfig } from \"./context/ThemeContext\";\nimport {\n ColorPalette,\n ColorPaletteExtend,\n ThemeTextType,\n ThemeBackground,\n MainColors,\n Theme,\n TypographyVariants,\n ThemeFonts,\n TypoNumber,\n TypographyVariantsProps,\n TypoStyle,\n TypoOptions,\n TypoSubStyle,\n TypoColorOptions,\n ShadowLevel,\n ShadowStyle,\n} from \"./theme/types\";\nimport { ThemeFactoryColors, ThemeFactoryConfig } from \"./theme/palette\";\nimport {\n SnackItem,\n ShowAlertProps,\n ShowSnackBarProps,\n ShowBottomSheetProps,\n PopOverMenuProps,\n CustomSnackbarProps,\n OverlayProviderProps,\n AlertAction,\n AlertActions,\n SnackType,\n HideOption,\n BottomSheetOptions,\n FoldingStateInfo\n} from \"./model/types\";\nimport { RadioOption } from \"./ui/types\";\n\nexport type {\n ThemeProviderProps,\n ThemeProps,\n Palette,\n FoldableConfig,\n ZSTextProps,\n BoxStyle,\n ZSTextFieldRef,\n ColorPalette,\n ColorPaletteExtend,\n ThemeTextType,\n ThemeBackground,\n MainColors,\n Theme,\n TypographyVariants,\n ThemeFonts,\n TypoNumber,\n TypographyVariantsProps,\n TypoStyle,\n TypoOptions,\n TypoSubStyle,\n TypoColorOptions,\n ThemeFactoryColors,\n ThemeFactoryConfig,\n SnackItem,\n ShowAlertProps,\n ShowSnackBarProps,\n ShowBottomSheetProps,\n PopOverMenuProps,\n CustomSnackbarProps,\n OverlayProviderProps,\n AlertAction,\n AlertActions,\n SnackType,\n HideOption,\n BottomSheetOptions,\n RadioOption,\n ShadowLevel,\n ShadowStyle,\n ZSContainerRef,\n FoldingStateInfo,\n};\n"]}
@@ -1,13 +1,5 @@
1
1
  import { OverlayContextProps } from './types';
2
- /**
3
- * Global overlay context를 설정합니다.
4
- * OverlayProvider에서 내부적으로 호출되며, 사용자가 직접 호출할 필요는 없습니다.
5
- */
6
2
  export declare const setGlobalOverlayRef: (ref: OverlayContextProps | null) => void;
7
- /**
8
- * Global overlay context를 가져옵니다.
9
- * 주로 내부적으로 사용되며, 사용자는 아래의 개별 함수들을 사용하는 것을 권장합니다.
10
- */
11
3
  export declare const getGlobalOverlayRef: () => OverlayContextProps | null;
12
4
  export declare const GlobalOverlay: {
13
5
  showAlert: (props: import("./types").ShowAlertProps) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"globalOverlay.d.ts","sourceRoot":"","sources":["../../src/model/globalOverlay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAK9C;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAAI,KAAK,mBAAmB,GAAG,IAAI,SAElE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,QAAO,mBAAmB,GAAG,IAE5D,CAAC;AAgEF,eAAO,MAAM,aAAa;;;;;;;;CAQzB,CAAC"}
1
+ {"version":3,"file":"globalOverlay.d.ts","sourceRoot":"","sources":["../../src/model/globalOverlay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAI9C,eAAO,MAAM,mBAAmB,GAAI,KAAK,mBAAmB,GAAG,IAAI,SAElE,CAAC;AAEF,eAAO,MAAM,mBAAmB,QAAO,mBAAmB,GAAG,IAE5D,CAAC;AAgEF,eAAO,MAAM,aAAa;;;;;;;;CAQzB,CAAC"}
@@ -1,16 +1,7 @@
1
- // Global overlay context reference
2
1
  let globalOverlayRef = null;
3
- /**
4
- * Global overlay context를 설정합니다.
5
- * OverlayProvider에서 내부적으로 호출되며, 사용자가 직접 호출할 필요는 없습니다.
6
- */
7
2
  export const setGlobalOverlayRef = (ref) => {
8
3
  globalOverlayRef = ref;
9
4
  };
10
- /**
11
- * Global overlay context를 가져옵니다.
12
- * 주로 내부적으로 사용되며, 사용자는 아래의 개별 함수들을 사용하는 것을 권장합니다.
13
- */
14
5
  export const getGlobalOverlayRef = () => {
15
6
  return globalOverlayRef;
16
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"globalOverlay.js","sourceRoot":"","sources":["../../src/model/globalOverlay.ts"],"names":[],"mappings":"AAEA,mCAAmC;AACnC,IAAI,gBAAgB,GAA+B,IAAI,CAAC;AAExD;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,GAA+B,EAAE,EAAE;IACrE,gBAAgB,GAAG,GAAG,CAAC;AACzB,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAA+B,EAAE;IAClE,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC;AAEF,MAAM,2BAA2B,GAAG,GAAG,EAAE;IACvC,MAAM,IAAI,KAAK,CACb,4GAA4G,CAC7G,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,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,MAAM,EAAE,EAAE;IACjE,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACtB,2BAA2B,EAAE,CAAC;QAC9B,OAAO;IACT,CAAC;IACD,gBAAgB,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;AACvC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,SAAS;IACT,YAAY;IACZ,eAAe;IACf,eAAe;IACf,YAAY;IACZ,UAAU;IACV,WAAW;CACZ,CAAC","sourcesContent":["import { OverlayContextProps } from './types';\n\n// Global overlay context reference\nlet globalOverlayRef: OverlayContextProps | null = null;\n\n/**\n * Global overlay context를 설정합니다.\n * OverlayProvider에서 내부적으로 호출되며, 사용자가 직접 호출할 필요는 없습니다.\n */\nexport const setGlobalOverlayRef = (ref: OverlayContextProps | null) => {\n globalOverlayRef = ref;\n};\n\n/**\n * Global overlay context를 가져옵니다.\n * 주로 내부적으로 사용되며, 사용자는 아래의 개별 함수들을 사용하는 것을 권장합니다.\n */\nexport const getGlobalOverlayRef = (): OverlayContextProps | null => {\n return globalOverlayRef;\n};\n\nconst getOverlayNotAvailableError = () => {\n throw new Error(\n 'Overlay functions are not available. Please make sure OverlayProvider is properly set up in your app root.'\n );\n};\n\nconst showAlert: OverlayContextProps['showAlert'] = (props) => {\n if (!globalOverlayRef) {\n getOverlayNotAvailableError();\n return;\n }\n globalOverlayRef.showAlert(props);\n};\n\nconst showSnackBar: OverlayContextProps['showSnackBar'] = (props) => {\n if (!globalOverlayRef) {\n getOverlayNotAvailableError();\n return;\n }\n globalOverlayRef.showSnackBar(props);\n};\n\nconst showBottomSheet: OverlayContextProps['showBottomSheet'] = (props) => {\n if (!globalOverlayRef) {\n getOverlayNotAvailableError();\n return;\n }\n globalOverlayRef.showBottomSheet(props);\n};\n\nconst showPopOverMenu: OverlayContextProps['showPopOverMenu'] = (props) => {\n if (!globalOverlayRef) {\n getOverlayNotAvailableError();\n return;\n }\n globalOverlayRef.showPopOverMenu(props);\n};\n\nconst showModality: OverlayContextProps['showModality'] = (props) => {\n if (!globalOverlayRef) {\n getOverlayNotAvailableError();\n return;\n }\n globalOverlayRef.showModality(props);\n};\n\nconst showLoader: OverlayContextProps['showLoader'] = () => {\n if (!globalOverlayRef) {\n getOverlayNotAvailableError();\n return;\n }\n globalOverlayRef.showLoader();\n};\n\nconst hideOverlay: OverlayContextProps['hideOverlay'] = (option) => {\n if (!globalOverlayRef) {\n getOverlayNotAvailableError();\n return;\n }\n globalOverlayRef.hideOverlay(option);\n};\n\nexport const GlobalOverlay = {\n showAlert,\n showSnackBar,\n showBottomSheet,\n showPopOverMenu,\n showModality,\n showLoader,\n hideOverlay,\n};\n"]}
1
+ {"version":3,"file":"globalOverlay.js","sourceRoot":"","sources":["../../src/model/globalOverlay.ts"],"names":[],"mappings":"AAEA,IAAI,gBAAgB,GAA+B,IAAI,CAAC;AAExD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,GAA+B,EAAE,EAAE;IACrE,gBAAgB,GAAG,GAAG,CAAC;AACzB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAA+B,EAAE;IAClE,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC;AAEF,MAAM,2BAA2B,GAAG,GAAG,EAAE;IACvC,MAAM,IAAI,KAAK,CACb,4GAA4G,CAC7G,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAqC,CAAC,KAAK,EAAE,EAAE;IAC5D,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACtB,2BAA2B,EAAE,CAAC;QAC9B,OAAO;IACT,CAAC;IACD,gBAAgB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AACpC,CAAC,CAAC;AAEF,MAAM,YAAY,GAAwC,CAAC,KAAK,EAAE,EAAE;IAClE,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACtB,2BAA2B,EAAE,CAAC;QAC9B,OAAO;IACT,CAAC;IACD,gBAAgB,CAAC,YAAY,CAA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= null;\n\nexport const setGlobalOverlayRef = (ref: OverlayContextProps | null) => {\n globalOverlayRef = ref;\n};\n\nexport const getGlobalOverlayRef = (): OverlayContextProps | null => {\n return globalOverlayRef;\n};\n\nconst getOverlayNotAvailableError = () => {\n throw new Error(\n 'Overlay functions are not available. Please make sure OverlayProvider is properly set up in your app root.'\n );\n};\n\nconst showAlert: OverlayContextProps['showAlert'] = (props) => {\n if (!globalOverlayRef) {\n getOverlayNotAvailableError();\n return;\n }\n globalOverlayRef.showAlert(props);\n};\n\nconst showSnackBar: OverlayContextProps['showSnackBar'] = (props) => {\n if (!globalOverlayRef) {\n getOverlayNotAvailableError();\n return;\n }\n globalOverlayRef.showSnackBar(props);\n};\n\nconst showBottomSheet: OverlayContextProps['showBottomSheet'] = (props) => {\n if (!globalOverlayRef) {\n getOverlayNotAvailableError();\n return;\n }\n globalOverlayRef.showBottomSheet(props);\n};\n\nconst showPopOverMenu: OverlayContextProps['showPopOverMenu'] = (props) => {\n if (!globalOverlayRef) {\n getOverlayNotAvailableError();\n return;\n }\n globalOverlayRef.showPopOverMenu(props);\n};\n\nconst showModality: OverlayContextProps['showModality'] = (props) => {\n if (!globalOverlayRef) {\n getOverlayNotAvailableError();\n return;\n }\n globalOverlayRef.showModality(props);\n};\n\nconst showLoader: OverlayContextProps['showLoader'] = () => {\n if (!globalOverlayRef) {\n getOverlayNotAvailableError();\n return;\n }\n globalOverlayRef.showLoader();\n};\n\nconst hideOverlay: OverlayContextProps['hideOverlay'] = (option) => {\n if (!globalOverlayRef) {\n getOverlayNotAvailableError();\n return;\n }\n globalOverlayRef.hideOverlay(option);\n};\n\nexport const GlobalOverlay = {\n showAlert,\n showSnackBar,\n showBottomSheet,\n showPopOverMenu,\n showModality,\n showLoader,\n hideOverlay,\n};\n"]}
@@ -109,7 +109,7 @@ export interface AboveKeyboardOptions {
109
109
  keyboardHideOffset?: number;
110
110
  }
111
111
  export declare enum FoldingState {
112
- FOLDED = "folded",// 폴딩, 일반 기기
112
+ FOLDED = "folded",
113
113
  UNFOLDED = "unfolded"
114
114
  }
115
115
  export interface FoldingFeatureData {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/model/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAEhE,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,YAAY,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC7C,eAAe,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACnD,eAAe,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,CAAC;IACvD,YAAY,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACjD,SAAS,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC3C,WAAW,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;CAC3C;AAED,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC7C;AAED,MAAM,WAAW,oBAAoB;IACnC,cAAc,EAAE,SAAS,EAAE,CAAC;IAC5B,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC;AAED,MAAM,WAAW,uBAAuB;IACtC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,qBAAqB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAClD,MAAM,EAAE,iBAAiB,CAAC;IAC1B,SAAS,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC/C,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,mBAAm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AW,kBAAkB;IACjC,KAAK,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAAC;IAC1C,WAAW,EAAE,YAAY,GAAG,UAAU,GAAG,SAAS,CAAC;IACnD,YAAY,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;AAED,MAAM,WAAW,sBAAsB;IACrC,cAAc,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAC1C,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,YAAY,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;CACf"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/model/types.ts"],"names":[],"mappings":"AAqIA,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;AACvB,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB","sourcesContent":["import { ReactNode } from \"react\";\nimport { TextProps, TouchableOpacityProps } from \"react-native\";\n\nexport interface OverlayContextProps {\n showLoader: () => void;\n showModality: (props: ModalityProps) => void;\n showPopOverMenu: (props: PopOverMenuProps) => void;\n showBottomSheet: (props: ShowBottomSheetProps) => void;\n showSnackBar: (props: ShowSnackBarProps) => void;\n showAlert: (props: ShowAlertProps) => void;\n hideOverlay: (option: HideOption) => void;\n}\n\nexport interface AlertContextProps {\n alertVisible: boolean;\n setAlertVisible: (visible: boolean) => void;\n}\n\nexport interface SnackbarContextProps {\n snackItemStack: SnackItem[];\n hideSnackBar: (index: number) => void;\n}\n\nexport interface BottomSheetContextProps {\n bottomSheetVisible: boolean;\n setBottomSheetVisible: (visible: boolean) => void;\n height: BottomSheetHeight;\n setHeight: (height: BottomSheetHeight) => void;\n maxHeight: number;\n}\n\nexport interface PopOverContextProps {\n popOverVisible: boolean;\n setPopOverVisible: (visible: boolean) => void;\n}\n\nexport interface ModalityContextProps {\n modalityVisible: boolean;\n setModalityVisible: (visible: boolean) => void;\n}\n\nexport interface LoaderContextProps {\n loaderVisible: boolean;\n setLoaderVisible: (visible: boolean) => void;\n}\n\nexport interface PopOverMenuProps {\n px: number;\n py: number;\n component: React.ReactNode;\n}\n\nexport interface ModalityProps {\n component: React.ReactNode;\n foldableSingleScreen?: boolean;\n}\n\nexport interface CustomSnackbarProps {\n snackType: SnackType;\n snackMessage: string;\n}\n\nexport interface OverlayProviderProps {\n children: ReactNode;\n customSnackbar?: (props: CustomSnackbarProps) => React.ReactNode;\n loaderComponent?: () => React.ReactNode;\n maxSnackbarCount?: number;\n}\n\nexport interface AlertAction {\n label: string;\n onPress?: () => void;\n}\n\nexport interface ShowAlertProps {\n title?: string;\n informative?: string;\n actions?: AlertActions;\n isBackgroundTouchClose?: boolean;\n titleStyle?: TextProps['style'];\n informativeStyle?: TextProps['style'];\n secondaryButtonStyle?: TouchableOpacityProps['style'];\n primaryButtonStyle?: TouchableOpacityProps['style'];\n secondaryButtonTextStyle?: TextProps['style'];\n}\n\nexport interface AlertActions {\n primary: AlertAction;\n secondary?: AlertAction;\n}\n\nexport interface SnackItem {\n message: string;\n type: SnackType;\n index: number;\n snackbarDuration?: number;\n}\n\nexport type SnackType = 'success' | 'error' | '';\n\nexport type HideOption = 'all' | 'snack' | 'alert' | 'bottomSheet' | 'loader' | 'popOver' | 'modal' | 'aboveKeyboard';\n\nexport interface ShowSnackBarProps {\n message: string;\n type?: SnackType;\n index?: number;\n snackbarDuration?: number;\n}\n\nexport interface BottomSheetOptions {\n isBackgroundTouchClose?: boolean;\n marginHorizontal?: number;\n marginBottom?: number;\n height?: BottomSheetHeight;\n maxHeight?: number;\n padding?: number;\n foldableSingleScreen?: boolean;\n type?: 'floating' | 'fixed';\n}\n\nexport type BottomSheetHeight = number | 'auto';\n\nexport interface ShowBottomSheetProps {\n headerComponent?: React.ReactNode;\n component: React.ReactNode;\n options?: BottomSheetOptions;\n}\n\nexport interface AboveKeyboardOptions {\n keyboardShowOffset?: number;\n keyboardHideOffset?: number;\n}\n\nexport enum FoldingState {\n FOLDED = 'folded', // 폴딩, 일반 기기\n UNFOLDED = 'unfolded',\n}\n\nexport interface FoldingFeatureData {\n state: 'flat' | 'half_opened' | 'unknown';\n orientation: 'horizontal' | 'vertical' | 'unknown';\n isSeparating: boolean;\n bounds: {\n left: number;\n top: number;\n right: number;\n bottom: number;\n };\n}\n\nexport interface NativeFoldingStateInfo {\n foldingFeature: FoldingFeatureData | null;\n width: number; // PT 단위\n}\n\nexport interface FoldingStateInfo {\n foldingState: FoldingState;\n width: number;\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/model/types.ts"],"names":[],"mappings":"AAqIA,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;AACvB,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB","sourcesContent":["import { ReactNode } from \"react\";\nimport { TextProps, TouchableOpacityProps } from \"react-native\";\n\nexport interface OverlayContextProps {\n showLoader: () => void;\n showModality: (props: ModalityProps) => void;\n showPopOverMenu: (props: PopOverMenuProps) => void;\n showBottomSheet: (props: ShowBottomSheetProps) => void;\n showSnackBar: (props: ShowSnackBarProps) => void;\n showAlert: (props: ShowAlertProps) => void;\n hideOverlay: (option: HideOption) => void;\n}\n\nexport interface AlertContextProps {\n alertVisible: boolean;\n setAlertVisible: (visible: boolean) => void;\n}\n\nexport interface SnackbarContextProps {\n snackItemStack: SnackItem[];\n hideSnackBar: (index: number) => void;\n}\n\nexport interface BottomSheetContextProps {\n bottomSheetVisible: boolean;\n setBottomSheetVisible: (visible: boolean) => void;\n height: BottomSheetHeight;\n setHeight: (height: BottomSheetHeight) => void;\n maxHeight: number;\n}\n\nexport interface PopOverContextProps {\n popOverVisible: boolean;\n setPopOverVisible: (visible: boolean) => void;\n}\n\nexport interface ModalityContextProps {\n modalityVisible: boolean;\n setModalityVisible: (visible: boolean) => void;\n}\n\nexport interface LoaderContextProps {\n loaderVisible: boolean;\n setLoaderVisible: (visible: boolean) => void;\n}\n\nexport interface PopOverMenuProps {\n px: number;\n py: number;\n component: React.ReactNode;\n}\n\nexport interface ModalityProps {\n component: React.ReactNode;\n foldableSingleScreen?: boolean;\n}\n\nexport interface CustomSnackbarProps {\n snackType: SnackType;\n snackMessage: string;\n}\n\nexport interface OverlayProviderProps {\n children: ReactNode;\n customSnackbar?: (props: CustomSnackbarProps) => React.ReactNode;\n loaderComponent?: () => React.ReactNode;\n maxSnackbarCount?: number;\n}\n\nexport interface AlertAction {\n label: string;\n onPress?: () => void;\n}\n\nexport interface ShowAlertProps {\n title?: string;\n informative?: string;\n actions?: AlertActions;\n isBackgroundTouchClose?: boolean;\n titleStyle?: TextProps['style'];\n informativeStyle?: TextProps['style'];\n secondaryButtonStyle?: TouchableOpacityProps['style'];\n primaryButtonStyle?: TouchableOpacityProps['style'];\n secondaryButtonTextStyle?: TextProps['style'];\n}\n\nexport interface AlertActions {\n primary: AlertAction;\n secondary?: AlertAction;\n}\n\nexport interface SnackItem {\n message: string;\n type: SnackType;\n index: number;\n snackbarDuration?: number;\n}\n\nexport type SnackType = 'success' | 'error' | '';\n\nexport type HideOption = 'all' | 'snack' | 'alert' | 'bottomSheet' | 'loader' | 'popOver' | 'modal' | 'aboveKeyboard';\n\nexport interface ShowSnackBarProps {\n message: string;\n type?: SnackType;\n index?: number;\n snackbarDuration?: number;\n}\n\nexport interface BottomSheetOptions {\n isBackgroundTouchClose?: boolean;\n marginHorizontal?: number;\n marginBottom?: number;\n height?: BottomSheetHeight;\n maxHeight?: number;\n padding?: number;\n foldableSingleScreen?: boolean;\n type?: 'floating' | 'fixed';\n}\n\nexport type BottomSheetHeight = number | 'auto';\n\nexport interface ShowBottomSheetProps {\n headerComponent?: React.ReactNode;\n component: React.ReactNode;\n options?: BottomSheetOptions;\n}\n\nexport interface AboveKeyboardOptions {\n keyboardShowOffset?: number;\n keyboardHideOffset?: number;\n}\n\nexport enum FoldingState {\n FOLDED = 'folded',\n UNFOLDED = 'unfolded',\n}\n\nexport interface FoldingFeatureData {\n state: 'flat' | 'half_opened' | 'unknown';\n orientation: 'horizontal' | 'vertical' | 'unknown';\n isSeparating: boolean;\n bounds: {\n left: number;\n top: number;\n right: number;\n bottom: number;\n };\n}\n\nexport interface NativeFoldingStateInfo {\n foldingFeature: FoldingFeatureData | null;\n width: number;\n}\n\nexport interface FoldingStateInfo {\n foldingState: FoldingState;\n width: number;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"useKeyboard.d.ts","sourceRoot":"","sources":["../../src/model/useKeyboard.tsx"],"names":[],"mappings":"AACA,OAAO,EAAsB,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAEtE,UAAU,iBAAiB;IACzB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,gBAAgB;IACxB,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IACpD,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;CACjC;AAKD,QAAA,MAAM,WAAW,GAAI,8CAGlB,gBAAqB,KAAG,iBA8B1B,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"useKeyboard.d.ts","sourceRoot":"","sources":["../../src/model/useKeyboard.tsx"],"names":[],"mappings":"AACA,OAAO,EAAsB,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAEtE,UAAU,iBAAiB;IACzB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,gBAAgB;IACxB,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IACpD,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;CACjC;AAKD,QAAA,MAAM,WAAW,GAAI,8CAGlB,gBAAqB,KAAG,iBAmC1B,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1,20 +1,24 @@
1
- import { useEffect, useState } from 'react';
1
+ import { useEffect, useRef, useState } from 'react';
2
2
  import { Keyboard, Platform } from 'react-native';
3
3
  const showEvent = Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow';
4
4
  const hideEvent = Platform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide';
5
5
  const useKeyboard = ({ handleKeyboardShow, handleKeyboardHide, } = {}) => {
6
6
  const [isKeyboardVisible, setIsKeyboardVisible] = useState(false);
7
7
  const [keyboardHeight, setKeyboardHeight] = useState(0);
8
+ const handleKeyboardShowRef = useRef(handleKeyboardShow);
9
+ const handleKeyboardHideRef = useRef(handleKeyboardHide);
10
+ handleKeyboardShowRef.current = handleKeyboardShow;
11
+ handleKeyboardHideRef.current = handleKeyboardHide;
8
12
  useEffect(() => {
9
13
  const showListener = (event) => {
10
14
  setIsKeyboardVisible(true);
11
15
  setKeyboardHeight(event.endCoordinates.height);
12
- handleKeyboardShow?.(event);
16
+ handleKeyboardShowRef.current?.(event);
13
17
  };
14
18
  const hideListener = () => {
15
19
  setIsKeyboardVisible(false);
16
20
  setKeyboardHeight(0);
17
- handleKeyboardHide?.();
21
+ handleKeyboardHideRef.current?.();
18
22
  };
19
23
  const keyboardShowSubscription = Keyboard.addListener(showEvent, showListener);
20
24
  const keyboardHideSubscription = Keyboard.addListener(hideEvent, hideListener);
@@ -22,7 +26,7 @@ const useKeyboard = ({ handleKeyboardShow, handleKeyboardHide, } = {}) => {
22
26
  keyboardShowSubscription.remove();
23
27
  keyboardHideSubscription.remove();
24
28
  };
25
- }, [handleKeyboardShow, handleKeyboardHide]);
29
+ }, []);
26
30
  return {
27
31
  isKeyboardVisible,
28
32
  keyboardHeight,
@@ -1 +1 @@
1
- {"version":3,"file":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Y,CAAC,CAAC;QAE/E,OAAO,GAAG,EAAE;YACV,wBAAwB,CAAC,MAAM,EAAE,CAAC;YAClC,wBAAwB,CAAC,MAAM,EAAE,CAAC;QACpC,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAAC,CAAC;IAE7C,OAAO;QACL,iBAAiB;QACjB,cAAc;KACf,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { useEffect, useState } from 'react';\nimport { Keyboard, Platform, type KeyboardEvent } from 'react-native';\n\ninterface UseKeyboardReturn {\n isKeyboardVisible: boolean;\n keyboardHeight: number;\n}\n\ninterface UseKeyboardProps {\n handleKeyboardShow?: (event: KeyboardEvent) => void;\n handleKeyboardHide?: () => void;\n}\n\nconst showEvent = Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow';\nconst hideEvent = Platform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide';\n\nconst useKeyboard = ({\n handleKeyboardShow,\n handleKeyboardHide,\n}: UseKeyboardProps = {}): UseKeyboardReturn => {\n const [isKeyboardVisible, setIsKeyboardVisible] = useState(false);\n const [keyboardHeight, setKeyboardHeight] = useState(0);\n\n useEffect(() => {\n const showListener = (event: KeyboardEvent) => {\n setIsKeyboardVisible(true);\n setKeyboardHeight(event.endCoordinates.height);\n handleKeyboardShow?.(event);\n };\n\n const hideListener = () => {\n setIsKeyboardVisible(false);\n setKeyboardHeight(0);\n handleKeyboardHide?.();\n };\n\n const keyboardShowSubscription = Keyboard.addListener(showEvent, showListener);\n const keyboardHideSubscription = Keyboard.addListener(hideEvent, hideListener);\n\n return () => {\n keyboardShowSubscription.remove();\n keyboardHideSubscription.remove();\n };\n }, [handleKeyboardShow, handleKeyboardHide]);\n\n return {\n isKeyboardVisible,\n keyboardHeight,\n };\n};\n\nexport default useKeyboard;"]}
1
+ {"version":3,"file":"useKeyboard.js","sourceRoot":"","sources":["../../src/model/useKeyboard.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AqB,CAAC,OAAO,EAAE,EAAE,CAAC;QACpC,CAAC,CAAC;QAEF,MAAM,wBAAwB,GAAG,QAAQ,CAAC,WAAW,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;QAC/E,MAAM,wBAAwB,GAAG,QAAQ,CAAC,WAAW,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;QAE/E,OAAO,GAAG,EAAE;YACV,wBAAwB,CAAC,MAAM,EAAE,CAAC;YAClC,wBAAwB,CAAC,MAAM,EAAE,CAAC;QACpC,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO;QACL,iBAAiB;QACjB,cAAc;KACf,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { useEffect, useRef, useState } from 'react';\nimport { Keyboard, Platform, type KeyboardEvent } from 'react-native';\n\ninterface UseKeyboardReturn {\n isKeyboardVisible: boolean;\n keyboardHeight: number;\n}\n\ninterface UseKeyboardProps {\n handleKeyboardShow?: (event: KeyboardEvent) => void;\n handleKeyboardHide?: () => void;\n}\n\nconst showEvent = Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow';\nconst hideEvent = Platform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide';\n\nconst useKeyboard = ({\n handleKeyboardShow,\n handleKeyboardHide,\n}: UseKeyboardProps = {}): UseKeyboardReturn => {\n const [isKeyboardVisible, setIsKeyboardVisible] = useState(false);\n const [keyboardHeight, setKeyboardHeight] = useState(0);\n\n const handleKeyboardShowRef = useRef(handleKeyboardShow);\n const handleKeyboardHideRef = useRef(handleKeyboardHide);\n handleKeyboardShowRef.current = handleKeyboardShow;\n handleKeyboardHideRef.current = handleKeyboardHide;\n\n useEffect(() => {\n const showListener = (event: KeyboardEvent) => {\n setIsKeyboardVisible(true);\n setKeyboardHeight(event.endCoordinates.height);\n handleKeyboardShowRef.current?.(event);\n };\n\n const hideListener = () => {\n setIsKeyboardVisible(false);\n setKeyboardHeight(0);\n handleKeyboardHideRef.current?.();\n };\n\n const keyboardShowSubscription = Keyboard.addListener(showEvent, showListener);\n const keyboardHideSubscription = Keyboard.addListener(hideEvent, hideListener);\n\n return () => {\n keyboardShowSubscription.remove();\n keyboardHideSubscription.remove();\n };\n }, []);\n\n return {\n isKeyboardVisible,\n keyboardHeight,\n };\n};\n\nexport default useKeyboard;"]}
@@ -15,5 +15,5 @@ export declare const Z_INDEX_VALUE: {
15
15
  ALERT: number;
16
16
  LOADING: number;
17
17
  };
18
- export declare const MAX_FOLDABLE_SINGLE_WIDTH = 600;
18
+ export declare const OVERLAY_FOLDABLE_SINGLE_WIDTH = 600;
19
19
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/model/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,YAAY,GACrB,OAAO,SAAS,CAAC,SAAS,CAAC,EAC3B,WAAW,MAAM,SAAS,KAC3B,SAAS,CAAC,MAAM,SAAS,CAAC,GAAG,SAQ/B,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;CAczB,CAAC;AAEF,eAAO,MAAM,yBAAyB,MAAM,CAAC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/model/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,YAAY,GACrB,OAAO,SAAS,CAAC,SAAS,CAAC,EAC3B,WAAW,MAAM,SAAS,KAC3B,SAAS,CAAC,MAAM,SAAS,CAAC,GAAG,SAQ/B,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;CAczB,CAAC;AAGF,eAAO,MAAM,6BAA6B,MAAM,CAAC"}
@@ -23,5 +23,6 @@ export const Z_INDEX_VALUE = {
23
23
  ALERT: 8700,
24
24
  LOADING: 8999,
25
25
  };
26
- export const MAX_FOLDABLE_SINGLE_WIDTH = 600;
26
+ // Modality / BottomSheet 오버레이의 foldableSingleScreen 전용 단일 화면 최대 가로 길이(px)
27
+ export const OVERLAY_FOLDABLE_SINGLE_WIDTH = 600;
27
28
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/model/utils.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAG,CACxB,KAA2B,EAC3B,SAA0B,EACY,EAAE;IACxC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACvB,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,SAAS,IAAI,IAAI,CAAC,CAAC;QACtG,OAAO,UAAU,EAAE,CAAC,SAAoC,CAAC,CAAC;IAC9D,CAAC;SAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,SAAS,IAAI,KAAK,EAAE,CAAC;QAC3E,OAAO,KAAK,CAAC,SAAS,CAAC,CAAC;IAC5B,CAAC;IACD,OAAO,SAAS,CAAC;AACrB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG;IACzB,OAAO,EAAE,IAAI;IACb,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,IAAI;IACZ,aAAa,EAAE,IAAI;IACnB,aAAa,EAAE,IAAI;IACnB,OAAO,EAAE,IAAI;IACb,UAAU,EAAE,IAAI;IAChB,cAAc,EAAE,IAAI;IACpB,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,IAAI;IACX,OAAO,EAAE,IAAI;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,CAAC","sourcesContent":["import { StyleProp, TextStyle } from \"react-native\";\n\nexport const extractStyle = (\n style: StyleProp<TextStyle>,\n attribute: keyof TextStyle\n): TextStyle[keyof TextStyle] | undefined => {\n if (Array.isArray(style)) {\n const foundStyle = style.find(item => typeof item === 'object' && item !== null && attribute in item);\n return foundStyle?.[attribute as keyof typeof foundStyle];\n } else if (typeof style === 'object' && style !== null && attribute in style) {\n return style[attribute];\n }\n return undefined;\n};\n\nexport const Z_INDEX_VALUE = {\n DEFAULT: 8000,\n MODAL1: 8001,\n MODAL2: 8002,\n MODAL3: 8003,\n MODAL4: 8004,\n BOTTOM_SHEET1: 8101,\n BOTTOM_SHEET2: 8102,\n POPOVER: 8200,\n BOTTOM_CTA: 8400,\n ABOVE_KEYBOARD: 8500,\n SNACKBAR: 8600,\n ALERT: 8700,\n LOADING: 8999,\n};\n\nexport const MAX_FOLDABLE_SINGLE_WIDTH = 600;"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/model/utils.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAG,CACxB,KAA2B,EAC3B,SAA0B,EACY,EAAE;IACxC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACvB,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,SAAS,IAAI,IAAI,CAAC,CAAC;QACtG,OAAO,UAAU,EAAE,CAAC,SAAoC,CAAC,CAAC;IAC9D,CAAC;SAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,SAAS,IAAI,KAAK,EAAE,CAAC;QAC3E,OAAO,KAAK,CAAC,SAAS,CAAC,CAAC;IAC5B,CAAC;IACD,OAAO,SAAS,CAAC;AACrB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG;IACzB,OAAO,EAAE,IAAI;IACb,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,IAAI;IACZ,aAAa,EAAE,IAAI;IACnB,aAAa,EAAE,IAAI;IACnB,OAAO,EAAE,IAAI;IACb,UAAU,EAAE,IAAI;IAChB,cAAc,EAAE,IAAI;IACpB,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,IAAI;IACX,OAAO,EAAE,IAAI;CAChB,CAAC;AAEF,0EAA0E;AAC1E,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAG,CAAC","sourcesContent":["import { StyleProp, TextStyle } from \"react-native\";\n\nexport const extractStyle = (\n style: StyleProp<TextStyle>,\n attribute: keyof TextStyle\n): TextStyle[keyof TextStyle] | undefined => {\n if (Array.isArray(style)) {\n const foundStyle = style.find(item => typeof item === 'object' && item !== null && attribute in item);\n return foundStyle?.[attribute as keyof typeof foundStyle];\n } else if (typeof style === 'object' && style !== null && attribute in style) {\n return style[attribute];\n }\n return undefined;\n};\n\nexport const Z_INDEX_VALUE = {\n DEFAULT: 8000,\n MODAL1: 8001,\n MODAL2: 8002,\n MODAL3: 8003,\n MODAL4: 8004,\n BOTTOM_SHEET1: 8101,\n BOTTOM_SHEET2: 8102,\n POPOVER: 8200,\n BOTTOM_CTA: 8400,\n ABOVE_KEYBOARD: 8500,\n SNACKBAR: 8600,\n ALERT: 8700,\n LOADING: 8999,\n};\n\n// Modality / BottomSheet 오버레이의 foldableSingleScreen 전용 단일 화면 최대 가로 길이(px)\nexport const OVERLAY_FOLDABLE_SINGLE_WIDTH = 600;"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/overlay/AlertOverlay/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAGpD,OAAO,EAAgB,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAWjE,iBAAS,YAAY,CAAC,EACpB,OAAO,EACP,KAAK,EACL,WAAW,EACX,sBAAsB,EACtB,UAAU,EACV,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAClB,wBAAwB,GACzB,EAAE,cAAc,4BAkEhB;AAED,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/overlay/AlertOverlay/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAGpD,OAAO,EAAgB,cAAc,EAAE,MAAM,mBAAmB,CAAC;AASjE,iBAAS,YAAY,CAAC,EACpB,OAAO,EACP,KAAK,EACL,WAAW,EACX,sBAAsB,EACtB,UAAU,EACV,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAClB,wBAAwB,GACzB,EAAE,cAAc,4BAmEhB;AAED,eAAe,YAAY,CAAC"}
@@ -1,5 +1,6 @@
1
- import React, { useCallback, useMemo } from 'react';
2
- import { Dimensions, StyleSheet, TouchableOpacity } from 'react-native';
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useCallback, useMemo } from 'react';
3
+ import { StyleSheet, TouchableOpacity, useWindowDimensions } from 'react-native';
3
4
  import Animated, { FadeInDown, FadeOutDown } from 'react-native-reanimated';
4
5
  import { useAlert } from '../../model/useOverlay';
5
6
  import { useTheme } from '../../context/ThemeContext';
@@ -7,11 +8,11 @@ import ModalBackground from '../ui/ModalBackground';
7
8
  import ViewAtom from '../../ui/atoms/ViewAtom';
8
9
  import { Z_INDEX_VALUE } from '../../model/utils';
9
10
  import ZSText from '../../ui/ZSText';
10
- const windowWidth = Dimensions.get('window').width;
11
11
  function AlertOverlay({ actions, title, informative, isBackgroundTouchClose, titleStyle, informativeStyle, secondaryButtonStyle, primaryButtonStyle, secondaryButtonTextStyle, }) {
12
12
  const { alertVisible, setAlertVisible } = useAlert();
13
13
  const { palette: { background, primary: primaryColor, modalBgColor } } = useTheme();
14
14
  const styles = useMemo(() => createStyles({ background }), [background]);
15
+ const { width: windowWidth } = useWindowDimensions();
15
16
  const modalWidth = Math.min(windowWidth - 60, 400);
16
17
  const { primary, secondary } = actions || {};
17
18
  const handleButtonPress = useCallback((onPressFunction) => () => {
@@ -20,30 +21,12 @@ function AlertOverlay({ actions, title, informative, isBackgroundTouchClose, tit
20
21
  setAlertVisible(false);
21
22
  }, [setAlertVisible]);
22
23
  return (!alertVisible ? null :
23
- <ModalBackground zIndex={Z_INDEX_VALUE.ALERT} key={alertVisible ? 'visibleao' : 'hiddenao'} modalBgColor={modalBgColor} onPress={() => { if (isBackgroundTouchClose)
24
- setAlertVisible(false); }}>
25
- <Animated.View entering={FadeInDown.duration(300)} exiting={FadeOutDown.duration(100)} style={[styles.contentContainer, { width: modalWidth }]}>
26
- {title && (<ZSText typo='subTitle.1' style={[styles.title, titleStyle]}>{title}</ZSText>)}
27
- {informative && (<ZSText typo='body.2' style={[styles.informative, informativeStyle]}>{informative}</ZSText>)}
28
- {actions && (<ViewAtom style={styles.buttonContainer}>
29
- {secondary ? (<>
30
- <TouchableOpacity style={[
31
- styles.button,
32
- { backgroundColor: background.neutral, marginRight: 8 },
33
- secondaryButtonStyle
34
- ]} onPress={handleButtonPress(secondary?.onPress)}>
35
- <ZSText typo='label.2' style={[secondaryButtonTextStyle]}>{secondary.label}</ZSText>
36
- </TouchableOpacity>
37
-
38
- <TouchableOpacity style={[styles.button, { backgroundColor: primaryColor.main }, primaryButtonStyle]} onPress={handleButtonPress(primary?.onPress)}>
39
- <ZSText typo='label.2' color='white' style={[secondaryButtonTextStyle]}>{primary?.label || '확인'}</ZSText>
40
- </TouchableOpacity>
41
- </>) : (<TouchableOpacity style={[styles.button, { backgroundColor: primaryColor.main }, primaryButtonStyle]} onPress={handleButtonPress(primary?.onPress)}>
42
- <ZSText typo='label.2' color='white' style={[secondaryButtonTextStyle]}>{primary?.label || '확인'}</ZSText>
43
- </TouchableOpacity>)}
44
- </ViewAtom>)}
45
- </Animated.View>
46
- </ModalBackground>);
24
+ _jsx(ModalBackground, { zIndex: Z_INDEX_VALUE.ALERT, modalBgColor: modalBgColor, onPress: () => { if (isBackgroundTouchClose)
25
+ setAlertVisible(false); }, children: _jsxs(Animated.View, { entering: FadeInDown.duration(300), exiting: FadeOutDown.duration(100), style: [styles.contentContainer, { width: modalWidth }], children: [title && (_jsx(ZSText, { typo: 'subTitle.1', style: [styles.title, titleStyle], children: title })), informative && (_jsx(ZSText, { typo: 'body.2', style: [styles.informative, informativeStyle], children: informative })), actions && (_jsx(ViewAtom, { style: styles.buttonContainer, children: secondary ? (_jsxs(_Fragment, { children: [_jsx(TouchableOpacity, { style: [
26
+ styles.button,
27
+ { backgroundColor: background.neutral, marginRight: 8 },
28
+ secondaryButtonStyle
29
+ ], onPress: handleButtonPress(secondary?.onPress), children: _jsx(ZSText, { typo: 'label.2', style: [secondaryButtonTextStyle], children: secondary.label }) }), _jsx(TouchableOpacity, { style: [styles.button, { backgroundColor: primaryColor.main }, primaryButtonStyle], onPress: handleButtonPress(primary?.onPress), children: _jsx(ZSText, { typo: 'label.2', color: 'white', style: [secondaryButtonTextStyle], children: primary?.label || '확인' }) })] })) : (_jsx(TouchableOpacity, { style: [styles.button, { backgroundColor: primaryColor.main }, primaryButtonStyle], onPress: handleButtonPress(primary?.onPress), children: _jsx(ZSText, { typo: 'label.2', color: 'white', style: [secondaryButtonTextStyle], children: primary?.label || '확인' }) })) }))] }) }, alertVisible ? 'visibleao' : 'hiddenao'));
47
30
  }
48
31
  export default AlertOverlay;
49
32
  const createStyles = ({ background }) => StyleSheet.create({
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/overlay/AlertOverlay/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,cA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AAI,IAAI,CAAC,EAAE,MAAM,CAC1G;gBAAA,EAAE,gBAAgB,CAAC,CACpB,CACH;YAAA,EAAE,QAAQ,CAAC,CACZ,CACH;QAAA,EAAE,QAAQ,CAAC,IAAI,CACjB;MAAA,EAAE,eAAe,CAAC,CACrB,CAAA;AACH,CAAC;AAED,eAAe,YAAY,CAAC;AAE5B,MAAM,YAAY,GAAG,CAAC,EAAE,UAAU,EAAoC,EAAE,EAAE,CACxE,UAAU,CAAC,MAAM,CAAC;IAChB,KAAK,EAAE;QACL,YAAY,EAAE,CAAC;QACf,KAAK,EAAE,MAAM;QACb,iBAAiB,EAAE,CAAC;KACrB;IACD,WAAW,EAAE;QACX,SAAS,EAAE,CAAC;QACZ,KAAK,EAAE,MAAM;QACb,iBAAiB,EAAE,CAAC;KACrB;IACD,eAAe,EAAE;QACf,aAAa,EAAE,KAAK;QACpB,KAAK,EAAE,MAAM;QACb,SAAS,EAAE,EAAE;QACb,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,UAAU;KAC3B;IACD,MAAM,EAAE;QACN,IAAI,EAAE,CAAC;QACP,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,eAAe,EAAE,EAAE;QACnB,YAAY,EAAE,EAAE;KACjB;IACD,YAAY,EAAE;QACZ,IAAI,EAAE,CAAC;QACP,cAAc,EAAE,QAAQ;KACzB;IACD,gBAAgB,EAAE;QAChB,UAAU,EAAE,QAAQ;QACpB,eAAe,EAAE,UAAU,CAAC,IAAI;QAChC,YAAY,EAAE,EAAE;QAChB,aAAa,EAAE,EAAE;QACjB,UAAU,EAAE,EAAE;QACd,iBAAiB,EAAE,EAAE;KACtB;CACF,CAAC,CAAC","sourcesContent":["import React, { useCallback, useMemo } from 'react';\nimport { Dimensions, StyleSheet, TouchableOpacity } from 'react-native';\nimport Animated, { FadeInDown, FadeOutDown } from 'react-native-reanimated';\nimport { AlertActions, ShowAlertProps } from '../../model/types';\nimport { useAlert } from '../../model/useOverlay';\nimport { useTheme } from '../../context/ThemeContext';\nimport { ThemeBackground } from '../../theme/types';\nimport ModalBackground from '../ui/ModalBackground';\nimport ViewAtom from '../../ui/atoms/ViewAtom';\nimport { Z_INDEX_VALUE } from '../../model/utils';\nimport ZSText from '../../ui/ZSText';\n\nconst windowWidth = Dimensions.get('window').width;\n\nfunction AlertOverlay({\n actions,\n title,\n informative,\n isBackgroundTouchClose,\n titleStyle,\n informativeStyle,\n secondaryButtonStyle,\n primaryButtonStyle,\n secondaryButtonTextStyle,\n}: ShowAlertProps) {\n const { alertVisible, setAlertVisible } = useAlert();\n const { palette: { background, primary: primaryColor, modalBgColor } } = useTheme();\n const styles = useMemo(() => createStyles({ background }), [background]);\n const modalWidth = Math.min(windowWidth - 60, 400);\n const { primary, secondary } = actions || {} as AlertActions;\n\n const handleButtonPress = useCallback((onPressFunction?: () => void) => () => {\n if (onPressFunction) onPressFunction();\n setAlertVisible(false);\n }, [setAlertVisible]);\n\n return (\n !alertVisible ? null :\n <ModalBackground\n zIndex={Z_INDEX_VALUE.ALERT}\n key={alertVisible ? 'visibleao' : 'hiddenao'}\n modalBgColor={modalBgColor}\n onPress={() => { if (isBackgroundTouchClose) setAlertVisible(false); }}\n >\n <Animated.View\n entering={FadeInDown.duration(300)}\n exiting={FadeOutDown.duration(100)}\n style={[styles.contentContainer, { width: modalWidth }]}\n >\n {title && (\n <ZSText typo='subTitle.1' style={[styles.title, titleStyle]}>{title}</ZSText>\n )}\n {informative && (\n <ZSText typo='body.2' style={[styles.informative, informativeStyle]}>{informative}</ZSText>\n )}\n {actions && (\n <ViewAtom style={styles.buttonContainer}>\n {secondary ? (\n <>\n <TouchableOpacity\n style={[\n styles.button,\n { backgroundColor: background.neutral, marginRight: 8 },\n secondaryButtonStyle\n ]}\n onPress={handleButtonPress(secondary?.onPress)}\n >\n <ZSText typo='label.2' style={[secondaryButtonTextStyle]}>{secondary.label}</ZSText>\n </TouchableOpacity>\n\n <TouchableOpacity\n style={[styles.button, { backgroundColor: primaryColor.main }, primaryButtonStyle]}\n onPress={handleButtonPress(primary?.onPress)}\n >\n <ZSText typo='label.2' color='white' style={[secondaryButtonTextStyle]}>{primary?.label || '확인'}</ZSText>\n </TouchableOpacity>\n </>\n ) : (\n <TouchableOpacity\n style={[styles.button, { backgroundColor: primaryColor.main }, primaryButtonStyle]}\n onPress={handleButtonPress(primary?.onPress)}\n >\n <ZSText typo='label.2' color='white' style={[secondaryButtonTextStyle]}>{primary?.label || '확인'}</ZSText>\n </TouchableOpacity>\n )}\n </ViewAtom>\n )}\n </Animated.View>\n </ModalBackground>\n )\n}\n\nexport default AlertOverlay;\n\nconst createStyles = ({ background }: { background: ThemeBackground; }) =>\n StyleSheet.create({\n title: {\n marginBottom: 8,\n width: '100%',\n paddingHorizontal: 4\n },\n informative: {\n marginTop: 8,\n width: '100%',\n paddingHorizontal: 4\n },\n buttonContainer: {\n flexDirection: 'row',\n width: '100%',\n marginTop: 24,\n alignItems: 'center',\n justifyContent: 'flex-end',\n },\n button: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n paddingVertical: 14,\n borderRadius: 12,\n },\n avoidingView: {\n flex: 1,\n justifyContent: 'center'\n },\n contentContainer: {\n alignItems: 'center',\n backgroundColor: background.base,\n borderRadius: 22,\n paddingBottom: 18,\n paddingTop: 24,\n paddingHorizontal: 20,\n },\n });\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/overlay/AlertOverlay/index.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACjF,OAAO,QAAQ,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE5E,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,4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jB;IACD,YAAY,EAAE;QACZ,IAAI,EAAE,CAAC;QACP,cAAc,EAAE,QAAQ;KACzB;IACD,gBAAgB,EAAE;QAChB,UAAU,EAAE,QAAQ;QACpB,eAAe,EAAE,UAAU,CAAC,IAAI;QAChC,YAAY,EAAE,EAAE;QAChB,aAAa,EAAE,EAAE;QACjB,UAAU,EAAE,EAAE;QACd,iBAAiB,EAAE,EAAE;KACtB;CACF,CAAC,CAAC","sourcesContent":["import React, { useCallback, useMemo } from 'react';\nimport { StyleSheet, TouchableOpacity, useWindowDimensions } from 'react-native';\nimport Animated, { FadeInDown, FadeOutDown } from 'react-native-reanimated';\nimport { AlertActions, ShowAlertProps } from '../../model/types';\nimport { useAlert } from '../../model/useOverlay';\nimport { useTheme } from '../../context/ThemeContext';\nimport { ThemeBackground } from '../../theme/types';\nimport ModalBackground from '../ui/ModalBackground';\nimport ViewAtom from '../../ui/atoms/ViewAtom';\nimport { Z_INDEX_VALUE } from '../../model/utils';\nimport ZSText from '../../ui/ZSText';\n\nfunction AlertOverlay({\n actions,\n title,\n informative,\n isBackgroundTouchClose,\n titleStyle,\n informativeStyle,\n secondaryButtonStyle,\n primaryButtonStyle,\n secondaryButtonTextStyle,\n}: ShowAlertProps) {\n const { alertVisible, setAlertVisible } = useAlert();\n const { palette: { background, primary: primaryColor, modalBgColor } } = useTheme();\n const styles = useMemo(() => createStyles({ background }), [background]);\n const { width: windowWidth } = useWindowDimensions();\n const modalWidth = Math.min(windowWidth - 60, 400);\n const { primary, secondary } = actions || {} as AlertActions;\n\n const handleButtonPress = useCallback((onPressFunction?: () => void) => () => {\n if (onPressFunction) onPressFunction();\n setAlertVisible(false);\n }, [setAlertVisible]);\n\n return (\n !alertVisible ? null :\n <ModalBackground\n zIndex={Z_INDEX_VALUE.ALERT}\n key={alertVisible ? 'visibleao' : 'hiddenao'}\n modalBgColor={modalBgColor}\n onPress={() => { if (isBackgroundTouchClose) setAlertVisible(false); }}\n >\n <Animated.View\n entering={FadeInDown.duration(300)}\n exiting={FadeOutDown.duration(100)}\n style={[styles.contentContainer, { width: modalWidth }]}\n >\n {title && (\n <ZSText typo='subTitle.1' style={[styles.title, titleStyle]}>{title}</ZSText>\n )}\n {informative && (\n <ZSText typo='body.2' style={[styles.informative, informativeStyle]}>{informative}</ZSText>\n )}\n {actions && (\n <ViewAtom style={styles.buttonContainer}>\n {secondary ? (\n <>\n <TouchableOpacity\n style={[\n styles.button,\n { backgroundColor: background.neutral, marginRight: 8 },\n secondaryButtonStyle\n ]}\n onPress={handleButtonPress(secondary?.onPress)}\n >\n <ZSText typo='label.2' style={[secondaryButtonTextStyle]}>{secondary.label}</ZSText>\n </TouchableOpacity>\n\n <TouchableOpacity\n style={[styles.button, { backgroundColor: primaryColor.main }, primaryButtonStyle]}\n onPress={handleButtonPress(primary?.onPress)}\n >\n <ZSText typo='label.2' color='white' style={[secondaryButtonTextStyle]}>{primary?.label || '확인'}</ZSText>\n </TouchableOpacity>\n </>\n ) : (\n <TouchableOpacity\n style={[styles.button, { backgroundColor: primaryColor.main }, primaryButtonStyle]}\n onPress={handleButtonPress(primary?.onPress)}\n >\n <ZSText typo='label.2' color='white' style={[secondaryButtonTextStyle]}>{primary?.label || '확인'}</ZSText>\n </TouchableOpacity>\n )}\n </ViewAtom>\n )}\n </Animated.View>\n </ModalBackground>\n )\n}\n\nexport default AlertOverlay;\n\nconst createStyles = ({ background }: { background: ThemeBackground; }) =>\n StyleSheet.create({\n title: {\n marginBottom: 8,\n width: '100%',\n paddingHorizontal: 4\n },\n informative: {\n marginTop: 8,\n width: '100%',\n paddingHorizontal: 4\n },\n buttonContainer: {\n flexDirection: 'row',\n width: '100%',\n marginTop: 24,\n alignItems: 'center',\n justifyContent: 'flex-end',\n },\n button: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n paddingVertical: 14,\n borderRadius: 12,\n },\n avoidingView: {\n flex: 1,\n justifyContent: 'center'\n },\n contentContainer: {\n alignItems: 'center',\n backgroundColor: background.base,\n borderRadius: 22,\n paddingBottom: 18,\n paddingTop: 24,\n paddingHorizontal: 20,\n },\n });\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/overlay/BottomSheetOverlay/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAOjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AA0CzD,iBAAS,kBAAkB,CAAC,EAC1B,eAAe,EACf,SAAS,EACT,OAAY,GACb,EAAE,oBAAoB,4BA4QtB;AA0CD,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/overlay/BottomSheetOverlay/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAOjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAiDzD,iBAAS,kBAAkB,CAAC,EAC1B,eAAe,EACf,SAAS,EACT,OAAY,GACb,EAAE,oBAAoB,4BAgRtB;AA0CD,eAAe,kBAAkB,CAAC"}
@@ -1,11 +1,12 @@
1
- import React, { useEffect, useState, useCallback, useMemo, useRef } from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useState, useCallback, useMemo, useRef } from 'react';
2
3
  import { StyleSheet, View, PanResponder, Keyboard, Platform, useWindowDimensions } from 'react-native';
3
4
  import { useBottomSheet } from '../../model/useOverlay';
4
5
  import Animated, { useAnimatedStyle, useSharedValue, withSpring, withTiming } from 'react-native-reanimated';
5
6
  import ModalBackground from '../ui/ModalBackground';
6
7
  import { useTheme } from '../../context/ThemeContext';
7
8
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
8
- import { MAX_FOLDABLE_SINGLE_WIDTH, Z_INDEX_VALUE } from '../../model/utils';
9
+ import { OVERLAY_FOLDABLE_SINGLE_WIDTH, Z_INDEX_VALUE } from '../../model/utils';
9
10
  import useKeyboard from '../../model/useKeyboard';
10
11
  import useFoldingState from '../../model/useFoldingState';
11
12
  const IS_IOS = Platform.OS === 'ios';
@@ -21,6 +22,13 @@ const ANIMATION_CONFIG = {
21
22
  velocity: 100,
22
23
  restDisplacementThreshold: 0.2,
23
24
  },
25
+ restore: {
26
+ damping: 26,
27
+ stiffness: 260,
28
+ mass: 0.85,
29
+ restDisplacementThreshold: 0.1,
30
+ restSpeedThreshold: 2,
31
+ },
24
32
  close: { duration: 150 },
25
33
  scale: { duration: 200 },
26
34
  scaleRestore: {
@@ -37,7 +45,7 @@ const GESTURE_CONSTANTS = {
37
45
  closeDistanceRatio: 1 / 3,
38
46
  minimumCloseDistance: 80,
39
47
  hideDelay: 200,
40
- moveThreshold: 10, // 드래그로 인식하기 위한 최소 이동 거리 (px)
48
+ moveThreshold: 10,
41
49
  };
42
50
  const getSafeFiniteNumber = (value, fallback) => Number.isFinite(value) ? value : fallback;
43
51
  function BottomSheetOverlay({ headerComponent, component, options = {}, }) {
@@ -84,12 +92,12 @@ function BottomSheetOverlay({ headerComponent, component, options = {}, }) {
84
92
  handleKeyboardShow,
85
93
  handleKeyboardHide,
86
94
  });
87
- // BottomSheet 표시/숨김 애니메이션 처리
88
95
  useEffect(() => {
89
96
  let timeoutId;
90
97
  if (bottomSheetVisible) {
91
98
  closingOffsetRef.current = latestCloseOffsetRef.current;
92
99
  Keyboard.dismiss();
100
+ translateY.value = latestCloseOffsetRef.current;
93
101
  setLocalVisible(true);
94
102
  translateY.value = withSpring(0, ANIMATION_CONFIG.spring);
95
103
  }
@@ -157,7 +165,8 @@ function BottomSheetOverlay({ headerComponent, component, options = {}, }) {
157
165
  }, []);
158
166
  const handlePanResponderRelease = useCallback((_, gestureState) => {
159
167
  isGesturing.value = false;
160
- translateX.value = withTiming(0, { duration: 100 });
168
+ const xVelocity = (gestureState.vx / GESTURE_CONSTANTS.horizontalDamping) * 1000;
169
+ translateX.value = withSpring(0, { ...ANIMATION_CONFIG.restore, velocity: xVelocity });
161
170
  const dismissThresholdHeight = sheetHeight > 0 ? sheetHeight : constrainedMaxHeight;
162
171
  const dismissDistanceThreshold = Math.max(dismissThresholdHeight * GESTURE_CONSTANTS.closeDistanceRatio, GESTURE_CONSTANTS.minimumCloseDistance);
163
172
  const shouldClose = gestureState.vy > GESTURE_CONSTANTS.closeVelocityThreshold ||
@@ -169,7 +178,11 @@ function BottomSheetOverlay({ headerComponent, component, options = {}, }) {
169
178
  closeBottomSheet();
170
179
  }
171
180
  else {
172
- translateY.value = withTiming(0, ANIMATION_CONFIG.close);
181
+ const yDamping = translateY.value >= 0
182
+ ? GESTURE_CONSTANTS.verticalDownDamping
183
+ : GESTURE_CONSTANTS.verticalUpDamping;
184
+ const yVelocity = (gestureState.vy / yDamping) * 1000;
185
+ translateY.value = withSpring(0, { ...ANIMATION_CONFIG.restore, velocity: yVelocity });
173
186
  }
174
187
  scale.value = withSpring(1, ANIMATION_CONFIG.scaleRestore);
175
188
  }, [closeBottomSheet, constrainedMaxHeight, sheetHeight]);
@@ -177,7 +190,6 @@ function BottomSheetOverlay({ headerComponent, component, options = {}, }) {
177
190
  onStartShouldSetPanResponder: () => false,
178
191
  onStartShouldSetPanResponderCapture: () => false,
179
192
  onMoveShouldSetPanResponder: (_, gestureState) => {
180
- // 일정 거리 이상 이동했을 때만 PanResponder가 응답 (탭과 드래그 구분)
181
193
  const { dx, dy } = gestureState;
182
194
  return Math.abs(dx) > GESTURE_CONSTANTS.moveThreshold || Math.abs(dy) > GESTURE_CONSTANTS.moveThreshold;
183
195
  },
@@ -186,7 +198,6 @@ function BottomSheetOverlay({ headerComponent, component, options = {}, }) {
186
198
  onPanResponderMove: handlePanResponderMove,
187
199
  onPanResponderRelease: handlePanResponderRelease,
188
200
  }), [handlePanResponderGrant, handlePanResponderMove, handlePanResponderRelease]);
189
- // 배경 터치 핸들러
190
201
  const handleBackgroundPress = useCallback(() => {
191
202
  if (isBackgroundTouchClose)
192
203
  setBottomSheetVisible(false);
@@ -205,7 +216,7 @@ function BottomSheetOverlay({ headerComponent, component, options = {}, }) {
205
216
  containerHeightStyle,
206
217
  {
207
218
  width: options.type === 'fixed' ? '100%' : windowWidth - marginHorizontal * 2,
208
- maxWidth: foldableSingleScreen ? MAX_FOLDABLE_SINGLE_WIDTH : '100%',
219
+ maxWidth: foldableSingleScreen ? OVERLAY_FOLDABLE_SINGLE_WIDTH : '100%',
209
220
  marginHorizontal: options.type === 'fixed' ? 0 : marginHorizontal,
210
221
  bottom: options.type === 'fixed' ? 0 : marginBottom + bottomInsets,
211
222
  paddingBottom: options.type === 'fixed' ? bottomInsets : 0,
@@ -234,22 +245,7 @@ function BottomSheetOverlay({ headerComponent, component, options = {}, }) {
234
245
  if (!localVisible) {
235
246
  return null;
236
247
  }
237
- return (<ModalBackground zIndex={Z_INDEX_VALUE.BOTTOM_SHEET1} key={localVisible ? 'visiblebs' : 'hiddenbs'} modalBgColor={palette.modalBgColor} onPress={handleBackgroundPress}>
238
- <Animated.View style={containerStyle} onLayout={handleSheetLayout}>
239
- <View style={pressableViewStyle}>
240
- <View {...panResponder.panHandlers}>
241
- <View style={gestureBarContainerStyle}>
242
- <View style={gestureBarStyle}/>
243
- </View>
244
- {headerComponent}
245
- </View>
246
-
247
- <View style={contentWrapperStyle}>
248
- {component}
249
- </View>
250
- </View>
251
- </Animated.View>
252
- </ModalBackground>);
248
+ return (_jsx(ModalBackground, { zIndex: Z_INDEX_VALUE.BOTTOM_SHEET1, modalBgColor: palette.modalBgColor, onPress: handleBackgroundPress, children: _jsx(Animated.View, { style: containerStyle, onLayout: handleSheetLayout, children: _jsxs(View, { style: pressableViewStyle, children: [_jsxs(View, { ...panResponder.panHandlers, children: [_jsx(View, { style: gestureBarContainerStyle, children: _jsx(View, { style: gestureBarStyle }) }), headerComponent] }), _jsx(View, { style: contentWrapperStyle, children: component })] }) }) }, localVisible ? 'visiblebs' : 'hiddenbs'));
253
249
  }
254
250
  const styles = StyleSheet.create({
255
251
  container: {