@kukkim/react-native-ui 0.1.3 → 0.1.5

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 (126) hide show
  1. package/lib/module/assets/icons/apple.svg +1 -0
  2. package/lib/module/assets/icons/facebook.svg +1 -0
  3. package/lib/module/assets/icons/google.svg +1 -0
  4. package/lib/module/assets/icons/kakaotalk.svg +1 -0
  5. package/lib/module/assets/icons/loader-circle.svg +1 -0
  6. package/lib/module/assets/icons/naver.svg +1 -0
  7. package/lib/module/components/badge/commonBadge.js +18 -16
  8. package/lib/module/components/badge/commonBadge.js.map +1 -1
  9. package/lib/module/components/badge/numberBadge.js +47 -0
  10. package/lib/module/components/badge/numberBadge.js.map +1 -0
  11. package/lib/module/components/button/index.js +2 -1
  12. package/lib/module/components/button/index.js.map +1 -1
  13. package/lib/module/components/button/socialLoginButton.js +48 -0
  14. package/lib/module/components/button/socialLoginButton.js.map +1 -0
  15. package/lib/module/components/card/foldableCard.js +9 -18
  16. package/lib/module/components/card/foldableCard.js.map +1 -1
  17. package/lib/module/components/icon/Apple.js +18 -0
  18. package/lib/module/components/icon/Apple.js.map +1 -0
  19. package/lib/module/components/icon/Facebook.js +18 -0
  20. package/lib/module/components/icon/Facebook.js.map +1 -0
  21. package/lib/module/components/icon/Google.js +18 -0
  22. package/lib/module/components/icon/Google.js.map +1 -0
  23. package/lib/module/components/icon/Kakaotalk.js +18 -0
  24. package/lib/module/components/icon/Kakaotalk.js.map +1 -0
  25. package/lib/module/components/icon/LoaderCircle.js +24 -0
  26. package/lib/module/components/icon/LoaderCircle.js.map +1 -0
  27. package/lib/module/components/icon/Naver.js +18 -0
  28. package/lib/module/components/icon/Naver.js.map +1 -0
  29. package/lib/module/components/icon/index.js +15 -2
  30. package/lib/module/components/icon/index.js.map +1 -1
  31. package/lib/module/components/index.js +4 -1
  32. package/lib/module/components/index.js.map +1 -1
  33. package/lib/module/components/select/commonSelect.js +135 -0
  34. package/lib/module/components/select/commonSelect.js.map +1 -0
  35. package/lib/module/components/select/index.js +5 -0
  36. package/lib/module/components/select/index.js.map +1 -0
  37. package/lib/module/components/select/types.js +4 -0
  38. package/lib/module/components/select/types.js.map +1 -0
  39. package/lib/module/components/slider/index.js +103 -1
  40. package/lib/module/components/slider/index.js.map +1 -1
  41. package/lib/module/components/slider/types.js +2 -0
  42. package/lib/module/components/spinner/commonSpinner.js +49 -0
  43. package/lib/module/components/spinner/commonSpinner.js.map +1 -0
  44. package/lib/module/components/spinner/index.js +3 -1
  45. package/lib/module/components/spinner/index.js.map +1 -1
  46. package/lib/module/components/spinner/types.js +2 -0
  47. package/lib/module/index.js +1 -1
  48. package/lib/module/index.js.map +1 -1
  49. package/lib/typescript/src/components/badge/commonBadge.d.ts +1 -1
  50. package/lib/typescript/src/components/badge/commonBadge.d.ts.map +1 -1
  51. package/lib/typescript/src/components/badge/numberBadge.d.ts +4 -0
  52. package/lib/typescript/src/components/badge/numberBadge.d.ts.map +1 -0
  53. package/lib/typescript/src/components/button/index.d.ts +2 -1
  54. package/lib/typescript/src/components/button/index.d.ts.map +1 -1
  55. package/lib/typescript/src/components/button/socialLoginButton.d.ts +4 -0
  56. package/lib/typescript/src/components/button/socialLoginButton.d.ts.map +1 -0
  57. package/lib/typescript/src/components/button/types.d.ts +3 -0
  58. package/lib/typescript/src/components/button/types.d.ts.map +1 -1
  59. package/lib/typescript/src/components/card/foldableCard.d.ts.map +1 -1
  60. package/lib/typescript/src/components/icon/Apple.d.ts +4 -0
  61. package/lib/typescript/src/components/icon/Apple.d.ts.map +1 -0
  62. package/lib/typescript/src/components/icon/Facebook.d.ts +4 -0
  63. package/lib/typescript/src/components/icon/Facebook.d.ts.map +1 -0
  64. package/lib/typescript/src/components/icon/Google.d.ts +4 -0
  65. package/lib/typescript/src/components/icon/Google.d.ts.map +1 -0
  66. package/lib/typescript/src/components/icon/Kakaotalk.d.ts +4 -0
  67. package/lib/typescript/src/components/icon/Kakaotalk.d.ts.map +1 -0
  68. package/lib/typescript/src/components/icon/LoaderCircle.d.ts +4 -0
  69. package/lib/typescript/src/components/icon/LoaderCircle.d.ts.map +1 -0
  70. package/lib/typescript/src/components/icon/Naver.d.ts +4 -0
  71. package/lib/typescript/src/components/icon/Naver.d.ts.map +1 -0
  72. package/lib/typescript/src/components/icon/index.d.ts.map +1 -1
  73. package/lib/typescript/src/components/icon/types.d.ts +1 -1
  74. package/lib/typescript/src/components/icon/types.d.ts.map +1 -1
  75. package/lib/typescript/src/components/index.d.ts +4 -1
  76. package/lib/typescript/src/components/index.d.ts.map +1 -1
  77. package/lib/typescript/src/components/select/commonSelect.d.ts +5 -0
  78. package/lib/typescript/src/components/select/commonSelect.d.ts.map +1 -0
  79. package/lib/typescript/src/components/select/index.d.ts +3 -0
  80. package/lib/typescript/src/components/select/index.d.ts.map +1 -0
  81. package/lib/typescript/src/components/select/types.d.ts +16 -0
  82. package/lib/typescript/src/components/select/types.d.ts.map +1 -0
  83. package/lib/typescript/src/components/slider/index.d.ts +2 -0
  84. package/lib/typescript/src/components/slider/index.d.ts.map +1 -1
  85. package/lib/typescript/src/components/slider/types.d.ts +9 -0
  86. package/lib/typescript/src/components/slider/types.d.ts.map +1 -1
  87. package/lib/typescript/src/components/spinner/commonSpinner.d.ts +4 -0
  88. package/lib/typescript/src/components/spinner/commonSpinner.d.ts.map +1 -0
  89. package/lib/typescript/src/components/spinner/index.d.ts +2 -0
  90. package/lib/typescript/src/components/spinner/index.d.ts.map +1 -1
  91. package/lib/typescript/src/components/spinner/types.d.ts +8 -0
  92. package/lib/typescript/src/components/spinner/types.d.ts.map +1 -1
  93. package/lib/typescript/src/index.d.ts +1 -1
  94. package/lib/typescript/src/index.d.ts.map +1 -1
  95. package/package.json +3 -1
  96. package/src/assets/icons/apple.svg +1 -0
  97. package/src/assets/icons/facebook.svg +1 -0
  98. package/src/assets/icons/google.svg +1 -0
  99. package/src/assets/icons/kakaotalk.svg +1 -0
  100. package/src/assets/icons/loader-circle.svg +1 -0
  101. package/src/assets/icons/naver.svg +1 -0
  102. package/src/components/badge/commonBadge.tsx +23 -26
  103. package/src/components/badge/numberBadge.tsx +49 -0
  104. package/src/components/button/index.ts +2 -1
  105. package/src/components/button/socialLoginButton.tsx +49 -0
  106. package/src/components/button/types.ts +4 -0
  107. package/src/components/card/foldableCard.tsx +14 -18
  108. package/src/components/icon/Apple.tsx +15 -0
  109. package/src/components/icon/Facebook.tsx +15 -0
  110. package/src/components/icon/Google.tsx +15 -0
  111. package/src/components/icon/Kakaotalk.tsx +15 -0
  112. package/src/components/icon/LoaderCircle.tsx +20 -0
  113. package/src/components/icon/Naver.tsx +15 -0
  114. package/src/components/icon/index.tsx +14 -1
  115. package/src/components/icon/types.ts +7 -3
  116. package/src/components/index.ts +4 -1
  117. package/src/components/select/commonSelect.tsx +170 -0
  118. package/src/components/select/index.ts +3 -0
  119. package/src/components/select/types.ts +18 -0
  120. package/src/components/slider/index.tsx +118 -1
  121. package/src/components/slider/types.ts +10 -0
  122. package/src/components/spinner/commonSpinner.tsx +48 -0
  123. package/src/components/spinner/index.ts +3 -0
  124. package/src/components/spinner/types.ts +9 -0
  125. package/src/index.tsx +5 -0
  126. package/src/components/spinner/index.tsx +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/slider/types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/slider/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,KAAK,OAAO,GAAG,SAAS,GAAG,WAAW,CAAC;AACvC,KAAK,WAAW,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAEnC,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,MAAM,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CAC9B"}
