@0610studio/zs-ui 0.2.3 → 0.3.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 (39) hide show
  1. package/build/index.d.ts +2 -2
  2. package/build/index.js.map +1 -1
  3. package/build/model/types.d.ts +11 -1
  4. package/build/model/types.d.ts.map +1 -1
  5. package/build/model/types.js.map +1 -1
  6. package/build/model/useOverlay.d.ts +3 -1
  7. package/build/model/useOverlay.d.ts.map +1 -1
  8. package/build/model/useOverlay.js +8 -0
  9. package/build/model/useOverlay.js.map +1 -1
  10. package/build/model/useOverlayProvider.d.ts.map +1 -1
  11. package/build/model/useOverlayProvider.js +38 -11
  12. package/build/model/useOverlayProvider.js.map +1 -1
  13. package/build/model/utils.d.ts +1 -9
  14. package/build/model/utils.d.ts.map +1 -1
  15. package/build/model/utils.js +2 -16
  16. package/build/model/utils.js.map +1 -1
  17. package/build/overlay/AboveKeyboard/index.d.ts +4 -0
  18. package/build/overlay/AboveKeyboard/index.d.ts.map +1 -0
  19. package/build/overlay/AboveKeyboard/index.js +41 -0
  20. package/build/overlay/AboveKeyboard/index.js.map +1 -0
  21. package/build/theme/types.d.ts +6 -1
  22. package/build/theme/types.d.ts.map +1 -1
  23. package/build/theme/types.js.map +1 -1
  24. package/build/ui/ZSPressable/index.d.ts.map +1 -1
  25. package/build/ui/ZSPressable/index.js +1 -1
  26. package/build/ui/ZSPressable/index.js.map +1 -1
  27. package/build/ui/ZSText/index.d.ts +2 -2
  28. package/build/ui/ZSText/index.d.ts.map +1 -1
  29. package/build/ui/ZSText/index.js +2 -1
  30. package/build/ui/ZSText/index.js.map +1 -1
  31. package/build/ui/ZSView/index.d.ts +2 -0
  32. package/build/ui/ZSView/index.d.ts.map +1 -1
  33. package/build/ui/ZSView/index.js +2 -2
  34. package/build/ui/ZSView/index.js.map +1 -1
  35. package/build/ui/atoms/AnimatedWrapper.d.ts +3 -1
  36. package/build/ui/atoms/AnimatedWrapper.d.ts.map +1 -1
  37. package/build/ui/atoms/AnimatedWrapper.js +6 -4
  38. package/build/ui/atoms/AnimatedWrapper.js.map +1 -1
  39. package/package.json +1 -1
