@0610studio/zs-ui 0.0.13 → 0.0.14

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 (48) hide show
  1. package/android/.gradle/8.9/checksums/checksums.lock +0 -0
  2. package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
  3. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  4. package/android/.gradle/buildOutputCleanup/cache.properties +1 -1
  5. package/build/index.d.ts +2 -1
  6. package/build/index.d.ts.map +1 -1
  7. package/build/index.js +4 -1
  8. package/build/index.js.map +1 -1
  9. package/build/model/index.d.ts +4 -0
  10. package/build/model/index.d.ts.map +1 -0
  11. package/build/model/index.js +4 -0
  12. package/build/model/index.js.map +1 -0
  13. package/docs/README.md +41 -0
  14. package/docs/blog/2024-11-12-welcome/docusaurus-plushie-banner.jpeg +0 -0
  15. package/docs/blog/2024-11-12-welcome/index.md +29 -0
  16. package/docs/blog/authors.yml +8 -0
  17. package/docs/blog/tags.yml +9 -0
  18. package/docs/docs/Theme/_category_.json +7 -0
  19. package/docs/docs/Theme/palette.md +107 -0
  20. package/docs/docs/Theme/typography.md +20 -0
  21. package/docs/docs/Theme/useTheme.md +29 -0
  22. package/docs/docs/UiComponent/ZSText.md +7 -0
  23. package/docs/docs/UiComponent/_category_.json +7 -0
  24. package/docs/docs/intro.md +76 -0
  25. package/docs/docs/provider.md +64 -0
  26. package/docs/docusaurus.config.ts +114 -0
  27. package/docs/package-lock.json +14998 -0
  28. package/docs/package.json +48 -0
  29. package/docs/sidebars.ts +33 -0
  30. package/docs/src/components/HomepageFeatures/index.tsx +70 -0
  31. package/docs/src/components/HomepageFeatures/styles.module.css +11 -0
  32. package/docs/src/css/custom.css +30 -0
  33. package/docs/src/pages/index.module.css +23 -0
  34. package/docs/src/pages/index.tsx +43 -0
  35. package/docs/src/pages/markdown-page.md +7 -0
  36. package/docs/static/.nojekyll +0 -0
  37. package/docs/static/img/docusaurus-social-card.jpg +0 -0
  38. package/docs/static/img/docusaurus.png +0 -0
  39. package/docs/static/img/favicon.ico +0 -0
  40. package/docs/static/img/logo.svg +1 -0
  41. package/docs/static/img/undraw_docusaurus_mountain.svg +171 -0
  42. package/docs/static/img/undraw_docusaurus_react.svg +170 -0
  43. package/docs/static/img/undraw_docusaurus_tree.svg +40 -0
  44. package/docs/tsconfig.json +7 -0
  45. package/docs/yarn.lock +8668 -0
  46. package/package.json +1 -1
  47. package/src/index.ts +10 -0
  48. package/src/model/index.ts +8 -0
@@ -1,2 +1,2 @@
1
- #Tue Oct 22 20:15:01 KST 2024
1
+ #Tue Nov 05 10:55:22 KST 2024
2
2
  gradle.version=8.9
package/build/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
+ import { useTheme, NotifyProvider, ThemeProvider } from './model';
1
2
  import { ZSView, AnimatedWrapper, TextAtom, ScrollViewAtom, ZSContainer, ZSPressable, ZSText, ThrottleButton, ZSTextField, ZSRadioGroup, ZSBottomButton, types as uiTypes } from './ui';
2
3
  import { AlertNotify, BottomSheetNotify, SnackbarNotify, useNotifyProvider, useNotify, BSTextInput, PopOverButton, PopOverMenu, types as notifyTypes } from './notify';