@@ -0,0 +1,4 @@
1
+ import { type SpinnerProps } from './types.js';
2
+ declare const CommonSpinner: ({ type, ...props }: SpinnerProps) => import("react").JSX.Element;
3
+ export default CommonSpinner;
4
+ //# sourceMappingURL=commonSpinner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commonSpinner.d.ts","sourceRoot":"","sources":["../../../../../src/components/spinner/commonSpinner.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAS,CAAC;AAG5C,QAAA,MAAM,aAAa,GAAI,oBAAgC,YAAY,gCAyBlE,CAAC;AASF,eAAe,aAAa,CAAC"}
@@ -1 +1,3 @@
1
+ import CommonSpinner from './commonSpinner.js';
2
+ export { CommonSpinner };
1
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/spinner/index.tsx"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/spinner/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,oBAAiB,CAAC;AAE5C,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -1 +1,9 @@
1
+ import { type ViewProps } from 'react-native';
2
+ type Variant = 'primary' | 'secondary';
3
+ type SizeVariant = 's' | 'm' | 'l';
4
+ export interface SpinnerProps extends ViewProps {
5
+ type?: Variant;
6
+ size?: SizeVariant;
7
+ }
8
+ export {};
1
9
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/spinner/types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/spinner/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,KAAK,OAAO,GAAG,SAAS,GAAG,WAAW,CAAC;AACvC,KAAK,WAAW,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAEnC,MAAM,WAAW,YAAa,SAAQ,SAAS;IAC7C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB"}
@@ -1,3 +1,3 @@
1
- export { CommonText, CommonButton, CommonBadge, SafeAreaContainer, ScrollViewContainer, CommonIcon, CommonRating, CommonAvatar, CommonImage, CheckBox, CommonHeader, CommonCard, FoldableCard, LinearProgressBar, CircularProgressBar, CommonInput, CommonPopOver, CommonSwitch, } from './components/index.js';
1
+ export { CommonText, CommonButton, CommonBadge, SafeAreaContainer, ScrollViewContainer, CommonIcon, CommonRating, CommonAvatar, CommonImage, CheckBox, CommonHeader, CommonCard, FoldableCard, LinearProgressBar, CircularProgressBar, CommonInput, CommonPopOver, CommonSwitch, SocialLoginButton, CommonSpinner, CommonSlider, CommonSelect, SelectItem, } from './components/index.js';
2
2
  export { ThemeProvider } from './theme/themeProvider.js';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACnB,WAAW,EACX,aAAa,EACb,YAAY,GACb,MAAM,uBAAc,CAAC;AACtB,OAAO,EAAE,aAAa,EAAE,MAAM,0BAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACnB,WAAW,EACX,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,UAAU,GACX,MAAM,uBAAc,CAAC;AACtB,OAAO,EAAE,aAAa,EAAE,MAAM,0BAAuB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kukkim/react-native-ui",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "ui library for react native",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -83,6 +83,7 @@
