@kukkim/react-native-ui 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -0
- package/README.md +33 -0
- package/lib/module/assets/icons/arrow-down-to-line.svg +1 -0
- package/lib/module/assets/icons/arrow-down-wide-narrow.svg +1 -0
- package/lib/module/assets/icons/arrow-left.svg +1 -0
- package/lib/module/assets/icons/check.svg +1 -0
- package/lib/module/assets/icons/chevron-down.svg +1 -0
- package/lib/module/assets/icons/copy.svg +1 -0
- package/lib/module/assets/icons/rotate-cw.svg +1 -0
- package/lib/module/assets/icons/square-arrow-out-up-right.svg +1 -0
- package/lib/module/assets/icons/star-empty.svg +1 -0
- package/lib/module/assets/icons/star-full.svg +1 -0
- package/lib/module/assets/icons/star-half.svg +25 -0
- package/lib/module/assets/icons/x.svg +1 -0
- package/lib/module/assets/images/defaultImage.png +0 -0
- package/lib/module/components/avatar/index.js +45 -0
- package/lib/module/components/avatar/index.js.map +1 -0
- package/lib/module/components/avatar/types.js +49 -0
- package/lib/module/components/avatar/types.js.map +1 -0
- package/lib/module/components/badge/commonBadge.js +44 -0
- package/lib/module/components/badge/commonBadge.js.map +1 -0
- package/lib/module/components/badge/index.js +5 -0
- package/lib/module/components/badge/index.js.map +1 -0
- package/lib/module/components/badge/types.js +48 -0
- package/lib/module/components/badge/types.js.map +1 -0
- package/lib/module/components/button/commonButton.js +43 -0
- package/lib/module/components/button/commonButton.js.map +1 -0
- package/lib/module/components/button/index.js +5 -0
- package/lib/module/components/button/index.js.map +1 -0
- package/lib/module/components/button/types.js +28 -0
- package/lib/module/components/button/types.js.map +1 -0
- package/lib/module/components/card/commonCard.js +57 -0
- package/lib/module/components/card/commonCard.js.map +1 -0
- package/lib/module/components/card/foldableCard.js +76 -0
- package/lib/module/components/card/foldableCard.js.map +1 -0
- package/lib/module/components/card/index.js +6 -0
- package/lib/module/components/card/index.js.map +1 -0
- package/lib/module/components/card/types.js +4 -0
- package/lib/module/components/card/types.js.map +1 -0
- package/lib/module/components/checkBox/index.js +38 -0
- package/lib/module/components/checkBox/index.js.map +1 -0
- package/lib/module/components/checkBox/types.js +17 -0
- package/lib/module/components/checkBox/types.js.map +1 -0
- package/lib/module/components/header/commonHeader.js +72 -0
- package/lib/module/components/header/commonHeader.js.map +1 -0
- package/lib/module/components/header/index.js +5 -0
- package/lib/module/components/header/index.js.map +1 -0
- package/lib/module/components/header/types.js +28 -0
- package/lib/module/components/header/types.js.map +1 -0
- package/lib/module/components/icon/ArrowDownToLine.js +25 -0
- package/lib/module/components/icon/ArrowDownToLine.js.map +1 -0
- package/lib/module/components/icon/ArrowDownWideNarrow.js +25 -0
- package/lib/module/components/icon/ArrowDownWideNarrow.js.map +1 -0
- package/lib/module/components/icon/ArrowLeft.js +25 -0
- package/lib/module/components/icon/ArrowLeft.js.map +1 -0
- package/lib/module/components/icon/Check.js +25 -0
- package/lib/module/components/icon/Check.js.map +1 -0
- package/lib/module/components/icon/ChevronDown.js +25 -0
- package/lib/module/components/icon/ChevronDown.js.map +1 -0
- package/lib/module/components/icon/Copy.js +32 -0
- package/lib/module/components/icon/Copy.js.map +1 -0
- package/lib/module/components/icon/RotateCw.js +27 -0
- package/lib/module/components/icon/RotateCw.js.map +1 -0
- package/lib/module/components/icon/SquareArrowOutUpRight.js +25 -0
- package/lib/module/components/icon/SquareArrowOutUpRight.js.map +1 -0
- package/lib/module/components/icon/StarEmpty.js +25 -0
- package/lib/module/components/icon/StarEmpty.js.map +1 -0
- package/lib/module/components/icon/StarFull.js +25 -0
- package/lib/module/components/icon/StarFull.js.map +1 -0
- package/lib/module/components/icon/StarHalf.js +34 -0
- package/lib/module/components/icon/StarHalf.js.map +1 -0
- package/lib/module/components/icon/X.js +25 -0
- package/lib/module/components/icon/X.js.map +1 -0
- package/lib/module/components/icon/index.js +54 -0
- package/lib/module/components/icon/index.js.map +1 -0
- package/lib/module/components/icon/types.js +8 -0
- package/lib/module/components/icon/types.js.map +1 -0
- package/lib/module/components/image/index.js +25 -0
- package/lib/module/components/image/index.js.map +1 -0
- package/lib/module/components/image/types.js +39 -0
- package/lib/module/components/image/types.js.map +1 -0
- package/lib/module/components/index.js +15 -0
- package/lib/module/components/index.js.map +1 -0
- package/lib/module/components/progressBar/circularProgressBar.js +59 -0
- package/lib/module/components/progressBar/circularProgressBar.js.map +1 -0
- package/lib/module/components/progressBar/index.js +7 -0
- package/lib/module/components/progressBar/index.js.map +1 -0
- package/lib/module/components/progressBar/linearProgressBar.js +42 -0
- package/lib/module/components/progressBar/linearProgressBar.js.map +1 -0
- package/lib/module/components/progressBar/types.js +13 -0
- package/lib/module/components/progressBar/types.js.map +1 -0
- package/lib/module/components/rating/index.js +84 -0
- package/lib/module/components/rating/index.js.map +1 -0
- package/lib/module/components/rating/types.js +8 -0
- package/lib/module/components/rating/types.js.map +1 -0
- package/lib/module/components/screenContainer/SafeAreaContainer.js +26 -0
- package/lib/module/components/screenContainer/SafeAreaContainer.js.map +1 -0
- package/lib/module/components/screenContainer/ScrollViewContainer.js +24 -0
- package/lib/module/components/screenContainer/ScrollViewContainer.js.map +1 -0
- package/lib/module/components/screenContainer/index.js +6 -0
- package/lib/module/components/screenContainer/index.js.map +1 -0
- package/lib/module/components/skeleton/index.js +3 -0
- package/lib/module/components/skeleton/index.js.map +1 -0
- package/lib/module/components/skeleton/types.js +2 -0
- package/lib/module/components/skeleton/types.js.map +1 -0
- package/lib/module/components/slider/index.js +3 -0
- package/lib/module/components/slider/index.js.map +1 -0
- package/lib/module/components/slider/types.js +2 -0
- package/lib/module/components/slider/types.js.map +1 -0
- package/lib/module/components/switch/index.js +3 -0
- package/lib/module/components/switch/index.js.map +1 -0
- package/lib/module/components/switch/types.js +2 -0
- package/lib/module/components/switch/types.js.map +1 -0
- package/lib/module/components/text/commonText.js +28 -0
- package/lib/module/components/text/commonText.js.map +1 -0
- package/lib/module/components/text/index.js +5 -0
- package/lib/module/components/text/index.js.map +1 -0
- package/lib/module/components/text/types.js +17 -0
- package/lib/module/components/text/types.js.map +1 -0
- package/lib/module/hooks/useTheme.js +12 -0
- package/lib/module/hooks/useTheme.js.map +1 -0
- package/lib/module/index.js +5 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/theme/color.js +10 -0
- package/lib/module/theme/color.js.map +1 -0
- package/lib/module/theme/style.js +17 -0
- package/lib/module/theme/style.js.map +1 -0
- package/lib/module/theme/themeProvider.js +22 -0
- package/lib/module/theme/themeProvider.js.map +1 -0
- package/lib/module/theme/themes.js +41 -0
- package/lib/module/theme/themes.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/components/avatar/index.d.ts +3 -0
- package/lib/typescript/src/components/avatar/index.d.ts.map +1 -0
- package/lib/typescript/src/components/avatar/types.d.ts +16 -0
- package/lib/typescript/src/components/avatar/types.d.ts.map +1 -0
- package/lib/typescript/src/components/badge/commonBadge.d.ts +4 -0
- package/lib/typescript/src/components/badge/commonBadge.d.ts.map +1 -0
- package/lib/typescript/src/components/badge/index.d.ts +3 -0
- package/lib/typescript/src/components/badge/index.d.ts.map +1 -0
- package/lib/typescript/src/components/badge/types.d.ts +19 -0
- package/lib/typescript/src/components/badge/types.d.ts.map +1 -0
- package/lib/typescript/src/components/button/commonButton.d.ts +4 -0
- package/lib/typescript/src/components/button/commonButton.d.ts.map +1 -0
- package/lib/typescript/src/components/button/index.d.ts +3 -0
- package/lib/typescript/src/components/button/index.d.ts.map +1 -0
- package/lib/typescript/src/components/button/types.d.ts +14 -0
- package/lib/typescript/src/components/button/types.d.ts.map +1 -0
- package/lib/typescript/src/components/card/commonCard.d.ts +4 -0
- package/lib/typescript/src/components/card/commonCard.d.ts.map +1 -0
- package/lib/typescript/src/components/card/foldableCard.d.ts +4 -0
- package/lib/typescript/src/components/card/foldableCard.d.ts.map +1 -0
- package/lib/typescript/src/components/card/index.d.ts +4 -0
- package/lib/typescript/src/components/card/index.d.ts.map +1 -0
- package/lib/typescript/src/components/card/types.d.ts +16 -0
- package/lib/typescript/src/components/card/types.d.ts.map +1 -0
- package/lib/typescript/src/components/checkBox/index.d.ts +3 -0
- package/lib/typescript/src/components/checkBox/index.d.ts.map +1 -0
- package/lib/typescript/src/components/checkBox/types.d.ts +11 -0
- package/lib/typescript/src/components/checkBox/types.d.ts.map +1 -0
- package/lib/typescript/src/components/header/commonHeader.d.ts +4 -0
- package/lib/typescript/src/components/header/commonHeader.d.ts.map +1 -0
- package/lib/typescript/src/components/header/index.d.ts +3 -0
- package/lib/typescript/src/components/header/index.d.ts.map +1 -0
- package/lib/typescript/src/components/header/types.d.ts +19 -0
- package/lib/typescript/src/components/header/types.d.ts.map +1 -0
- package/lib/typescript/src/components/icon/ArrowDownToLine.d.ts +4 -0
- package/lib/typescript/src/components/icon/ArrowDownToLine.d.ts.map +1 -0
- package/lib/typescript/src/components/icon/ArrowDownWideNarrow.d.ts +4 -0
- package/lib/typescript/src/components/icon/ArrowDownWideNarrow.d.ts.map +1 -0
- package/lib/typescript/src/components/icon/ArrowLeft.d.ts +4 -0
- package/lib/typescript/src/components/icon/ArrowLeft.d.ts.map +1 -0
- package/lib/typescript/src/components/icon/Check.d.ts +4 -0
- package/lib/typescript/src/components/icon/Check.d.ts.map +1 -0
- package/lib/typescript/src/components/icon/ChevronDown.d.ts +4 -0
- package/lib/typescript/src/components/icon/ChevronDown.d.ts.map +1 -0
- package/lib/typescript/src/components/icon/Copy.d.ts +4 -0
- package/lib/typescript/src/components/icon/Copy.d.ts.map +1 -0
- package/lib/typescript/src/components/icon/RotateCw.d.ts +4 -0
- package/lib/typescript/src/components/icon/RotateCw.d.ts.map +1 -0
- package/lib/typescript/src/components/icon/SquareArrowOutUpRight.d.ts +4 -0
- package/lib/typescript/src/components/icon/SquareArrowOutUpRight.d.ts.map +1 -0
- package/lib/typescript/src/components/icon/StarEmpty.d.ts +4 -0
- package/lib/typescript/src/components/icon/StarEmpty.d.ts.map +1 -0
- package/lib/typescript/src/components/icon/StarFull.d.ts +4 -0
- package/lib/typescript/src/components/icon/StarFull.d.ts.map +1 -0
- package/lib/typescript/src/components/icon/StarHalf.d.ts +4 -0
- package/lib/typescript/src/components/icon/StarHalf.d.ts.map +1 -0
- package/lib/typescript/src/components/icon/X.d.ts +4 -0
- package/lib/typescript/src/components/icon/X.d.ts.map +1 -0
- package/lib/typescript/src/components/icon/index.d.ts +3 -0
- package/lib/typescript/src/components/icon/index.d.ts.map +1 -0
- package/lib/typescript/src/components/icon/types.d.ts +12 -0
- package/lib/typescript/src/components/icon/types.d.ts.map +1 -0
- package/lib/typescript/src/components/image/index.d.ts +3 -0
- package/lib/typescript/src/components/image/index.d.ts.map +1 -0
- package/lib/typescript/src/components/image/types.d.ts +9 -0
- package/lib/typescript/src/components/image/types.d.ts.map +1 -0
- package/lib/typescript/src/components/index.d.ts +13 -0
- package/lib/typescript/src/components/index.d.ts.map +1 -0
- package/lib/typescript/src/components/progressBar/circularProgressBar.d.ts +4 -0
- package/lib/typescript/src/components/progressBar/circularProgressBar.d.ts.map +1 -0
- package/lib/typescript/src/components/progressBar/index.d.ts +4 -0
- package/lib/typescript/src/components/progressBar/index.d.ts.map +1 -0
- package/lib/typescript/src/components/progressBar/linearProgressBar.d.ts +4 -0
- package/lib/typescript/src/components/progressBar/linearProgressBar.d.ts.map +1 -0
- package/lib/typescript/src/components/progressBar/types.d.ts +12 -0
- package/lib/typescript/src/components/progressBar/types.d.ts.map +1 -0
- package/lib/typescript/src/components/rating/index.d.ts +3 -0
- package/lib/typescript/src/components/rating/index.d.ts.map +1 -0
- package/lib/typescript/src/components/rating/types.d.ts +13 -0
- package/lib/typescript/src/components/rating/types.d.ts.map +1 -0
- package/lib/typescript/src/components/screenContainer/SafeAreaContainer.d.ts +4 -0
- package/lib/typescript/src/components/screenContainer/SafeAreaContainer.d.ts.map +1 -0
- package/lib/typescript/src/components/screenContainer/ScrollViewContainer.d.ts +4 -0
- package/lib/typescript/src/components/screenContainer/ScrollViewContainer.d.ts.map +1 -0
- package/lib/typescript/src/components/screenContainer/index.d.ts +4 -0
- package/lib/typescript/src/components/screenContainer/index.d.ts.map +1 -0
- package/lib/typescript/src/components/skeleton/index.d.ts +1 -0
- package/lib/typescript/src/components/skeleton/index.d.ts.map +1 -0
- package/lib/typescript/src/components/skeleton/types.d.ts +1 -0
- package/lib/typescript/src/components/skeleton/types.d.ts.map +1 -0
- package/lib/typescript/src/components/slider/index.d.ts +1 -0
- package/lib/typescript/src/components/slider/index.d.ts.map +1 -0
- package/lib/typescript/src/components/slider/types.d.ts +1 -0
- package/lib/typescript/src/components/slider/types.d.ts.map +1 -0
- package/lib/typescript/src/components/switch/index.d.ts +1 -0
- package/lib/typescript/src/components/switch/index.d.ts.map +1 -0
- package/lib/typescript/src/components/switch/types.d.ts +1 -0
- package/lib/typescript/src/components/switch/types.d.ts.map +1 -0
- package/lib/typescript/src/components/text/commonText.d.ts +4 -0
- package/lib/typescript/src/components/text/commonText.d.ts.map +1 -0
- package/lib/typescript/src/components/text/index.d.ts +3 -0
- package/lib/typescript/src/components/text/index.d.ts.map +1 -0
- package/lib/typescript/src/components/text/types.d.ts +11 -0
- package/lib/typescript/src/components/text/types.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useTheme.d.ts +5 -0
- package/lib/typescript/src/hooks/useTheme.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +3 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/theme/color.d.ts +8 -0
- package/lib/typescript/src/theme/color.d.ts.map +1 -0
- package/lib/typescript/src/theme/style.d.ts +15 -0
- package/lib/typescript/src/theme/style.d.ts.map +1 -0
- package/lib/typescript/src/theme/themeProvider.d.ts +13 -0
- package/lib/typescript/src/theme/themeProvider.d.ts.map +1 -0
- package/lib/typescript/src/theme/themes.d.ts +25 -0
- package/lib/typescript/src/theme/themes.d.ts.map +1 -0
- package/package.json +170 -0
- package/src/assets/icons/arrow-down-to-line.svg +1 -0
- package/src/assets/icons/arrow-down-wide-narrow.svg +1 -0
- package/src/assets/icons/arrow-left.svg +1 -0
- package/src/assets/icons/check.svg +1 -0
- package/src/assets/icons/chevron-down.svg +1 -0
- package/src/assets/icons/copy.svg +1 -0
- package/src/assets/icons/rotate-cw.svg +1 -0
- package/src/assets/icons/square-arrow-out-up-right.svg +1 -0
- package/src/assets/icons/star-empty.svg +1 -0
- package/src/assets/icons/star-full.svg +1 -0
- package/src/assets/icons/star-half.svg +25 -0
- package/src/assets/icons/x.svg +1 -0
- package/src/assets/images/defaultImage.png +0 -0
- package/src/components/avatar/index.tsx +58 -0
- package/src/components/avatar/types.ts +38 -0
- package/src/components/badge/commonBadge.tsx +50 -0
- package/src/components/badge/index.ts +3 -0
- package/src/components/badge/types.ts +36 -0
- package/src/components/button/commonButton.tsx +43 -0
- package/src/components/button/index.ts +3 -0
- package/src/components/button/types.ts +29 -0
- package/src/components/card/commonCard.tsx +67 -0
- package/src/components/card/foldableCard.tsx +88 -0
- package/src/components/card/index.ts +4 -0
- package/src/components/card/types.ts +18 -0
- package/src/components/checkBox/index.tsx +41 -0
- package/src/components/checkBox/types.ts +16 -0
- package/src/components/header/commonHeader.tsx +55 -0
- package/src/components/header/index.ts +3 -0
- package/src/components/header/types.ts +30 -0
- package/src/components/icon/ArrowDownToLine.tsx +21 -0
- package/src/components/icon/ArrowDownWideNarrow.tsx +21 -0
- package/src/components/icon/ArrowLeft.tsx +21 -0
- package/src/components/icon/Check.tsx +21 -0
- package/src/components/icon/ChevronDown.tsx +21 -0
- package/src/components/icon/Copy.tsx +22 -0
- package/src/components/icon/RotateCw.tsx +22 -0
- package/src/components/icon/SquareArrowOutUpRight.tsx +21 -0
- package/src/components/icon/StarEmpty.tsx +21 -0
- package/src/components/icon/StarFull.tsx +21 -0
- package/src/components/icon/StarHalf.tsx +32 -0
- package/src/components/icon/X.tsx +21 -0
- package/src/components/icon/index.tsx +54 -0
- package/src/components/icon/types.ts +30 -0
- package/src/components/image/index.tsx +21 -0
- package/src/components/image/types.ts +20 -0
- package/src/components/index.ts +12 -0
- package/src/components/progressBar/circularProgressBar.tsx +64 -0
- package/src/components/progressBar/index.ts +5 -0
- package/src/components/progressBar/linearProgressBar.tsx +51 -0
- package/src/components/progressBar/types.ts +22 -0
- package/src/components/rating/index.tsx +106 -0
- package/src/components/rating/types.ts +17 -0
- package/src/components/screenContainer/SafeAreaContainer.tsx +22 -0
- package/src/components/screenContainer/ScrollViewContainer.tsx +19 -0
- package/src/components/screenContainer/index.ts +4 -0
- package/src/components/skeleton/index.tsx +1 -0
- package/src/components/skeleton/types.ts +0 -0
- package/src/components/slider/index.tsx +1 -0
- package/src/components/slider/types.ts +0 -0
- package/src/components/switch/index.tsx +1 -0
- package/src/components/switch/types.ts +0 -0
- package/src/components/text/commonText.tsx +27 -0
- package/src/components/text/index.ts +3 -0
- package/src/components/text/types.ts +16 -0
- package/src/hooks/useTheme.ts +12 -0
- package/src/index.tsx +18 -0
- package/src/theme/color.ts +7 -0
- package/src/theme/style.ts +15 -0
- package/src/theme/themeProvider.tsx +25 -0
- package/src/theme/themes.ts +71 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/skeleton/index.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/skeleton/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/slider/index.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/slider/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/switch/index.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/switch/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commonText.d.ts","sourceRoot":"","sources":["../../../../../src/components/text/commonText.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,eAAe,EAAgB,MAAM,YAAS,CAAC;AAG7D,QAAA,MAAM,UAAU,GAAI,2BAAiC,eAAe,gCAcnE,CAAC;AAQF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/text/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,iBAAc,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type TextProps, type TextStyle } from 'react-native';
|
|
2
|
+
type Variant = 'primary' | 'secondary';
|
|
3
|
+
type SizeVariant = 's' | 'm' | 'l';
|
|
4
|
+
export declare const fontSizeType: Record<SizeVariant, TextStyle>;
|
|
5
|
+
export interface CommonTextProps extends TextProps {
|
|
6
|
+
type?: Variant;
|
|
7
|
+
size?: SizeVariant;
|
|
8
|
+
isInner?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/text/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9D,KAAK,OAAO,GAAG,SAAS,GAAG,WAAW,CAAC;AACvC,KAAK,WAAW,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAEnC,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,WAAW,EAAE,SAAS,CAIvD,CAAC;AAEF,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useTheme.ts"],"names":[],"mappings":"AAGA,wBAAgB,QAAQ;;;EAQvB"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { CommonText, CommonButton, CommonBadge, SafeAreaContainer, ScrollViewContainer, CommonIcon, CommonRating, CommonAvatar, CommonImage, CheckBox, CommonHeader, CommonCard, FoldableCard, LinearProgressBar, CircularProgressBar, } from './components/index.js';
|
|
2
|
+
export { ThemeProvider } from './theme/themeProvider.js';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +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,GACpB,MAAM,uBAAc,CAAC;AACtB,OAAO,EAAE,aAAa,EAAE,MAAM,0BAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../../src/theme/color.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO;;;;;;CAMnB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const spacing: {
|
|
2
|
+
none: number;
|
|
3
|
+
xs: number;
|
|
4
|
+
sm: number;
|
|
5
|
+
md: number;
|
|
6
|
+
lg: number;
|
|
7
|
+
xl: number;
|
|
8
|
+
};
|
|
9
|
+
export declare const radius: {
|
|
10
|
+
sm: number;
|
|
11
|
+
md: number;
|
|
12
|
+
lg: number;
|
|
13
|
+
full: number;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=style.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../../src/theme/style.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO;;;;;;;CAOnB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;CAKlB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type PropsWithChildren } from 'react';
|
|
2
|
+
import { type AppTheme, type ThemeMode } from './themes.js';
|
|
3
|
+
type ThemeContextValue = {
|
|
4
|
+
theme: AppTheme;
|
|
5
|
+
mode: ThemeMode;
|
|
6
|
+
};
|
|
7
|
+
export declare const ThemeContext: import("react").Context<ThemeContextValue | null>;
|
|
8
|
+
type Props = PropsWithChildren<{
|
|
9
|
+
mode?: ThemeMode;
|
|
10
|
+
}>;
|
|
11
|
+
export declare function ThemeProvider({ children, mode }: Props): import("react").JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=themeProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themeProvider.d.ts","sourceRoot":"","sources":["../../../../src/theme/themeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,iBAAiB,EAAW,MAAM,OAAO,CAAC;AACvE,OAAO,EAAyB,KAAK,QAAQ,EAAE,KAAK,SAAS,EAAE,MAAM,aAAU,CAAC;AAEhF,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,QAAQ,CAAC;IAChB,IAAI,EAAE,SAAS,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,YAAY,mDAAgD,CAAC;AAE1E,KAAK,KAAK,GAAG,iBAAiB,CAAC;IAC7B,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,CAAC,CAAC;AAEH,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,IAAc,EAAE,EAAE,KAAK,+BAUhE"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { spacing, radius } from './style.js';
|
|
2
|
+
export type ThemeMode = 'light' | 'dark';
|
|
3
|
+
export interface ThemeColors {
|
|
4
|
+
background: string;
|
|
5
|
+
surface: string;
|
|
6
|
+
text: string;
|
|
7
|
+
white: string;
|
|
8
|
+
primary: string;
|
|
9
|
+
secondary: string;
|
|
10
|
+
warning: string;
|
|
11
|
+
danger: string;
|
|
12
|
+
border: string;
|
|
13
|
+
disabled: string;
|
|
14
|
+
}
|
|
15
|
+
export type ThemeSpacing = typeof spacing;
|
|
16
|
+
export type ThemeRadius = typeof radius;
|
|
17
|
+
export interface AppTheme {
|
|
18
|
+
mode: ThemeMode;
|
|
19
|
+
colors: ThemeColors;
|
|
20
|
+
spacing: ThemeSpacing;
|
|
21
|
+
radius: ThemeRadius;
|
|
22
|
+
}
|
|
23
|
+
export declare const lightTheme: AppTheme;
|
|
24
|
+
export declare const darkTheme: AppTheme;
|
|
25
|
+
//# sourceMappingURL=themes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../../../../src/theme/themes.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAS,CAAC;AAE1C,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAEzC,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IAEb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IAEf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,YAAY,GAAG,OAAO,OAAO,CAAC;AAC1C,MAAM,MAAM,WAAW,GAAG,OAAO,MAAM,CAAC;AAExC,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,YAAY,CAAC;IACtB,MAAM,EAAE,WAAW,CAAC;CACrB;AAED,eAAO,MAAM,UAAU,EAAE,QAkBxB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,QAkBvB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@kukkim/react-native-ui",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "ui library for react native",
|
|
5
|
+
"main": "./lib/module/index.js",
|
|
6
|
+
"types": "./lib/typescript/src/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"source": "./src/index.tsx",
|
|
10
|
+
"types": "./lib/typescript/src/index.d.ts",
|
|
11
|
+
"default": "./lib/module/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./package.json": "./package.json"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"src",
|
|
17
|
+
"lib",
|
|
18
|
+
"android",
|
|
19
|
+
"ios",
|
|
20
|
+
"cpp",
|
|
21
|
+
"*.podspec",
|
|
22
|
+
"react-native.config.js",
|
|
23
|
+
"!ios/build",
|
|
24
|
+
"!android/build",
|
|
25
|
+
"!android/gradle",
|
|
26
|
+
"!android/gradlew",
|
|
27
|
+
"!android/gradlew.bat",
|
|
28
|
+
"!android/local.properties",
|
|
29
|
+
"!**/__tests__",
|
|
30
|
+
"!**/__fixtures__",
|
|
31
|
+
"!**/__mocks__",
|
|
32
|
+
"!**/.*"
|
|
33
|
+
],
|
|
34
|
+
"scripts": {
|
|
35
|
+
"example": "yarn workspace @kukkim/react-native-ui-example",
|
|
36
|
+
"clean": "del-cli lib",
|
|
37
|
+
"prepare": "bob build",
|
|
38
|
+
"typecheck": "tsc",
|
|
39
|
+
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
40
|
+
"test": "jest",
|
|
41
|
+
"release": "release-it --only-version",
|
|
42
|
+
"icons:build": "svgr --native --typescript --out-dir src/components/icon src/assets/icons"
|
|
43
|
+
},
|
|
44
|
+
"keywords": [
|
|
45
|
+
"react-native",
|
|
46
|
+
"ios",
|
|
47
|
+
"android"
|
|
48
|
+
],
|
|
49
|
+
"repository": {
|
|
50
|
+
"type": "git",
|
|
51
|
+
"url": "git+https://github.com/KukKim/react-native-ui.git"
|
|
52
|
+
},
|
|
53
|
+
"author": "kukkim <kukkim89@gmail.com> (https://github.com/KukKim)",
|
|
54
|
+
"license": "MIT",
|
|
55
|
+
"bugs": {
|
|
56
|
+
"url": "https://github.com/KukKim/react-native-ui/issues"
|
|
57
|
+
},
|
|
58
|
+
"homepage": "https://github.com/KukKim/react-native-ui#readme",
|
|
59
|
+
"publishConfig": {
|
|
60
|
+
"registry": "https://registry.npmjs.org/"
|
|
61
|
+
},
|
|
62
|
+
"devDependencies": {
|
|
63
|
+
"@commitlint/config-conventional": "^21.0.2",
|
|
64
|
+
"@eslint/compat": "^2.1.0",
|
|
65
|
+
"@eslint/eslintrc": "^3.3.5",
|
|
66
|
+
"@eslint/js": "^10.0.1",
|
|
67
|
+
"@jest/globals": "^29.7.0",
|
|
68
|
+
"@react-native/babel-preset": "0.85.0",
|
|
69
|
+
"@react-native/eslint-config": "0.85.0",
|
|
70
|
+
"@react-native/jest-preset": "0.85.0",
|
|
71
|
+
"@release-it/conventional-changelog": "^11.0.1",
|
|
72
|
+
"@svgr/cli": "^8.1.0",
|
|
73
|
+
"@types/react": "^19.2.0",
|
|
74
|
+
"commitlint": "^21.0.2",
|
|
75
|
+
"del-cli": "^7.0.0",
|
|
76
|
+
"eslint": "^9.39.4",
|
|
77
|
+
"eslint-config-prettier": "^10.1.8",
|
|
78
|
+
"eslint-plugin-ft-flow": "^3.0.11",
|
|
79
|
+
"eslint-plugin-prettier": "^5.5.6",
|
|
80
|
+
"jest": "^29.7.0",
|
|
81
|
+
"lefthook": "^2.1.9",
|
|
82
|
+
"prettier": "^3.8.3",
|
|
83
|
+
"react": "19.2.0",
|
|
84
|
+
"react-native": "0.83.6",
|
|
85
|
+
"react-native-builder-bob": "^0.42.1",
|
|
86
|
+
"release-it": "^20.2.0",
|
|
87
|
+
"turbo": "^2.9.16",
|
|
88
|
+
"typescript": "^6.0.3"
|
|
89
|
+
},
|
|
90
|
+
"peerDependencies": {
|
|
91
|
+
"react": "*",
|
|
92
|
+
"react-native": "*",
|
|
93
|
+
"react-native-svg": "*"
|
|
94
|
+
},
|
|
95
|
+
"workspaces": [
|
|
96
|
+
"example"
|
|
97
|
+
],
|
|
98
|
+
"packageManager": "yarn@4.11.0",
|
|
99
|
+
"react-native-builder-bob": {
|
|
100
|
+
"source": "src",
|
|
101
|
+
"output": "lib",
|
|
102
|
+
"targets": [
|
|
103
|
+
[
|
|
104
|
+
"module",
|
|
105
|
+
{
|
|
106
|
+
"esm": true
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
[
|
|
110
|
+
"typescript",
|
|
111
|
+
{
|
|
112
|
+
"project": "tsconfig.build.json"
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
"prettier": {
|
|
118
|
+
"quoteProps": "consistent",
|
|
119
|
+
"singleQuote": true,
|
|
120
|
+
"tabWidth": 2,
|
|
121
|
+
"trailingComma": "es5",
|
|
122
|
+
"useTabs": false
|
|
123
|
+
},
|
|
124
|
+
"jest": {
|
|
125
|
+
"preset": "@react-native/jest-preset",
|
|
126
|
+
"modulePathIgnorePatterns": [
|
|
127
|
+
"<rootDir>/example/node_modules",
|
|
128
|
+
"<rootDir>/lib/"
|
|
129
|
+
]
|
|
130
|
+
},
|
|
131
|
+
"commitlint": {
|
|
132
|
+
"extends": [
|
|
133
|
+
"@commitlint/config-conventional"
|
|
134
|
+
]
|
|
135
|
+
},
|
|
136
|
+
"release-it": {
|
|
137
|
+
"git": {
|
|
138
|
+
"commitMessage": "chore: release ${version}",
|
|
139
|
+
"tagName": "v${version}"
|
|
140
|
+
},
|
|
141
|
+
"npm": {
|
|
142
|
+
"publish": true
|
|
143
|
+
},
|
|
144
|
+
"github": {
|
|
145
|
+
"release": true
|
|
146
|
+
},
|
|
147
|
+
"plugins": {
|
|
148
|
+
"@release-it/conventional-changelog": {
|
|
149
|
+
"preset": {
|
|
150
|
+
"name": "angular"
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"create-react-native-library": {
|
|
156
|
+
"type": "library",
|
|
157
|
+
"languages": "js",
|
|
158
|
+
"tools": [
|
|
159
|
+
"eslint",
|
|
160
|
+
"jest",
|
|
161
|
+
"lefthook",
|
|
162
|
+
"release-it"
|
|
163
|
+
],
|
|
164
|
+
"version": "0.62.2"
|
|
165
|
+
},
|
|
166
|
+
"dependencies": {
|
|
167
|
+
"react-native-safe-area-context": "^5.8.0",
|
|
168
|
+
"react-native-svg": "^15.15.5"
|
|
169
|
+
}
|
|
170
|
+
}
|
|
@@ -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-arrow-down-to-line-icon lucide-arrow-down-to-line"><path d="M12 17V3"/><path d="m6 11 6 6 6-6"/><path d="M19 21H5"/></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-arrow-down-wide-narrow-icon lucide-arrow-down-wide-narrow"><path d="m3 16 4 4 4-4"/><path d="M7 20V4"/><path d="M11 4h10"/><path d="M11 8h7"/><path d="M11 12h4"/></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-arrow-left-icon lucide-arrow-left"><path d="m12 19-7-7 7-7"/><path d="M19 12H5"/></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-check-icon lucide-check"><path d="M20 6 9 17l-5-5"/></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-chevron-down-icon lucide-chevron-down"><path d="m6 9 6 6 6-6"/></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-copy-icon lucide-copy"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></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-rotate-cw-icon lucide-rotate-cw"><path d="M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/></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-square-arrow-out-up-right-icon lucide-square-arrow-out-up-right"><path d="M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6"/><path d="m21 3-9 9"/><path d="M15 3h6v6"/></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-star-icon lucide-star"><path d="M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-star-icon lucide-star"><path d="M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"/></svg>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<svg
|
|
2
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
3
|
+
width="24"
|
|
4
|
+
height="24"
|
|
5
|
+
viewBox="0 0 24 24"
|
|
6
|
+
>
|
|
7
|
+
<defs>
|
|
8
|
+
<clipPath id="half">
|
|
9
|
+
<rect x="0" y="0" width="12" height="24" />
|
|
10
|
+
</clipPath>
|
|
11
|
+
</defs>
|
|
12
|
+
<path
|
|
13
|
+
clip-path="url(#half)"
|
|
14
|
+
fill="currentColor"
|
|
15
|
+
d="M12 2.5l2.93 5.94 6.56.96-4.75 4.63 1.12 6.53L12 17.5l-5.86 3.06 1.12-6.53L2.51 9.4l6.56-.96L12 2.5z"
|
|
16
|
+
/>
|
|
17
|
+
<path
|
|
18
|
+
fill="none"
|
|
19
|
+
stroke="currentColor"
|
|
20
|
+
stroke-width="2"
|
|
21
|
+
stroke-linecap="round"
|
|
22
|
+
stroke-linejoin="round"
|
|
23
|
+
d="M12 2.5l2.93 5.94 6.56.96-4.75 4.63 1.12 6.53L12 17.5l-5.86 3.06 1.12-6.53L2.51 9.4l6.56-.96L12 2.5z"
|
|
24
|
+
/>
|
|
25
|
+
</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-x-icon lucide-x"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>
|
|
Binary file
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { StyleSheet, View } from 'react-native';
|
|
2
|
+
import { CommonText } from '../text';
|
|
3
|
+
import { CommonImage } from '../image';
|
|
4
|
+
import {
|
|
5
|
+
type CommonAvatarProps,
|
|
6
|
+
fontSizeType,
|
|
7
|
+
sizeType,
|
|
8
|
+
imageSizeType,
|
|
9
|
+
} from './types';
|
|
10
|
+
import { useTheme } from '../../hooks/useTheme';
|
|
11
|
+
|
|
12
|
+
export const CommonAvatar = ({
|
|
13
|
+
type = 'primary',
|
|
14
|
+
size = 'm',
|
|
15
|
+
title,
|
|
16
|
+
source,
|
|
17
|
+
...props
|
|
18
|
+
}: CommonAvatarProps) => {
|
|
19
|
+
const { theme } = useTheme();
|
|
20
|
+
return (
|
|
21
|
+
<View
|
|
22
|
+
style={[
|
|
23
|
+
styles.container,
|
|
24
|
+
sizeType[size],
|
|
25
|
+
{ backgroundColor: theme.colors[type] },
|
|
26
|
+
]}
|
|
27
|
+
{...props}
|
|
28
|
+
>
|
|
29
|
+
{source ? (
|
|
30
|
+
<CommonImage
|
|
31
|
+
style={[styles.container, imageSizeType[size]]}
|
|
32
|
+
source={source}
|
|
33
|
+
/>
|
|
34
|
+
) : (
|
|
35
|
+
<CommonText
|
|
36
|
+
style={[
|
|
37
|
+
styles.innerText,
|
|
38
|
+
fontSizeType[size],
|
|
39
|
+
{ color: theme.colors.white },
|
|
40
|
+
]}
|
|
41
|
+
>
|
|
42
|
+
{title ?? 'None'}
|
|
43
|
+
</CommonText>
|
|
44
|
+
)}
|
|
45
|
+
</View>
|
|
46
|
+
);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const styles = StyleSheet.create({
|
|
50
|
+
container: {
|
|
51
|
+
borderRadius: 12,
|
|
52
|
+
alignItems: 'center',
|
|
53
|
+
justifyContent: 'center',
|
|
54
|
+
},
|
|
55
|
+
innerText: {
|
|
56
|
+
fontSize: 20,
|
|
57
|
+
},
|
|
58
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type TextStyle,
|
|
3
|
+
type ViewProps,
|
|
4
|
+
type ViewStyle,
|
|
5
|
+
type ImageStyle,
|
|
6
|
+
type ImageSource,
|
|
7
|
+
} from 'react-native';
|
|
8
|
+
|
|
9
|
+
type Variant = 'primary' | 'secondary';
|
|
10
|
+
type SizeVariant = 's' | 'm' | 'l';
|
|
11
|
+
|
|
12
|
+
export const sizeType: Record<SizeVariant, ViewStyle> = {
|
|
13
|
+
s: { width: 16, height: 16, borderRadius: 8 },
|
|
14
|
+
m: { width: 20, height: 20, borderRadius: 10 },
|
|
15
|
+
l: { width: 24, height: 24, borderRadius: 12 },
|
|
16
|
+
};
|
|
17
|
+
// TODO: sizeType과 동일한 코드인데 type때문에 코드 중복이 발생함 수정필요.
|
|
18
|
+
export const imageSizeType: Record<SizeVariant, ImageStyle> = {
|
|
19
|
+
s: { width: 16, height: 16, borderRadius: 8 },
|
|
20
|
+
m: { width: 20, height: 20, borderRadius: 10 },
|
|
21
|
+
l: { width: 24, height: 24, borderRadius: 12 },
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const fontSizeType: Record<SizeVariant, TextStyle> = {
|
|
25
|
+
s: { fontSize: 10 },
|
|
26
|
+
m: { fontSize: 12 },
|
|
27
|
+
l: { fontSize: 14 },
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export interface AvatarProps extends ViewProps {
|
|
31
|
+
type?: Variant;
|
|
32
|
+
size?: SizeVariant;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface CommonAvatarProps extends AvatarProps {
|
|
36
|
+
title?: string;
|
|
37
|
+
source?: ImageSource;
|
|
38
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { StyleSheet, View } from 'react-native';
|
|
2
|
+
import { CommonText } from '../text';
|
|
3
|
+
import { type CommonBadgeProps, fontSizeType, sizeType } from './types';
|
|
4
|
+
import { useTheme } from '../../hooks/useTheme';
|
|
5
|
+
|
|
6
|
+
// TODO: 부모컴포넌트의 정렬기준에 따라 컴포넌트의 형태가 변함.
|
|
7
|
+
const CommonBadge = ({
|
|
8
|
+
type = 'primary',
|
|
9
|
+
size = 'm',
|
|
10
|
+
typeText,
|
|
11
|
+
...props
|
|
12
|
+
}: CommonBadgeProps) => {
|
|
13
|
+
const { theme } = useTheme();
|
|
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
|
+
)}
|
|
34
|
+
</View>
|
|
35
|
+
);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const styles = StyleSheet.create({
|
|
39
|
+
container: {
|
|
40
|
+
borderRadius: 12,
|
|
41
|
+
alignSelf: 'auto',
|
|
42
|
+
alignItems: 'center',
|
|
43
|
+
justifyContent: 'center',
|
|
44
|
+
},
|
|
45
|
+
innerText: {
|
|
46
|
+
fontSize: 20,
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
export default CommonBadge;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type TextStyle, type ViewProps, type ViewStyle } from 'react-native';
|
|
2
|
+
|
|
3
|
+
type Variant = 'primary' | 'secondary';
|
|
4
|
+
type SizeVariant = 's' | 'm' | 'l';
|
|
5
|
+
|
|
6
|
+
export const sizeType: Record<SizeVariant, ViewStyle> = {
|
|
7
|
+
s: { minWidth: 18, height: 18, borderRadius: 8, paddingHorizontal: 4 },
|
|
8
|
+
m: { minWidth: 20, height: 20, borderRadius: 10, paddingHorizontal: 4 },
|
|
9
|
+
l: { minWidth: 22, height: 22, borderRadius: 12, paddingHorizontal: 4 },
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const expandedSizeType: Record<SizeVariant, ViewStyle> = {
|
|
13
|
+
s: { minWidth: 32, height: 16 },
|
|
14
|
+
m: { minWidth: 36, height: 20 },
|
|
15
|
+
l: { minWidth: 40, height: 24 },
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const fontSizeType: Record<SizeVariant, TextStyle> = {
|
|
19
|
+
s: { fontSize: 10 },
|
|
20
|
+
m: { fontSize: 12 },
|
|
21
|
+
l: { fontSize: 14 },
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export interface BadgeProps extends ViewProps {
|
|
25
|
+
type?: Variant;
|
|
26
|
+
size?: SizeVariant;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface CommonBadgeProps extends BadgeProps {
|
|
30
|
+
typeText?: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface NumberBadgeProps extends BadgeProps {
|
|
34
|
+
number: number;
|
|
35
|
+
maxNumber?: number;
|
|
36
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Pressable, StyleSheet } from 'react-native';
|
|
2
|
+
import { CommonText } from '../text';
|
|
3
|
+
import { type CommonButtonProps, fontSizeType } from './types';
|
|
4
|
+
import { useTheme } from '../../hooks/useTheme';
|
|
5
|
+
|
|
6
|
+
const CommonButton = ({
|
|
7
|
+
title,
|
|
8
|
+
type = 'primary',
|
|
9
|
+
size = 'm',
|
|
10
|
+
disabled,
|
|
11
|
+
...props
|
|
12
|
+
}: CommonButtonProps) => {
|
|
13
|
+
const { theme } = useTheme();
|
|
14
|
+
return (
|
|
15
|
+
<Pressable
|
|
16
|
+
style={[
|
|
17
|
+
styles.container,
|
|
18
|
+
disabled
|
|
19
|
+
? { backgroundColor: theme.colors[type] }
|
|
20
|
+
: { backgroundColor: theme.colors[type] },
|
|
21
|
+
]}
|
|
22
|
+
{...props}
|
|
23
|
+
>
|
|
24
|
+
<CommonText
|
|
25
|
+
style={[fontSizeType[size], { color: theme.colors.white }]}
|
|
26
|
+
isInner={true}
|
|
27
|
+
>
|
|
28
|
+
{title}
|
|
29
|
+
</CommonText>
|
|
30
|
+
</Pressable>
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const styles = StyleSheet.create({
|
|
35
|
+
container: {
|
|
36
|
+
margin: 5,
|
|
37
|
+
paddingVertical: 10,
|
|
38
|
+
paddingHorizontal: 20,
|
|
39
|
+
borderRadius: 3,
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export default CommonButton;
|