3
- export { ZSView, AnimatedWrapper, TextAtom, ScrollViewAtom, ZSContainer, ZSPressable, ZSText, ThrottleButton, ZSTextField, ZSRadioGroup, ZSBottomButton, AlertNotify, BottomSheetNotify, SnackbarNotify, useNotifyProvider, useNotify, BSTextInput, PopOverButton, PopOverMenu, uiTypes, // UI 관련 타입
4
+ export { useTheme, NotifyProvider, ThemeProvider, ZSView, AnimatedWrapper, TextAtom, ScrollViewAtom, ZSContainer, ZSPressable, ZSText, ThrottleButton, ZSTextField, ZSRadioGroup, ZSBottomButton, AlertNotify, BottomSheetNotify, SnackbarNotify, useNotifyProvider, useNotify, BSTextInput, PopOverButton, PopOverMenu, uiTypes, // UI 관련 타입
4
5
  notifyTypes };
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,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,IAAI,OAAO,EACjB,MAAM,MAAM,CAAC;AAEd,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,SAAS,EACT,WAAW,EACX,aAAa,EACb,WAAW,EACX,KAAK,IAAI,WAAW,EACrB,MAAM,UAAU,CAAC;AAElB,OAAO,EACL,MAAM,EACN,eAAe,EACf,QAAQ,EACR,cAAc,EACd,WAAW,EACX,WAAW,EACX,MAAM,EACN,cAAc,EACd,WAAW,EACX,YAAY,EACZ,cAAc,EAEd,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,SAAS,EACT,WAAW,EACX,aAAa,EACb,WAAW,EAEX,OAAO,EAAO,WAAW;AACzB,WAAW,EACZ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,cAAc,EACd,aAAa,EACd,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,EACd,KAAK,IAAI,OAAO,EACjB,MAAM,MAAM,CAAC;AAEd,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,SAAS,EACT,WAAW,EACX,aAAa,EACb,WAAW,EACX,KAAK,IAAI,WAAW,EACrB,MAAM,UAAU,CAAC;AAElB,OAAO,EACL,QAAQ,EACR,cAAc,EACd,aAAa,EAEb,MAAM,EACN,eAAe,EACf,QAAQ,EACR,cAAc,EACd,WAAW,EACX,WAAW,EACX,MAAM,EACN,cAAc,EACd,WAAW,EACX,YAAY,EACZ,cAAc,EAEd,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,SAAS,EACT,WAAW,EACX,aAAa,EACb,WAAW,EAEX,OAAO,EAAO,WAAW;AACzB,WAAW,EACZ,CAAC"}
package/build/index.js CHANGED
@@ -1,6 +1,9 @@
1
+ import { useTheme, NotifyProvider, ThemeProvider, } from './model';
1
2
  import { ZSView, AnimatedWrapper, TextAtom, ScrollViewAtom, ZSContainer, ZSPressable, ZSText, ThrottleButton, ZSTextField, ZSRadioGroup, ZSBottomButton, types as uiTypes } from './ui';
2
3
  import { AlertNotify, BottomSheetNotify, SnackbarNotify, useNotifyProvider, useNotify, BSTextInput, PopOverButton, PopOverMenu, types as notifyTypes } from './notify';
3
- export { ZSView, AnimatedWrapper, TextAtom, ScrollViewAtom, ZSContainer, ZSPressable, ZSText, ThrottleButton, ZSTextField, ZSRadioGroup, ZSBottomButton,
4
+ export { useTheme, NotifyProvider, ThemeProvider,
5
+ // ---
6
+ ZSView, AnimatedWrapper, TextAtom, ScrollViewAtom, ZSContainer, ZSPressable, ZSText, ThrottleButton, ZSTextField, ZSRadioGroup, ZSBottomButton,
4
7
  // ---
5
8
  AlertNotify, BottomSheetNotify, SnackbarNotify, useNotifyProvider, useNotify, BSTextInput, PopOverButton, PopOverMenu,
6
9
  // ---
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,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,IAAI,OAAO,EACjB,MAAM,MAAM,CAAC;AAEd,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,SAAS,EACT,WAAW,EACX,aAAa,EACb,WAAW,EACX,KAAK,IAAI,WAAW,EACrB,MAAM,UAAU,CAAC;AAElB,OAAO,EACL,MAAM,EACN,eAAe,EACf,QAAQ,EACR,cAAc,EACd,WAAW,EACX,WAAW,EACX,MAAM,EACN,cAAc,EACd,WAAW,EACX,YAAY,EACZ,cAAc;AACd,MAAM;AACN,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,SAAS,EACT,WAAW,EACX,aAAa,EACb,WAAW;AACX,MAAM;AACN,OAAO,EAAO,WAAW;AACzB,WAAW,CAAG,eAAe;EAC9B,CAAC","sourcesContent":["import { \n ZSView,\n AnimatedWrapper,\n TextAtom,\n ScrollViewAtom,\n ZSContainer,\n ZSPressable,\n ZSText,\n ThrottleButton,\n ZSTextField,\n ZSRadioGroup,\n ZSBottomButton,\n types as uiTypes \n} from './ui';\n\nimport { \n AlertNotify, \n BottomSheetNotify, \n SnackbarNotify, \n useNotifyProvider, \n useNotify,\n BSTextInput,\n PopOverButton,\n PopOverMenu,\n types as notifyTypes \n} from './notify';\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 // ---\n AlertNotify, \n BottomSheetNotify, \n SnackbarNotify, \n useNotifyProvider, \n useNotify, \n BSTextInput,\n PopOverButton,\n PopOverMenu,\n // ---\n uiTypes, // UI 관련 타입\n notifyTypes // Notify 관련 타입\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,cAAc,EACd,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,EACd,KAAK,IAAI,OAAO,EACjB,MAAM,MAAM,CAAC;AAEd,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,SAAS,EACT,WAAW,EACX,aAAa,EACb,WAAW,EACX,KAAK,IAAI,WAAW,EACrB,MAAM,UAAU,CAAC;AAElB,OAAO,EACL,QAAQ,EACR,cAAc,EACd,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;AACd,MAAM;AACN,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,SAAS,EACT,WAAW,EACX,aAAa,EACb,WAAW;AACX,MAAM;AACN,OAAO,EAAO,WAAW;AACzB,WAAW,CAAG,eAAe;EAC9B,CAAC","sourcesContent":["import {\n useTheme,\n NotifyProvider,\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 types as uiTypes \n} from './ui';\n\nimport { \n AlertNotify, \n BottomSheetNotify, \n SnackbarNotify, \n useNotifyProvider, \n useNotify,\n BSTextInput,\n PopOverButton,\n PopOverMenu,\n types as notifyTypes \n} from './notify';\n\nexport {\n useTheme,\n NotifyProvider,\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 // ---\n AlertNotify, \n BottomSheetNotify, \n SnackbarNotify, \n useNotifyProvider, \n useNotify, \n BSTextInput,\n PopOverButton,\n PopOverMenu,\n // ---\n uiTypes, // UI 관련 타입\n notifyTypes // Notify 관련 타입\n};\n"]}
@@ -0,0 +1,4 @@
1
+ import { NotifyProvider } from "./useNotifyProvider";
2
+ import { ThemeProvider, useTheme } from "./useThemeProvider";
3
+ export { useTheme, NotifyProvider, ThemeProvider, };
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/model/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE7D,OAAO,EACL,QAAQ,EACR,cAAc,EACd,aAAa,GACd,CAAA"}
@@ -0,0 +1,4 @@
1
+ import { NotifyProvider } from "./useNotifyProvider";
2
+ import { ThemeProvider, useTheme } from "./useThemeProvider";
3
+ export { useTheme, NotifyProvider, ThemeProvider, };
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/model/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE7D,OAAO,EACL,QAAQ,EACR,cAAc,EACd,aAAa,GACd,CAAA","sourcesContent":["import { NotifyProvider } from \"./useNotifyProvider\"; \nimport { ThemeProvider, useTheme } from \"./useThemeProvider\";\n\nexport {\n useTheme,\n NotifyProvider,\n ThemeProvider,\n}\n"]}
package/docs/README.md ADDED
@@ -0,0 +1,41 @@
1
+ # Website
2
+
3
+ This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
4
+
5
+ ### Installation
6
+
7
+ ```
8
+ $ yarn
9
+ ```
10
+
11
+ ### Local Development
12
+
13
+ ```
14
+ $ yarn start
15
+ ```
16
+
17
+ This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
18
+
19
+ ### Build
20
+
21
+ ```
22
+ $ yarn build
23
+ ```
24
+
25
+ This command generates static content into the `build` directory and can be served using any static contents hosting service.
26
+
27
+ ### Deployment
28
+
29
+ Using SSH:
30
+
31
+ ```
32
+ $ USE_SSH=true yarn deploy
33
+ ```
34
+
35
+ Not using SSH:
36
+
37
+ ```
38
+ $ GIT_USER=<Your GitHub username> yarn deploy
39
+ ```
40
+
41
+ If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
@@ -0,0 +1,29 @@
1
+ ---
2
+ slug: welcome
3
+ title: Welcome
4
+ authors: [rightHot]
5
+ tags: [zsUi, barabom]
6
+ ---
7
+
8
+ `ZS-ui`는 `바라봄APP`에서 사용되는 UI 컴포넌트를 분리하기 위해 개발되었습니다.
9
+
10
+ 단순한 구조를 지향하여, Expo를 시작하는 분들에게 영감을 주는 라이브러리가 되었으면 합니다.
11
+
12
+ <!-- truncate -->
13
+
14
+ <br />
15
+
16
+ 현재 `바라봄APP`은 React Native CLI에서 Expo로 마이그레이션 작업 중이며, `ZS-ui`와 함께 활발히 개발하고 있습니다.
17
+
18
+ 바라봄 앱에 대한 자세한 정보는 아래에서 확인 가능합니다.
19
+
20
+ <div style={{ textAlign: 'left' }}>
21
+ <img src="https://barabom.me/assets/img_orimage.jpg" style={{ width: 500, height: 250 }} />
22
+ </div>
23
+
24
+
25
+ - **홈페이지**: [https://barabom.me](https://barabom.me)
26
+
27
+ - **구글 플레이**: [다운로드 링크](https://play.google.com/store/apps/details?id=com.rn_drpet)
28
+
29
+ - **애플 앱스토어**: [다운로드 링크](https://apps.apple.com/kr/app/id1516235091)
@@ -0,0 +1,8 @@
1
+ rightHot:
2
+ name: 김정훈
3
+ title: Front End Engineer
4
+ url: https://github.com/KimJeonghun91
5
+ image_url: https://kimjeonghun91.github.io/assets/img/me.png
6
+ page: true
7
+ socials:
8
+ github: KimJeonghun91
@@ -0,0 +1,9 @@
1
+ zsUi:
2
+ label: ZS-ui
3
+ permalink: /zsui
4
+ description: ZS-ui tag description
5
+
6
+ barabom:
7
+ label: 바라봄
8
+ permalink: /barabom
9
+ description: barabom tag description
@@ -0,0 +1,7 @@
1
+ {
2
+ "label": "Theme",
3
+ "position": 3,
4
+ "link": {
5
+ "type": "generated-index"
6
+ }
7
+ }
@@ -0,0 +1,107 @@
1
+ ---
2
+ sidebar_position: 2
3
+ ---
4
+
5
+ # palette
6
+
7
+ 색상 팔레트를 설정하는 함수로, 라이트 및 다크 모드를 포함하며 사용자 정의 색상 팔레트를 지원합니다.
8
+
9
+
10
+ ### 기본 사용법
11
+
12
+ ```tsx
13
+ import { useTheme } from '@0610studio/zs-ui/src/model/useThemeProvider';
14
+
15
+ const {
16
+ palette: {
17
+ toggleTheme,
18
+ mode,
19
+ background,
20
+ text,
21
+ primary,
22
+ secondary,
23
+ danger,
24
+ warning,
25
+ success,
26
+ information,
27
+ },
28
+ } = useTheme();
29
+ ```
30
+
31
+ - 테마 모드 전환: toggleTheme 함수를 통해 라이트와 다크 모드를 전환할 수 있습니다.
32
+
33
+ - 현재 테마 모드 확인: mode 값을 통해 현재 테마가 'light'인지 'dark'인지 확인할 수 있습니다.
34
+
35
+
36
+ ```tsx
37
+ <Pressable onPress={toggleTheme}>
38
+ <Text>현재 모드: {mode}</Text>
39
+ </Pressable>
40
+ ```
41
+
42
+ <br />
43
+
44
+ ### 색상 팔레트
45
+
46
+ 각 테마 색상은 primary, secondary, danger, warning, success, information 과 같이 지정되어 있으며, 팔레트의 각 색상은 라이트와 다크 모드를 지원합니다.
47
+
48
+ ```tsx
49
+ <View style={{ backgroundColor: primary.lighter }}>
50
+ <Text style={styles.textWhite}>Primary Lighter</Text>
51
+ </View>
52
+ <View style={{ backgroundColor: primary.main }}>
53
+ <Text style={styles.textWhite}>Primary Main</Text>
54
+ </View>
55
+ <View style={{ backgroundColor: secondary.main }}>
56
+ <Text style={styles.textWhite}>Secondary Main</Text>
57
+ </View>
58
+
59
+ <Text style={{ color: text.primary }}>Text Primary Color</Text>
60
+ <Text style={{ color: text.secondary }}>Text Secondary Color</Text>
61
+ <Text style={{ color: text.danger }}>Text Danger Color</Text>
62
+ <Text style={{ color: text.warning }}>Text Warning Color</Text>
63
+ <Text style={{ color: text.success }}>Text Success Color</Text>
64
+ <Text style={{ color: text.information }}>Text Information Color</Text>
65
+ ```
66
+
67
+ **타입**
68
+
69
+ ```tsx title="ColorPalette 타입"
70
+ export type ColorPalette = {
71
+ 0: string;
72
+ 5: string;
73
+ 10: string; // p-lighter
74
+ 20: string; // p-light
75
+ 30: string;
76
+ 40: string;
77
+ 50: string; // p-main
78
+ 60: string; // p-dark
79
+ 70: string; // p-darker
80
+ 80: string;
81
+ 90: string;
82
+ 100: string;
83
+ main: string;
84
+ };
85
+
86
+ export type ColorPaletteExtend = ColorPalette & {
87
+ lighter: string;
88
+ light: string;
89
+ dark: string;
90
+ darker: string;
91
+ };
92
+ ```
93
+
94
+ ```json title="텍스트 타입"
95
+ {
96
+ main: string;
97
+ primary: string;
98
+ secondary: string;
99
+ disabled: string;
100
+ danger: string;
101
+ warning: string;
102
+ success: string;
103
+ information: string;
104
+ white: string;
105
+ black: string;
106
+ }
107
+ ```
@@ -0,0 +1,20 @@
1
+ ---
2
+ sidebar_position: 3
3
+ ---
4
+
5
+ # typography
6
+
7
+ ZS-ui component가 아닌 style 에서도 적용할 수 있도록 useTheme 에서 typography 를 제공합니다.
8
+
9
+
10
+ ### 사용법
11
+
12
+ ```tsx
13
+ import { useTheme } from '@0610studio/zs-ui/src/model/useThemeProvider';
14
+ import { Text } from 'react-native';
15
+
16
+ const { typography } = useTheme();
17
+
18
+ <Text style={{fontFamily: typography.themeFonts[400]}}></Text>
19
+ ```
20
+
@@ -0,0 +1,29 @@
1
+ ---
2
+ sidebar_position: 1
3
+ ---
4
+
5
+ # useTheme
6
+
7
+ useTheme는 ThemeContext에서 테마 속성을 가져와 사용하는 훅입니다.
8
+
9
+ ThemeProvider 외부에서 호출할 경우 오류가 발생합니다.
10
+
11
+ 각 테마 색상은 `primary`, `secondary`, `danger`, `warning`, `success`, `information`과 같은 다양한 상태에 맞게 정의되어 있으며, 기본 배경과 텍스트 색상도 포함되어있습니다.
12
+
13
+ <br />
14
+
15
+ ### 시스템 색상 설정 감지
16
+
17
+ `useColorScheme` 훅을 사용하여 시스템의 다크 모드 설정을 감지합니다.
18
+
19
+ <br />
20
+
21
+ ### AsyncStorage 사용
22
+
23
+ themeMode와 useSystemColorScheme 값은 AsyncStorage에 저장되어 있어 사용자가 앱을 다시 열 때 동일한 테마가 적용됩니다.
24
+
25
+ <br />
26
+
27
+ ### 테마 토글 함수
28
+
29
+ `toggleTheme` : 사용자가 테마를 라이트와 다크 모드 사이에서 전환할 수 있습니다. 이 함수는 AsyncStorage에 모드를 저장합니다.
@@ -0,0 +1,7 @@
1
+ ---
2
+ sidebar_position: 1
3
+ ---
4
+
5
+ # ZSText
6
+
7
+
@@ -0,0 +1,7 @@
1
+ {
2
+ "label": "UI 컴포넌트",
3
+ "position": 4,
4
+ "link": {
5
+ "type": "generated-index"
6
+ }
7
+ }
@@ -0,0 +1,76 @@
1
+ ---
2
+ sidebar_position: 1
3
+ ---
4
+
5
+ # 개요
6
+
7
+ `ZS-ui`는 JavaScript만으로 구현된 `Expo`용 UI 컴포넌트 라이브러리입니다.
8
+
9
+ 다크 모드, 테마, 타이포그래피(Typo), Alert와 같은 주요 UI 요소가 포함되어 있으며, 직관적이고 일관된 사용자 인터페이스를 구현할 수 있습니다.
10
+
11
+ <div style={{
12
+ display: 'flex',
13
+ overflowX: 'auto',
14
+ gap: '20px',
15
+ padding: '0 10px 0 0'
16
+ }}>
17
+ <div style={{
18
+ minWidth: '300px',
19
+ flexShrink: 0
20
+ }}>
21
+ <video controls width="300">
22
+ <source src="https://github.com/user-attachments/assets/7b66915e-163e-4abe-9fab-fb25e33d7a88" type="video/mp4" />
23
+ </video>
24
+ <p>테마</p>
25
+ </div>
26
+ <div style={{
27
+ minWidth: '300px',
28
+ flexShrink: 0
29
+ }}>
30
+ <video controls width="300">
31
+ <source src="https://github.com/user-attachments/assets/73f59984-fc7b-4004-a516-089a2969ea1d" type="video/mp4" />
32
+ </video>
33
+ <p>UI 컴포넌트</p>
34
+ </div>
35
+ <div style={{
36
+ minWidth: '300px',
37
+ flexShrink: 0
38
+ }}>
39
+ <video controls width="300">
40
+ <source src="https://github.com/user-attachments/assets/24918e91-9afc-4777-b6c7-b914bfb30e60" type="video/mp4" />
41
+ </video>
42
+ <p>Notify 컴포넌트</p>
43
+ </div>
44
+ </div>
45
+
46
+ <br />
47
+
48
+ # 설치방법
49
+
50
+ 아래 명령어를 통해 필요한 패키지들을 설치합니다.
51
+
52
+ ```sql
53
+ # 필수 패키지 설치
54
+ npx expo install @react-native-async-storage/async-storage react-native-gesture-handler react-native-reanimated react-native-svg react-native-safe-area-context
55
+
56
+ # ZS UI 라이브러리 설치
57
+ npx expo install @0610studio/zs-ui
58
+ ```
59
+
60
+ <br />
61
+
62
+ # 폴더 구조
63
+
64
+ ```sql
65
+ root/
66
+ ├── example/ # 예제 폴더 - 라이브러리 사용 예제
67
+
68
+ ├── src/
69
+ │ ├── assets/ # 폰트와 이미지 같은 정적 파일들을 저장
70
+ │ ├── model/ # Provider 및 전역 상태 관리 관련 폴더
71
+ │ ├── notify/ # Alert, 스낵바, 바텀시트 등의 알림 관련 UI 컴포넌트
72
+ │ ├── theme/ # 색상 팔레트와 타이포그래피 등의 테마 설정 파일
73
+ │ └── ui/ # UI 컴포넌트와 atomic 기본 요소들
74
+ └──
75
+ ```
76
+
@@ -0,0 +1,64 @@
1
+ ---
2
+ sidebar_position: 2
3
+ ---
4
+
5
+ # Provider 구성
6
+
7
+ 프로젝트에서 `ZS-ui`를 사용할 때 필요한 Provider를 최상위 경로에 추가합니다.
8
+
9
+ ### ThemeProvider
10
+
11
+ ThemeProvider는 프로젝트 전반에서 사용할 폰트와 테마 관련 설정을 관리합니다.
12
+
13
+ - `themeFonts` : 폰트 굵기별로 사용할 폰트 이름을 정의합니다.
14
+
15
+ - `requireFonts` : require 구문을 사용하여 각 폰트 파일을 로드합니다.
16
+
17
+
18
+ ### NotifyProvider
19
+
20
+ NotifyProvider는 프로젝트 전역에서 사용할 알림 시스템을 관리합니다. customSnackbar와 loaderComponent를 통해 커스텀 스낵바 및 로더 컴포넌트를 설정할 수 있습니다.
21
+
22
+ - `customSnackbar` : 알림을 표시할 때 사용할 사용자 정의 스낵바 컴포넌트입니다. 프로젝트에 맞게 커스터마이징한 스낵바를 설정할 수 있습니다.
23
+
24
+ - `loaderComponent` : 로딩 상태에서 사용할 사용자 정의 로더 컴포넌트입니다.
25
+
26
+
27
+ ### 예제
28
+
29
+ ```tsx title="app/_layout.tsx"
30
+ const themeFonts = {
31
+ 100: 'Pretendard-Thin',
32
+ 200: 'Pretendard-ExtraLight',
33
+ 300: 'Pretendard-Light',
34
+ 400: 'Pretendard-Regular',
35
+ 500: 'Pretendard-Medium',
36
+ 600: 'Pretendard-SemiBold',
37
+ 700: 'Pretendard-Bold',
38
+ 800: 'Pretendard-ExtraBold',
39
+ 900: 'Pretendard-Black',
40
+ };
41
+
42
+ const requireFonts = {
43
+ 'Pretendard-Thin': require('../assets/fonts/Pretendard-Thin.otf'),
44
+ 'Pretendard-ExtraLight': require('../assets/fonts/Pretendard-ExtraLight.otf'),
45
+ 'Pretendard-Light': require('../assets/fonts/Pretendard-Light.otf'),
46
+ 'Pretendard-Regular': require('../assets/fonts/Pretendard-Regular.otf'),
47
+ 'Pretendard-Medium': require('../assets/fonts/Pretendard-Medium.otf'),
48
+ 'Pretendard-SemiBold': require('../assets/fonts/Pretendard-SemiBold.otf'),
49
+ 'Pretendard-Bold': require('../assets/fonts/Pretendard-Bold.otf'),
50
+ 'Pretendard-ExtraBold': require('../assets/fonts/Pretendard-ExtraBold.otf'),
51
+ 'Pretendard-Black': require('../assets/fonts/Pretendard-Black.otf'),
52
+ };
53
+
54
+ const [loaded] = useFonts(requireFonts);
55
+
56
+ <ThemeProvider themeFonts={themeFonts}>
57
+ <NotifyProvider
58
+ customSnackbar={SnackBar} // Optional - 사용자 정의 스낵바 컴포넌트
59
+ loaderComponent={LoadingLottieComponent} // Optional - 사용자 정의 로더 컴포넌트
60
+ >
61
+
62
+ </NotifyProvider>
63
+ </ThemeProvider>
64
+ ```
@@ -0,0 +1,114 @@
1
+ import {themes as prismThemes} from 'prism-react-renderer';
2
+ import type {Config} from '@docusaurus/types';
3
+ import type * as Preset from '@docusaurus/preset-classic';
4
+
5
+ // This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
6
+
7
+ const config: Config = {
8
+ title: 'ZS-ui',
9
+ tagline: 'Expo용 UI 라이브러리',
10
+ favicon: 'img/favicon.ico',
11
+
12
+ url: 'https://0610studio.github.io',
13
+ baseUrl: '/zs-ui/',
14
+
15
+ organizationName: '0610studio', // Usually your GitHub org/user name.
16
+ projectName: 'zs-ui', // Usually your repo name.
17
+
18
+ onBrokenLinks: 'throw',
19
+ onBrokenMarkdownLinks: 'warn',
20
+
21
+ i18n: {
22
+ defaultLocale: 'ko',
23
+ locales: ['ko'],
24
+ },
25
+
26
+ presets: [
27
+ [
28
+ 'classic',
29
+ {
30
+ docs: {
31
+ sidebarPath: './sidebars.ts',
32
+ // Please change this to your repo.
33
+ // Remove this to remove the "edit this page" links.
34
+ editUrl: 'https://github.com/0610studio/zs-ui/tree/main/',
35
+ },
36
+ blog: {
37
+ showReadingTime: true,
38
+ feedOptions: {
39
+ type: ['rss', 'atom'],
40
+ xslt: true,
41
+ },
42
+ editUrl: 'https://github.com/0610studio/zs-ui/tree/main/',
43
+ onInlineTags: 'warn',
44
+ onInlineAuthors: 'warn',
45
+ onUntruncatedBlogPosts: 'warn',
46
+ },
47
+ theme: {
48
+ customCss: './src/css/custom.css',
49
+ },
50
+ } satisfies Preset.Options,
51
+ ],
52
+ ],
53
+
54
+ themeConfig: {
55
+ // Replace with your project's social card
56
+ image: 'img/docusaurus-social-card.jpg',
57
+ navbar: {
58
+ title: 'Expo ZS-ui',
59
+ logo: {
60
+ alt: 'Expo ZS-ui Logo',
61
+ src: 'img/logo.svg',
62
+ },
63
+ items: [
64
+ {
65
+ type: 'docSidebar',
66
+ sidebarId: 'tutorialSidebar',
67
+ position: 'left',
68
+ label: '문서',
69
+ },
70
+ {to: '/blog', label: '블로그', position: 'left'},
71
+ {
72
+ href: 'https://github.com/0610studio/zs-ui',
73
+ label: 'GitHub',
74
+ position: 'right',
75
+ },
76
+ ],
77
+ },
78
+ footer: {
79
+ style: 'light',
80
+ links: [
81
+ {
82
+ title: 'Docs',
83
+ items: [
84
+ {
85
+ label: '문서',
86
+ to: '/docs/intro',
87
+ },
88
+ ],
89
+ },
90
+ {
91
+ title: 'More',
92
+ items: [
93
+ {
94
+ label: 'Blog',
95
+ to: '/blog',
96
+ },
97
+ {
98
+ label: 'GitHub',
99
+ href: 'https://github.com/0610studio/zs-ui',
100
+ },
101
+ ],
102
+ },
103
+ ],
104
+ copyright: `Copyright © ${new Date().getFullYear()} 0610studio, Inc. Built with Docusaurus.`,
105
+ },
106
+ prism: {
107
+ theme: prismThemes.github,
108
+ darkTheme: prismThemes.dracula,
109
+ },
110
+ trailingSlash: true,
111
+ } satisfies Preset.ThemeConfig,
112
+ };
113
+
114
+ export default config;