@0610studio/zs-ui 0.13.1 → 0.13.2

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.
package/README.md CHANGED
@@ -25,12 +25,6 @@ npx expo install @0610studio/zs-ui
25
25
 
26
26
  <br />
27
27
 
28
- ## TODO
29
-
30
- - [ ] 폴더블 폰에서 접힘/펼침 상태 변경으로 인해 액티비티가 재시작되었을 때, `Dimensions.get('window')`가 이전 값을 반환하고 onChange가 호출되지 않는 문제
31
-
32
- <br />
33
-
34
28
  ### playground
35
29
 
36
30
  [EXPO snack](https://snack.expo.dev/@studio0610/zs-ui-playground)에서 확인 가능합니다.
@@ -42,7 +36,7 @@ npx expo install @0610studio/zs-ui
42
36
  | 항목 | 값 |
43
37
  |------|-----|
44
38
  | **상태** | ✅ 성공 |
45
- | **실행 시간** | 2025. 10. 31. 오전 10:24 |
39
+ | **실행 시간** | 2025. 10. 31 |
46
40
  | **전체 테스트** | 123 |
47
41
  | **성공** | ✅ 123 |
48
42
  | **실패** | ✅ 0 |
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { OverlayProviderProps } from '../model/types';
2
3
  export declare function OverlayProvider({ customSnackbar, maxSnackbarCount, loaderComponent, children }: OverlayProviderProps): import("react").JSX.Element;
3
4
  //# sourceMappingURL=OverlayContext.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"OverlayContext.d.ts","sourceRoot":"","sources":["../../src/context/OverlayContext.tsx"],"names":[],"mappings":"AAGA,OAAO,EAA+D,oBAAoB,EAAwF,MAAM,gBAAgB,CAAC;AAUzM,wBAAgB,eAAe,CAAC,EAC9B,cAAc,EACd,gBAAoB,EACpB,eAAe,EACf,QAAQ,EACT,EAAE,oBAAoB,+BA6StB"}
1
+ {"version":3,"file":"OverlayContext.d.ts","sourceRoot":"","sources":["../../src/context/OverlayContext.tsx"],"names":[],"mappings":";AAGA,OAAO,EAA+D,oBAAoB,EAAwF,MAAM,gBAAgB,CAAC;AAUzM,wBAAgB,eAAe,CAAC,EAC9B,cAAc,EACd,gBAAoB,EACpB,eAAe,EACf,QAAQ,EACT,EAAE,oBAAoB,+BA6StB"}
package/build/index.d.ts CHANGED
@@ -10,6 +10,7 @@ import ZSText from './ui/ZSText';
10
10
  import ThrottleButton from './ui/ThrottleButton';
11
11
  import ZSTextField from './ui/ZSTextField';
12
12
  import ZSRadioGroup from './ui/ZSRadioGroup';
13
+ import ZSSwitch from './ui/ZSSwitch';
13
14
  import ZSBottomCta from './ui/ZSBottomCta';
14
15
  import ZSView from './ui/ZSView';
15
16
  import AnimatedWrapper from './ui/atoms/AnimatedWrapper';
@@ -19,7 +20,7 @@ import { ZSContainerRef } from "./ui/ZSContainer";
19
20
  import { ZSTextProps } from "./ui/ZSText";
20
21
  import { BoxStyle, ZSTextFieldRef } from "./ui/ZSTextField";
21
22
  import { AlertOverlay, BottomSheetOverlay, SnackbarNotify, useOverlay, PopOverButton, PopOverMenu, ZSPortal } from './overlay';
22
- export { useTheme, useFoldingState, ThemeProvider, OverlayProvider, themeFactory, ZSBottomCta, ZSView, AnimatedWrapper, TextAtom, ZSContainer, ZSPressable, ZSText, ThrottleButton, ZSTextField, ZSRadioGroup, ErrorComponent, ZSAboveKeyboard, AlertOverlay, BottomSheetOverlay, SnackbarNotify, useOverlay, PopOverButton, PopOverMenu, ZSPortal, GlobalOverlay, };
23
+ export { useTheme, useFoldingState, ThemeProvider, OverlayProvider, themeFactory, ZSBottomCta, ZSView, AnimatedWrapper, TextAtom, ZSContainer, ZSPressable, ZSText, ThrottleButton, ZSTextField, ZSRadioGroup, ZSSwitch, ErrorComponent, ZSAboveKeyboard, AlertOverlay, BottomSheetOverlay, SnackbarNotify, useOverlay, PopOverButton, PopOverMenu, ZSPortal, GlobalOverlay, };
23
24
  import type { ThemeProviderProps, ThemeProps, Palette } from "./context/ThemeContext";
24
25
  import { ColorPalette, ColorPaletteExtend, ThemeTextType, ThemeBackground, MainColors, Theme, TypographyVariants, ThemeFonts, TypoNumber, TypographyVariantsProps, TypoStyle, TypoOptions, TypoSubStyle, TypoColorOptions, ShadowLevel, ShadowStyle } from "./theme/types";
25
26
  import { ThemeFactoryColors, ThemeFactoryConfig } from "./theme/palette";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,cAAc,MAAM,oCAAoC,CAAC;AAChE,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,cAAc,MAAM,qBAAqB,CAAC;AACjD,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAC7C,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,eAAe,MAAM,4BAA4B,CAAC;AACzD,OAAO,QAAQ,MAAM,qBAAqB,CAAC;AAC3C,OAAO,eAAe,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,cAAc,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,MA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UAAU,EACV,UAAU,EACV,uBAAuB,EACvB,SAAS,EACT,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,SAAS,EACT,cAAc,EACd,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,WAAW,EACX,YAAY,EACZ,SAAS,EACT,UAAU,EACV,kBAAkB,EAClB,WAAW,EACX,WAAW,EACX,WAAW,EACX,cAAc,EACd,gBAAgB,GACjB,CAAC"}
package/build/index.js CHANGED
@@ -10,6 +10,7 @@ import ZSText from './ui/ZSText';
10
10
  import ThrottleButton from './ui/ThrottleButton';
11
11
  import ZSTextField from './ui/ZSTextField';
12
12
  import ZSRadioGroup from './ui/ZSRadioGroup';
13
+ import ZSSwitch from './ui/ZSSwitch';
13
14
  import ZSBottomCta from './ui/ZSBottomCta';
14
15
  import ZSView from './ui/ZSView';
15
16
  import AnimatedWrapper from './ui/atoms/AnimatedWrapper';
@@ -18,7 +19,7 @@ import ZSAboveKeyboard from "./ui/ZSAboveKeyboard";
18
19
  import { AlertOverlay, BottomSheetOverlay, SnackbarNotify, useOverlay, PopOverButton, PopOverMenu, ZSPortal } from './overlay';
19
20
  export { useTheme, useFoldingState, ThemeProvider, OverlayProvider, themeFactory,
20
21
  // ---
21
- ZSBottomCta, ZSView, AnimatedWrapper, TextAtom, ZSContainer, ZSPressable, ZSText, ThrottleButton, ZSTextField, ZSRadioGroup, ErrorComponent, ZSAboveKeyboard,
22
+ ZSBottomCta, ZSView, AnimatedWrapper, TextAtom, ZSContainer, ZSPressable, ZSText, ThrottleButton, ZSTextField, ZSRadioGroup, ZSSwitch, ErrorComponent, ZSAboveKeyboard,
22
23
  // ---
23
24
  AlertOverlay, BottomSheetOverlay, SnackbarNotify, useOverlay, PopOverButton, PopOverMenu, ZSPortal,
24
25
  // Global overlay functions
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],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ay } from './model'\nimport { OverlayProvider } from \"./context/OverlayContext\";\nimport { ThemeProvider, useTheme } from \"./context/ThemeContext\";\nimport { useFoldingState } from './model/useFoldingState'\nimport { themeFactory } from './theme/palette';\nimport ErrorComponent from './ui/ZSTextField/ui/ErrorComponent';\nimport ZSContainer from './ui/ZSContainer';\nimport ZSPressable from './ui/ZSPressable';\nimport ZSText from './ui/ZSText';\nimport ThrottleButton from './ui/ThrottleButton';\nimport ZSTextField from './ui/ZSTextField';\nimport ZSRadioGroup from './ui/ZSRadioGroup';\nimport ZSBottomCta from './ui/ZSBottomCta';\nimport ZSView from './ui/ZSView';\nimport AnimatedWrapper from './ui/atoms/AnimatedWrapper';\nimport TextAtom from './ui/atoms/TextAtom';\nimport ZSAboveKeyboard from \"./ui/ZSAboveKeyboard\";\nimport { ZSContainerRef } from \"./ui/ZSContainer\";\nimport { ZSTextProps } from \"./ui/ZSText\";\nimport { BoxStyle, ZSTextFieldRef } from \"./ui/ZSTextField\";\nimport { AlertOverlay, BottomSheetOverlay, SnackbarNotify, useOverlay, PopOverButton, PopOverMenu, ZSPortal } from './overlay';\n\nexport {\n useTheme,\n useFoldingState,\n ThemeProvider,\n OverlayProvider,\n themeFactory,\n // ---\n ZSBottomCta,\n ZSView,\n AnimatedWrapper,\n TextAtom,\n ZSContainer,\n ZSPressable,\n ZSText,\n ThrottleButton,\n ZSTextField,\n ZSRadioGroup,\n ErrorComponent,\n ZSAboveKeyboard,\n // ---\n AlertOverlay,\n BottomSheetOverlay,\n SnackbarNotify,\n useOverlay,\n PopOverButton,\n PopOverMenu,\n ZSPortal,\n // Global overlay functions\n GlobalOverlay,\n};\n\n// ------------------------------------------------------\n\nimport type { ThemeProviderProps, ThemeProps, Palette } from \"./context/ThemeContext\";\nimport {\n ColorPalette,\n ColorPaletteExtend,\n ThemeTextType,\n ThemeBackground,\n MainColors,\n Theme,\n TypographyVariants,\n ThemeFonts,\n TypoNumber,\n TypographyVariantsProps,\n TypoStyle,\n TypoOptions,\n TypoSubStyle,\n TypoColorOptions,\n ShadowLevel,\n ShadowStyle,\n} from \"./theme/types\";\nimport { ThemeFactoryColors, ThemeFactoryConfig } from \"./theme/palette\";\nimport {\n SnackItem,\n ShowAlertProps,\n ShowSnackBarProps,\n ShowBottomSheetProps,\n PopOverMenuProps,\n CustomSnackbarProps,\n OverlayProviderProps,\n AlertAction,\n AlertActions,\n SnackType,\n HideOption,\n BottomSheetOptions,\n FoldingStateInfo\n} from \"./model/types\";\nimport { RadioOption } from \"./ui/types\";\n\nexport type {\n ThemeProviderProps,\n ThemeProps,\n Palette,\n ZSTextProps,\n BoxStyle,\n ZSTextFieldRef,\n ColorPalette,\n ColorPaletteExtend,\n ThemeTextType,\n ThemeBackground,\n MainColors,\n Theme,\n TypographyVariants,\n ThemeFonts,\n TypoNumber,\n TypographyVariantsProps,\n TypoStyle,\n TypoOptions,\n TypoSubStyle,\n TypoColorOptions,\n ThemeFactoryColors,\n ThemeFactoryConfig,\n SnackItem,\n ShowAlertProps,\n ShowSnackBarProps,\n ShowBottomSheetProps,\n PopOverMenuProps,\n CustomSnackbarProps,\n OverlayProviderProps,\n AlertAction,\n AlertActions,\n SnackType,\n HideOption,\n BottomSheetOptions,\n RadioOption,\n ShadowLevel,\n ShadowStyle,\n ZSContainerRef,\n FoldingStateInfo,\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,cAAc,MAAM,oCAAoC,CAAC;AAChE,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,cAAc,MAAM,qBAAqB,CAAC;AACjD,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAC7C,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,eAAe,MAAM,4BAA4B,CAAC;AACzD,OAAO,QAAQ,MAAM,qBAAqB,CAAC;AAC3C,OAAO,eAAe,MAAM,sBAAsB,CAAC;AAInD,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,cAAc,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE/H,OAAO,EACL,QAAQ,EACR,eAAe,EACf,aAAa,EACb,eAAe,EACf,YAAY;AACZ,MAAM;AACN,WAAW,EACX,MAAM,EACN,eAAe,EACf,QAAQ,EACR,WAAW,EACX,WAAW,EACX,MAAM,EACN,cAAc,EACd,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,cAAc,EACd,eAAe;AACf,MAAM;AACN,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,aAAa,EACb,WAAW,EACX,QAAQ;AACR,2BAA2B;AAC3B,aAAa,GACd,CAAC","sourcesContent":["import { GlobalOverlay } from './model'\nimport { OverlayProvider } from \"./context/OverlayContext\";\nimport { ThemeProvider, useTheme } from \"./context/ThemeContext\";\nimport { useFoldingState } from './model/useFoldingState'\nimport { themeFactory } from './theme/palette';\nimport ErrorComponent from './ui/ZSTextField/ui/ErrorComponent';\nimport ZSContainer from './ui/ZSContainer';\nimport ZSPressable from './ui/ZSPressable';\nimport ZSText from './ui/ZSText';\nimport ThrottleButton from './ui/ThrottleButton';\nimport ZSTextField from './ui/ZSTextField';\nimport ZSRadioGroup from './ui/ZSRadioGroup';\nimport ZSSwitch from './ui/ZSSwitch';\nimport ZSBottomCta from './ui/ZSBottomCta';\nimport ZSView from './ui/ZSView';\nimport AnimatedWrapper from './ui/atoms/AnimatedWrapper';\nimport TextAtom from './ui/atoms/TextAtom';\nimport ZSAboveKeyboard from \"./ui/ZSAboveKeyboard\";\nimport { ZSContainerRef } from \"./ui/ZSContainer\";\nimport { ZSTextProps } from \"./ui/ZSText\";\nimport { BoxStyle, ZSTextFieldRef } from \"./ui/ZSTextField\";\nimport { AlertOverlay, BottomSheetOverlay, SnackbarNotify, useOverlay, PopOverButton, PopOverMenu, ZSPortal } from './overlay';\n\nexport {\n useTheme,\n useFoldingState,\n ThemeProvider,\n OverlayProvider,\n themeFactory,\n // ---\n ZSBottomCta,\n ZSView,\n AnimatedWrapper,\n TextAtom,\n ZSContainer,\n ZSPressable,\n ZSText,\n ThrottleButton,\n ZSTextField,\n ZSRadioGroup,\n ZSSwitch,\n ErrorComponent,\n ZSAboveKeyboard,\n // ---\n AlertOverlay,\n BottomSheetOverlay,\n SnackbarNotify,\n useOverlay,\n PopOverButton,\n PopOverMenu,\n ZSPortal,\n // Global overlay functions\n GlobalOverlay,\n};\n\n// ------------------------------------------------------\n\nimport type { ThemeProviderProps, ThemeProps, Palette } from \"./context/ThemeContext\";\nimport {\n ColorPalette,\n ColorPaletteExtend,\n ThemeTextType,\n ThemeBackground,\n MainColors,\n Theme,\n TypographyVariants,\n ThemeFonts,\n TypoNumber,\n TypographyVariantsProps,\n TypoStyle,\n TypoOptions,\n TypoSubStyle,\n TypoColorOptions,\n ShadowLevel,\n ShadowStyle,\n} from \"./theme/types\";\nimport { ThemeFactoryColors, ThemeFactoryConfig } from \"./theme/palette\";\nimport {\n SnackItem,\n ShowAlertProps,\n ShowSnackBarProps,\n ShowBottomSheetProps,\n PopOverMenuProps,\n CustomSnackbarProps,\n OverlayProviderProps,\n AlertAction,\n AlertActions,\n SnackType,\n HideOption,\n BottomSheetOptions,\n FoldingStateInfo\n} from \"./model/types\";\nimport { RadioOption } from \"./ui/types\";\n\nexport type {\n ThemeProviderProps,\n ThemeProps,\n Palette,\n ZSTextProps,\n BoxStyle,\n ZSTextFieldRef,\n ColorPalette,\n ColorPaletteExtend,\n ThemeTextType,\n ThemeBackground,\n MainColors,\n Theme,\n TypographyVariants,\n ThemeFonts,\n TypoNumber,\n TypographyVariantsProps,\n TypoStyle,\n TypoOptions,\n TypoSubStyle,\n TypoColorOptions,\n ThemeFactoryColors,\n ThemeFactoryConfig,\n SnackItem,\n ShowAlertProps,\n ShowSnackBarProps,\n ShowBottomSheetProps,\n PopOverMenuProps,\n CustomSnackbarProps,\n OverlayProviderProps,\n AlertAction,\n AlertActions,\n SnackType,\n HideOption,\n BottomSheetOptions,\n RadioOption,\n ShadowLevel,\n ShadowStyle,\n ZSContainerRef,\n FoldingStateInfo,\n};\n"]}
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { AlertContextProps, SnackbarContextProps, BottomSheetContextProps, PopOverContextProps, ModalityContextProps, LoaderContextProps, OverlayContextProps } from './types';
2
3
  export declare const OverlayContext: import("react").Context<OverlayContextProps | null>;