package/build/index.d.ts CHANGED
@@ -6,9 +6,9 @@ export { useTheme, OverlayProvider, ThemeProvider, ZSView, AnimatedWrapper, Text
6
6
  import type { ThemeProviderProps, ThemeProps, Palette } from "./model/useThemeProvider";
7
7
  import { ZSTextProps } from "./ui/ZSText";
8
8
  import { BoxStyle } from "./ui/ZSTextField";
9
- import { ColorPalette, ColorPaletteExtend, ThemeTextType, ThemeBorderType, ThemeBackground, MainColors, Theme, TypographyVariants, ThemeFonts, TypoNumber, TypographyVariantsProps, TypoStyle, TypoOptions, TypoSubStyle, TextColorOptions } from "./theme/types";
9
+ import { ColorPalette, ColorPaletteExtend, ThemeTextType, ThemeBorderType, ThemeBackground, MainColors, Theme, TypographyVariants, ThemeFonts, TypoNumber, TypographyVariantsProps, TypoStyle, TypoOptions, TypoSubStyle, TypoColorOptions } from "./theme/types";
10
10
  import { SnackItem, ShowAlertProps, ShowSnackBarProps, ShowBottomSheetProps, PopOverMenuProps, CustomSnackbarProps, OverlayProviderProps, AlertAction, AlertActions, SnackType, HideOption, BottomSheetOptions } from "./model/types";
11
11
  import { RadioOption, ShadowLevel, ShadowStyle } from "./ui/types";
12
12
  import { ZSContainerRef } from "./ui/ZSContainer";
13
- export type { ThemeProviderProps, ThemeProps, Palette, ZSTextProps, BoxStyle, ColorPalette, ColorPaletteExtend, ThemeTextType, ThemeBorderType, ThemeBackground, MainColors, Theme, TypographyVariants, ThemeFonts, TypoNumber, TypographyVariantsProps, TypoStyle, TypoOptions, TypoSubStyle, TextColorOptions, SnackItem, ShowAlertProps, ShowSnackBarProps, ShowBottomSheetProps, PopOverMenuProps, CustomSnackbarProps, OverlayProviderProps, AlertAction, AlertActions, SnackType, HideOption, BottomSheetOptions, RadioOption, ShadowLevel, ShadowStyle, ZSContainerRef };
13
+ export type { ThemeProviderProps, ThemeProps, Palette, ZSTextProps, BoxStyle, ColorPalette, ColorPaletteExtend, ThemeTextType, ThemeBorderType, ThemeBackground, MainColors, Theme, TypographyVariants, ThemeFonts, TypoNumber, TypographyVariantsProps, TypoStyle, TypoOptions, TypoSubStyle, TypoColorOptions, SnackItem, ShowAlertProps, ShowSnackBarProps, ShowBottomSheetProps, PopOverMenuProps, CustomSnackbarProps, OverlayProviderProps, AlertAction, AlertActions, SnackType, HideOption, BottomSheetOptions, RadioOption, ShadowLevel, ShadowStyle, ZSContainerRef };
14
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,aAAa,GACd,MAAM,SAAS,CAAA;AAEhB,OAAO,EACL,MAAM,EACN,eAAe,EACf,QAAQ,EACR,cAAc,EACd,WAAW,EACX,WAAW,EACX,MAAM,EACN,cAAc,EACd,WAAW,EACX,YAAY,EACZ,cAAc,GACf,MAAM,MAAM,CAAC;AAEd,OAAO,cAAc,MAAM,oCAAoC,CAAC;AAEhE,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,UAAU,EACV,aAAa,EACb,WAAW,GACZ,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,QAAQ,EACR,eAAe,EACf,aAAa;AACb,MAAM;AACN,MAAM,EACN,eAAe,EACf,QAAQ,EACR,cAAc,EACd,WAAW,EACX,WAAW,EACX,MAAM,EACN,cAAc,EACd,WAAW,EACX,YAAY,EACZ,cAAc,EACd,cAAc;AACd,MAAM;AACN,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,UAAU,EACV,aAAa,EACb,WAAW,GACZ,CAAC","sourcesContent":["import {\n useTheme,\n OverlayProvider,\n ThemeProvider,\n} from './model'\n\nimport {\n ZSView,\n AnimatedWrapper,\n TextAtom,\n ScrollViewAtom,\n ZSContainer,\n ZSPressable,\n ZSText,\n ThrottleButton,\n ZSTextField,\n ZSRadioGroup,\n ZSBottomButton,\n} from './ui';\n\nimport ErrorComponent from './ui/ZSTextField/ui/ErrorComponent';\n\nimport {\n AlertOverlay,\n BottomSheetOverlay,\n SnackbarNotify,\n useOverlayProvider,\n useOverlay,\n PopOverButton,\n PopOverMenu,\n} from './overlay';\n\nexport {\n useTheme,\n OverlayProvider,\n ThemeProvider,\n // ---\n ZSView,\n AnimatedWrapper,\n TextAtom,\n ScrollViewAtom,\n ZSContainer,\n ZSPressable,\n ZSText,\n ThrottleButton,\n ZSTextField,\n ZSRadioGroup,\n ZSBottomButton,\n ErrorComponent,\n // ---\n AlertOverlay,\n BottomSheetOverlay,\n SnackbarNotify,\n useOverlayProvider,\n useOverlay,\n PopOverButton,\n PopOverMenu,\n};\n\n// ------------------------------------------------------\n\nimport type {\n ThemeProviderProps,\n ThemeProps,\n Palette,\n} from \"./model/useThemeProvider\";\nimport { ZSTextProps } from \"./ui/ZSText\";\nimport { BoxStyle } from \"./ui/ZSTextField\";\nimport {\n ColorPalette,\n ColorPaletteExtend,\n ThemeTextType,\n ThemeBorderType,\n ThemeBackground,\n MainColors,\n Theme,\n TypographyVariants,\n ThemeFonts,\n TypoNumber,\n TypographyVariantsProps,\n TypoStyle,\n TypoOptions,\n TypoSubStyle,\n TextColorOptions\n} from \"./theme/types\";\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} from \"./model/types\";\nimport {\n RadioOption,\n ShadowLevel,\n ShadowStyle,\n} from \"./ui/types\";\nimport { ZSContainerRef } from \"./ui/ZSContainer\";\n\nexport type {\n ThemeProviderProps,\n ThemeProps,\n Palette,\n ZSTextProps,\n BoxStyle,\n ColorPalette,\n ColorPaletteExtend,\n ThemeTextType,\n ThemeBorderType,\n ThemeBackground,\n MainColors,\n Theme,\n TypographyVariants,\n ThemeFonts,\n TypoNumber,\n TypographyVariantsProps,\n TypoStyle,\n TypoOptions,\n TypoSubStyle,\n TextColorOptions,\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};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,aAAa,GACd,MAAM,SAAS,CAAA;AAEhB,OAAO,EACL,MAAM,EACN,eAAe,EACf,QAAQ,EACR,cAAc,EACd,WAAW,EACX,WAAW,EACX,MAAM,EACN,cAAc,EACd,WAAW,EACX,YAAY,EACZ,cAAc,GACf,MAAM,MAAM,CAAC;AAEd,OAAO,cAAc,MAAM,oCAAoC,CAAC;AAEhE,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,UAAU,EACV,aAAa,EACb,WAAW,GACZ,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,QAAQ,EACR,eAAe,EACf,aAAa;AACb,MAAM;AACN,MAAM,EACN,eAAe,EACf,QAAQ,EACR,cAAc,EACd,WAAW,EACX,WAAW,EACX,MAAM,EACN,cAAc,EACd,WAAW,EACX,YAAY,EACZ,cAAc,EACd,cAAc;AACd,MAAM;AACN,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,UAAU,EACV,aAAa,EACb,WAAW,GACZ,CAAC","sourcesContent":["import {\n useTheme,\n OverlayProvider,\n ThemeProvider,\n} from './model'\n\nimport {\n ZSView,\n AnimatedWrapper,\n TextAtom,\n ScrollViewAtom,\n ZSContainer,\n ZSPressable,\n ZSText,\n ThrottleButton,\n ZSTextField,\n ZSRadioGroup,\n ZSBottomButton,\n} from './ui';\n\nimport ErrorComponent from './ui/ZSTextField/ui/ErrorComponent';\n\nimport {\n AlertOverlay,\n BottomSheetOverlay,\n SnackbarNotify,\n useOverlayProvider,\n useOverlay,\n PopOverButton,\n PopOverMenu,\n} from './overlay';\n\nexport {\n useTheme,\n OverlayProvider,\n ThemeProvider,\n // ---\n ZSView,\n AnimatedWrapper,\n TextAtom,\n ScrollViewAtom,\n ZSContainer,\n ZSPressable,\n ZSText,\n ThrottleButton,\n ZSTextField,\n ZSRadioGroup,\n ZSBottomButton,\n ErrorComponent,\n // ---\n AlertOverlay,\n BottomSheetOverlay,\n SnackbarNotify,\n useOverlayProvider,\n useOverlay,\n PopOverButton,\n PopOverMenu,\n};\n\n// ------------------------------------------------------\n\nimport type {\n ThemeProviderProps,\n ThemeProps,\n Palette,\n} from \"./model/useThemeProvider\";\nimport { ZSTextProps } from \"./ui/ZSText\";\nimport { BoxStyle } from \"./ui/ZSTextField\";\nimport {\n ColorPalette,\n ColorPaletteExtend,\n ThemeTextType,\n ThemeBorderType,\n ThemeBackground,\n MainColors,\n Theme,\n TypographyVariants,\n ThemeFonts,\n TypoNumber,\n TypographyVariantsProps,\n TypoStyle,\n TypoOptions,\n TypoSubStyle,\n TypoColorOptions\n} from \"./theme/types\";\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} from \"./model/types\";\nimport {\n RadioOption,\n ShadowLevel,\n ShadowStyle,\n} from \"./ui/types\";\nimport { ZSContainerRef } from \"./ui/ZSContainer\";\n\nexport type {\n ThemeProviderProps,\n ThemeProps,\n Palette,\n ZSTextProps,\n BoxStyle,\n ColorPalette,\n ColorPaletteExtend,\n ThemeTextType,\n ThemeBorderType,\n ThemeBackground,\n MainColors,\n Theme,\n TypographyVariants,\n ThemeFonts,\n TypoNumber,\n TypographyVariantsProps,\n TypoStyle,\n TypoOptions,\n TypoSubStyle,\n TypoColorOptions,\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};\n"]}
@@ -8,6 +8,7 @@ export interface OverlayContextProps {
8
8
  showSnackBar: (props: ShowSnackBarProps) => void;
9
9
  showAlert: (props: ShowAlertProps) => void;
10
10
  hideOverlay: (option: HideOption) => void;
11
+ showAboveKeyboard: (props: ShowAboveKeyboardProps) => void;
11
12
  }
12
13
  export interface AlertContextProps {
13
14
  alertVisible: boolean;
@@ -31,6 +32,11 @@ export interface ModalityContextProps {
31
32
  modalityVisible: boolean;
32
33
  setModalityVisible: (visible: boolean) => void;
33
34
  }
35
+ export interface AboveKeyboardContextProps {
36
+ aboveKeyboardVisible: boolean;
37
+ setAboveKeyboardVisible: (visible: boolean) => void;
38
+ marginBottom: number;
39
+ }
34
40
  export interface LoaderContextProps {
35
41
  loaderVisible: boolean;
36
42
  setLoaderVisible: (visible: boolean) => void;
@@ -57,6 +63,10 @@ export interface AlertAction {
57
63
  label: string;
58
64
  onPress?: () => void;
59
65
  }
66
+ export interface ShowAboveKeyboardProps {
67
+ render: () => React.ReactNode;
68
+ marginBottom?: number;
69
+ }
60
70
  export interface ShowAlertProps {
61
71
  title?: string;
62
72
  informative?: string;
@@ -81,7 +91,7 @@ export interface SnackItem {
81
91
  snackbarDuration?: number;
82
92
  }
83
93
  export type SnackType = 'success' | 'error' | '';
84
- export type HideOption = 'all' | 'snack' | 'alert' | 'bottomSheet' | 'loader' | 'popOver' | 'modal';
94
+ export type HideOption = 'all' | 'snack' | 'alert' | 'bottomSheet' | 'loader' | 'popOver' | 'modal' | 'aboveKeyboard';
85
95
  export interface ShowSnackBarProps {
86
96
  message: string;
87
97
  type?: SnackType;
@@ -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;IAChC,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;CAC7C;AAED,MAAM,WAAW,iBAAiB;IAC9B,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC/C;AAED,MAAM,WAAW,oBAAoB;IACjC,cAAc,EAAE,SAAS,EAAE,CAAC;IAC5B,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AAED,MAAM,WAAW,uBAAuB;IACpC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,qBAAqB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAClD,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC;AAED,MAAM,WAAW,mBAAmB;IAChC,cAAc,EAAE,OAAO,CAAC;IACxB,iBAAiB,EAAE,CAAC,OAAO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C/B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,oBAAoB;IACjC,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAClC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,OAAO,CAAC,EAAE,kBAAkB,CAAC;CAChC"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/model/types.ts"],"names":[],"mappings":"","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: number;\n setHeight: (height: number) => void;\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}\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 primaryButtonTextStyle?: TextProps['style'];\n singleButtonTextStyle?: 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';\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?: number;\n padding?: number;\n}\n\nexport interface ShowBottomSheetProps {\n headerComponent?: React.ReactNode;\n component: React.ReactNode;\n options?: BottomSheetOptions;\n}"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/model/types.ts"],"names":[],"mappings":"","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 showAboveKeyboard: (props: ShowAboveKeyboardProps) => 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: number;\n setHeight: (height: number) => void;\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 AboveKeyboardContextProps {\n aboveKeyboardVisible: boolean;\n setAboveKeyboardVisible: (visible: boolean) => void;\n marginBottom: number;\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}\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 ShowAboveKeyboardProps {\n render: () => React.ReactNode;\n marginBottom?: number;\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 primaryButtonTextStyle?: TextProps['style'];\n singleButtonTextStyle?: 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?: number;\n padding?: number;\n}\n\nexport interface ShowBottomSheetProps {\n headerComponent?: React.ReactNode;\n component: React.ReactNode;\n options?: BottomSheetOptions;\n}"]}
@@ -1,4 +1,4 @@
1
- import { AlertContextProps, SnackbarContextProps, BottomSheetContextProps, PopOverContextProps, ModalityContextProps, LoaderContextProps, OverlayContextProps } from './types';
1
+ import { AlertContextProps, SnackbarContextProps, BottomSheetContextProps, PopOverContextProps, ModalityContextProps, LoaderContextProps, OverlayContextProps, AboveKeyboardContextProps } from './types';
2
2
  export declare const OverlayContext: import("react").Context<OverlayContextProps | null>;
3
3
  export declare const AlertContext: import("react").Context<AlertContextProps | null>;
4
4
  export declare const SnackbarContext: import("react").Context<SnackbarContextProps | null>;
@@ -6,6 +6,7 @@ export declare const BottomSheetContext: import("react").Context<BottomSheetCont
6
6
  export declare const PopOverContext: import("react").Context<PopOverContextProps | null>;
7
7
  export declare const ModalityContext: import("react").Context<ModalityContextProps | null>;
8
8
  export declare const LoaderContext: import("react").Context<LoaderContextProps | null>;
9
+ export declare const AboveKeyboardContext: import("react").Context<AboveKeyboardContextProps | null>;
9
10
  export declare const useOverlay: () => OverlayContextProps;
10
11
  export declare const useAlert: () => AlertContextProps;
11
12
  export declare const useSnackbar: () => SnackbarContextProps;
@@ -13,4 +14,5 @@ export declare const useBottomSheet: () => BottomSheetContextProps;
13
14
  export declare const usePopOver: () => PopOverContextProps;
14
15
  export declare const useModality: () => ModalityContextProps;
15
16
  export declare const useLoader: () => LoaderContextProps;
17
+ export declare const useAboveKeyboard: () => AboveKeyboardContextProps;
16
18
  //# sourceMappingURL=useOverlay.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useOverlay.d.ts","sourceRoot":"","sources":["../../src/model/useOverlay.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE/K,eAAO,MAAM,cAAc,qDAAkD,CAAC;AAC9E,eAAO,MAAM,YAAY,mDAAgD,CAAC;AAC1E,eAAO,MAAM,eAAe,sDAAmD,CAAC;AAChF,eAAO,MAAM,kBAAkB,yDAAsD,CAAC;AACtF,eAAO,MAAM,cAAc,qDAAkD,CAAC;AAC9E,eAAO,MAAM,eAAe,sDAAmD,CAAC;AAChF,eAAO,MAAM,aAAa,oDAAiD,CAAC;AAE5E,eAAO,MAAM,UAAU,2BAMtB,CAAC;AAEF,eAAO,MAAM,QAAQ,yBAMpB,CAAC;AAEF,eAAO,MAAM,WAAW,4BAMvB,CAAC;AAEF,eAAO,MAAM,cAAc,+BAM1B,CAAC;AAEF,eAAO,MAAM,UAAU,2BAMtB,CAAC;AAEF,eAAO,MAAM,WAAW,4BAMvB,CAAC;AAEF,eAAO,MAAM,SAAS,0BAMrB,CAAC"}
1
+ {"version":3,"file":"useOverlay.d.ts","sourceRoot":"","sources":["../../src/model/useOverlay.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAE1M,eAAO,MAAM,cAAc,qDAAkD,CAAC;AAC9E,eAAO,MAAM,YAAY,mDAAgD,CAAC;AAC1E,eAAO,MAAM,eAAe,sDAAmD,CAAC;AAChF,eAAO,MAAM,kBAAkB,yDAAsD,CAAC;AACtF,eAAO,MAAM,cAAc,qDAAkD,CAAC;AAC9E,eAAO,MAAM,eAAe,sDAAmD,CAAC;AAChF,eAAO,MAAM,aAAa,oDAAiD,CAAC;AAC5E,eAAO,MAAM,oBAAoB,2DAAwD,CAAC;AAE1F,eAAO,MAAM,UAAU,2BAMtB,CAAC;AAEF,eAAO,MAAM,QAAQ,yBAMpB,CAAC;AAEF,eAAO,MAAM,WAAW,4BAMvB,CAAC;AAEF,eAAO,MAAM,cAAc,+BAM1B,CAAC;AAEF,eAAO,MAAM,UAAU,2BAMtB,CAAC;AAEF,eAAO,MAAM,WAAW,4BAMvB,CAAC;AAEF,eAAO,MAAM,SAAS,0BAMrB,CAAC;AAEF,eAAO,MAAM,gBAAgB,iCAM5B,CAAC"}
@@ -6,6 +6,7 @@ export const BottomSheetContext = createContext(null);
6
6
  export const PopOverContext = createContext(null);
7
7
  export const ModalityContext = createContext(null);
8
8
  export const LoaderContext = createContext(null);
9
+ export const AboveKeyboardContext = createContext(null);
9
10
  export const useOverlay = () => {
10
11
  const context = useContext(OverlayContext);
11
12
  if (!context) {
@@ -55,4 +56,11 @@ export const useLoader = () => {
55
56
  }
56
57
  return context;
57
58
  };
59
+ export const useAboveKeyboard = () => {
60
+ const context = useContext(AboveKeyboardContext);
61
+ if (!context) {
62
+ throw new Error('useAboveKeyboard must be used within a AboveKeyboardProvider');
63
+ }
64
+ return context;
65
+ };
58
66
  //# sourceMappingURL=useOverlay.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useOverlay.js","sourceRoot":"","sources":["../../src/model/useOverlay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGlD,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAA6B,IAAI,CAAC,CAAC;AAC9E,MAAM,CAAC,MAAM,YAAY,GAAG,aAAa,C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,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;IAChF,CAAC;IACD,OAAO,OAAO,CAAC;AACnB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE;IAC3B,MAAM,OAAO,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAC3C,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;IACxE,CAAC;IACD,OAAO,OAAO,CAAC;AACnB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE;IAC5B,MAAM,OAAO,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC;IAC5C,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IAC1E,CAAC;IACD,OAAO,OAAO,CAAC;AACnB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,EAAE;IAC1B,MAAM,OAAO,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC;IAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;IACtE,CAAC;IACD,OAAO,OAAO,CAAC;AACnB,CAAC,CAAC","sourcesContent":["import { createContext, useContext } from 'react';\nimport { AlertContextProps, SnackbarContextProps, BottomSheetContextProps, PopOverContextProps, ModalityContextProps, LoaderContextProps, OverlayContextProps } from './types';\n\nexport const OverlayContext = createContext<OverlayContextProps | null>(null);\nexport const AlertContext = createContext<AlertContextProps | null>(null);\nexport const SnackbarContext = createContext<SnackbarContextProps | null>(null);\nexport const BottomSheetContext = createContext<BottomSheetContextProps | null>(null);\nexport const PopOverContext = createContext<PopOverContextProps | null>(null);\nexport const ModalityContext = createContext<ModalityContextProps | null>(null);\nexport const LoaderContext = createContext<LoaderContextProps | null>(null);\n\nexport const useOverlay = () => {\n const context = useContext(OverlayContext);\n if (!context) {\n throw new Error('useOverlay must be used within an OverlayProvider');\n }\n return context;\n};\n\nexport const useAlert = () => {\n const context = useContext(AlertContext);\n if (!context) {\n throw new Error('useAlert must be used within an AlertProvider');\n }\n return context;\n};\n\nexport const useSnackbar = () => {\n const context = useContext(SnackbarContext);\n if (!context) {\n throw new Error('useSnackbar must be used within a SnackbarProvider');\n }\n return context;\n};\n\nexport const useBottomSheet = () => {\n const context = useContext(BottomSheetContext);\n if (!context) {\n throw new Error('useBottomSheet must be used within a BottomSheetProvider');\n }\n return context;\n};\n\nexport const usePopOver = () => {\n const context = useContext(PopOverContext);\n if (!context) {\n throw new Error('usePopOver must be used within a PopOverProvider');\n }\n return context;\n};\n\nexport const useModality = () => {\n const context = useContext(ModalityContext);\n if (!context) {\n throw new Error('useModality must be used within a ModalityProvider');\n }\n return context;\n};\n\nexport const useLoader = () => {\n const context = useContext(LoaderContext);\n if (!context) {\n throw new Error('useLoader must be used within a LoaderProvider');\n }\n return context;\n};\n"]}
1
+ {"version":3,"file":"useOverlay.js","sourceRoot":"","sources":["../../src/model/useOverlay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGlD,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAA6B,IAAI,CAAC,CAAC;AAC9E,MAAM,CAAC,MAAM,YAAY,GAAG,aAAa,CAA2B,IAAI,CAAC,CAAC;AAC1E,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAA8B,IAAI,CAAC,CAAC;AAChF,MAAM,CAAC,MAAM,kBAAkB,GAAG,aAAa,CAAiC,IAAI,CAAC,CAAC;AACtF,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAA6B,IAAI,CAAC,CAAC;AAC9E,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAA8B,IAAI,CAAC,CAAC;AAChF,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,C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K,CAAC,kDAAkD,CAAC,CAAC;IACxE,CAAC;IACD,OAAO,OAAO,CAAC;AACnB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE;IAC5B,MAAM,OAAO,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC;IAC5C,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IAC1E,CAAC;IACD,OAAO,OAAO,CAAC;AACnB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,EAAE;IAC1B,MAAM,OAAO,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC;IAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;IACtE,CAAC;IACD,OAAO,OAAO,CAAC;AACnB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACjC,MAAM,OAAO,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;IACjD,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,8DAA8D,CAAC,CAAC;IACpF,CAAC;IACD,OAAO,OAAO,CAAC;AACnB,CAAC,CAAC","sourcesContent":["import { createContext, useContext } from 'react';\nimport { AlertContextProps, SnackbarContextProps, BottomSheetContextProps, PopOverContextProps, ModalityContextProps, LoaderContextProps, OverlayContextProps, AboveKeyboardContextProps } from './types';\n\nexport const OverlayContext = createContext<OverlayContextProps | null>(null);\nexport const AlertContext = createContext<AlertContextProps | null>(null);\nexport const SnackbarContext = createContext<SnackbarContextProps | null>(null);\nexport const BottomSheetContext = createContext<BottomSheetContextProps | null>(null);\nexport const PopOverContext = createContext<PopOverContextProps | null>(null);\nexport const ModalityContext = createContext<ModalityContextProps | null>(null);\nexport const LoaderContext = createContext<LoaderContextProps | null>(null);\nexport const AboveKeyboardContext = createContext<AboveKeyboardContextProps | null>(null);\n\nexport const useOverlay = () => {\n const context = useContext(OverlayContext);\n if (!context) {\n throw new Error('useOverlay must be used within an OverlayProvider');\n }\n return context;\n};\n\nexport const useAlert = () => {\n const context = useContext(AlertContext);\n if (!context) {\n throw new Error('useAlert must be used within an AlertProvider');\n }\n return context;\n};\n\nexport const useSnackbar = () => {\n const context = useContext(SnackbarContext);\n if (!context) {\n throw new Error('useSnackbar must be used within a SnackbarProvider');\n }\n return context;\n};\n\nexport const useBottomSheet = () => {\n const context = useContext(BottomSheetContext);\n if (!context) {\n throw new Error('useBottomSheet must be used within a BottomSheetProvider');\n }\n return context;\n};\n\nexport const usePopOver = () => {\n const context = useContext(PopOverContext);\n if (!context) {\n throw new Error('usePopOver must be used within a PopOverProvider');\n }\n return context;\n};\n\nexport const useModality = () => {\n const context = useContext(ModalityContext);\n if (!context) {\n throw new Error('useModality must be used within a ModalityProvider');\n }\n return context;\n};\n\nexport const useLoader = () => {\n const context = useContext(LoaderContext);\n if (!context) {\n throw new Error('useLoader must be used within a LoaderProvider');\n }\n return context;\n};\n\nexport const useAboveKeyboard = () => {\n const context = useContext(AboveKeyboardContext);\n if (!context) {\n throw new Error('useAboveKeyboard must be used within a AboveKeyboardProvider');\n }\n return context;\n};"]}
@@ -1 +1 @@
1
- {"version":3,"file":"useOverlayProvider.d.ts","sourceRoot":"","sources":["../../src/model/useOverlayProvider.tsx"],"names":[],"mappings":"AAGA,OAAO,EAA+D,oBAAoB,EAAwF,MAAM,SAAS,CAAC;AAQlM,wBAAgB,eAAe,CAAC,EAC9B,cAAc,EACd,gBAAoB,EACpB,eAAe,EACf,QAAQ,EACT,EAAE,oBAAoB,+BAyStB"}
1
+ {"version":3,"file":"useOverlayProvider.d.ts","sourceRoot":"","sources":["../../src/model/useOverlayProvider.tsx"],"names":[],"mappings":"AAGA,OAAO,EAA+D,oBAAoB,EAAgH,MAAM,SAAS,CAAC;AAS1N,wBAAgB,eAAe,CAAC,EAC9B,cAAc,EACd,gBAAoB,EACpB,eAAe,EACf,QAAQ,EACT,EAAE,oBAAoB,+BA2UtB"}
@@ -1,12 +1,13 @@
1
1
  import { useCallback, useEffect, useMemo, useState } from 'react';
2
2
  import { BackHandler, Keyboard } from 'react-native';
3
- import { AlertContext, SnackbarContext, BottomSheetContext, PopOverContext, ModalityContext, LoaderContext, OverlayContext } from './useOverlay';
3
+ import { AlertContext, SnackbarContext, BottomSheetContext, PopOverContext, ModalityContext, LoaderContext, OverlayContext, AboveKeyboardContext } from './useOverlay';
4
4
  import AlertOverlay from '../overlay/AlertOverlay';
5
5
  import SnackbarNotify from '../overlay/SnackbarNotify';
6
6
  import BottomSheetOverlay from '../overlay/BottomSheetOverlay';
7
7
  import LoadingNotify from '../overlay/LoadingNotify';
8
8
  import PopOverMenu from '../overlay/PopOver/PopOverMenu';
9
9
  import Modality from '../overlay/Modality';
10
+ import AboveKeyboard from '../overlay/AboveKeyboard';
10
11
  export function OverlayProvider({ customSnackbar, maxSnackbarCount = 3, loaderComponent, children }) {
11
12
  // Alert
12
13
  const [title, setTitle] = useState('');
@@ -38,8 +39,16 @@ export function OverlayProvider({ customSnackbar, maxSnackbarCount = 3, loaderCo
38
39
  // Modality
39
40
  const [modalityVisible, setModalityVisible] = useState(false);
40
41
  const [modalityComponent, setModalityComponent] = useState(false);
42
+ // AboveKeyboard
43
+ const [aboveKeyboardVisible, setAboveKeyboardVisible] = useState(false);
44
+ const [aboveKeyboardRender, setAboveKeyboardRender] = useState(() => null);
45
+ const [aboveKeyboardMarginBottom, setAboveKeyboardMarginBottom] = useState(0);
41
46
  // ---
42
- const [fontFamily, setFontFamily] = useState(undefined);
47
+ const showAboveKeyboard = ({ render, marginBottom }) => {
48
+ setAboveKeyboardRender(() => render);
49
+ setAboveKeyboardMarginBottom(marginBottom || 0);
50
+ setAboveKeyboardVisible(true);
51
+ };
43
52
  const showAlert = ({ title, informative, actions, isBackgroundTouchClose = true, titleStyle, informativeStyle, secondaryButtonStyle, primaryButtonStyle, secondaryButtonTextStyle, primaryButtonTextStyle, singleButtonTextStyle, }) => {
44
53
  Keyboard.dismiss();
45
54
  setTitle(title || '');
@@ -54,7 +63,6 @@ export function OverlayProvider({ customSnackbar, maxSnackbarCount = 3, loaderCo
54
63
  setSecondaryButtonTextStyle(secondaryButtonTextStyle);
55
64
  setPrimaryButtonTextStyle(primaryButtonTextStyle);
56
65
  setSingleButtonTextStyle(singleButtonTextStyle);
57
- setFontFamily(fontFamily);
58
66
  };
59
67
  const showBottomSheet = ({ headerComponent, component, options, }) => {
60
68
  Keyboard.dismiss();
@@ -107,6 +115,9 @@ export function OverlayProvider({ customSnackbar, maxSnackbarCount = 3, loaderCo
107
115
  case 'popOver':
108
116
  setPopOverVisible(false);
109
117
  break;
118
+ case 'aboveKeyboard':
119
+ setAboveKeyboardVisible(false);
120
+ break;
110
121
  case 'all':
111
122
  setModalityVisible(false);
112
123
  setAlertVisible(false);
@@ -114,6 +125,7 @@ export function OverlayProvider({ customSnackbar, maxSnackbarCount = 3, loaderCo
114
125
  setLoaderVisible(false);
115
126
  setPopOverVisible(false);
116
127
  setBottomSheetVisible(false);
128
+ setAboveKeyboardVisible(false);
117
129
  break;
118
130
  default:
119
131
  break;
@@ -135,7 +147,7 @@ export function OverlayProvider({ customSnackbar, maxSnackbarCount = 3, loaderCo
135
147
  const backHandler = BackHandler.addEventListener('hardwareBackPress', backPressHandler);
136
148
  return () => backHandler.remove();
137
149
  }, [backPressHandler]);
138
- // ------------------------------------------------------------
150
+ // ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
139
151
  const overlayContextValue = useMemo(() => ({
140
152
  hideOverlay,
141
153
  showAlert,
@@ -144,6 +156,7 @@ export function OverlayProvider({ customSnackbar, maxSnackbarCount = 3, loaderCo
144
156
  showPopOverMenu,
145
157
  showModality,
146
158
  showLoader,
159
+ showAboveKeyboard,
147
160
  }), [
148
161
  hideOverlay,
149
162
  showAlert,
@@ -152,6 +165,7 @@ export function OverlayProvider({ customSnackbar, maxSnackbarCount = 3, loaderCo
152
165
  showPopOverMenu,
153
166
  showModality,
154
167
  showLoader,
168
+ showAboveKeyboard,
155
169
  ]);
156
170
  const alertContextValue = useMemo(() => ({
157
171
  alertVisible,
@@ -199,6 +213,15 @@ export function OverlayProvider({ customSnackbar, maxSnackbarCount = 3, loaderCo
199
213
  loaderVisible,
200
214
  setLoaderVisible,
201
215
  ]);
216
+ const aboveKeyboardContextValue = useMemo(() => ({
217
+ aboveKeyboardVisible,
218
+ setAboveKeyboardVisible,
219
+ marginBottom: aboveKeyboardMarginBottom,
220
+ }), [
221
+ aboveKeyboardVisible,
222
+ setAboveKeyboardVisible,
223
+ aboveKeyboardMarginBottom,
224
+ ]);
202
225
  return (<OverlayContext.Provider value={overlayContextValue}>
203
226
  <AlertContext.Provider value={alertContextValue}>
204
227
  <SnackbarContext.Provider value={snackbarContextValue}>
@@ -206,19 +229,23 @@ export function OverlayProvider({ customSnackbar, maxSnackbarCount = 3, loaderCo
206
229
  <PopOverContext.Provider value={popOverContextValue}>
207
230
  <ModalityContext.Provider value={modalityContextValue}>
208
231
  <LoaderContext.Provider value={loaderContextValue}>
209
- {children}
232
+ <AboveKeyboardContext.Provider value={aboveKeyboardContextValue}>
233
+ {children}
234
+
235
+ <Modality modalityComponent={modalityComponent}/>
210
236
 
211
- <Modality modalityComponent={modalityComponent}/>
237
+ <BottomSheetOverlay headerComponent={bottomSheetHeader} component={bottomSheetComponent} options={bottomSheetOptions}/>
212
238
 
213
- <BottomSheetOverlay headerComponent={bottomSheetHeader} component={bottomSheetComponent} options={bottomSheetOptions}/>
239
+ <PopOverMenu px={popOverLocation?.px} py={popOverLocation?.py} component={popOverComponent}/>
214
240
 
215
- <PopOverMenu px={popOverLocation?.px} py={popOverLocation?.py} component={popOverComponent}/>
241
+ <AlertOverlay title={title} informative={informative} actions={actions || {}} isBackgroundTouchClose={isBackgroundTouchClose} titleStyle={titleStyle} informativeStyle={informativeStyle} secondaryButtonStyle={secondaryButtonStyle} primaryButtonStyle={primaryButtonStyle} secondaryButtonTextStyle={secondaryButtonTextStyle} primaryButtonTextStyle={primaryButtonTextStyle} singleButtonTextStyle={singleButtonTextStyle}/>
216
242
 
217
- <AlertOverlay title={title} informative={informative} actions={actions || {}} isBackgroundTouchClose={isBackgroundTouchClose} titleStyle={titleStyle} informativeStyle={informativeStyle} secondaryButtonStyle={secondaryButtonStyle} primaryButtonStyle={primaryButtonStyle} secondaryButtonTextStyle={secondaryButtonTextStyle} primaryButtonTextStyle={primaryButtonTextStyle} singleButtonTextStyle={singleButtonTextStyle}/>
243
+ <AboveKeyboard render={aboveKeyboardRender}/>
218
244
 
219
- <SnackbarNotify customSnackbar={customSnackbar}/>
245
+ <SnackbarNotify customSnackbar={customSnackbar}/>
220
246
 
221
- <LoadingNotify loaderComponent={loaderComponent}/>
247
+ <LoadingNotify loaderComponent={loaderComponent}/>
248
+ </AboveKeyboardContext.Provider>
222
249
  </LoaderContext.Provider>
223
250
  </ModalityContext.Provider>
224
251
  </PopOverContext.Provider>
@@ -1 +1 @@
1
- {"version":3,"file":"useOverlayProvider.js","sourceRoot":"","sources":["../../src/model/useOverlayProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAoC,MAAM,cAAc,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,kBAAkB,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEjJ,OAAO,YAAY,MAAM,yBAAyB,CAAC;AACnD,OAAO,cAAc,MAAM,2BAA2B,CAAC;AACvD,OAAO,kBAAkB,MAAM,+BAA+B,CAAC;AAC/D,OAAO,aAAa,MAAM,0BAA0B,CAAC;AACrD,OAAO,WAAW,MAAM,gCAAgC,CAAC;AACzD,OAAO,QAAQ,MAAM,qBAA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CAAC,CAC3C,kBAAkB,CAAC,CAAC,kBAAkB,CAAC,CACvC,wBAAwB,CAAC,CAAC,wBAAwB,CAAC,CACnD,sBAAsB,CAAC,CAAC,sBAAsB,CAAC,CAC/C,qBAAqB,CAAC,CAAC,qBAAqB,CAAC,EAG/C;;kBAAA,CAAC,cAAc,CACb,cAAc,CAAC,CAAC,cAAc,CAAC,EAGjC;;kBAAA,CAAC,aAAa,CACZ,eAAe,CAAC,CAAC,eAAe,CAAC,EAErC;gBAAA,EAAE,aAAa,CAAC,QAAQ,CAC1B;cAAA,EAAE,eAAe,CAAC,QAAQ,CAC5B;YAAA,EAAE,cAAc,CAAC,QAAQ,CAC3B;UAAA,EAAE,kBAAkB,CAAC,QAAQ,CAC/B;QAAA,EAAE,eAAe,CAAC,QAAQ,CAC5B;MAAA,EAAE,YAAY,CAAC,QAAQ,CACzB;IAAA,EAAE,cAAc,CAAC,QAAQ,CAAC,CAC3B,CAAC;AACJ,CAAC","sourcesContent":["import { useCallback, useEffect, useMemo, useState } from 'react';\nimport { BackHandler, Keyboard, TextProps, TouchableOpacityProps } from 'react-native';\nimport { AlertContext, SnackbarContext, BottomSheetContext, PopOverContext, ModalityContext, LoaderContext, OverlayContext } from './useOverlay';\nimport { AlertActions, BottomSheetOptions, HideOption, ModalityProps, OverlayProviderProps, PopOverMenuProps, ShowAlertProps, ShowBottomSheetProps, ShowSnackBarProps, SnackItem } from './types';\nimport AlertOverlay from '../overlay/AlertOverlay';\nimport SnackbarNotify from '../overlay/SnackbarNotify';\nimport BottomSheetOverlay from '../overlay/BottomSheetOverlay';\nimport LoadingNotify from '../overlay/LoadingNotify';\nimport PopOverMenu from '../overlay/PopOver/PopOverMenu';\nimport Modality from '../overlay/Modality';\n\nexport function OverlayProvider({\n customSnackbar,\n maxSnackbarCount = 3,\n loaderComponent,\n children\n}: OverlayProviderProps) {\n // Alert\n const [title, setTitle] = useState<string>('');\n const [informative, setInformative] = useState<string>('');\n const [alertVisible, setAlertVisible] = useState<boolean>(false);\n const [actions, setActions] = useState<AlertActions>();\n const [isBackgroundTouchClose, setIsBackgroundTouchClose] = useState<boolean>(true);\n const [titleStyle, setTitleStyle] = useState<TextProps['style']>();\n const [informativeStyle, setInformativeStyle] = useState<TextProps['style']>();\n const [secondaryButtonStyle, setSecondaryButtonStyle] = useState<TouchableOpacityProps['style']>();\n const [primaryButtonStyle, setPrimaryButtonStyle] = useState<TouchableOpacityProps['style']>();\n const [secondaryButtonTextStyle, setSecondaryButtonTextStyle] = useState<TextProps['style']>();\n const [primaryButtonTextStyle, setPrimaryButtonTextStyle] = useState<TextProps['style']>();\n const [singleButtonTextStyle, setSingleButtonTextStyle] = useState<TextProps['style']>();\n\n // Snackbar\n const [snackItemStack, setSnackItemStack] = useState<SnackItem[]>([]);\n\n // BottomSheet\n const [bottomSheetVisible, setBottomSheetVisible] = useState<boolean>(false);\n const [bottomSheetComponent, setBottomSheetComponent] = useState<React.ReactNode>(null);\n const [bottomSheetHeader, setBottomSheetHeader] = useState<React.ReactNode>(null);\n const [bottomSheetOptions, setBottomSheetOptions] = useState<BottomSheetOptions>();\n const [bottomSheetHeight, setBottomSheetHeight] = useState<number>(300);\n\n // Loading\n const [loaderVisible, setLoaderVisible] = useState<boolean>(false);\n\n // PopOver\n const [popOverVisible, setPopOverVisible] = useState<boolean>(false);\n const [popOverLocation, setPopOverLocation] = useState<{ px: PopOverMenuProps['px'], py: PopOverMenuProps['py'] }>({ px: 0, py: 0 });\n const [popOverComponent, setPopOverComponent] = useState<React.ReactNode>(false);\n\n // Modality\n const [modalityVisible, setModalityVisible] = useState<boolean>(false);\n const [modalityComponent, setModalityComponent] = useState<React.ReactNode>(false);\n\n // ---\n const [fontFamily, setFontFamily] = useState<string | undefined | { title?: string; info?: string; label?: string; }>(undefined);\n\n const showAlert = ({\n title,\n informative,\n actions,\n isBackgroundTouchClose = true,\n titleStyle,\n informativeStyle,\n secondaryButtonStyle,\n primaryButtonStyle,\n secondaryButtonTextStyle,\n primaryButtonTextStyle,\n singleButtonTextStyle,\n }: ShowAlertProps) => {\n Keyboard.dismiss();\n setTitle(title || '');\n setInformative(informative || '');\n setActions(actions || {} as AlertActions);\n setIsBackgroundTouchClose(isBackgroundTouchClose);\n setAlertVisible(true);\n\n setTitleStyle(titleStyle);\n setInformativeStyle(informativeStyle);\n setSecondaryButtonStyle(secondaryButtonStyle);\n setPrimaryButtonStyle(primaryButtonStyle);\n setSecondaryButtonTextStyle(secondaryButtonTextStyle);\n setPrimaryButtonTextStyle(primaryButtonTextStyle);\n setSingleButtonTextStyle(singleButtonTextStyle);\n\n setFontFamily(fontFamily);\n };\n\n const showBottomSheet = ({\n headerComponent,\n component,\n options,\n }: ShowBottomSheetProps) => {\n Keyboard.dismiss();\n setBottomSheetComponent(component);\n setBottomSheetHeader(headerComponent);\n setBottomSheetOptions(options);\n setBottomSheetHeight(options?.height || 300);\n setBottomSheetVisible(true);\n };\n\n const showLoader = () => {\n setLoaderVisible(true);\n };\n\n const showPopOverMenu = ({\n px,\n py,\n component\n }: PopOverMenuProps) => {\n Keyboard.dismiss();\n setPopOverLocation({ px, py });\n setPopOverComponent(component);\n setPopOverVisible(true);\n }\n\n const showModality = ({\n component\n }: ModalityProps) => {\n Keyboard.dismiss();\n setModalityComponent(component);\n setModalityVisible(true);\n }\n\n const showSnackBar = ({\n message,\n type = 'success',\n index = Date.now(),\n snackbarDuration = 3500\n }: ShowSnackBarProps) => {\n setSnackItemStack((prev) => {\n const newStack = [...prev, { message, type, index: index, snackbarDuration: snackbarDuration }];\n return newStack.length > maxSnackbarCount ? newStack.slice(1) : newStack;\n });\n };\n\n const hideSnackBar = (index: number) => {\n setSnackItemStack((prev) => prev.filter((item) => item.index !== index));\n };\n\n const hideOverlay = useCallback((option: HideOption) => {\n switch (option) {\n case 'alert':\n setAlertVisible(false);\n break;\n case 'modal':\n setModalityVisible(false);\n break;\n case 'snack':\n setSnackItemStack([]);\n break;\n case 'bottomSheet':\n setBottomSheetVisible(false);\n break;\n case 'loader':\n setLoaderVisible(false);\n break;\n case 'popOver':\n setPopOverVisible(false);\n break;\n case 'all':\n setModalityVisible(false);\n setAlertVisible(false);\n setSnackItemStack([]);\n setLoaderVisible(false);\n setPopOverVisible(false);\n setBottomSheetVisible(false);\n break;\n default:\n break;\n };\n }, []);\n\n // 안드로이드 뒤로가기 버튼 제어\n const backPressHandler = useCallback(() => {\n if (loaderVisible) {\n return true;\n }\n if (alertVisible || modalityVisible || popOverVisible || bottomSheetVisible) {\n hideOverlay('all');\n return true;\n }\n return false;\n }, [alertVisible, loaderVisible, modalityVisible, popOverVisible]);\n\n useEffect(() => {\n const backHandler = BackHandler.addEventListener('hardwareBackPress', backPressHandler);\n return () => backHandler.remove();\n }, [backPressHandler]);\n\n // ------------------------------------------------------------\n const overlayContextValue = useMemo(() => ({\n hideOverlay,\n showAlert,\n showSnackBar,\n showBottomSheet,\n showPopOverMenu,\n showModality,\n showLoader,\n }), [\n hideOverlay,\n showAlert,\n showSnackBar,\n showBottomSheet,\n showPopOverMenu,\n showModality,\n showLoader,\n ]);\n\n const alertContextValue = useMemo(() => ({\n alertVisible,\n setAlertVisible,\n }), [\n alertVisible,\n setAlertVisible,\n ]);\n\n const snackbarContextValue = useMemo(() => ({\n snackItemStack,\n hideSnackBar,\n }), [\n snackItemStack,\n hideSnackBar,\n ]);\n\n const bottomSheetContextValue = useMemo(() => ({\n bottomSheetVisible,\n setBottomSheetVisible,\n height: bottomSheetHeight,\n setHeight: setBottomSheetHeight,\n }), [\n bottomSheetVisible,\n setBottomSheetVisible,\n bottomSheetHeight,\n setBottomSheetHeight,\n ]);\n\n const popOverContextValue = useMemo(() => ({\n popOverVisible,\n setPopOverVisible,\n }), [\n popOverVisible,\n setPopOverVisible,\n ]);\n\n const modalityContextValue = useMemo(() => ({\n modalityVisible,\n setModalityVisible,\n }), [\n modalityVisible,\n setModalityVisible,\n ]);\n\n const loaderContextValue = useMemo(() => ({\n loaderVisible,\n setLoaderVisible,\n }), [\n loaderVisible,\n setLoaderVisible,\n ]);\n\n return (\n <OverlayContext.Provider value={overlayContextValue}>\n <AlertContext.Provider value={alertContextValue}>\n <SnackbarContext.Provider value={snackbarContextValue}>\n <BottomSheetContext.Provider value={bottomSheetContextValue}>\n <PopOverContext.Provider value={popOverContextValue}>\n <ModalityContext.Provider value={modalityContextValue}>\n <LoaderContext.Provider value={loaderContextValue}>\n {children}\n\n <Modality modalityComponent={modalityComponent} />\n\n <BottomSheetOverlay\n headerComponent={bottomSheetHeader}\n component={bottomSheetComponent}\n options={bottomSheetOptions}\n />\n\n <PopOverMenu\n px={popOverLocation?.px}\n py={popOverLocation?.py}\n component={popOverComponent}\n />\n\n <AlertOverlay\n title={title}\n informative={informative}\n actions={actions || {} as AlertActions}\n isBackgroundTouchClose={isBackgroundTouchClose}\n titleStyle={titleStyle}\n informativeStyle={informativeStyle}\n secondaryButtonStyle={secondaryButtonStyle}\n primaryButtonStyle={primaryButtonStyle}\n secondaryButtonTextStyle={secondaryButtonTextStyle}\n primaryButtonTextStyle={primaryButtonTextStyle}\n singleButtonTextStyle={singleButtonTextStyle}\n />\n\n <SnackbarNotify\n customSnackbar={customSnackbar}\n />\n\n <LoadingNotify\n loaderComponent={loaderComponent}\n />\n </LoaderContext.Provider>\n </ModalityContext.Provider>\n </PopOverContext.Provider>\n </BottomSheetContext.Provider>\n </SnackbarContext.Provider>\n </AlertContext.Provider>\n </OverlayContext.Provider>\n );\n}\n"]}
1
+ {"version":3,"file":"useOverlayProvider.js","sourceRoot":"","sources":["../../src/model/useOverlayProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAoC,MAAM,cAAc,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,kBAAkB,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,oBA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C,sBAAsB,CAAC,CAC/C,qBAAqB,CAAC,CAAC,qBAAqB,CAAC,EAG/C;;oBAAA,CAAC,aAAa,CACZ,MAAM,CAAC,CAAC,mBAAmB,CAAC,EAG9B;;oBAAA,CAAC,cAAc,CACb,cAAc,CAAC,CAAC,cAAc,CAAC,EAGjC;;oBAAA,CAAC,aAAa,CACZ,eAAe,CAAC,CAAC,eAAe,CAAC,EAErC;kBAAA,EAAE,oBAAoB,CAAC,QAAQ,CACjC;gBAAA,EAAE,aAAa,CAAC,QAAQ,CAC1B;cAAA,EAAE,eAAe,CAAC,QAAQ,CAC5B;YAAA,EAAE,cAAc,CAAC,QAAQ,CAC3B;UAAA,EAAE,kBAAkB,CAAC,QAAQ,CAC/B;QAAA,EAAE,eAAe,CAAC,QAAQ,CAC5B;MAAA,EAAE,YAAY,CAAC,QAAQ,CACzB;IAAA,EAAE,cAAc,CAAC,QAAQ,CAAC,CAC3B,CAAC;AACJ,CAAC","sourcesContent":["import { useCallback, useEffect, useMemo, useState } from 'react';\nimport { BackHandler, Keyboard, TextProps, TouchableOpacityProps } from 'react-native';\nimport { AlertContext, SnackbarContext, BottomSheetContext, PopOverContext, ModalityContext, LoaderContext, OverlayContext, AboveKeyboardContext } from './useOverlay';\nimport { AlertActions, BottomSheetOptions, HideOption, ModalityProps, OverlayProviderProps, PopOverMenuProps, ShowAboveKeyboardProps, ShowAlertProps, ShowBottomSheetProps, ShowSnackBarProps, SnackItem } from './types';\nimport AlertOverlay from '../overlay/AlertOverlay';\nimport SnackbarNotify from '../overlay/SnackbarNotify';\nimport BottomSheetOverlay from '../overlay/BottomSheetOverlay';\nimport LoadingNotify from '../overlay/LoadingNotify';\nimport PopOverMenu from '../overlay/PopOver/PopOverMenu';\nimport Modality from '../overlay/Modality';\nimport AboveKeyboard from '../overlay/AboveKeyboard';\n\nexport function OverlayProvider({\n customSnackbar,\n maxSnackbarCount = 3,\n loaderComponent,\n children\n}: OverlayProviderProps) {\n // Alert\n const [title, setTitle] = useState<string>('');\n const [informative, setInformative] = useState<string>('');\n const [alertVisible, setAlertVisible] = useState<boolean>(false);\n const [actions, setActions] = useState<AlertActions>();\n const [isBackgroundTouchClose, setIsBackgroundTouchClose] = useState<boolean>(true);\n const [titleStyle, setTitleStyle] = useState<TextProps['style']>();\n const [informativeStyle, setInformativeStyle] = useState<TextProps['style']>();\n const [secondaryButtonStyle, setSecondaryButtonStyle] = useState<TouchableOpacityProps['style']>();\n const [primaryButtonStyle, setPrimaryButtonStyle] = useState<TouchableOpacityProps['style']>();\n const [secondaryButtonTextStyle, setSecondaryButtonTextStyle] = useState<TextProps['style']>();\n const [primaryButtonTextStyle, setPrimaryButtonTextStyle] = useState<TextProps['style']>();\n const [singleButtonTextStyle, setSingleButtonTextStyle] = useState<TextProps['style']>();\n\n // Snackbar\n const [snackItemStack, setSnackItemStack] = useState<SnackItem[]>([]);\n\n // BottomSheet\n const [bottomSheetVisible, setBottomSheetVisible] = useState<boolean>(false);\n const [bottomSheetComponent, setBottomSheetComponent] = useState<React.ReactNode>(null);\n const [bottomSheetHeader, setBottomSheetHeader] = useState<React.ReactNode>(null);\n const [bottomSheetOptions, setBottomSheetOptions] = useState<BottomSheetOptions>();\n const [bottomSheetHeight, setBottomSheetHeight] = useState<number>(300);\n\n // Loading\n const [loaderVisible, setLoaderVisible] = useState<boolean>(false);\n\n // PopOver\n const [popOverVisible, setPopOverVisible] = useState<boolean>(false);\n const [popOverLocation, setPopOverLocation] = useState<{ px: PopOverMenuProps['px'], py: PopOverMenuProps['py'] }>({ px: 0, py: 0 });\n const [popOverComponent, setPopOverComponent] = useState<React.ReactNode>(false);\n\n // Modality\n const [modalityVisible, setModalityVisible] = useState<boolean>(false);\n const [modalityComponent, setModalityComponent] = useState<React.ReactNode>(false);\n\n // AboveKeyboard\n const [aboveKeyboardVisible, setAboveKeyboardVisible] = useState<boolean>(false);\n const [aboveKeyboardRender, setAboveKeyboardRender] = useState<() => React.ReactNode>(() => null);\n const [aboveKeyboardMarginBottom, setAboveKeyboardMarginBottom] = useState<number>(0);\n\n // ---\n\n const showAboveKeyboard = ({\n render,\n marginBottom\n }: ShowAboveKeyboardProps) => {\n setAboveKeyboardRender(() => render);\n setAboveKeyboardMarginBottom(marginBottom || 0);\n setAboveKeyboardVisible(true);\n }\n\n const showAlert = ({\n title,\n informative,\n actions,\n isBackgroundTouchClose = true,\n titleStyle,\n informativeStyle,\n secondaryButtonStyle,\n primaryButtonStyle,\n secondaryButtonTextStyle,\n primaryButtonTextStyle,\n singleButtonTextStyle,\n }: ShowAlertProps) => {\n Keyboard.dismiss();\n setTitle(title || '');\n setInformative(informative || '');\n setActions(actions || {} as AlertActions);\n setIsBackgroundTouchClose(isBackgroundTouchClose);\n setAlertVisible(true);\n\n setTitleStyle(titleStyle);\n setInformativeStyle(informativeStyle);\n setSecondaryButtonStyle(secondaryButtonStyle);\n setPrimaryButtonStyle(primaryButtonStyle);\n setSecondaryButtonTextStyle(secondaryButtonTextStyle);\n setPrimaryButtonTextStyle(primaryButtonTextStyle);\n setSingleButtonTextStyle(singleButtonTextStyle);\n };\n\n const showBottomSheet = ({\n headerComponent,\n component,\n options,\n }: ShowBottomSheetProps) => {\n Keyboard.dismiss();\n setBottomSheetComponent(component);\n setBottomSheetHeader(headerComponent);\n setBottomSheetOptions(options);\n setBottomSheetHeight(options?.height || 300);\n setBottomSheetVisible(true);\n };\n\n const showLoader = () => {\n setLoaderVisible(true);\n };\n\n const showPopOverMenu = ({\n px,\n py,\n component\n }: PopOverMenuProps) => {\n Keyboard.dismiss();\n setPopOverLocation({ px, py });\n setPopOverComponent(component);\n setPopOverVisible(true);\n }\n\n const showModality = ({\n component\n }: ModalityProps) => {\n Keyboard.dismiss();\n setModalityComponent(component);\n setModalityVisible(true);\n }\n\n const showSnackBar = ({\n message,\n type = 'success',\n index = Date.now(),\n snackbarDuration = 3500\n }: ShowSnackBarProps) => {\n setSnackItemStack((prev) => {\n const newStack = [...prev, { message, type, index: index, snackbarDuration: snackbarDuration }];\n return newStack.length > maxSnackbarCount ? newStack.slice(1) : newStack;\n });\n };\n\n const hideSnackBar = (index: number) => {\n setSnackItemStack((prev) => prev.filter((item) => item.index !== index));\n };\n\n const hideOverlay = useCallback((option: HideOption) => {\n switch (option) {\n case 'alert':\n setAlertVisible(false);\n break;\n case 'modal':\n setModalityVisible(false);\n break;\n case 'snack':\n setSnackItemStack([]);\n break;\n case 'bottomSheet':\n setBottomSheetVisible(false);\n break;\n case 'loader':\n setLoaderVisible(false);\n break;\n case 'popOver':\n setPopOverVisible(false);\n break;\n case 'aboveKeyboard':\n setAboveKeyboardVisible(false);\n break;\n case 'all':\n setModalityVisible(false);\n setAlertVisible(false);\n setSnackItemStack([]);\n setLoaderVisible(false);\n setPopOverVisible(false);\n setBottomSheetVisible(false);\n setAboveKeyboardVisible(false);\n break;\n default:\n break;\n };\n }, []);\n\n // 안드로이드 뒤로가기 버튼 제어\n const backPressHandler = useCallback(() => {\n if (loaderVisible) {\n return true;\n }\n if (alertVisible || modalityVisible || popOverVisible || bottomSheetVisible) {\n hideOverlay('all');\n return true;\n }\n return false;\n }, [alertVisible, loaderVisible, modalityVisible, popOverVisible]);\n\n useEffect(() => {\n const backHandler = BackHandler.addEventListener('hardwareBackPress', backPressHandler);\n return () => backHandler.remove();\n }, [backPressHandler]);\n\n // ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n\n const overlayContextValue = useMemo(() => ({\n hideOverlay,\n showAlert,\n showSnackBar,\n showBottomSheet,\n showPopOverMenu,\n showModality,\n showLoader,\n showAboveKeyboard,\n }), [\n hideOverlay,\n showAlert,\n showSnackBar,\n showBottomSheet,\n showPopOverMenu,\n showModality,\n showLoader,\n showAboveKeyboard,\n ]);\n\n const alertContextValue = useMemo(() => ({\n alertVisible,\n setAlertVisible,\n }), [\n alertVisible,\n setAlertVisible,\n ]);\n\n const snackbarContextValue = useMemo(() => ({\n snackItemStack,\n hideSnackBar,\n }), [\n snackItemStack,\n hideSnackBar,\n ]);\n\n const bottomSheetContextValue = useMemo(() => ({\n bottomSheetVisible,\n setBottomSheetVisible,\n height: bottomSheetHeight,\n setHeight: setBottomSheetHeight,\n }), [\n bottomSheetVisible,\n setBottomSheetVisible,\n bottomSheetHeight,\n setBottomSheetHeight,\n ]);\n\n const popOverContextValue = useMemo(() => ({\n popOverVisible,\n setPopOverVisible,\n }), [\n popOverVisible,\n setPopOverVisible,\n ]);\n\n const modalityContextValue = useMemo(() => ({\n modalityVisible,\n setModalityVisible,\n }), [\n modalityVisible,\n setModalityVisible,\n ]);\n\n const loaderContextValue = useMemo(() => ({\n loaderVisible,\n setLoaderVisible,\n }), [\n loaderVisible,\n setLoaderVisible,\n ]);\n\n const aboveKeyboardContextValue = useMemo(() => ({\n aboveKeyboardVisible,\n setAboveKeyboardVisible,\n marginBottom: aboveKeyboardMarginBottom,\n }), [\n aboveKeyboardVisible,\n setAboveKeyboardVisible,\n aboveKeyboardMarginBottom,\n ]);\n\n return (\n <OverlayContext.Provider value={overlayContextValue}>\n <AlertContext.Provider value={alertContextValue}>\n <SnackbarContext.Provider value={snackbarContextValue}>\n <BottomSheetContext.Provider value={bottomSheetContextValue}>\n <PopOverContext.Provider value={popOverContextValue}>\n <ModalityContext.Provider value={modalityContextValue}>\n <LoaderContext.Provider value={loaderContextValue}>\n <AboveKeyboardContext.Provider value={aboveKeyboardContextValue}>\n {children}\n\n <Modality modalityComponent={modalityComponent} />\n\n <BottomSheetOverlay\n headerComponent={bottomSheetHeader}\n component={bottomSheetComponent}\n options={bottomSheetOptions}\n />\n\n <PopOverMenu\n px={popOverLocation?.px}\n py={popOverLocation?.py}\n component={popOverComponent}\n />\n\n <AlertOverlay\n title={title}\n informative={informative}\n actions={actions || {} as AlertActions}\n isBackgroundTouchClose={isBackgroundTouchClose}\n titleStyle={titleStyle}\n informativeStyle={informativeStyle}\n secondaryButtonStyle={secondaryButtonStyle}\n primaryButtonStyle={primaryButtonStyle}\n secondaryButtonTextStyle={secondaryButtonTextStyle}\n primaryButtonTextStyle={primaryButtonTextStyle}\n singleButtonTextStyle={singleButtonTextStyle}\n />\n\n <AboveKeyboard\n render={aboveKeyboardRender}\n />\n\n <SnackbarNotify\n customSnackbar={customSnackbar}\n />\n\n <LoadingNotify\n loaderComponent={loaderComponent}\n />\n </AboveKeyboardContext.Provider>\n </LoaderContext.Provider>\n </ModalityContext.Provider>\n </PopOverContext.Provider>\n </BottomSheetContext.Provider>\n </SnackbarContext.Provider>\n </AlertContext.Provider>\n </OverlayContext.Provider>\n );\n}\n"]}
@@ -1,13 +1,4 @@
1
1
  import { StyleProp, TextStyle } from "react-native";
2
- /**
3
- * 사각형의 너비와 높이에 따라 비슷한 비율의 테두리 반지름을 계산합니다.
4
- * @param width 사각형의 너비입니다.
5
- * @param height 사각형의 높이입니다.
6
- * @param borderRadius 기본 테두리 반지름입니다.
7
- * @returns 계산된 테두리 반지름입니다.
8
- */
9
- export declare const calculateRadius: (width: number, height: number, borderRadius: number) => number;
10
- export declare const withPromise: <T extends unknown[]>(fn: (...args: T) => Promise<unknown>) => ((...args: T) => void);
11
2
  export declare const extractStyle: (style: StyleProp<TextStyle>, attribute: keyof TextStyle) => TextStyle[keyof TextStyle] | undefined;
12
3
  export declare const Z_INDEX_VALUE: {
13
4
  DEFAULT: number;
@@ -19,6 +10,7 @@ export declare const Z_INDEX_VALUE: {
19
10
  BOTTOM_SHEET2: number;
20
11
  POPOVER: number;
21
12
  ALERT: number;
13
+ ABOVE_KEYBOARD: number;
22
14
  SNACKBAR: number;
23
15
  LOADING: number;
24
16
  };
@@ -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;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,GAAI,OAAO,MAAM,EAAE,QAAQ,MAAM,EAAE,cAAc,MAAM,WAIlF,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,OAAO,EAAE,EAAE,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,KAAG,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,IAAI,CAE5G,CAAC;AAEF,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;;;;;;;;;;;;CAYzB,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;;;;;;;;;;;;;CAazB,CAAC"}
@@ -1,18 +1,3 @@
1
- /**
2
- * 사각형의 너비와 높이에 따라 비슷한 비율의 테두리 반지름을 계산합니다.
3
- * @param width 사각형의 너비입니다.
4
- * @param height 사각형의 높이입니다.
5
- * @param borderRadius 기본 테두리 반지름입니다.
6
- * @returns 계산된 테두리 반지름입니다.
7
- */
8
- export const calculateRadius = (width, height, borderRadius) => {
9
- const radiusRatio = Math.max((width / height), (height / width));
10
- const calc = borderRadius * (radiusRatio > 1 ? radiusRatio / 2 : radiusRatio);
11
- return calc;
12
- };
13
- export const withPromise = (fn) => {
14
- return (...args) => { void fn(...args); };
15
- };
16
1
  export const extractStyle = (style, attribute) => {
17
2
  if (Array.isArray(style)) {
18
3
  const foundStyle = style.find(item => typeof item === 'object' && item !== null && attribute in item);
@@ -33,7 +18,8 @@ export const Z_INDEX_VALUE = {
33
18
  BOTTOM_SHEET2: 8102,
34
19
  POPOVER: 8200,
35
20
  ALERT: 8300,
36
- SNACKBAR: 8400,
21
+ ABOVE_KEYBOARD: 8400,
22
+ SNACKBAR: 8500,
37
23
  LOADING: 8999,
38
24
  };
39
25
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/model/utils.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAa,EAAE,MAAc,EAAE,YAAoB,EAAE,EAAE;IACnF,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG,MAAM,CAAC,EAAE,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC;IACjE,MAAM,IAAI,GAAG,YAAY,GAAG,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;IAC9E,OAAO,IAAI,CAAC;AAChB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAsB,EAAoC,EAA0B,EAAE;IAC7G,OAAO,CAAC,GAAG,IAAI,EAAE,EAAE,GAAG,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC,CAAA,CAAC,CAAC,CAAC;AAC7C,CAAC,CAAC;AAEF,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,KAAK,EAAE,IAAI;IACX,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,IAAI;CAChB,CAAC","sourcesContent":["import { StyleProp, TextStyle } from \"react-native\";\n\n/**\n * 사각형의 너비와 높이에 따라 비슷한 비율의 테두리 반지름을 계산합니다.\n * @param width 사각형의 너비입니다.\n * @param height 사각형의 높이입니다.\n * @param borderRadius 기본 테두리 반지름입니다.\n * @returns 계산된 테두리 반지름입니다.\n */\nexport const calculateRadius = (width: number, height: number, borderRadius: number) => {\n const radiusRatio = Math.max((width / height), (height / width));\n const calc = borderRadius * (radiusRatio > 1 ? radiusRatio / 2 : radiusRatio);\n return calc;\n};\n\nexport const withPromise = <T extends unknown[]>(fn: (...args: T) => Promise<unknown>): ((...args: T) => void) => {\n return (...args) => { void fn(...args) };\n};\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 ALERT: 8300,\n SNACKBAR: 8400,\n LOADING: 8999,\n};\n"]}
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,KAAK,EAAE,IAAI;IACX,cAAc,EAAE,IAAI;IACpB,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,IAAI;CAChB,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 ALERT: 8300,\n ABOVE_KEYBOARD: 8400,\n SNACKBAR: 8500,\n LOADING: 8999,\n};\n"]}
@@ -0,0 +1,4 @@
1
+ import { ShowAboveKeyboardProps } from "../../model/types";
2
+ declare function AboveKeyboard({ render, }: ShowAboveKeyboardProps): import("react").JSX.Element | null;
3
+ export default AboveKeyboard;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/overlay/AboveKeyboard/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAI3D,iBAAS,aAAa,CAAC,EACrB,MAAM,GACP,EAAE,sBAAsB,sCA+BxB;AAED,eAAe,aAAa,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { useEffect, useState } from "react";
2
+ import { Keyboard, Platform, StyleSheet } from "react-native";
3
+ import Animated, { FadeInDown, FadeOutDown } from "react-native-reanimated";
4
+ import { useAboveKeyboard } from "../../model/useOverlay";
5
+ import { Z_INDEX_VALUE } from "../../model/utils";
6
+ function AboveKeyboard({ render, }) {
7
+ const [bottomValue, setBottomValue] = useState(0);
8
+ const [isKeyboardVisible, setIsKeyboardVisible] = useState(false);
9
+ const { aboveKeyboardVisible, marginBottom } = useAboveKeyboard();
10
+ useEffect(() => {
11
+ const showEvent = Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow';
12
+ const hideEvent = Platform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide';
13
+ const keyboardShowSubscription = Keyboard.addListener(showEvent, (event) => {
14
+ setBottomValue(Platform.OS === 'ios' ? event.endCoordinates.height : 0);
15
+ setIsKeyboardVisible(true);
16
+ });
17
+ const keyboardHideSubscription = Keyboard.addListener(hideEvent, () => {
18
+ setIsKeyboardVisible(false);
19
+ });
20
+ return () => {
21
+ keyboardShowSubscription.remove();
22
+ keyboardHideSubscription.remove();
23
+ };
24
+ }, []);
25
+ return (aboveKeyboardVisible && isKeyboardVisible ?
26
+ <Animated.View entering={FadeInDown.duration(600)} exiting={FadeOutDown} style={[styles.container, { bottom: bottomValue + marginBottom }]}>
27
+ {render()}
28
+ </Animated.View>
29
+ : null);
30
+ }
31
+ export default AboveKeyboard;
32
+ const styles = StyleSheet.create({
33
+ container: {
34
+ position: 'absolute',
35
+ justifyContent: 'center',
36
+ alignItems: 'center',
37
+ zIndex: Z_INDEX_VALUE.ABOVE_KEYBOARD,
38
+ width: '100%',
39
+ },
40
+ });
41
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/overlay/AboveKeyboard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,QAAQ,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,SAAS,aAAa,CAAC,EACrB,MAAM,GACiB;IACvB,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAClD,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;I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,CACX;MAAA,EAAE,QAAQ,CAAC,IAAI,CAAC;QAChB,CAAC,CAAC,IAAI,CACT,CAAC;AACJ,CAAC;AAED,eAAe,aAAa,CAAC;AAE7B,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,QAAQ,EAAE,UAAU;QACpB,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,MAAM,EAAE,aAAa,CAAC,cAAc;QACpC,KAAK,EAAE,MAAM;KACd;CACF,CAAC,CAAC","sourcesContent":["import { useEffect, useState } from \"react\";\nimport { Keyboard, Platform, StyleSheet } from \"react-native\";\nimport Animated, { FadeInDown, FadeOutDown } from \"react-native-reanimated\";\nimport { ShowAboveKeyboardProps } from \"../../model/types\";\nimport { useAboveKeyboard } from \"../../model/useOverlay\";\nimport { Z_INDEX_VALUE } from \"../../model/utils\";\n\nfunction AboveKeyboard({\n render,\n}: ShowAboveKeyboardProps) {\n const [bottomValue, setBottomValue] = useState(0);\n const [isKeyboardVisible, setIsKeyboardVisible] = useState(false);\n const { aboveKeyboardVisible, marginBottom } = useAboveKeyboard();\n\n useEffect(() => {\n const showEvent = Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow';\n const hideEvent = Platform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide';\n\n const keyboardShowSubscription = Keyboard.addListener(showEvent, (event) => {\n setBottomValue(Platform.OS === 'ios' ? event.endCoordinates.height : 0)\n setIsKeyboardVisible(true);\n });\n\n const keyboardHideSubscription = Keyboard.addListener(hideEvent, () => {\n setIsKeyboardVisible(false);\n });\n\n return () => {\n keyboardShowSubscription.remove();\n keyboardHideSubscription.remove();\n };\n }, []);\n\n return (\n aboveKeyboardVisible && isKeyboardVisible ?\n <Animated.View entering={FadeInDown.duration(600)} exiting={FadeOutDown} style={[styles.container, { bottom: bottomValue + marginBottom }]}>\n {render()}\n </Animated.View>\n : null\n );\n}\n\nexport default AboveKeyboard;\n\nconst styles = StyleSheet.create({\n container: {\n position: 'absolute',\n justifyContent: 'center',\n alignItems: 'center',\n zIndex: Z_INDEX_VALUE.ABOVE_KEYBOARD,\n width: '100%',\n },\n});"]}
@@ -115,6 +115,11 @@ export interface TypographyVariantsProps extends TypographyVariants {
115
115
  }
116
116
  export type TypoStyle = 'heading' | 'title' | 'subTitle' | 'label' | 'body' | 'caption';
117
117
  export type TypoOptions = 'heading.1' | 'heading.2' | 'heading.3' | 'heading.4' | 'heading.5' | 'heading.6' | 'title.1' | 'title.2' | 'title.3' | 'title.4' | 'title.5' | 'title.6' | 'subTitle.1' | 'subTitle.2' | 'subTitle.3' | 'subTitle.4' | 'subTitle.5' | 'subTitle.6' | 'body.1' | 'body.2' | 'body.3' | 'body.4' | 'body.5' | 'body.6' | 'label.1' | 'label.2' | 'label.3' | 'label.4' | 'label.5' | 'label.6' | 'caption.1' | 'caption.2' | 'caption.3' | 'caption.4' | 'caption.5' | 'caption.6';
118
+ export type CommonColorOptions = 'danger' | 'danger.5' | 'danger.10' | 'danger.20' | 'danger.30' | 'danger.40' | 'danger.50' | 'danger.60' | 'danger.70' | 'danger.80' | 'danger.90' | 'danger.100' | 'warning' | 'warning.5' | 'warning.10' | 'warning.20' | 'warning.30' | 'warning.40' | 'warning.50' | 'warning.60' | 'warning.70' | 'warning.80' | 'warning.90' | 'warning.100' | 'success' | 'success.5' | 'success.10' | 'success.20' | 'success.30' | 'success.40' | 'success.50' | 'success.60' | 'success.70' | 'success.80' | 'success.90' | 'success.100' | 'information' | 'information.5' | 'information.10' | 'information.20' | 'information.30' | 'information.40' | 'information.50' | 'information.60' | 'information.70' | 'information.80' | 'information.90' | 'information.100' | 'grey.5' | 'grey.10' | 'grey.20' | 'grey.30' | 'grey.40' | 'grey.50' | 'grey.60' | 'grey.70' | 'grey.80' | 'grey.90' | 'grey.100';
118
119
  export type TypoSubStyle = '1' | '2' | '3' | '4' | '5' | '6';
119
- export type TextColorOptions = 'primary' | 'secondary' | 'disabled' | 'danger' | 'warning' | 'success' | 'information' | 'white' | 'black';
120
+ export type TypoColor = 'primary' | 'secondary' | 'disabled' | 'danger' | 'warning' | 'success' | 'information' | 'white' | 'black';
121
+ export type ViewColor = 'layer1' | 'layer2' | 'neutral' | 'base' | 'danger' | 'warning' | 'success' | 'information';
122
+ export type TypoColorOptions = 'primary' | 'secondary' | 'disabled' | 'white' | 'black' | CommonColorOptions;
123
+ export type SubColorOptions = undefined | '0' | '5' | '10' | '20' | '30' | '40' | '50' | '60' | '70' | '80' | '90' | '100';
124
+ export type ViewColorOptions = 'layer1' | 'layer2' | 'neutral' | 'base' | CommonColorOptions;
120
125
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/theme/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,MAAM,MAAM,YAAY,GAAG;IACzB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG;IAC9C,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CA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IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;AAE3H,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,kBAAkB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/theme/types.ts"],"names":[],"mappings":"AAoGC,CAAC;AAYD,CAAC;AAaD,CAAC","sourcesContent":["import { TextProps } from \"react-native\";\n\nexport type ColorPalette = {\n 0: string;\n 5: string;\n 10: string; // p-lighter\n 20: string; // p-light\n 30: string;\n 40: string;\n 50: string; // p-main\n 60: string; // p-dark\n 70: string; // p-darker\n 80: string;\n 90: string;\n 100: string;\n main: string;\n};\n\nexport type ColorPaletteExtend = ColorPalette & {\n lighter: string;\n light: string;\n dark: string;\n darker: string;\n};\n\nexport interface ThemeTextType {\n main: string;\n primary: string;\n secondary: string;\n disabled: string;\n danger: string;\n warning: string;\n success: string;\n information: string;\n white: string;\n black: string;\n}\n\nexport interface ThemeBorderType {\n box: string;\n active: string;\n base: string;\n danger: string;\n warning: string;\n success: string;\n information: string;\n}\n\nexport interface ThemeBackground {\n layer1: string;\n layer2: string;\n neutral: string;\n base: string;\n danger: string;\n warning: string;\n success: string;\n information: string;\n}\n\nexport interface MainColors {\n primary: string;\n secondary: string;\n danger: string;\n warning: string;\n success: string;\n information: string;\n grey: string;\n}\n\nexport interface Theme {\n mode: 'light' | 'dark';\n primary: ColorPaletteExtend;\n secondary: ColorPalette;\n danger: ColorPalette;\n warning: ColorPalette;\n success: ColorPalette;\n information: ColorPalette;\n grey: ColorPalette;\n text: ThemeTextType;\n border: ThemeBorderType;\n background: ThemeBackground;\n action: {\n hover: string;\n pressed: string;\n disable: string;\n };\n divider: string;\n elevationShadow: string[];\n modalBgColor: string;\n mainColor: MainColors;\n}\n\nexport interface TypographyVariants {\n themeFonts?: ThemeFonts;\n heading: TypoNumber;\n label: TypoNumber;\n title: TypoNumber;\n subTitle: TypoNumber;\n body: TypoNumber;\n caption: TypoNumber;\n};\n\nexport interface ThemeFonts {\n 100?: string;\n 200?: string;\n 300?: string;\n 400: string;\n 500?: string;\n 600?: string;\n 700: string;\n 800?: string;\n 900?: string;\n};\n\nexport interface TypoNumber {\n '1': TextProps['style'];\n '2': TextProps['style'];\n '3': TextProps['style'];\n '4': TextProps['style'];\n '5': TextProps['style'];\n '6': TextProps['style'];\n}\n\nexport interface TypographyVariantsProps extends TypographyVariants {\n themeFonts?: ThemeFonts;\n};\n\nexport type TypoStyle = 'heading' | 'title' | 'subTitle' | 'label' | 'body' | 'caption';\n\nexport type TypoOptions =\n 'heading.1' |\n 'heading.2' |\n 'heading.3' |\n 'heading.4' |\n 'heading.5' |\n 'heading.6' |\n 'title.1' |\n 'title.2' |\n 'title.3' |\n 'title.4' |\n 'title.5' |\n 'title.6' |\n 'subTitle.1' |\n 'subTitle.2' |\n 'subTitle.3' |\n 'subTitle.4' |\n 'subTitle.5' |\n 'subTitle.6' |\n 'body.1' |\n 'body.2' |\n 'body.3' |\n 'body.4' |\n 'body.5' |\n 'body.6' |\n 'label.1' |\n 'label.2' |\n 'label.3' |\n 'label.4' |\n 'label.5' |\n 'label.6' |\n 'caption.1' |\n 'caption.2' |\n 'caption.3' |\n 'caption.4' |\n 'caption.5' |\n 'caption.6';\n\nexport type TypoSubStyle = '1' | '2' | '3' | '4' | '5' | '6';\n\nexport type TextColorOptions = 'primary' | 'secondary' | 'disabled' | 'danger' | 'warning' | 'success' | 'information' | 'white' | 'black';\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/theme/types.ts"],"names":[],"mappings":"AAoGC,CAAC;AAYD,CAAC;AAaD,CAAC","sourcesContent":["import { TextProps } from \"react-native\";\n\nexport type ColorPalette = {\n 0: string;\n 5: string;\n 10: string; // p-lighter\n 20: string; // p-light\n 30: string;\n 40: string;\n 50: string; // p-main\n 60: string; // p-dark\n 70: string; // p-darker\n 80: string;\n 90: string;\n 100: string;\n main: string;\n};\n\nexport type ColorPaletteExtend = ColorPalette & {\n lighter: string;\n light: string;\n dark: string;\n darker: string;\n};\n\nexport interface ThemeTextType {\n main: string;\n primary: string;\n secondary: string;\n disabled: string;\n danger: string;\n warning: string;\n success: string;\n information: string;\n white: string;\n black: string;\n}\n\nexport interface ThemeBorderType {\n box: string;\n active: string;\n base: string;\n danger: string;\n warning: string;\n success: string;\n information: string;\n}\n\nexport interface ThemeBackground {\n layer1: string;\n layer2: string;\n neutral: string;\n base: string;\n danger: string;\n warning: string;\n success: string;\n information: string;\n}\n\nexport interface MainColors {\n primary: string;\n secondary: string;\n danger: string;\n warning: string;\n success: string;\n information: string;\n grey: string;\n}\n\nexport interface Theme {\n mode: 'light' | 'dark';\n primary: ColorPaletteExtend;\n secondary: ColorPalette;\n danger: ColorPalette;\n warning: ColorPalette;\n success: ColorPalette;\n information: ColorPalette;\n grey: ColorPalette;\n text: ThemeTextType;\n border: ThemeBorderType;\n background: ThemeBackground;\n action: {\n hover: string;\n pressed: string;\n disable: string;\n };\n divider: string;\n elevationShadow: string[];\n modalBgColor: string;\n mainColor: MainColors;\n}\n\nexport interface TypographyVariants {\n themeFonts?: ThemeFonts;\n heading: TypoNumber;\n label: TypoNumber;\n title: TypoNumber;\n subTitle: TypoNumber;\n body: TypoNumber;\n caption: TypoNumber;\n};\n\nexport interface ThemeFonts {\n 100?: string;\n 200?: string;\n 300?: string;\n 400: string;\n 500?: string;\n 600?: string;\n 700: string;\n 800?: string;\n 900?: string;\n};\n\nexport interface TypoNumber {\n '1': TextProps['style'];\n '2': TextProps['style'];\n '3': TextProps['style'];\n '4': TextProps['style'];\n '5': TextProps['style'];\n '6': TextProps['style'];\n}\n\nexport interface TypographyVariantsProps extends TypographyVariants {\n themeFonts?: ThemeFonts;\n};\n\nexport type TypoStyle = 'heading' | 'title' | 'subTitle' | 'label' | 'body' | 'caption';\n\nexport type TypoOptions =\n 'heading.1' |\n 'heading.2' |\n 'heading.3' |\n 'heading.4' |\n 'heading.5' |\n 'heading.6' |\n 'title.1' |\n 'title.2' |\n 'title.3' |\n 'title.4' |\n 'title.5' |\n 'title.6' |\n 'subTitle.1' |\n 'subTitle.2' |\n 'subTitle.3' |\n 'subTitle.4' |\n 'subTitle.5' |\n 'subTitle.6' |\n 'body.1' |\n 'body.2' |\n 'body.3' |\n 'body.4' |\n 'body.5' |\n 'body.6' |\n 'label.1' |\n 'label.2' |\n 'label.3' |\n 'label.4' |\n 'label.5' |\n 'label.6' |\n 'caption.1' |\n 'caption.2' |\n 'caption.3' |\n 'caption.4' |\n 'caption.5' |\n 'caption.6';\n\nexport type CommonColorOptions = 'danger' | 'danger.5' | 'danger.10' | 'danger.20' | 'danger.30' | 'danger.40' | 'danger.50' | 'danger.60' | 'danger.70' | 'danger.80' | 'danger.90' | 'danger.100'\n| 'warning' | 'warning.5' | 'warning.10' | 'warning.20' | 'warning.30' | 'warning.40' | 'warning.50' | 'warning.60' | 'warning.70' | 'warning.80' | 'warning.90' | 'warning.100'\n| 'success' | 'success.5' | 'success.10' | 'success.20' | 'success.30' | 'success.40' | 'success.50' | 'success.60' | 'success.70' | 'success.80' | 'success.90' | 'success.100'\n| 'information' | 'information.5' | 'information.10' | 'information.20' | 'information.30' | 'information.40' | 'information.50' | 'information.60' | 'information.70' | 'information.80' | 'information.90' | 'information.100'\n| 'grey.5' | 'grey.10' | 'grey.20' | 'grey.30' | 'grey.40' | 'grey.50' | 'grey.60' | 'grey.70' | 'grey.80' | 'grey.90' | 'grey.100';\n\nexport type TypoSubStyle = '1' | '2' | '3' | '4' | '5' | '6';\n\nexport type TypoColor = 'primary' | 'secondary' | 'disabled' | 'danger' | 'warning' | 'success' | 'information' | 'white' | 'black';\n\nexport type ViewColor = 'layer1' | 'layer2' | 'neutral' | 'base' | 'danger' | 'warning' | 'success' | 'information';\n\nexport type TypoColorOptions = 'primary' | 'secondary' | 'disabled' | 'white' | 'black' | CommonColorOptions;\n\nexport type SubColorOptions = undefined | '0' | '5' | '10' | '20' | '30' | '40' | '50' | '60' | '70' | '80' | '90' | '100';\n\nexport type ViewColorOptions = 'layer1' | 'layer2' | 'neutral' | 'base' | CommonColorOptions;"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/ZSPressable/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAC3C,OAAO,EAA4B,SAAS,EAAE,MAAM,cAAc,CAAC;AAGnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAI5C,UAAU,gBAAiB,SAAQ,SAAS;IAC1C,OAAO,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IAC/B,WAAW,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IACpC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,6BAA6B,CAAC,EAAE,MAAM,CAAC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,WAAW,CAAC;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,iBAAS,WAAW,CAAC,EACnB,OAAO,EACP,WAAW,EACX,WAAkB,EAClB,sBAAmD,EACnD,6BAAkC,EAClC,IAAI,EACJ,QAAQ,EACR,cAAkB,EAClB,SAAiB,EACjB,GAAG,KAAK,EACT,EAAE,gBAAgB,qBAgDlB;AAED,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/ZSPressable/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAC3C,OAAO,EAA4B,SAAS,EAAE,MAAM,cAAc,CAAC;AAGnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAI5C,UAAU,gBAAiB,SAAQ,SAAS;IAC1C,OAAO,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IAC/B,WAAW,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IACpC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,6BAA6B,CAAC,EAAE,MAAM,CAAC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,WAAW,CAAC;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,iBAAS,WAAW,CAAC,EACnB,OAAO,EACP,WAAW,EACX,WAAkB,EAClB,sBAAmD,EACnD,6BAAkC,EAClC,IAAI,EACJ,QAAQ,EACR,cAAc,EACd,SAAiB,EACjB,GAAG,KAAK,EACT,EAAE,gBAAgB,qBAgDlB;AAED,eAAe,WAAW,CAAC"}
@@ -3,7 +3,7 @@ import { Pressable } from "react-native";
3
3
  import Animated, { interpolate, useAnimatedStyle, useSharedValue, withTiming, runOnJS } from "react-native-reanimated";
4
4
  import AnimatedWrapper from "../atoms/AnimatedWrapper";
5
5
  const DEFAULT_DURATION = { duration: 100 };
6
- function ZSPressable({ onPress, onLongPress, isAnimation = true, pressedBackgroundColor = 'rgba(180, 180, 180, 0.1)', pressedBackgroundBorderRadius = 16, flex, minWidth, elevationLevel = 0, fullWidth = false, ...props }) {
6
+ function ZSPressable({ onPress, onLongPress, isAnimation = true, pressedBackgroundColor = 'rgba(180, 180, 180, 0.1)', pressedBackgroundBorderRadius = 16, flex, minWidth, elevationLevel, fullWidth = false, ...props }) {
7
7
  const isButtonPress = useSharedValue(0);
8
8
  const boxAnimation = useAnimatedStyle(() => {
9
9
  const scale = interpolate(isButtonP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CAAC,CAAC,CAAC,CAAC;QACxC,CAAC,CAAC,EAAE,CAAC;QACL,OAAO;YACL,eAAe,EAAE,OAAO,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,aAAa;YACjE,YAAY,EAAE,6BAA6B;YAC3C,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;YAC1B,QAAQ,EAAE,QAAQ;YAClB,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAsC;SAC1E,CAAC;IACJ,CAAC,EACD,CAAC,sBAAsB,EAAE,6BAA6B,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,CAAC,CACnF,CAAC;IAEF,OAAO,CACL,CAAC,SAAS,CACR,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,KAAK,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAElD;MAAA,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CACjC;QAAA,CAAC,eAAe,CACd,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,cAAc,CAAC,CAAC,cAAc,CAAC,CAC/B,KAAK,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAEnB;UAAA,CAAC,KAAK,CAAC,QAAQ,CACjB;QAAA,EAAE,eAAe,CACnB;MAAA,EAAE,QAAQ,CAAC,IAAI,CACjB;IAAA,EAAE,SAAS,CAAC,CACb,CAAC;AACJ,CAAC;AAED,eAAe,WAAW,CAAC","sourcesContent":["import React, { useCallback } from \"react\";\nimport { FlexAlignType, Pressable, ViewProps } from \"react-native\";\nimport Animated, { interpolate, useAnimatedStyle, useSharedValue, withTiming, runOnJS } from \"react-native-reanimated\";\nimport AnimatedWrapper from \"../atoms/AnimatedWrapper\";\nimport type { ShadowLevel } from \"../types\";\n\nconst DEFAULT_DURATION = { duration: 100 };\n\ninterface ZSPressableProps extends ViewProps {\n onPress: (value?: any) => void;\n onLongPress?: (value?: any) => void;\n pressedBackgroundColor?: string;\n pressedBackgroundBorderRadius?: number;\n flex?: number;\n minWidth?: number;\n isAnimation?: boolean;\n elevationLevel?: ShadowLevel;\n fullWidth?: boolean;\n}\n\nfunction ZSPressable({\n onPress,\n onLongPress,\n isAnimation = true,\n pressedBackgroundColor = 'rgba(180, 180, 180, 0.1)',\n pressedBackgroundBorderRadius = 16,\n flex,\n minWidth,\n elevationLevel = 0,\n fullWidth = false,\n ...props\n}: ZSPressableProps) {\n const isButtonPress = useSharedValue(0);\n\n const boxAnimation = useAnimatedStyle(() => {\n const scale = interpolate(\n isButtonPress.value,\n [0, 1],\n [1, 0.96],\n 'clamp'\n );\n return {\n transform: [{ scale: withTiming(scale, DEFAULT_DURATION) }],\n };\n }, []);\n\n const handlePressStyle = useCallback(\n (pressed: boolean) => {\n runOnJS(() => {\n isButtonPress.value = pressed ? 1 : 0;\n })();\n return {\n backgroundColor: pressed ? pressedBackgroundColor : 'transparent',\n borderRadius: pressedBackgroundBorderRadius,\n flex: fullWidth ? 1 : flex,\n minWidth: minWidth,\n alignSelf: fullWidth ? 'stretch' : undefined as FlexAlignType | undefined,\n };\n },\n [pressedBackgroundColor, pressedBackgroundBorderRadius, flex, minWidth, fullWidth]\n );\n\n return (\n <Pressable\n onPress={onPress}\n onLongPress={onLongPress}\n style={({ pressed }) => handlePressStyle(pressed)}\n >\n <Animated.View style={boxAnimation}>\n <AnimatedWrapper\n isAnimation={isAnimation}\n elevationLevel={elevationLevel}\n style={props.style}\n >\n {props.children}\n </AnimatedWrapper>\n </Animated.View>\n </Pressable>\n );\n}\n\nexport default ZSPressable;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/ZSPressable/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MA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EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;YAC1B,QAAQ,EAAE,QAAQ;YAClB,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAsC;SAC1E,CAAC;IACJ,CAAC,EACD,CAAC,sBAAsB,EAAE,6BAA6B,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,CAAC,CACnF,CAAC;IAEF,OAAO,CACL,CAAC,SAAS,CACR,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,KAAK,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAElD;MAAA,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CACjC;QAAA,CAAC,eAAe,CACd,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,cAAc,CAAC,CAAC,cAAc,CAAC,CAC/B,KAAK,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAEnB;UAAA,CAAC,KAAK,CAAC,QAAQ,CACjB;QAAA,EAAE,eAAe,CACnB;MAAA,EAAE,QAAQ,CAAC,IAAI,CACjB;IAAA,EAAE,SAAS,CAAC,CACb,CAAC;AACJ,CAAC;AAED,eAAe,WAAW,CAAC","sourcesContent":["import React, { useCallback } from \"react\";\nimport { FlexAlignType, Pressable, ViewProps } from \"react-native\";\nimport Animated, { interpolate, useAnimatedStyle, useSharedValue, withTiming, runOnJS } from \"react-native-reanimated\";\nimport AnimatedWrapper from \"../atoms/AnimatedWrapper\";\nimport type { ShadowLevel } from \"../types\";\n\nconst DEFAULT_DURATION = { duration: 100 };\n\ninterface ZSPressableProps extends ViewProps {\n onPress: (value?: any) => void;\n onLongPress?: (value?: any) => void;\n pressedBackgroundColor?: string;\n pressedBackgroundBorderRadius?: number;\n flex?: number;\n minWidth?: number;\n isAnimation?: boolean;\n elevationLevel?: ShadowLevel;\n fullWidth?: boolean;\n}\n\nfunction ZSPressable({\n onPress,\n onLongPress,\n isAnimation = true,\n pressedBackgroundColor = 'rgba(180, 180, 180, 0.1)',\n pressedBackgroundBorderRadius = 16,\n flex,\n minWidth,\n elevationLevel,\n fullWidth = false,\n ...props\n}: ZSPressableProps) {\n const isButtonPress = useSharedValue(0);\n\n const boxAnimation = useAnimatedStyle(() => {\n const scale = interpolate(\n isButtonPress.value,\n [0, 1],\n [1, 0.96],\n 'clamp'\n );\n return {\n transform: [{ scale: withTiming(scale, DEFAULT_DURATION) }],\n };\n }, []);\n\n const handlePressStyle = useCallback(\n (pressed: boolean) => {\n runOnJS(() => {\n isButtonPress.value = pressed ? 1 : 0;\n })();\n return {\n backgroundColor: pressed ? pressedBackgroundColor : 'transparent',\n borderRadius: pressedBackgroundBorderRadius,\n flex: fullWidth ? 1 : flex,\n minWidth: minWidth,\n alignSelf: fullWidth ? 'stretch' : undefined as FlexAlignType | undefined,\n };\n },\n [pressedBackgroundColor, pressedBackgroundBorderRadius, flex, minWidth, fullWidth]\n );\n\n return (\n <Pressable\n onPress={onPress}\n onLongPress={onLongPress}\n style={({ pressed }) => handlePressStyle(pressed)}\n >\n <Animated.View style={boxAnimation}>\n <AnimatedWrapper\n isAnimation={isAnimation}\n elevationLevel={elevationLevel}\n style={props.style}\n >\n {props.children}\n </AnimatedWrapper>\n </Animated.View>\n </Pressable>\n );\n}\n\nexport default ZSPressable;\n"]}
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import { TextProps } from "react-native/types";
3
- import { TypoOptions, TextColorOptions } from "../../theme/types";
3
+ import { TypoOptions, TypoColorOptions } from "../../theme/types";
4
4
  export interface ZSTextProps extends TextProps {
5
5
  typo?: TypoOptions;
6
- color?: TextColorOptions;
6
+ color?: TypoColorOptions;
7
7
  }
8
8
  declare function ZSText({ typo, color, ...props }: ZSTextProps): React.JSX.Element;
9
9
  declare const _default: React.MemoExoticComponent<typeof ZSText>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/ZSText/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,WAAW,EAAa,gBAAgB,EAAgB,MAAM,mBAAmB,CAAC;AAG3F,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC1C,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,KAAK,CAAC,EAAE,gBAAgB,CAAC;CAC5B;AAED,iBAAS,MAAM,CAAC,EACd,IAAe,EACf,KAAiB,EACjB,GAAG,KAAK,EACT,EAAE,WAAW,qBAIb;;AAED,wBAA4B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/ZSText/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,WAAW,EAAa,gBAAgB,EAA4C,MAAM,mBAAmB,CAAC;AAGvH,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC1C,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,KAAK,CAAC,EAAE,gBAAgB,CAAC;CAC5B;AAED,iBAAS,MAAM,CAAC,EACd,IAAe,EACf,KAAiB,EACjB,GAAG,KAAK,EACT,EAAE,WAAW,qBAKb;;AAED,wBAA4B"}
@@ -4,7 +4,8 @@ import TextAtom from "../atoms/TextAtom";
4
4
  function ZSText({ typo = 'body.2', color = 'primary', ...props }) {
5
5
  const { palette, typography } = useTheme();
6
6
  const [s01, s02] = typo.split('.');
7
- return <TextAtom {...props} style={[typography[s01][s02], { color: palette.text[color] }, props.style]}>{props.children}</TextAtom>;
7
+ const [c01, c02] = color.split('.');
8
+ return <TextAtom {...props} style={[typography[s01][s02], { color: c02 ? palette[c01][c02] : palette.text[c01] }, props.style]}>{props.children}</TextAtom>;
8
9
  }
9
10
  export default memo(ZSText);
10
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/ZSText/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,QAAQ,MAAM,mBAAmB,CAAA;AAOxC,SAAS,MAAM,CAAC,EACd,IAAI,GAAG,QAAQ,EACf,KAAK,GAAG,SAAS,EACjB,GAAG,KAAK,EACI;IACV,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC3C,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAA8B,CAAC;IAChE,OAAO,CAAC,QAAQ,CAAC,IAAI,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAA;AACvI,CAAC;AAED,eAAe,IAAI,CAAC,MAAM,CAAC,CAAC","sourcesContent":["import React, { memo } from 'react';\nimport { TextProps } from \"react-native/types\";\nimport { useTheme } from \"../../model/useThemeProvider\";\nimport { TypoOptions, TypoStyle, TextColorOptions, TypoSubStyle } from \"../../theme/types\";\nimport TextAtom from \"../atoms/TextAtom\"\n\nexport interface ZSTextProps extends TextProps {\n typo?: TypoOptions;\n color?: TextColorOptions;\n}\n\nfunction ZSText({\n typo = 'body.2',\n color = 'primary',\n ...props\n}: ZSTextProps) {\n const { palette, typography } = useTheme();\n const [s01, s02] = typo.split('.') as [TypoStyle, TypoSubStyle];\n return <TextAtom {...props} style={[typography[s01][s02], { color: palette.text[color] }, props.style]}>{props.children}</TextAtom>\n}\n\nexport default memo(ZSText);\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/ZSText/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,QAAQ,MAAM,mBAAmB,CAAA;AAOxC,SAAS,MAAM,CAAC,EACd,IAAI,GAAG,QAAQ,EACf,KAAK,GAAG,SAAS,EACjB,GAAG,KAAK,EACI;IACV,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC3C,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAA8B,CAAC;IAChE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAiC,CAAC;IACpE,OAAO,CAAC,QAAQ,CAAC,IAAI,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAA;AAC/J,CAAC;AAED,eAAe,IAAI,CAAC,MAAM,CAAC,CAAC","sourcesContent":["import React, { memo } from 'react';\nimport { TextProps } from \"react-native/types\";\nimport { useTheme } from \"../../model/useThemeProvider\";\nimport { TypoOptions, TypoStyle, TypoColorOptions, TypoSubStyle, TypoColor, SubColorOptions } from \"../../theme/types\";\nimport TextAtom from \"../atoms/TextAtom\"\n\nexport interface ZSTextProps extends TextProps {\n typo?: TypoOptions;\n color?: TypoColorOptions;\n}\n\nfunction ZSText({\n typo = 'body.2',\n color = 'primary',\n ...props\n}: ZSTextProps) {\n const { palette, typography } = useTheme();\n const [s01, s02] = typo.split('.') as [TypoStyle, TypoSubStyle];\n const [c01, c02] = color.split('.') as [TypoColor, SubColorOptions];\n return <TextAtom {...props} style={[typography[s01][s02], { color: c02 ? palette[c01][c02] : palette.text[c01] }, props.style]}>{props.children}</TextAtom>\n}\n\nexport default memo(ZSText);\n"]}
@@ -1,9 +1,11 @@
1
1
  import React from 'react';
2
2
  import { ViewProps } from 'react-native';
3
3
  import { ShadowLevel } from '../types';
4
+ import { ViewColorOptions } from '../../theme';
4
5
  type Props = ViewProps & {
5
6
  isAnimation?: boolean;
6
7
  elevationLevel?: ShadowLevel;
8
+ color?: ViewColorOptions;
7
9
  };
8
10
  declare const _default: React.NamedExoticComponent<Props>;
9
11
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/ZSView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAc,MAAM,cAAc,CAAC;AAGrD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,KAAK,KAAK,GAAG,SAAS,GAAG;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,WAAW,CAAC;CAC9B,CAAC;;AAsBF,wBAA4B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/ZSView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAc,MAAM,cAAc,CAAC;AAGrD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,KAAK,KAAK,GAAG,SAAS,GAAG;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,WAAW,CAAC;IAC7B,KAAK,CAAC,EAAE,gBAAgB,CAAC;CAC1B,CAAC;;AAsBF,wBAA4B"}
@@ -2,14 +2,14 @@ import React, { memo, useMemo } from 'react';
2
2
  import { StyleSheet } from 'react-native';
3
3
  import { useTheme } from '../../model/useThemeProvider';
4
4
  import AnimatedWrapper from '../atoms/AnimatedWrapper';
5
- const ZSView = ({ isAnimation = false, elevationLevel = 0, style, children, ...rest }) => {
5
+ const ZSView = ({ isAnimation = false, elevationLevel = 0, style, children, color, ...rest }) => {
6
6
  const { palette } = useTheme();
7
7
  const styles = useMemo(() => StyleSheet.create({
8
8
  container: {
9
9
  backgroundColor: palette.background.base,
10
10
  },
11
11
  }), [palette.background.base]);
12
- return (<AnimatedWrapper isAnimation={isAnimation} elevationLevel={elevationLevel} style={[styles.container, style]} {...rest}>
12
+ return (<AnimatedWrapper color={color} isAnimation={isAnimation} elevationLevel={elevationLevel} style={[styles.container, style]} {...rest}>
13
13
  {children}
14
14
  </AnimatedWrapper>);
15
15
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/ZSView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAa,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,eAAe,MAAM,0BAA0B,CAAC;AAQvD,MAAM,MAAM,GAAoB,CAAC,EAAE,WAAW,GAAG,KAAK,EAAE,cAAc,GAAG,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IACxG,MAAM,EAAE,OAAO,EAAE,GAAG,QAAQ,EAAE,CAAC;IAE/B,MAAM,MAAM,GAAG,OAAO,CACpB,GAAG,EAAE,CACH,UAAU,CAAC,MAAM,CAAC;QAChB,SAAS,EAAE;YACT,eAAe,EAAE,OAAO,CAAC,UAAU,CAAC,IAAI;SACzC;KACF,CAAC,EACJ,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAC1B,CAAC;IAEF,OAAO,CACL,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC,WAAW,CAAC,CAAC,cAAc,CAAC,CAAC,cAAc,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CACpH;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,eAAe,CAAC,CACnB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC,MAAM,CAAC,CAAC","sourcesContent":["import React, { memo, useMemo } from 'react';\nimport { ViewProps, StyleSheet } from 'react-native';\nimport { useTheme } from '../../model/useThemeProvider';\nimport AnimatedWrapper from '../atoms/AnimatedWrapper';\nimport { ShadowLevel } from '../types';\n\ntype Props = ViewProps & {\n isAnimation?: boolean;\n elevationLevel?: ShadowLevel;\n};\n\nconst ZSView: React.FC<Props> = ({ isAnimation = false, elevationLevel = 0, style, children, ...rest }) => {\n const { palette } = useTheme();\n\n const styles = useMemo(\n () =>\n StyleSheet.create({\n container: {\n backgroundColor: palette.background.base,\n },\n }),\n [palette.background.base],\n );\n\n return (\n <AnimatedWrapper isAnimation={isAnimation} elevationLevel={elevationLevel} style={[styles.container, style]} {...rest}>\n {children}\n </AnimatedWrapper>\n );\n};\n\nexport default memo(ZSView);\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/ZSView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAa,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,eAAe,MAAM,0BAA0B,CAAC;AAUvD,MAAM,MAAM,GAAoB,CAAC,EAAE,WAAW,GAAG,KAAK,EAAE,cAAc,GAAG,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IAC/G,MAAM,EAAE,OAAO,EAAE,GAAG,QAAQ,EAAE,CAAC;IAE/B,MAAM,MAAM,GAAG,OAAO,CACpB,GAAG,EAAE,CACH,UAAU,CAAC,MAAM,CAAC;QAChB,SAAS,EAAE;YACT,eAAe,EAAE,OAAO,CAAC,UAAU,CAAC,IAAI;SACzC;KACF,CAAC,EACJ,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAC1B,CAAC;IAEF,OAAO,CACL,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,CAAC,WAAW,CAAC,CAAC,cAAc,CAAC,CAAC,cAAc,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAClI;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,eAAe,CAAC,CACnB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC,MAAM,CAAC,CAAC","sourcesContent":["import React, { memo, useMemo } from 'react';\nimport { ViewProps, StyleSheet } from 'react-native';\nimport { useTheme } from '../../model/useThemeProvider';\nimport AnimatedWrapper from '../atoms/AnimatedWrapper';\nimport { ShadowLevel } from '../types';\nimport { ViewColorOptions } from '../../theme';\n\ntype Props = ViewProps & {\n isAnimation?: boolean;\n elevationLevel?: ShadowLevel;\n color?: ViewColorOptions;\n};\n\nconst ZSView: React.FC<Props> = ({ isAnimation = false, elevationLevel = 0, style, children, color, ...rest }) => {\n const { palette } = useTheme();\n\n const styles = useMemo(\n () =>\n StyleSheet.create({\n container: {\n backgroundColor: palette.background.base,\n },\n }),\n [palette.background.base],\n );\n\n return (\n <AnimatedWrapper color={color} isAnimation={isAnimation} elevationLevel={elevationLevel} style={[styles.container, style]} {...rest}>\n {children}\n </AnimatedWrapper>\n );\n};\n\nexport default memo(ZSView);\n"]}
@@ -1,12 +1,14 @@
1
1
  import React from 'react';
2
2
  import { ViewProps } from 'react-native';
3
3
  import { ShadowLevel } from '../types';
4
+ import { ViewColorOptions } from '../../theme/types';
4
5
  interface AnimatedWrapperProps extends ViewProps {
5
6
  isAnimation: boolean;
6
7
  elevationLevel?: ShadowLevel;
7
8
  duration?: number;
9
+ color?: ViewColorOptions;
8
10
  }
9
- declare function AnimatedWrapper({ isAnimation, elevationLevel, duration, style, children, ...props }: AnimatedWrapperProps): React.JSX.Element;
11
+ declare function AnimatedWrapper({ isAnimation, elevationLevel, duration, style, children, color, ...props }: AnimatedWrapperProps): React.JSX.Element;
10
12
  declare const _default: React.MemoExoticComponent<typeof AnimatedWrapper>;
11
13
  export default _default;
12
14
  //# sourceMappingURL=AnimatedWrapper.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AnimatedWrapper.d.ts","sourceRoot":"","sources":["../../../src/ui/atoms/AnimatedWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,EAAQ,SAAS,EAAY,MAAM,cAAc,CAAC;AAGzD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAMvC,UAAU,oBAAqB,SAAQ,SAAS;IAC9C,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,iBAAS,eAAe,CAAC,EACvB,WAAkB,EAClB,cAAkB,EAClB,QAA2B,EAC3B,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,oBAAoB,qBA8CtB;;AAED,wBAA2C"}
1
+ {"version":3,"file":"AnimatedWrapper.d.ts","sourceRoot":"","sources":["../../../src/ui/atoms/AnimatedWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,EAAQ,SAAS,EAAY,MAAM,cAAc,CAAC;AAGzD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,OAAO,EAA8B,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAKjF,UAAU,oBAAqB,SAAQ,SAAS;IAC9C,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,gBAAgB,CAAC;CAC1B;AAED,iBAAS,eAAe,CAAC,EACvB,WAAkB,EAClB,cAAkB,EAClB,QAA2B,EAC3B,KAAK,EACL,QAAQ,EACR,KAAK,EACL,GAAG,KAAK,EACT,EAAE,oBAAoB,qBAgDtB;;AAED,wBAA2C"}
@@ -5,9 +5,11 @@ import { useTheme } from '../../model/useThemeProvider';
5
5
  import { IOS_SHADOW } from '../../theme/elevation';
6
6
  const DEFAULT_DURATION = 200;
7
7
  const SHADOW_DURATION = 50;
8
- function AnimatedWrapper({ isAnimation = true, elevationLevel = 0, duration = DEFAULT_DURATION, style, children, ...props }) {
9
- const { elevation } = useTheme();
8
+ function AnimatedWrapper({ isAnimation = true, elevationLevel = 0, duration = DEFAULT_DURATION, style, children, color, ...props }) {
9
+ const { elevation, palette } = useTheme();
10
10
  const opacity = useSharedValue(0);
11
+ const [c01, c02] = color ? color.split('.') : [undefined, undefined];
12
+ const backgroundColor = c02 ? palette[c01][c02] : c01 ? palette.background[c01] : elevationLevel ? palette.background.base : undefined;
11
13
  // 그림자 및 기타 스타일을 플랫폼에 맞게 미리 계산
12
14
  const staticStyle = useMemo(() => {
13
15
  return { ...elevation[elevationLevel] };
@@ -34,9 +36,9 @@ function AnimatedWrapper({ isAnimation = true, elevationLevel = 0, duration = DE
34
36
  }), [duration, onEntering]);
35
37
  // 애니메이션이 비활성화된 경우 기본 View로 렌더링
36
38
  if (!isAnimation) {
37
- return <View style={[style, staticStyle]} {...props}>{children}</View>;
39
+ return <View style={[style, backgroundColor && { backgroundColor }, { ...elevation[elevationLevel] }]} {...props}>{children}</View>;
38
40
  }
39
- return (<Animated.View style={[style, staticStyle, animatedStyle]} {...animationProps} {...props}>
41
+ return (<Animated.View style={[style, backgroundColor && { backgroundColor }, staticStyle, animatedStyle]} {...animationProps} {...props}>
40
42
  {children}
41
43
  </Animated.View>);
42
44
  }
@@ -1 +1 @@
1
- {"version":3,"file":"AnimatedWrapper.js","sourceRoot":"","sources":["../../../src/ui/atoms/AnimatedWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,IAAI,EAAa,QAAQ,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,QAAQ,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAC/H,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,MAAM,gBAAgB,GAAG,GAAY,CAAC;AACtC,MAAM,eAAe,GAAG,EAAW,CAAC;AAQpC,SAAS,eAAe,CAAC,EACvB,WAAW,GAAG,IAAI,EAClB,cAAc,GAAG,CAAC,EAClB,QAAQ,GAAG,gBAAgB,EAC3B,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACa;IACrB,MAAM,EAAE,SAAS,EAAE,GAAG,QAAQ,EAAE,CAAC;IACjC,MAAM,O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QACjB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,CAAC;IACzE,CAAC;IAED,OAAO,CACL,CAAC,QAAQ,CAAC,IAAI,CACZ,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,WAAW,EAAE,aAAa,CAAC,CAAC,CAC3C,IAAI,cAAc,CAAC,CACnB,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,QAAQ,CAAC,IAAI,CAAC,CACjB,CAAC;AACJ,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC","sourcesContent":["import React, { useMemo, useCallback } from 'react';\nimport { View, ViewProps, Platform } from 'react-native';\nimport Animated, { FadeInDown, FadeOut, useAnimatedStyle, withTiming, useSharedValue, runOnJS } from 'react-native-reanimated';\nimport { useTheme } from '../../model/useThemeProvider';\nimport { ShadowLevel } from '../types';\nimport { IOS_SHADOW } from '../../theme/elevation';\n\nconst DEFAULT_DURATION = 200 as const;\nconst SHADOW_DURATION = 50 as const;\n\ninterface AnimatedWrapperProps extends ViewProps {\n isAnimation: boolean;\n elevationLevel?: ShadowLevel;\n duration?: number;\n}\n\nfunction AnimatedWrapper({\n isAnimation = true,\n elevationLevel = 0,\n duration = DEFAULT_DURATION,\n style,\n children,\n ...props\n}: AnimatedWrapperProps) {\n const { elevation } = useTheme();\n const opacity = useSharedValue(0);\n\n // 그림자 및 기타 스타일을 플랫폼에 맞게 미리 계산\n const staticStyle = useMemo(() => {\n return { ...elevation[elevationLevel] };\n }, [elevation]);\n\n // 애니메이션 스타일 정의 (iOS 그림자 및 Android elevation 처리)\n const animatedStyle = useAnimatedStyle(() => {\n if (Platform.OS === 'ios') {\n return { shadowOpacity: opacity.value * IOS_SHADOW[elevationLevel].shadowOpacity };\n }\n return { elevation: opacity.value * elevationLevel };\n }, [elevationLevel]);\n\n // 컴포넌트가 등장할 때 애니메이션 핸들링\n const onEntering = useCallback(() => {\n opacity.value = withTiming(1, { duration: SHADOW_DURATION });\n }, [opacity]);\n\n const animationProps = useMemo(() => ({\n entering: FadeInDown.duration(duration).withCallback((finished) => {\n 'worklet';\n if (finished) {\n runOnJS(onEntering)();\n }\n }),\n exiting: FadeOut.duration(50),\n }), [duration, onEntering]);\n\n // 애니메이션이 비활성화된 경우 기본 View로 렌더링\n if (!isAnimation) {\n return <View style={[style, staticStyle]} {...props}>{children}</View>;\n }\n\n return (\n <Animated.View\n style={[style, staticStyle, animatedStyle]}\n {...animationProps}\n {...props}\n >\n {children}\n </Animated.View>\n );\n}\n\nexport default React.memo(AnimatedWrapper);\n"]}
1
+ {"version":3,"file":"AnimatedWrapper.js","sourceRoot":"","sources":["../../../src/ui/atoms/AnimatedWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,IAAI,EAAa,QAAQ,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,QAAQ,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAC/H,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGnD,MAAM,gBAAgB,GAAG,GAAY,CAAC;AACtC,MAAM,eAAe,GAAG,EAAW,CAAC;AASpC,SAAS,eAAe,CAAC,EACvB,WAAW,GAAG,IAAI,EAClB,cAAc,GAAG,CAAC,EAClB,QAAQ,GAAG,gBAAgB,EAC3B,KAAK,EACL,QAAQ,EACR,KAAK,EACL,GAAG,KAAK,EACa;IACrB,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,QAAQ,EAAE,C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AC;IAEd,MAAM,cAAc,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;QACpC,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,YAAY,CAAC,CAAC,QAAQ,EAAE,EAAE;YAChE,SAAS,CAAC;YACV,IAAI,QAAQ,EAAE,CAAC;gBACb,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;YACxB,CAAC;QACH,CAAC,CAAC;QACF,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;KAC9B,CAAC,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC;IAE5B,+BAA+B;IAC/B,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,eAAe,IAAI,EAAE,eAAe,EAAE,EAAE,EAAE,GAAG,SAAS,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,CAAC;IACtI,CAAC;IAED,OAAO,CACL,CAAC,QAAQ,CAAC,IAAI,CACZ,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,eAAe,IAAI,EAAE,eAAe,EAAE,EAAE,WAAW,EAAE,aAAa,CAAC,CAAC,CACnF,IAAI,cAAc,CAAC,CACnB,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,QAAQ,CAAC,IAAI,CAAC,CACjB,CAAC;AACJ,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC","sourcesContent":["import React, { useMemo, useCallback } from 'react';\nimport { View, ViewProps, Platform } from 'react-native';\nimport Animated, { FadeInDown, FadeOut, useAnimatedStyle, withTiming, useSharedValue, runOnJS } from 'react-native-reanimated';\nimport { useTheme } from '../../model/useThemeProvider';\nimport { ShadowLevel } from '../types';\nimport { IOS_SHADOW } from '../../theme/elevation';\nimport { SubColorOptions, ViewColor, ViewColorOptions } from '../../theme/types';\n\nconst DEFAULT_DURATION = 200 as const;\nconst SHADOW_DURATION = 50 as const;\n\ninterface AnimatedWrapperProps extends ViewProps {\n isAnimation: boolean;\n elevationLevel?: ShadowLevel;\n duration?: number;\n color?: ViewColorOptions;\n}\n\nfunction AnimatedWrapper({\n isAnimation = true,\n elevationLevel = 0,\n duration = DEFAULT_DURATION,\n style,\n children,\n color,\n ...props\n}: AnimatedWrapperProps) {\n const { elevation, palette } = useTheme();\n const opacity = useSharedValue(0);\n const [c01, c02] = color ? color.split('.') as [ViewColor, SubColorOptions] : [undefined, undefined];\n const backgroundColor = c02 ? palette[c01][c02] : c01 ? palette.background[c01] : elevationLevel ? palette.background.base : undefined;\n\n // 그림자 및 기타 스타일을 플랫폼에 맞게 미리 계산\n const staticStyle = useMemo(() => {\n return { ...elevation[elevationLevel] };\n }, [elevation]);\n\n // 애니메이션 스타일 정의 (iOS 그림자 및 Android elevation 처리)\n const animatedStyle = useAnimatedStyle(() => {\n if (Platform.OS === 'ios') {\n return { shadowOpacity: opacity.value * IOS_SHADOW[elevationLevel].shadowOpacity };\n }\n return { elevation: opacity.value * elevationLevel };\n }, [elevationLevel]);\n\n // 컴포넌트가 등장할 때 애니메이션 핸들링\n const onEntering = useCallback(() => {\n opacity.value = withTiming(1, { duration: SHADOW_DURATION });\n }, [opacity]);\n\n const animationProps = useMemo(() => ({\n entering: FadeInDown.duration(duration).withCallback((finished) => {\n 'worklet';\n if (finished) {\n runOnJS(onEntering)();\n }\n }),\n exiting: FadeOut.duration(50),\n }), [duration, onEntering]);\n\n // 애니메이션이 비활성화된 경우 기본 View로 렌더링\n if (!isAnimation) {\n return <View style={[style, backgroundColor && { backgroundColor }, { ...elevation[elevationLevel] }]} {...props}>{children}</View>;\n }\n\n return (\n <Animated.View\n style={[style, backgroundColor && { backgroundColor }, staticStyle, animatedStyle]}\n {...animationProps}\n {...props}\n >\n {children}\n </Animated.View>\n );\n}\n\nexport default React.memo(AnimatedWrapper);\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0610studio/zs-ui",
3
- "version": "0.2.3",
3
+ "version": "0.3.0",
4
4
  "private": false,
5
5
  "description": "EXPO ZS-UI",
6
6
  "type": "module",