@0610studio/zs-ui 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +5 -0
- package/README.md +3 -0
- package/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.9/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/build.gradle +43 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/kr/co/studio0610/zsui/ZsUiModule.kt +47 -0
- package/android/src/main/java/kr/co/studio0610/zsui/ZsUiView.kt +7 -0
- package/build/ZsUi.types.d.ts +7 -0
- package/build/ZsUi.types.d.ts.map +1 -0
- package/build/ZsUi.types.js +2 -0
- package/build/ZsUi.types.js.map +1 -0
- package/build/ZsUiModule.d.ts +3 -0
- package/build/ZsUiModule.d.ts.map +1 -0
- package/build/ZsUiModule.js +5 -0
- package/build/ZsUiModule.js.map +1 -0
- package/build/ZsUiModule.web.d.ts +7 -0
- package/build/ZsUiModule.web.d.ts.map +1 -0
- package/build/ZsUiModule.web.js +12 -0
- package/build/ZsUiModule.web.js.map +1 -0
- package/build/ZsUiView.d.ts +4 -0
- package/build/ZsUiView.d.ts.map +1 -0
- package/build/ZsUiView.js +7 -0
- package/build/ZsUiView.js.map +1 -0
- package/build/ZsUiView.web.d.ts +4 -0
- package/build/ZsUiView.web.d.ts.map +1 -0
- package/build/ZsUiView.web.js +7 -0
- package/build/ZsUiView.web.js.map +1 -0
- package/build/assets/SvgCheck.d.ts +7 -0
- package/build/assets/SvgCheck.d.ts.map +1 -0
- package/build/assets/SvgCheck.js +8 -0
- package/build/assets/SvgCheck.js.map +1 -0
- package/build/assets/SvgX.d.ts +6 -0
- package/build/assets/SvgX.d.ts.map +1 -0
- package/build/assets/SvgX.js +14 -0
- package/build/assets/SvgX.js.map +1 -0
- package/build/index.d.ts +5 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +10 -0
- package/build/index.js.map +1 -0
- package/build/model/types.d.ts +84 -0
- package/build/model/types.d.ts.map +1 -0
- package/build/model/types.js +11 -0
- package/build/model/types.js.map +1 -0
- package/build/model/useNotify.d.ts +5 -0
- package/build/model/useNotify.d.ts.map +1 -0
- package/build/model/useNotify.js +11 -0
- package/build/model/useNotify.js.map +1 -0
- package/build/model/useNotifyProvider.d.ts +3 -0
- package/build/model/useNotifyProvider.d.ts.map +1 -0
- package/build/model/useNotifyProvider.js +165 -0
- package/build/model/useNotifyProvider.js.map +1 -0
- package/build/model/useThemeProvider.d.ts +19 -0
- package/build/model/useThemeProvider.d.ts.map +1 -0
- package/build/model/useThemeProvider.js +73 -0
- package/build/model/useThemeProvider.js.map +1 -0
- package/build/model/utils.d.ts +12 -0
- package/build/model/utils.d.ts.map +1 -0
- package/build/model/utils.js +26 -0
- package/build/model/utils.js.map +1 -0
- package/build/notify/AlertNotify/index.d.ts +5 -0
- package/build/notify/AlertNotify/index.d.ts.map +1 -0
- package/build/notify/AlertNotify/index.js +109 -0
- package/build/notify/AlertNotify/index.js.map +1 -0
- package/build/notify/BottomSheetNotify/index.d.ts +19 -0
- package/build/notify/BottomSheetNotify/index.d.ts.map +1 -0
- package/build/notify/BottomSheetNotify/index.js +90 -0
- package/build/notify/BottomSheetNotify/index.js.map +1 -0
- package/build/notify/BottomSheetNotify/model/useBottomSheetNotify.d.ts +43 -0
- package/build/notify/BottomSheetNotify/model/useBottomSheetNotify.d.ts.map +1 -0
- package/build/notify/BottomSheetNotify/model/useBottomSheetNotify.js +222 -0
- package/build/notify/BottomSheetNotify/model/useBottomSheetNotify.js.map +1 -0
- package/build/notify/BottomSheetNotify/types/index.d.ts +4 -0
- package/build/notify/BottomSheetNotify/types/index.d.ts.map +1 -0
- package/build/notify/BottomSheetNotify/types/index.js +2 -0
- package/build/notify/BottomSheetNotify/types/index.js.map +1 -0
- package/build/notify/BottomSheetNotify/ui/BSTextInput/index.d.ts +4 -0
- package/build/notify/BottomSheetNotify/ui/BSTextInput/index.d.ts.map +1 -0
- package/build/notify/BottomSheetNotify/ui/BSTextInput/index.js +14 -0
- package/build/notify/BottomSheetNotify/ui/BSTextInput/index.js.map +1 -0
- package/build/notify/BottomSheetNotify/ui/ContentsComponent/index.d.ts +19 -0
- package/build/notify/BottomSheetNotify/ui/ContentsComponent/index.d.ts.map +1 -0
- package/build/notify/BottomSheetNotify/ui/ContentsComponent/index.js +33 -0
- package/build/notify/BottomSheetNotify/ui/ContentsComponent/index.js.map +1 -0
- package/build/notify/LoadingNotify/index.d.ts +6 -0
- package/build/notify/LoadingNotify/index.d.ts.map +1 -0
- package/build/notify/LoadingNotify/index.js +28 -0
- package/build/notify/LoadingNotify/index.js.map +1 -0
- package/build/notify/PopOver/PopOverButton.d.ts +11 -0
- package/build/notify/PopOver/PopOverButton.d.ts.map +1 -0
- package/build/notify/PopOver/PopOverButton.js +31 -0
- package/build/notify/PopOver/PopOverButton.js.map +1 -0
- package/build/notify/PopOver/PopOverMenu.d.ts +4 -0
- package/build/notify/PopOver/PopOverMenu.d.ts.map +1 -0
- package/build/notify/PopOver/PopOverMenu.js +69 -0
- package/build/notify/PopOver/PopOverMenu.js.map +1 -0
- package/build/notify/SnackbarNotify/index.d.ts +7 -0
- package/build/notify/SnackbarNotify/index.d.ts.map +1 -0
- package/build/notify/SnackbarNotify/index.js +24 -0
- package/build/notify/SnackbarNotify/index.js.map +1 -0
- package/build/notify/SnackbarNotify/ui/SnackbarItem.d.ts +9 -0
- package/build/notify/SnackbarNotify/ui/SnackbarItem.d.ts.map +1 -0
- package/build/notify/SnackbarNotify/ui/SnackbarItem.js +72 -0
- package/build/notify/SnackbarNotify/ui/SnackbarItem.js.map +1 -0
- package/build/notify/index.d.ts +11 -0
- package/build/notify/index.d.ts.map +1 -0
- package/build/notify/index.js +11 -0
- package/build/notify/index.js.map +1 -0
- package/build/notify/ui/ModalBackground.d.ts +9 -0
- package/build/notify/ui/ModalBackground.d.ts.map +1 -0
- package/build/notify/ui/ModalBackground.js +27 -0
- package/build/notify/ui/ModalBackground.js.map +1 -0
- package/build/theme/index.d.ts +4 -0
- package/build/theme/index.d.ts.map +1 -0
- package/build/theme/index.js +4 -0
- package/build/theme/index.js.map +1 -0
- package/build/theme/palette.d.ts +62 -0
- package/build/theme/palette.d.ts.map +1 -0
- package/build/theme/palette.js +353 -0
- package/build/theme/palette.js.map +1 -0
- package/build/theme/types.d.ts +101 -0
- package/build/theme/types.d.ts.map +1 -0
- package/build/theme/types.js +5 -0
- package/build/theme/types.js.map +1 -0
- package/build/theme/typography.d.ts +5 -0
- package/build/theme/typography.d.ts.map +1 -0
- package/build/theme/typography.js +198 -0
- package/build/theme/typography.js.map +1 -0
- package/build/ui/ThrottleButton/index.d.ts +15 -0
- package/build/ui/ThrottleButton/index.d.ts.map +1 -0
- package/build/ui/ThrottleButton/index.js +74 -0
- package/build/ui/ThrottleButton/index.js.map +1 -0
- package/build/ui/ZSBottomButton/index.d.ts +16 -0
- package/build/ui/ZSBottomButton/index.d.ts.map +1 -0
- package/build/ui/ZSBottomButton/index.js +89 -0
- package/build/ui/ZSBottomButton/index.js.map +1 -0
- package/build/ui/ZSContainer/index.d.ts +19 -0
- package/build/ui/ZSContainer/index.d.ts.map +1 -0
- package/build/ui/ZSContainer/index.js +37 -0
- package/build/ui/ZSContainer/index.js.map +1 -0
- package/build/ui/ZSPressable/index.d.ts +17 -0
- package/build/ui/ZSPressable/index.d.ts.map +1 -0
- package/build/ui/ZSPressable/index.js +35 -0
- package/build/ui/ZSPressable/index.js.map +1 -0
- package/build/ui/ZSRadioGroup/index.d.ts +18 -0
- package/build/ui/ZSRadioGroup/index.d.ts.map +1 -0
- package/build/ui/ZSRadioGroup/index.js +82 -0
- package/build/ui/ZSRadioGroup/index.js.map +1 -0
- package/build/ui/ZSText/index.d.ts +11 -0
- package/build/ui/ZSText/index.d.ts.map +1 -0
- package/build/ui/ZSText/index.js +10 -0
- package/build/ui/ZSText/index.js.map +1 -0
- package/build/ui/ZSTextField/index.d.ts +31 -0
- package/build/ui/ZSTextField/index.d.ts.map +1 -0
- package/build/ui/ZSTextField/index.js +102 -0
- package/build/ui/ZSTextField/index.js.map +1 -0
- package/build/ui/ZSTextField/ui/ButtonClose.d.ts +6 -0
- package/build/ui/ZSTextField/ui/ButtonClose.d.ts.map +1 -0
- package/build/ui/ZSTextField/ui/ButtonClose.js +9 -0
- package/build/ui/ZSTextField/ui/ButtonClose.js.map +1 -0
- package/build/ui/ZSTextField/ui/ErrorComponent.d.ts +7 -0
- package/build/ui/ZSTextField/ui/ErrorComponent.d.ts.map +1 -0
- package/build/ui/ZSTextField/ui/ErrorComponent.js +16 -0
- package/build/ui/ZSTextField/ui/ErrorComponent.js.map +1 -0
- package/build/ui/ZSView/index.d.ts +8 -0
- package/build/ui/ZSView/index.d.ts.map +1 -0
- package/build/ui/ZSView/index.js +17 -0
- package/build/ui/ZSView/index.js.map +1 -0
- package/build/ui/atoms/AnimatedWrapper.d.ts +12 -0
- package/build/ui/atoms/AnimatedWrapper.d.ts.map +1 -0
- package/build/ui/atoms/AnimatedWrapper.js +61 -0
- package/build/ui/atoms/AnimatedWrapper.js.map +1 -0
- package/build/ui/atoms/ScrollViewAtom.d.ts +5 -0
- package/build/ui/atoms/ScrollViewAtom.d.ts.map +1 -0
- package/build/ui/atoms/ScrollViewAtom.js +10 -0
- package/build/ui/atoms/ScrollViewAtom.js.map +1 -0
- package/build/ui/atoms/TextAtom.d.ts +6 -0
- package/build/ui/atoms/TextAtom.d.ts.map +1 -0
- package/build/ui/atoms/TextAtom.js +9 -0
- package/build/ui/atoms/TextAtom.js.map +1 -0
- package/build/ui/atoms/ViewAtom.d.ts +6 -0
- package/build/ui/atoms/ViewAtom.d.ts.map +1 -0
- package/build/ui/atoms/ViewAtom.js +9 -0
- package/build/ui/atoms/ViewAtom.js.map +1 -0
- package/build/ui/index.d.ts +14 -0
- package/build/ui/index.d.ts.map +1 -0
- package/build/ui/index.js +14 -0
- package/build/ui/index.js.map +1 -0
- package/build/ui/types.d.ts +14 -0
- package/build/ui/types.d.ts.map +1 -0
- package/build/ui/types.js +2 -0
- package/build/ui/types.js.map +1 -0
- package/expo-module.config.json +9 -0
- package/ios/ZsUi.podspec +27 -0
- package/ios/ZsUiModule.swift +44 -0
- package/ios/ZsUiView.swift +7 -0
- package/package.json +54 -0
- package/src/ZsUi.types.ts +7 -0
- package/src/ZsUiModule.ts +5 -0
- package/src/ZsUiModule.web.ts +13 -0
- package/src/ZsUiView.tsx +11 -0
- package/src/ZsUiView.web.tsx +11 -0
- package/src/assets/SvgCheck.tsx +16 -0
- package/src/assets/SvgX.tsx +22 -0
- package/src/index.ts +52 -0
- package/src/model/types.ts +102 -0
- package/src/model/useNotify.ts +14 -0
- package/src/model/useNotifyProvider.tsx +251 -0
- package/src/model/useThemeProvider.tsx +99 -0
- package/src/model/utils.ts +31 -0
- package/src/notify/AlertNotify/index.tsx +177 -0
- package/src/notify/BottomSheetNotify/index.tsx +177 -0
- package/src/notify/BottomSheetNotify/model/useBottomSheetNotify.tsx +270 -0
- package/src/notify/BottomSheetNotify/types/index.ts +3 -0
- package/src/notify/BottomSheetNotify/ui/BSTextInput/index.tsx +28 -0
- package/src/notify/BottomSheetNotify/ui/ContentsComponent/index.tsx +76 -0
- package/src/notify/LoadingNotify/index.tsx +46 -0
- package/src/notify/PopOver/PopOverButton.tsx +56 -0
- package/src/notify/PopOver/PopOverMenu.tsx +95 -0
- package/src/notify/SnackbarNotify/index.tsx +43 -0
- package/src/notify/SnackbarNotify/ui/SnackbarItem.tsx +103 -0
- package/src/notify/index.ts +21 -0
- package/src/notify/ui/ModalBackground.tsx +46 -0
- package/src/theme/index.ts +3 -0
- package/src/theme/palette.ts +374 -0
- package/src/theme/types.ts +150 -0
- package/src/theme/typography.ts +199 -0
- package/src/ui/ThrottleButton/index.tsx +119 -0
- package/src/ui/ZSBottomButton/index.tsx +151 -0
- package/src/ui/ZSContainer/index.tsx +92 -0
- package/src/ui/ZSPressable/index.tsx +82 -0
- package/src/ui/ZSRadioGroup/index.tsx +141 -0
- package/src/ui/ZSText/index.tsx +22 -0
- package/src/ui/ZSTextField/index.tsx +200 -0
- package/src/ui/ZSTextField/ui/ButtonClose.tsx +20 -0
- package/src/ui/ZSTextField/ui/ErrorComponent.tsx +25 -0
- package/src/ui/ZSView/index.tsx +30 -0
- package/src/ui/atoms/AnimatedWrapper.tsx +89 -0
- package/src/ui/atoms/ScrollViewAtom.tsx +17 -0
- package/src/ui/atoms/TextAtom.tsx +15 -0
- package/src/ui/atoms/ViewAtom.tsx +15 -0
- package/src/ui/index.ts +27 -0
- package/src/ui/types.ts +12 -0
- package/tsconfig.json +9 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import ZSView from './ZSView';
|
|
2
|
+
import AnimatedWrapper from './atoms/AnimatedWrapper';
|
|
3
|
+
import TextAtom from './atoms/TextAtom';
|
|
4
|
+
import ScrollViewAtom from './atoms/ScrollViewAtom';
|
|
5
|
+
import ZSContainer from './ZSContainer';
|
|
6
|
+
import ZSPressable from './ZSPressable';
|
|
7
|
+
import ZSText from './ZSText';
|
|
8
|
+
import ThrottleButton from './ThrottleButton';
|
|
9
|
+
import ZSTextField from './ZSTextField';
|
|
10
|
+
import ZSRadioGroup from './ZSRadioGroup';
|
|
11
|
+
import ZSBottomButton from './ZSBottomButton';
|
|
12
|
+
import * as types from './types';
|
|
13
|
+
export { ZSView, AnimatedWrapper, TextAtom, ScrollViewAtom, ZSContainer, ZSPressable, ZSText, ThrottleButton, ZSTextField, ZSRadioGroup, ZSBottomButton, types };
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,eAAe,MAAM,yBAAyB,CAAC;AACtD,OAAO,QAAQ,MAAM,kBAAkB,CAAC;AACxC,OAAO,cAAc,MAAM,wBAAwB,CAAC;AACpD,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AAEjC,OAAO,EACL,MAAM,EACN,eAAe,EACf,QAAQ,EACR,cAAc,EACd,WAAW,EACX,WAAW,EACX,MAAM,EACN,cAAc,EACd,WAAW,EACX,YAAY,EACZ,cAAc,EACd,KAAK,EACN,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import ZSView from './ZSView';
|
|
2
|
+
import AnimatedWrapper from './atoms/AnimatedWrapper';
|
|
3
|
+
import TextAtom from './atoms/TextAtom';
|
|
4
|
+
import ScrollViewAtom from './atoms/ScrollViewAtom';
|
|
5
|
+
import ZSContainer from './ZSContainer';
|
|
6
|
+
import ZSPressable from './ZSPressable';
|
|
7
|
+
import ZSText from './ZSText';
|
|
8
|
+
import ThrottleButton from './ThrottleButton';
|
|
9
|
+
import ZSTextField from './ZSTextField';
|
|
10
|
+
import ZSRadioGroup from './ZSRadioGroup';
|
|
11
|
+
import ZSBottomButton from './ZSBottomButton';
|
|
12
|
+
import * as types from './types';
|
|
13
|
+
export { ZSView, AnimatedWrapper, TextAtom, ScrollViewAtom, ZSContainer, ZSPressable, ZSText, ThrottleButton, ZSTextField, ZSRadioGroup, ZSBottomButton, types };
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,eAAe,MAAM,yBAAyB,CAAC;AACtD,OAAO,QAAQ,MAAM,kBAAkB,CAAC;AACxC,OAAO,cAAc,MAAM,wBAAwB,CAAC;AACpD,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AAEjC,OAAO,EACL,MAAM,EACN,eAAe,EACf,QAAQ,EACR,cAAc,EACd,WAAW,EACX,WAAW,EACX,MAAM,EACN,cAAc,EACd,WAAW,EACX,YAAY,EACZ,cAAc,EACd,KAAK,EACN,CAAC","sourcesContent":["import ZSView from './ZSView';\nimport AnimatedWrapper from './atoms/AnimatedWrapper';\nimport TextAtom from './atoms/TextAtom';\nimport ScrollViewAtom from './atoms/ScrollViewAtom';\nimport ZSContainer from './ZSContainer';\nimport ZSPressable from './ZSPressable';\nimport ZSText from './ZSText';\nimport ThrottleButton from './ThrottleButton';\nimport ZSTextField from './ZSTextField';\nimport ZSRadioGroup from './ZSRadioGroup';\nimport ZSBottomButton from './ZSBottomButton';\nimport * as types from './types';\n\nexport {\n ZSView,\n AnimatedWrapper,\n TextAtom,\n ScrollViewAtom,\n ZSContainer,\n ZSPressable,\n ZSText,\n ThrottleButton,\n ZSTextField,\n ZSRadioGroup,\n ZSBottomButton,\n types\n};"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface RadioOption {
|
|
2
|
+
value: string;
|
|
3
|
+
index: string;
|
|
4
|
+
}
|
|
5
|
+
export type ShadowLevel = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
|
6
|
+
export interface ShadowStyle {
|
|
7
|
+
shadowOffset: {
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
};
|
|
11
|
+
shadowOpacity: number;
|
|
12
|
+
shadowRadius: number;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ui/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,WAAW,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAEhE,MAAM,WAAW,WAAW;IAC1B,YAAY,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAChD,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/ui/types.ts"],"names":[],"mappings":"","sourcesContent":["export interface RadioOption {\n value: string;\n index: string;\n}\n\nexport type ShadowLevel = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;\n\nexport interface ShadowStyle {\n shadowOffset: { width: number; height: number };\n shadowOpacity: number;\n shadowRadius: number;\n}\n"]}
|
package/ios/ZsUi.podspec
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
require 'json'
|
|
2
|
+
|
|
3
|
+
package = JSON.parse(File.read(File.join(__dir__, '..', 'package.json')))
|
|
4
|
+
|
|
5
|
+
Pod::Spec.new do |s|
|
|
6
|
+
s.name = 'ZsUi'
|
|
7
|
+
s.version = package['version']
|
|
8
|
+
s.summary = package['description']
|
|
9
|
+
s.description = package['description']
|
|
10
|
+
s.license = package['license']
|
|
11
|
+
s.author = package['author']
|
|
12
|
+
s.homepage = package['homepage']
|
|
13
|
+
s.platforms = { :ios => '13.4', :tvos => '13.4' }
|
|
14
|
+
s.swift_version = '5.4'
|
|
15
|
+
s.source = { git: 'https://github.com/0610studio' }
|
|
16
|
+
s.static_framework = true
|
|
17
|
+
|
|
18
|
+
s.dependency 'ExpoModulesCore'
|
|
19
|
+
|
|
20
|
+
# Swift/Objective-C compatibility
|
|
21
|
+
s.pod_target_xcconfig = {
|
|
22
|
+
'DEFINES_MODULE' => 'YES',
|
|
23
|
+
'SWIFT_COMPILATION_MODE' => 'wholemodule'
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
s.source_files = "**/*.{h,m,swift}"
|
|
27
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import ExpoModulesCore
|
|
2
|
+
|
|
3
|
+
public class ZsUiModule: Module {
|
|
4
|
+
// Each module class must implement the definition function. The definition consists of components
|
|
5
|
+
// that describes the module's functionality and behavior.
|
|
6
|
+
// See https://docs.expo.dev/modules/module-api for more details about available components.
|
|
7
|
+
public func definition() -> ModuleDefinition {
|
|
8
|
+
// Sets the name of the module that JavaScript code will use to refer to the module. Takes a string as an argument.
|
|
9
|
+
// Can be inferred from module's class name, but it's recommended to set it explicitly for clarity.
|
|
10
|
+
// The module will be accessible from `requireNativeModule('ZsUi')` in JavaScript.
|
|
11
|
+
Name("ZsUi")
|
|
12
|
+
|
|
13
|
+
// Sets constant properties on the module. Can take a dictionary or a closure that returns a dictionary.
|
|
14
|
+
Constants([
|
|
15
|
+
"PI": Double.pi
|
|
16
|
+
])
|
|
17
|
+
|
|
18
|
+
// Defines event names that the module can send to JavaScript.
|
|
19
|
+
Events("onChange")
|
|
20
|
+
|
|
21
|
+
// Defines a JavaScript synchronous function that runs the native code on the JavaScript thread.
|
|
22
|
+
Function("hello") {
|
|
23
|
+
return "Hello world! 👋"
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Defines a JavaScript function that always returns a Promise and whose native code
|
|
27
|
+
// is by default dispatched on the different thread than the JavaScript runtime runs on.
|
|
28
|
+
AsyncFunction("setValueAsync") { (value: String) in
|
|
29
|
+
// Send an event to JavaScript.
|
|
30
|
+
self.sendEvent("onChange", [
|
|
31
|
+
"value": value
|
|
32
|
+
])
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Enables the module to be used as a native view. Definition components that are accepted as part of the
|
|
36
|
+
// view definition: Prop, Events.
|
|
37
|
+
View(ZsUiView.self) {
|
|
38
|
+
// Defines a setter for the `name` prop.
|
|
39
|
+
Prop("name") { (view: ZsUiView, prop: String) in
|
|
40
|
+
print(prop)
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@0610studio/zs-ui",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "EXPO ZS-UI",
|
|
6
|
+
"main": "build/index.js",
|
|
7
|
+
"types": "build/index.d.ts",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"start:android": "cd example && yarn install && npx expo run:android",
|
|
10
|
+
"build": "expo-module build",
|
|
11
|
+
"prepare": "expo-module prepare",
|
|
12
|
+
"---------------------------------------------------------------------------": "",
|
|
13
|
+
"clean": "expo-module clean",
|
|
14
|
+
"lint": "expo-module lint",
|
|
15
|
+
"test": "expo-module test",
|
|
16
|
+
"prepublishOnly": "expo-module prepublishOnly",
|
|
17
|
+
"expo-module": "expo-module",
|
|
18
|
+
"open:ios": "xed example/ios",
|
|
19
|
+
"open:android": "open -a \"Android Studio\" example/android"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"react-native",
|
|
23
|
+
"expo",
|
|
24
|
+
"zs-ui",
|
|
25
|
+
"ZsUi"
|
|
26
|
+
],
|
|
27
|
+
"repository": "https://github.com/0610studio/zs-ui",
|
|
28
|
+
"author": "righthot <0610studio@naver.com> ()",
|
|
29
|
+
"license": "MIT",
|
|
30
|
+
"homepage": "https://github.com/0610studio/zs-ui",
|
|
31
|
+
"dependencies": {},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@react-native-async-storage/async-storage": "^2.0.0",
|
|
34
|
+
"@types/react": "^18.0.25",
|
|
35
|
+
"expo-module-scripts": "^3.5.2",
|
|
36
|
+
"expo-modules-core": "^1.12.24",
|
|
37
|
+
"react": ">=16.8.0",
|
|
38
|
+
"react-native": ">=0.63.0",
|
|
39
|
+
"react-native-gesture-handler": "^2.20.0",
|
|
40
|
+
"react-native-reanimated": "^3.16.0",
|
|
41
|
+
"react-native-safe-area-context": "^4.11.1",
|
|
42
|
+
"react-native-svg": "^15.8.0"
|
|
43
|
+
},
|
|
44
|
+
"peerDependencies": {
|
|
45
|
+
"@react-native-async-storage/async-storage": "*",
|
|
46
|
+
"expo": "*",
|
|
47
|
+
"react": "*",
|
|
48
|
+
"react-native": "*",
|
|
49
|
+
"react-native-gesture-handler": "*",
|
|
50
|
+
"react-native-reanimated": "*",
|
|
51
|
+
"react-native-safe-area-context": "*",
|
|
52
|
+
"react-native-svg": "*"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { EventEmitter } from 'expo-modules-core';
|
|
2
|
+
|
|
3
|
+
const emitter = new EventEmitter({} as any);
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
PI: Math.PI,
|
|
7
|
+
async setValueAsync(value: string): Promise<void> {
|
|
8
|
+
emitter.emit('onChange', { value });
|
|
9
|
+
},
|
|
10
|
+
hello() {
|
|
11
|
+
return 'Hello world! 👋';
|
|
12
|
+
},
|
|
13
|
+
};
|
package/src/ZsUiView.tsx
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { requireNativeViewManager } from 'expo-modules-core';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
import { ZsUiViewProps } from './ZsUi.types';
|
|
5
|
+
|
|
6
|
+
const NativeView: React.ComponentType<ZsUiViewProps> =
|
|
7
|
+
requireNativeViewManager('ZsUi');
|
|
8
|
+
|
|
9
|
+
export default function ZsUiView(props: ZsUiViewProps) {
|
|
10
|
+
return <NativeView {...props} />;
|
|
11
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Svg, { Path } from 'react-native-svg';
|
|
3
|
+
|
|
4
|
+
export const SvgCheck = ({ size = 24, color = '#fff', strokeWidth = "2" }) => {
|
|
5
|
+
return (
|
|
6
|
+
<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
7
|
+
<Path
|
|
8
|
+
d="M6 12L10.2426 16.2426L18.727 7.75732"
|
|
9
|
+
stroke={color}
|
|
10
|
+
strokeWidth={strokeWidth}
|
|
11
|
+
strokeLinecap="round"
|
|
12
|
+
strokeLinejoin="round"
|
|
13
|
+
/>
|
|
14
|
+
</Svg>
|
|
15
|
+
);
|
|
16
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Svg, { Path } from 'react-native-svg';
|
|
3
|
+
|
|
4
|
+
export const SvgX = ({ size = 12, color = '#5E696E' }) => {
|
|
5
|
+
const strokeWidth = size * 0.12;
|
|
6
|
+
|
|
7
|
+
return (
|
|
8
|
+
<Svg width={size} height={size} viewBox={`0 0 ${size} ${size}`}>
|
|
9
|
+
<Path
|
|
10
|
+
d={`
|
|
11
|
+
M ${size * 0.25} ${size * 0.25}
|
|
12
|
+
Q ${size / 2} ${size / 2} ${size * 0.75} ${size * 0.75}
|
|
13
|
+
M ${size * 0.25} ${size * 0.75}
|
|
14
|
+
Q ${size / 2} ${size / 2} ${size * 0.75} ${size * 0.25}
|
|
15
|
+
`}
|
|
16
|
+
stroke={color}
|
|
17
|
+
strokeWidth={strokeWidth}
|
|
18
|
+
strokeLinecap="round"
|
|
19
|
+
/>
|
|
20
|
+
</Svg>
|
|
21
|
+
);
|
|
22
|
+
};
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ZSView,
|
|
3
|
+
AnimatedWrapper,
|
|
4
|
+
TextAtom,
|
|
5
|
+
ScrollViewAtom,
|
|
6
|
+
ZSContainer,
|
|
7
|
+
ZSPressable,
|
|
8
|
+
ZSText,
|
|
9
|
+
ThrottleButton,
|
|
10
|
+
ZSTextField,
|
|
11
|
+
ZSRadioGroup,
|
|
12
|
+
ZSBottomButton,
|
|
13
|
+
types as uiTypes
|
|
14
|
+
} from './ui';
|
|
15
|
+
|
|
16
|
+
import {
|
|
17
|
+
AlertNotify,
|
|
18
|
+
BottomSheetNotify,
|
|
19
|
+
SnackbarNotify,
|
|
20
|
+
useNotifyProvider,
|
|
21
|
+
useNotify,
|
|
22
|
+
BSTextInput,
|
|
23
|
+
PopOverButton,
|
|
24
|
+
PopOverMenu,
|
|
25
|
+
types as notifyTypes
|
|
26
|
+
} from './notify';
|
|
27
|
+
|
|
28
|
+
export {
|
|
29
|
+
ZSView,
|
|
30
|
+
AnimatedWrapper,
|
|
31
|
+
TextAtom,
|
|
32
|
+
ScrollViewAtom,
|
|
33
|
+
ZSContainer,
|
|
34
|
+
ZSPressable,
|
|
35
|
+
ZSText,
|
|
36
|
+
ThrottleButton,
|
|
37
|
+
ZSTextField,
|
|
38
|
+
ZSRadioGroup,
|
|
39
|
+
ZSBottomButton,
|
|
40
|
+
// ---
|
|
41
|
+
AlertNotify,
|
|
42
|
+
BottomSheetNotify,
|
|
43
|
+
SnackbarNotify,
|
|
44
|
+
useNotifyProvider,
|
|
45
|
+
useNotify,
|
|
46
|
+
BSTextInput,
|
|
47
|
+
PopOverButton,
|
|
48
|
+
PopOverMenu,
|
|
49
|
+
// ---
|
|
50
|
+
uiTypes, // UI 관련 타입
|
|
51
|
+
notifyTypes // Notify 관련 타입
|
|
52
|
+
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { TextProps, TouchableOpacityProps } from "react-native";
|
|
3
|
+
|
|
4
|
+
export interface NotifyProps {
|
|
5
|
+
alertVisible: boolean;
|
|
6
|
+
setAlertVisible: (visible: boolean) => void;
|
|
7
|
+
// ---
|
|
8
|
+
snackItemStack: SnackItem[];
|
|
9
|
+
hideSnackBar: (index: number) => void;
|
|
10
|
+
// ---
|
|
11
|
+
bottomSheetVisible: boolean;
|
|
12
|
+
setBottomSheetVisible: (visible: boolean) => void;
|
|
13
|
+
// ---
|
|
14
|
+
loaderVisible: boolean;
|
|
15
|
+
// ---
|
|
16
|
+
popOverVisible: boolean;
|
|
17
|
+
setPopOverVisible: (visible: boolean) => void;
|
|
18
|
+
// ---
|
|
19
|
+
showAlert: (props: ShowAlertProps) => void;
|
|
20
|
+
showSnackBar: (props: ShowSnackBarProps) => void;
|
|
21
|
+
showBottomSheet: (props: ShowBottomSheetProps) => void;
|
|
22
|
+
showLoader: () => void;
|
|
23
|
+
showPopOverMenu: (props: PopOverMenuProps) => void;
|
|
24
|
+
// ---
|
|
25
|
+
hideNotify: (option: HideOption) => void;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface PopOverMenuProps {
|
|
29
|
+
px: number;
|
|
30
|
+
py: number;
|
|
31
|
+
component: React.ReactNode;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface ShowBottomSheetProps {
|
|
35
|
+
backgroundColor?: string;
|
|
36
|
+
isBottomRadius?: boolean;
|
|
37
|
+
marginHorizontal?: number;
|
|
38
|
+
isHandleVisible?: boolean;
|
|
39
|
+
marginBottom?: number;
|
|
40
|
+
padding?: number;
|
|
41
|
+
component: React.ReactNode;
|
|
42
|
+
contentsGestureEnable?: boolean;
|
|
43
|
+
maxHeight?: number;
|
|
44
|
+
isScrollView?: boolean;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export interface CustomSnackbarProps {
|
|
48
|
+
snackType: SnackType;
|
|
49
|
+
snackMessage: string;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export interface NotifyProviderProps {
|
|
53
|
+
children: ReactNode;
|
|
54
|
+
customSnackbar?: (props: CustomSnackbarProps) => React.ReactNode;
|
|
55
|
+
loaderComponent?: () => React.ReactNode;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export interface AlertAction {
|
|
59
|
+
label: string;
|
|
60
|
+
onPress?: () => void;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export interface ShowAlertProps {
|
|
64
|
+
title: string;
|
|
65
|
+
informative: string;
|
|
66
|
+
actions?: AlertActions;
|
|
67
|
+
isBackgroundTouchClose?: boolean;
|
|
68
|
+
titleStyle?: TextProps['style'];
|
|
69
|
+
informativeStyle?: TextProps['style'];
|
|
70
|
+
secondaryButtonStyle?: TouchableOpacityProps['style'];
|
|
71
|
+
primaryButtonStyle?: TouchableOpacityProps['style'];
|
|
72
|
+
secondaryButtonTextStyle?: TextProps['style'];
|
|
73
|
+
primaryButtonTextStyle?: TextProps['style'];
|
|
74
|
+
singleButtonTextStyle?: TextProps['style'];
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export interface AlertActions {
|
|
78
|
+
primary: AlertAction;
|
|
79
|
+
secondary?: AlertAction;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export interface SnackItem {
|
|
83
|
+
message: string;
|
|
84
|
+
type: SnackType;
|
|
85
|
+
index: number;
|
|
86
|
+
snackbarDuration?: number;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export type SnackType = 'success' | 'error' | '';
|
|
90
|
+
|
|
91
|
+
export type HideOption = 'all' | 'snack' | 'alert' | 'bottomSheet' | 'loader' | 'popOver';
|
|
92
|
+
|
|
93
|
+
export interface ShowSnackBarProps {
|
|
94
|
+
message: string;
|
|
95
|
+
type?: SnackType;
|
|
96
|
+
index?: number;
|
|
97
|
+
snackbarDuration?: number;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export interface BottomSheetRef {
|
|
101
|
+
handleVisible: (isOpen: boolean) => void;
|
|
102
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
import { NotifyProps } from './types';
|
|
3
|
+
|
|
4
|
+
const NotifyContext = createContext<NotifyProps | null>(null);
|
|
5
|
+
|
|
6
|
+
export const useNotify = () => {
|
|
7
|
+
const context = useContext(NotifyContext);
|
|
8
|
+
if (!context) {
|
|
9
|
+
throw new Error('useNotify must be used within a NotifyProvider');
|
|
10
|
+
}
|
|
11
|
+
return context;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default NotifyContext;
|