3
4
  export declare const AlertContext: import("react").Context<AlertContextProps | null>;
@@ -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,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,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PopOverMenuProps } from "../../model/types";
2
3
  declare function PopOverMenu({ px, py, component }: PopOverMenuProps): JSX.Element | null;
3
4
  export default PopOverMenu;
@@ -1 +1 @@
1
- {"version":3,"file":"PopOverMenu.d.ts","sourceRoot":"","sources":["../../../src/overlay/PopOver/PopOverMenu.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAOrD,iBAAS,WAAW,CAAC,EACnB,EAAE,EACF,EAAE,EACF,SAAS,EACV,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CAuFvC;AAED,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"PopOverMenu.d.ts","sourceRoot":"","sources":["../../../src/overlay/PopOver/PopOverMenu.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAOrD,iBAAS,WAAW,CAAC,EACnB,EAAE,EACF,EAAE,EACF,SAAS,EACV,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CAuFvC;AAED,eAAe,WAAW,CAAC"}
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface Props {
2
3
  children: React.ReactNode;
3
4
  keyboardShowOffset?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/ZSAboveKeyboard/index.tsx"],"names":[],"mappings":"AAaA,UAAU,KAAK;IACb,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,iBAAS,eAAe,CAAC,EACvB,kBAAsB,EACtB,kBAAsB,EACtB,QAAQ,EACR,kBAAkB,EAClB,uBAA+B,EAC/B,eAAe,GAChB,EAAE,KAAK,+BAwBP;AAED,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/ZSAboveKeyboard/index.tsx"],"names":[],"mappings":";AAaA,UAAU,KAAK;IACb,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,iBAAS,eAAe,CAAC,EACvB,kBAAsB,EACtB,kBAAsB,EACtB,QAAQ,EACR,kBAAkB,EAClB,uBAA+B,EAC/B,eAAe,GAChB,EAAE,KAAK,+BAwBP;AAED,eAAe,eAAe,CAAC"}
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface Props {
2
3
  render: () => React.ReactNode;
3
4
  offset?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/ZSBottomCta/index.tsx"],"names":[],"mappings":"AAMA,UAAU,KAAK;IACb,MAAM,EAAE,MAAM,KAAK,CAAC,SAAS,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,iBAAS,WAAW,CAAC,EACnB,MAAM,EACN,MAAU,GACX,EAAE,KAAK,+BAQP;AAED,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/ZSBottomCta/index.tsx"],"names":[],"mappings":";AAMA,UAAU,KAAK;IACb,MAAM,EAAE,MAAM,KAAK,CAAC,SAAS,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,iBAAS,WAAW,CAAC,EACnB,MAAM,EACN,MAAU,GACX,EAAE,KAAK,+BAQP;AAED,eAAe,WAAW,CAAC"}
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ import { type StyleProp, type ViewStyle } from "react-native";
3
+ interface ZSSwitchProps {
4
+ isActive: boolean;
5
+ onToggle: () => void;
6
+ style?: StyleProp<ViewStyle>;
7
+ width?: number;
8
+ trackColorInactive?: string;
9
+ trackColorActive?: string;
10
+ thumbColor?: string;
11
+ }
12
+ declare function ZSSwitch({ isActive, onToggle, style, width, trackColorInactive, trackColorActive, thumbColor, }: ZSSwitchProps): React.JSX.Element;
13
+ export default ZSSwitch;
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/ZSSwitch/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAa,MAAM,cAAc,CAAC;AASzE,UAAU,aAAa;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,iBAAS,QAAQ,CAAC,EAChB,QAAgB,EAChB,QAAQ,EACR,KAAK,EACL,KAAU,EACV,kBAAkB,EAClB,gBAAgB,EAChB,UAAsB,GACvB,EAAE,aAAa,qBA0Df;AAED,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,44 @@
1
+ import React, { useState } from "react";
2
+ import { Pressable } from "react-native";
3
+ import Animated, { interpolate, interpolateColor, useAnimatedStyle, withTiming, } from "react-native-reanimated";
4
+ import { useTheme } from "../../context/ThemeContext";
5
+ function ZSSwitch({ isActive = false, onToggle, style, width = 50, trackColorInactive, trackColorActive, thumbColor = '#ffffff', }) {
6
+ const [toggledWidth, setToggledWidth] = useState(0);
7
+ const { palette } = useTheme();
8
+ const height = width * 0.6;
9
+ const padding = width * 0.04;
10
+ const thumbSize = height - padding * 2;
11
+ const toggleBorderRadius = height * 1.2;
12
+ const thumbBorderRadius = thumbSize / 2;
13
+ const colorAnimation = useAnimatedStyle(() => {
14
+ const color = interpolateColor(isActive ? 1 : 0, [0, 1], [trackColorInactive ?? palette.grey[30], trackColorActive ?? palette.primary.main]);
15
+ return { backgroundColor: color };
16
+ });
17
+ const togglePositionAnimation = useAnimatedStyle(() => {
18
+ const positionStyle = interpolate(isActive ? 1 : 0, [0, 1], [0, toggledWidth - thumbSize - padding * 2], 'clamp');
19
+ return {
20
+ transform: [{ translateX: withTiming(positionStyle, { duration: 200 }) }],
21
+ };
22
+ });
23
+ const toggleStyle = {
24
+ width,
25
+ height,
26
+ borderRadius: toggleBorderRadius,
27
+ padding,
28
+ justifyContent: "center",
29
+ };
30
+ const thumbStyle = {
31
+ width: thumbSize,
32
+ height: thumbSize,
33
+ borderRadius: thumbBorderRadius,
34
+ justifyContent: "center",
35
+ };
36
+ return (<Pressable onPress={onToggle} style={style}>
37
+ <Animated.View style={[colorAnimation, toggleStyle]} onLayout={e => setToggledWidth(e.nativeEvent.layout.width)} accessibilityState={{ selected: isActive }}>
38
+ <Animated.View style={[togglePositionAnimation, thumbStyle, { backgroundColor: thumbColor }]}/>
39
+ </Animated.View>
40
+ </Pressable>);
41
+ }
42
+ ;
43
+ export default ZSSwitch;
44
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/ZSSwitch/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAkC,SAAS,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,QAAQ,EAAE,EACf,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,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G,SAAS,GAAG,OAAO,GAAG,CAAC,CAAC,EAC3C,OAAO,CACR,CAAC;QAEF,OAAO;YACL,SAAS,EAAE,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;SAC1E,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,MAAM,WAAW,GAAG;QAClB,KAAK;QACL,MAAM;QACN,YAAY,EAAE,kBAAkB;QAChC,OAAO;QACP,cAAc,EAAE,QAAiB;KAClC,CAAC;IAEF,MAAM,UAAU,GAAG;QACjB,KAAK,EAAE,SAAS;QAChB,MAAM,EAAE,SAAS;QACjB,YAAY,EAAE,iBAAiB;QAC/B,cAAc,EAAE,QAAiB;KAClC,CAAC;IAEF,OAAO,CACL,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CACzC;MAAA,CAAC,QAAQ,CAAC,IAAI,CACZ,KAAK,CAAC,CAAC,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC,CACrC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAC3D,kBAAkB,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAE3C;QAAA,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,uBAAuB,EAAE,UAAU,EAAE,EAAE,eAAe,EAAE,UAAU,EAAE,CAAC,CAAC,EAC/F;MAAA,EAAE,QAAQ,CAAC,IAAI,CACjB;IAAA,EAAE,SAAS,CAAC,CACb,CAAC;AACJ,CAAC;AAAA,CAAC;AAEF,eAAe,QAAQ,CAAC","sourcesContent":["import React, { useState } from \"react\";\nimport { type StyleProp, type ViewStyle, Pressable } from \"react-native\";\nimport Animated, {\n interpolate,\n interpolateColor,\n useAnimatedStyle,\n withTiming,\n} from \"react-native-reanimated\";\nimport { useTheme } from \"../../context/ThemeContext\";\n\ninterface ZSSwitchProps {\n isActive: boolean;\n onToggle: () => void;\n style?: StyleProp<ViewStyle>;\n width?: number;\n trackColorInactive?: string;\n trackColorActive?: string;\n thumbColor?: string;\n}\n\nfunction ZSSwitch({\n isActive = false,\n onToggle,\n style,\n width = 50,\n trackColorInactive,\n trackColorActive,\n thumbColor = '#ffffff',\n}: ZSSwitchProps) {\n const [toggledWidth, setToggledWidth] = useState(0);\n const { palette } = useTheme();\n const height = width * 0.6;\n const padding = width * 0.04;\n const thumbSize = height - padding * 2;\n const toggleBorderRadius = height * 1.2;\n const thumbBorderRadius = thumbSize / 2;\n\n const colorAnimation = useAnimatedStyle(() => {\n const color = interpolateColor(\n isActive ? 1 : 0,\n [0, 1],\n [trackColorInactive ?? palette.grey[30], trackColorActive ?? palette.primary.main],\n );\n\n return { backgroundColor: color };\n });\n\n const togglePositionAnimation = useAnimatedStyle(() => {\n const positionStyle = interpolate(\n isActive ? 1 : 0,\n [0, 1],\n [0, toggledWidth - thumbSize - padding * 2],\n 'clamp',\n );\n\n return {\n transform: [{ translateX: withTiming(positionStyle, { duration: 200 }) }],\n };\n });\n\n const toggleStyle = {\n width,\n height,\n borderRadius: toggleBorderRadius,\n padding,\n justifyContent: \"center\" as const,\n };\n\n const thumbStyle = {\n width: thumbSize,\n height: thumbSize,\n borderRadius: thumbBorderRadius,\n justifyContent: \"center\" as const,\n };\n\n return (\n <Pressable onPress={onToggle} style={style}>\n <Animated.View\n style={[colorAnimation, toggleStyle]}\n onLayout={e => setToggledWidth(e.nativeEvent.layout.width)}\n accessibilityState={{ selected: isActive }}\n >\n <Animated.View style={[togglePositionAnimation, thumbStyle, { backgroundColor: thumbColor }]} />\n </Animated.View>\n </Pressable>\n );\n};\n\nexport default ZSSwitch;\n"]}
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const ButtonClose: ({ onChangeText, marginTop }: {
2
3
  onChangeText?: ((text: string) => void) | undefined;
3
4
  marginTop?: number | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonClose.d.ts","sourceRoot":"","sources":["../../../../src/ui/ZSTextField/ui/ButtonClose.tsx"],"names":[],"mappings":"AAGA,QAAA,MAAM,WAAW;2BAIS,MAAM,KAAK,IAAI;;iCAUxC,CAAA;AAED,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"ButtonClose.d.ts","sourceRoot":"","sources":["../../../../src/ui/ZSTextField/ui/ButtonClose.tsx"],"names":[],"mappings":";AAGA,QAAA,MAAM,WAAW;2BAIS,MAAM,KAAK,IAAI;;iCAUxC,CAAA;AAED,eAAe,WAAW,CAAC"}
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const ErrorComponent: ({ errorMessage, errorColor, }: {
2
3
  errorMessage: string;
3
4
  errorColor: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorComponent.d.ts","sourceRoot":"","sources":["../../../../src/ui/ZSTextField/ui/ErrorComponent.tsx"],"names":[],"mappings":"AAIA,QAAA,MAAM,cAAc;kBAIJ,MAAM;gBACR,MAAM;iCAcnB,CAAA;AAED,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"ErrorComponent.d.ts","sourceRoot":"","sources":["../../../../src/ui/ZSTextField/ui/ErrorComponent.tsx"],"names":[],"mappings":";AAIA,QAAA,MAAM,cAAc;kBAIJ,MAAM;gBACR,MAAM;iCAcnB,CAAA;AAED,eAAe,cAAc,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0610studio/zs-ui",
3
- "version": "0.13.1",
3
+ "version": "0.13.2",
4
4
  "private": false,
5
5
  "description": "EXPO ZS-UI",
6
6
  "type": "commonjs",
@@ -52,14 +52,15 @@
52
52
  "expo-router": "4.0.21",
53
53
  "jest": "^29",
54
54
  "jest-expo": "^51",
55
- "react": "18.3.1",
56
- "react-native": ">=0.76.9",
57
- "react-native-reanimated": ">=3.17.4",
58
- "react-native-safe-area-context": "5.6.2",
59
- "react-native-svg": "15.8.0",
60
55
  "react-test-renderer": "18.3.1",
61
56
  "ts-jest": "^29.2.5",
62
- "typescript": "4.9.5"
57
+ "typescript": "4.9.5",
58
+ "react": "19.0.0",
59
+ "react-native": "0.79.6",
60
+ "react-native-reanimated": "~3.17.4",
61
+ "react-native-safe-area-context": "5.4.0",
62
+ "react-native-screens": "~4.11.1",
63
+ "react-native-svg": "15.11.2"
63
64
  },
64
65
  "peerDependencies": {
65
66
  "@react-native-async-storage/async-storage": "*",
@@ -67,7 +68,7 @@
67
68
  "expo-navigation-bar": ">=4.0.7",
68
69
  "expo-router": "*",
69
70
  "react": "*",
70
- "react-native": ">=0.76.0",
71
+ "react-native": ">=0.79.0",
71
72
  "react-native-reanimated": "^3.0.0",
72
73
  "react-native-safe-area-context": "*",
73
74
  "react-native-svg": "*"