83
83
  "react": "19.2.0",
84
84
  "react-native": "0.83.6",
85
85
  "react-native-builder-bob": "^0.42.1",
86
+ "react-native-gesture-handler": "^3.0.0",
86
87
  "react-native-reanimated": "^4.0.0",
87
88
  "react-native-safe-area-context": "^5.8.0",
88
89
  "react-native-svg": "^15.15.5",
@@ -94,6 +95,7 @@
94
95
  "peerDependencies": {
95
96
  "react": "*",
96
97
  "react-native": "*",
98
+ "react-native-gesture-handler": ">=3.0.0",
97
99
  "react-native-reanimated": ">=4.0.0",
98
100
  "react-native-safe-area-context": ">=5.0.0",
99
101
  "react-native-svg": "*",
@@ -0,0 +1 @@
1
+ <svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Apple</title><path d="M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701"/></svg>
@@ -0,0 +1 @@
1
+ <svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Facebook</title><path d="M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z"/></svg>
@@ -0,0 +1 @@
1
+ <svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Google</title><path d="M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z"/></svg>
@@ -0,0 +1 @@
1
+ <svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>KakaoTalk</title><path d="M22.125 0H1.875C.8394 0 0 .8394 0 1.875v20.25C0 23.1606.8394 24 1.875 24h20.25C23.1606 24 24 23.1606 24 22.125V1.875C24 .8394 23.1606 0 22.125 0zM12 18.75c-.591 0-1.1697-.0413-1.7317-.1209-.5626.3965-3.813 2.6797-4.1198 2.7225 0 0-.1258.0489-.2328-.0141s-.0876-.2282-.0876-.2282c.0322-.2198.8426-3.0183.992-3.5333-2.7452-1.36-4.5701-3.7686-4.5701-6.5135C2.25 6.8168 6.6152 3.375 12 3.375s9.75 3.4418 9.75 7.6875c0 4.2457-4.3652 7.6875-9.75 7.6875zM8.0496 9.8672h-.8777v3.3417c0 .2963-.2523.5372-.5625.5372s-.5625-.2409-.5625-.5372V9.8672h-.8777c-.3044 0-.552-.2471-.552-.5508s.2477-.5508.552-.5508h2.8804c.3044 0 .552.2471.552.5508s-.2477.5508-.552.5508zm10.9879 2.9566a.558.558 0 0 1 .108.4167.5588.5588 0 0 1-.2183.371.5572.5572 0 0 1-.3383.1135.558.558 0 0 1-.4493-.2236l-1.3192-1.7479-.1952.1952v1.2273a.5635.5635 0 0 1-.5627.5628.563.563 0 0 1-.5625-.5625V9.3281c0-.3102.2523-.5625.5625-.5625s.5625.2523.5625.5625v1.209l1.5694-1.5694c.0807-.0807.1916-.1252.312-.1252.1404 0 .2814.0606.3871.1661.0985.0984.1573.2251.1654.3566.0082.1327-.036.2542-.1241.3425l-1.2818 1.2817 1.3845 1.8344zm-8.3502-3.5023c-.095-.2699-.3829-.5475-.7503-.5557-.3663.0083-.6542.2858-.749.5551l-1.3455 3.5415c-.1708.5305-.0217.7272.1333.7988a.8568.8568 0 0 0 .3576.0776c.2346 0 .4139-.0952.4678-.2481l.2787-.7297 1.7152.0001.2785.7292c.0541.1532.2335.2484.4681.2484a.8601.8601 0 0 0 .3576-.0775c.1551-.0713.3041-.2681.1329-.7999l-1.3449-3.5398zm-1.3116 2.4433l.5618-1.5961.5618 1.5961H9.3757zm5.9056 1.3836c0 .2843-.2418.5156-.5391.5156h-1.8047c-.2973 0-.5391-.2314-.5391-.5156V9.3281c0-.3102.2576-.5625.5742-.5625s.5742.2523.5742.5625v3.3047h1.1953c.2974 0 .5392.2314.5392.5156z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-loader-circle-icon lucide-loader-circle"><path d="M21 12a9 9 0 1 1-6.219-8.56"/></svg>
@@ -0,0 +1 @@
1
+ <svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Naver</title><path d="M16.273 12.845 7.376 0H0v24h7.726V11.156L16.624 24H24V0h-7.727v12.845Z"/></svg>
@@ -3,47 +3,44 @@ import { CommonText } from '../text';
3
3
  import { type CommonBadgeProps, fontSizeType, sizeType } from './types';
4
4
  import { useTheme } from '../../hooks/useTheme';
5
5
 
6
- // TODO: 부모컴포넌트의 정렬기준에 따라 컴포넌트의 형태가 변함.
7
6
  const CommonBadge = ({
8
7
  type = 'primary',
9
8
  size = 'm',
10
9
  typeText,
10
+ style,
11
11
  ...props
12
12
  }: CommonBadgeProps) => {
13
13
  const { theme } = useTheme();
14
14
  return (
15
- <View
16
- style={[
17
- styles.container,
18
- sizeType[size],
19
- { backgroundColor: theme.colors[type] },
20
- ]}
21
- {...props}
22
- >
23
- {typeText && (
24
- <CommonText
25
- style={[
26
- styles.innerText,
27
- fontSizeType[size],
28
- { color: theme.colors.white },
29
- ]}
30
- >
31
- {typeText}
32
- </CommonText>
33
- )}
15
+ <View style={[styles.wrapper, style]} {...props}>
16
+ <View
17
+ style={[
18
+ styles.badge,
19
+ sizeType[size],
20
+ { backgroundColor: theme.colors[type] },
21
+ ]}
22
+ {...props}
23
+ >
24
+ {typeText && (
25
+ <CommonText
26
+ style={[fontSizeType[size], { color: theme.colors.white }]}
27
+ >
28
+ {typeText}
29
+ </CommonText>
30
+ )}
31
+ </View>
34
32
  </View>
35
33
  );
36
34
  };
37
35
 
38
36
  const styles = StyleSheet.create({
39
- container: {
40
- borderRadius: 12,
41
- alignSelf: 'auto',
37
+ wrapper: {
38
+ flexDirection: 'row',
39
+ },
40
+ badge: {
42
41
  alignItems: 'center',
43
42
  justifyContent: 'center',
44
- },
45
- innerText: {
46
- fontSize: 20,
43
+ borderRadius: 999,
47
44
  },
48
45
  });
49
46
 
@@ -0,0 +1,49 @@
1
+ import { StyleSheet, View } from 'react-native';
2
+ import { CommonText } from '../text';
3
+ import {
4
+ type NumberBadgeProps,
5
+ expandedSizeType,
6
+ fontSizeType,
7
+ sizeType,
8
+ } from './types';
9
+ import { useTheme } from '../../hooks/useTheme';
10
+
11
+ const NumberBadge = ({
12
+ type = 'primary',
13
+ number,
14
+ maxNumber,
15
+ size = 'm',
16
+ style,
17
+ ...props
18
+ }: NumberBadgeProps) => {
19
+ const { theme } = useTheme();
20
+ const isExpanded = maxNumber !== undefined && number > maxNumber;
21
+ return (
22
+ <View style={[styles.wrapper, style]} {...props}>
23
+ <View
24
+ style={[
25
+ styles.badge,
26
+ isExpanded ? expandedSizeType[size] : sizeType[size],
27
+ { backgroundColor: theme.colors[type] },
28
+ ]}
29
+ >
30
+ <CommonText style={[fontSizeType[size], { color: theme.colors.white }]}>
31
+ {isExpanded ? `${maxNumber}+` : number}
32
+ </CommonText>
33
+ </View>
34
+ </View>
35
+ );
36
+ };
37
+
38
+ const styles = StyleSheet.create({
39
+ wrapper: {
40
+ flexDirection: 'row',
41
+ },
42
+ badge: {
43
+ alignItems: 'center',
44
+ justifyContent: 'center',
45
+ borderRadius: 999,
46
+ },
47
+ });
48
+
49
+ export default NumberBadge;
@@ -1,3 +1,4 @@
1
1
  import CommonButton from './commonButton';
2
+ import SocialLoginButton from './socialLoginButton';
2
3
 
3
- export { CommonButton };
4
+ export { CommonButton, SocialLoginButton };
@@ -0,0 +1,49 @@
1
+ import { Pressable, StyleSheet } from 'react-native';
2
+ import { CommonIcon } from '../icon';
3
+ import { CommonText } from '../text';
4
+ import { type SocialLoginButtonProps } from './types';
5
+ import { useTheme } from '../../hooks/useTheme';
6
+
7
+ const SocialLoginButton = ({
8
+ type = 'primary',
9
+ provider,
10
+ disabled,
11
+ ...props
12
+ }: SocialLoginButtonProps) => {
13
+ const { theme } = useTheme();
14
+
15
+ return (
16
+ <Pressable
17
+ style={[
18
+ styles.container,
19
+ disabled
20
+ ? {
21
+ backgroundColor: theme.colors.disabled,
22
+ }
23
+ : {
24
+ backgroundColor: theme.colors[type],
25
+ },
26
+ ]}
27
+ {...props}
28
+ >
29
+ <CommonIcon iconType={provider} size={'m'} color={'black'} />
30
+ <CommonText style={{ color: theme.colors.white }}>
31
+ {'Login with ' + provider}
32
+ </CommonText>
33
+ </Pressable>
34
+ );
35
+ };
36
+
37
+ const styles = StyleSheet.create({
38
+ container: {
39
+ flexDirection: 'row',
40
+ margin: 5,
41
+ paddingVertical: 10,
42
+ paddingHorizontal: 10,
43
+ borderRadius: 5,
44
+ gap: 10,
45
+ alignItems: 'center',
46
+ },
47
+ });
48
+
49
+ export default SocialLoginButton;
@@ -27,3 +27,7 @@ export interface ButtonProps extends PressableProps {
27
27
  export interface CommonButtonProps extends ButtonProps {
28
28
  title?: string;
29
29
  }
30
+
31
+ export interface SocialLoginButtonProps extends ButtonProps {
32
+ provider: 'apple' | 'facebook' | 'google' | 'kakaotalk' | 'naver';
33
+ }
@@ -2,14 +2,14 @@ import { StyleSheet, View, Pressable } from 'react-native';
2
2
  import { CommonText } from '../text';
3
3
  import { type FoldableCardProps } from './types';
4
4
  import { useTheme } from '../../hooks/useTheme';
5
- // import Animated, {
6
- // FadeIn,
7
- // FadeOut,
8
- // LinearTransition,
9
- // } from 'react-native-reanimated';
5
+ import Animated, {
6
+ FadeIn,
7
+ FadeOut,
8
+ LinearTransition,
9
+ } from 'react-native-reanimated';
10
10
 
11
- //TODO: React-native-reanimated 적용시키기
12
- // const AnimatedPressable = Animated.createAnimatedComponent(Pressable);
11
+ //TODO: Animation이 여전히 부자연스러우니 수정필요.
12
+ const AnimatedPressable = Animated.createAnimatedComponent(Pressable);
13
13
  const FoldableCard = ({
14
14
  children,
15
15
  type = 'primary',
@@ -20,8 +20,7 @@ const FoldableCard = ({
20
20
  const { theme } = useTheme();
21
21
  return (
22
22
  <View style={styles.container}>
23
- <Pressable
24
- // <AnimatedPressable
23
+ <AnimatedPressable
25
24
  style={[
26
25
  styles.titleContainer,
27
26
  {
@@ -29,7 +28,7 @@ const FoldableCard = ({
29
28
  },
30
29
  ]}
31
30
  onPress={onPress}
32
- // layout={LinearTransition.duration(200)}
31
+ layout={LinearTransition.duration(200)}
33
32
  >
34
33
  <CommonText
35
34
  style={[
@@ -41,13 +40,11 @@ const FoldableCard = ({
41
40
  >
42
41
  {title}
43
42
  </CommonText>
44
- {/* </AnimatedPressable> */}
45
- </Pressable>
43
+ </AnimatedPressable>
46
44
  {value && (
47
- <View
48
- // <Animated.View
49
- // entering={FadeIn}
50
- // exiting={FadeOut}
45
+ <Animated.View
46
+ entering={FadeIn}
47
+ exiting={FadeOut}
51
48
  style={[
52
49
  styles.contentContainer,
53
50
  {
@@ -56,8 +53,7 @@ const FoldableCard = ({
56
53
  ]}
57
54
  >
58
55
  {children}
59
- {/* </Animated.View> */}
60
- </View>
56
+ </Animated.View>
61
57
  )}
62
58
  </View>
63
59
  );
@@ -0,0 +1,15 @@
1
+ // import * as React from 'react';
2
+ import Svg, { Path } from 'react-native-svg';
3
+ import type { SvgProps } from 'react-native-svg';
4
+ const SvgApple = (props: SvgProps) => (
5
+ <Svg
6
+ // xmlns="http://www.w3.org/2000/svg"
7
+ viewBox="0 0 24 24"
8
+ width={props.width ?? 24}
9
+ height={props.height ?? 24}
10
+ {...props}
11
+ >
12
+ <Path d="M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701" />
13
+ </Svg>
14
+ );
15
+ export default SvgApple;
@@ -0,0 +1,15 @@
1
+ // import * as React from 'react';
2
+ import Svg, { Path } from 'react-native-svg';
3
+ import type { SvgProps } from 'react-native-svg';
4
+ const SvgFacebook = (props: SvgProps) => (
5
+ <Svg
6
+ // xmlns="http://www.w3.org/2000/svg"
7
+ viewBox="0 0 24 24"
8
+ width={props.width ?? 24}
9
+ height={props.height ?? 24}
10
+ {...props}
11
+ >
12
+ <Path d="M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a9 9 0 0 1 1.141.195v3.325a9 9 0 0 0-.653-.036 27 27 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.7 1.7 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647" />
13
+ </Svg>
14
+ );
15
+ export default SvgFacebook;
@@ -0,0 +1,15 @@
1
+ // import * as React from 'react';
2
+ import Svg, { Path } from 'react-native-svg';
3
+ import type { SvgProps } from 'react-native-svg';
4
+ const SvgGoogle = (props: SvgProps) => (
5
+ <Svg
6
+ // xmlns="http://www.w3.org/2000/svg"
7
+ viewBox="0 0 24 24"
8
+ width={props.width ?? 24}
9
+ height={props.height ?? 24}
10
+ {...props}
11
+ >
12
+ <Path d="M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053z" />
13
+ </Svg>
14
+ );
15
+ export default SvgGoogle;
@@ -0,0 +1,15 @@
1
+ // import * as React from 'react';
2
+ import Svg, { Path } from 'react-native-svg';
3
+ import type { SvgProps } from 'react-native-svg';
4
+ const SvgKakaotalk = (props: SvgProps) => (
5
+ <Svg
6
+ // xmlns="http://www.w3.org/2000/svg"
7
+ viewBox="0 0 24 24"
8
+ width={props.width ?? 24}
9
+ height={props.height ?? 24}
10
+ {...props}
11
+ >
12
+ <Path d="M22.125 0H1.875C.839 0 0 .84 0 1.875v20.25C0 23.161.84 24 1.875 24h20.25C23.161 24 24 23.16 24 22.125V1.875C24 .839 23.16 0 22.125 0M12 18.75q-.888 0-1.732-.12c-.562.396-3.813 2.679-4.12 2.722 0 0-.125.049-.232-.014s-.088-.229-.088-.229c.032-.22.843-3.018.992-3.533-2.745-1.36-4.57-3.769-4.57-6.513 0-4.246 4.365-7.688 9.75-7.688s9.75 3.442 9.75 7.688S17.385 18.75 12 18.75M8.05 9.867h-.878v3.342c0 .296-.252.537-.563.537s-.562-.24-.562-.537V9.867h-.878a.552.552 0 0 1 0-1.101h2.88a.552.552 0 0 1 0 1.101m10.987 2.957a.56.56 0 0 1 .109.417.56.56 0 0 1-.219.37.56.56 0 0 1-.338.114.56.56 0 0 1-.45-.224l-1.319-1.747-.195.195v1.227a.564.564 0 0 1-.562.563.563.563 0 0 1-.563-.563V9.328a.563.563 0 0 1 1.125 0v1.21l1.57-1.57a.44.44 0 0 1 .311-.126c.14 0 .282.061.388.167a.56.56 0 0 1 .165.356.44.44 0 0 1-.124.343l-1.282 1.281zm-8.35-3.502c-.095-.27-.383-.548-.75-.556-.366.008-.654.286-.749.555l-1.345 3.541c-.171.53-.022.728.133.8a.9.9 0 0 0 .357.077c.235 0 .414-.095.468-.248l.279-.73h1.715l.279.73c.054.153.233.248.468.248a.9.9 0 0 0 .357-.078c.155-.071.304-.268.133-.8zm-1.311 2.443.562-1.596.561 1.596zm5.905 1.383a.53.53 0 0 1-.539.516h-1.804a.53.53 0 0 1-.54-.516v-3.82c0-.31.258-.562.575-.562s.574.252.574.562v3.305h1.195c.297 0 .54.231.54.515" />
13
+ </Svg>
14
+ );
15
+ export default SvgKakaotalk;
@@ -0,0 +1,20 @@
1
+ import Svg, { Path } from 'react-native-svg';
2
+ import type { SvgProps } from 'react-native-svg';
3
+ const SvgLoaderCircle = (props: SvgProps) => (
4
+ <Svg
5
+ // xmlns="http://www.w3.org/2000/svg"
6
+ fill="none"
7
+ stroke={props.color}
8
+ strokeLinecap="round"
9
+ strokeLinejoin="round"
10
+ strokeWidth={2}
11
+ // className="loader-circle_svg__lucide loader-circle_svg__lucide-loader-circle-icon loader-circle_svg__lucide-loader-circle"
12
+ viewBox="0 0 24 24"
13
+ width={props.width ?? 24}
14
+ height={props.height ?? 24}
15
+ {...props}
16
+ >
17
+ <Path d="M21 12a9 9 0 1 1-6.219-8.56" />
18
+ </Svg>
19
+ );
20
+ export default SvgLoaderCircle;
@@ -0,0 +1,15 @@
1
+ // import * as React from 'react';
2
+ import Svg, { Path } from 'react-native-svg';
3
+ import type { SvgProps } from 'react-native-svg';
4
+ const SvgNaver = (props: SvgProps) => (
5
+ <Svg
6
+ // xmlns="http://www.w3.org/2000/svg"
7
+ viewBox="0 0 24 24"
8
+ width={props.width ?? 24}
9
+ height={props.height ?? 24}
10
+ {...props}
11
+ >
12
+ <Path d="M16.273 12.845 7.376 0H0v24h7.726V11.156L16.624 24H24V0h-7.727z" />
13
+ </Svg>
14
+ );
15
+ export default SvgNaver;
@@ -7,9 +7,15 @@ import StarHalf from './StarHalf';
7
7
  import StarFull from './StarFull';
8
8
  import Check from './Check';
9
9
  import X from './X';
10
+ import LoaderCircle from './LoaderCircle';
11
+ import Apple from './Apple';
12
+ import Facebook from './Facebook';
13
+ import Google from './Google';
14
+ import Kakaotalk from './Kakaotalk';
15
+ import Naver from './Naver';
10
16
  // import { ArrowDownToLine } from './ArrowDownToLine';
11
17
  // import { ArrowDownWideNarrow } from './ArrowDownWideNarrow';
12
- // import { ChevronDown } from './ChevronDown';
18
+ import ChevronDown from './ChevronDown';
13
19
  // import { RotateCw } from './RotateCw';
14
20
  // export { SquareArrowOutUpRight } from './SquareArrowOutUpRight';
15
21
 
@@ -20,6 +26,13 @@ const iconMap = {
20
26
  star_full: StarFull,
21
27
  check: Check,
22
28
  close: X,
29
+ loaderCircle: LoaderCircle,
30
+ apple: Apple,
31
+ facebook: Facebook,
32
+ google: Google,
33
+ kakaotalk: Kakaotalk,
34
+ naver: Naver,
35
+ down: ChevronDown,
23
36
  } as const;
24
37
 
25
38
  export const CommonIcon = ({
@@ -15,10 +15,14 @@ export interface IconProps extends ViewProps {
15
15
  // | 'spinner'
16
16
  | 'check'
17
17
  | 'back'
18
+ | 'down'
18
19
  | 'close'
19
- // | 'apple'
20
- // | 'facebook'
21
- // | 'google'
20
+ | 'apple'
21
+ | 'facebook'
22
+ | 'google'
23
+ | 'kakaotalk'
24
+ | 'naver'
25
+ | 'loaderCircle'
22
26
  // | 'close'
23
27
  // | 'tune'
24
28
  | 'star_empty'
@@ -1,5 +1,5 @@
1
1
  export { CommonText } from './text';
2
- export { CommonButton } from './button';
2
+ export { CommonButton, SocialLoginButton } from './button';
3
3
  export { CommonBadge } from './badge';
4
4
  export { SafeAreaContainer, ScrollViewContainer } from './screenContainer';
5
5
  export { CommonIcon } from './icon';
@@ -13,3 +13,6 @@ export { LinearProgressBar, CircularProgressBar } from './progressBar';
13
13
  export { CommonInput } from './input';
14
14
  export { CommonPopOver } from './popOver';
15
15
  export { CommonSwitch } from './switch';
16
+ export { CommonSpinner } from './spinner';
17
+ export { CommonSlider } from './slider';
18
+ export { CommonSelect, SelectItem } from './select';