@pop-ui/foundation 1.0.0 → 1.1.0-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +92 -10
- package/dist/foundation.js +946 -526
- package/dist/foundation.umd.cjs +1 -1
- package/dist/native/icons/native/IconArrowDown.js +6 -0
- package/dist/native/icons/native/IconArrowLeft.js +6 -0
- package/dist/native/icons/native/IconArrowRight.js +6 -0
- package/dist/native/icons/native/IconArrowUp.js +6 -0
- package/dist/native/icons/native/IconBookmark.js +7 -0
- package/dist/native/icons/native/IconBriefcase.js +6 -0
- package/dist/native/icons/native/IconCafe.js +7 -0
- package/dist/native/icons/native/IconCalendar.js +7 -0
- package/dist/native/icons/native/IconCalendarCancel.js +6 -0
- package/dist/native/icons/native/IconCamera.js +6 -0
- package/dist/native/icons/native/IconCameraSwitch.js +6 -0
- package/dist/native/icons/native/IconCard.js +9 -0
- package/dist/native/icons/native/IconCards.js +6 -0
- package/dist/native/icons/native/IconCaretDown.js +6 -0
- package/dist/native/icons/native/IconCaretUp.js +6 -0
- package/dist/native/icons/native/IconCaution.js +7 -0
- package/dist/native/icons/native/IconChartBar.js +7 -0
- package/dist/native/icons/native/IconCheck.js +6 -0
- package/dist/native/icons/native/IconCheckBadge.js +6 -0
- package/dist/native/icons/native/IconCheckCircle.js +7 -0
- package/dist/native/icons/native/IconChevronDown.js +6 -0
- package/dist/native/icons/native/IconChevronLeft.js +6 -0
- package/dist/native/icons/native/IconChevronLeftDouble.js +6 -0
- package/dist/native/icons/native/IconChevronRight.js +6 -0
- package/dist/native/icons/native/IconChevronRightDouble.js +6 -0
- package/dist/native/icons/native/IconChevronUp.js +6 -0
- package/dist/native/icons/native/IconChevronUpDown.js +6 -0
- package/dist/native/icons/native/IconClock.js +6 -0
- package/dist/native/icons/native/IconCoffee.js +6 -0
- package/dist/native/icons/native/IconCopy.js +6 -0
- package/dist/native/icons/native/IconCreditCard.js +6 -0
- package/dist/native/icons/native/IconDev.js +6 -0
- package/dist/native/icons/native/IconDirection.js +6 -0
- package/dist/native/icons/native/IconDragMenu.js +6 -0
- package/dist/native/icons/native/IconEdit.js +6 -0
- package/dist/native/icons/native/IconEditNote.js +6 -0
- package/dist/native/icons/native/IconExport.js +6 -0
- package/dist/native/icons/native/IconExternalLink.js +6 -0
- package/dist/native/icons/native/IconFilter.js +6 -0
- package/dist/native/icons/native/IconGift.js +6 -0
- package/dist/native/icons/native/IconGrid.js +7 -0
- package/dist/native/icons/native/IconHamburger.js +6 -0
- package/dist/native/icons/native/IconHeart.js +7 -0
- package/dist/native/icons/native/IconHelp.js +6 -0
- package/dist/native/icons/native/IconHome.js +6 -0
- package/dist/native/icons/native/IconInfoCircle.js +7 -0
- package/dist/native/icons/native/IconKebap.js +6 -0
- package/dist/native/icons/native/IconLike.js +6 -0
- package/dist/native/icons/native/IconLink.js +6 -0
- package/dist/native/icons/native/IconList.js +6 -0
- package/dist/native/icons/native/IconListBullet.js +6 -0
- package/dist/native/icons/native/IconListNumber.js +6 -0
- package/dist/native/icons/native/IconLocation.js +6 -0
- package/dist/native/icons/native/IconMail.js +6 -0
- package/dist/native/icons/native/IconMap.js +6 -0
- package/dist/native/icons/native/IconMapMarker.js +7 -0
- package/dist/native/icons/native/IconMeatBall.js +6 -0
- package/dist/native/icons/native/IconMenu.js +6 -0
- package/dist/native/icons/native/IconMenuCheck.js +7 -0
- package/dist/native/icons/native/IconMessage.js +9 -0
- package/dist/native/icons/native/IconMinus.js +6 -0
- package/dist/native/icons/native/IconMoneyCircle.js +7 -0
- package/dist/native/icons/native/IconNote.js +6 -0
- package/dist/native/icons/native/IconNotification.js +7 -0
- package/dist/native/icons/native/IconPercentBadge.js +6 -0
- package/dist/native/icons/native/IconPhoneClock.js +6 -0
- package/dist/native/icons/native/IconPhoto.js +6 -0
- package/dist/native/icons/native/IconPlayCircle.js +7 -0
- package/dist/native/icons/native/IconPlus.js +6 -0
- package/dist/native/icons/native/IconPlusCircle.js +7 -0
- package/dist/native/icons/native/IconPopcorn.js +6 -0
- package/dist/native/icons/native/IconPopdeal.js +6 -0
- package/dist/native/icons/native/IconPoppass.js +6 -0
- package/dist/native/icons/native/IconPrinter.js +6 -0
- package/dist/native/icons/native/IconQuestion.js +6 -0
- package/dist/native/icons/native/IconQuestionCircle.js +7 -0
- package/dist/native/icons/native/IconQuote.js +9 -0
- package/dist/native/icons/native/IconRefresh.js +6 -0
- package/dist/native/icons/native/IconReset.js +6 -0
- package/dist/native/icons/native/IconRestaurant.js +7 -0
- package/dist/native/icons/native/IconSearch.js +6 -0
- package/dist/native/icons/native/IconSetting.js +6 -0
- package/dist/native/icons/native/IconShare.js +7 -0
- package/dist/native/icons/native/IconShop.js +7 -0
- package/dist/native/icons/native/IconShoppingBagCheck.js +9 -0
- package/dist/native/icons/native/IconSiren.js +6 -0
- package/dist/native/icons/native/IconSirenImportant.js +6 -0
- package/dist/native/icons/native/IconSmartphone.js +6 -0
- package/dist/native/icons/native/IconSound.js +7 -0
- package/dist/native/icons/native/IconStar.js +7 -0
- package/dist/native/icons/native/IconStore.js +6 -0
- package/dist/native/icons/native/IconSwapHorizontal.js +6 -0
- package/dist/native/icons/native/IconSwapVertical.js +6 -0
- package/dist/native/icons/native/IconText.js +6 -0
- package/dist/native/icons/native/IconTicket.js +6 -0
- package/dist/native/icons/native/IconTicketPlay.js +6 -0
- package/dist/native/icons/native/IconTrash.js +6 -0
- package/dist/native/icons/native/IconUser.js +7 -0
- package/dist/native/icons/native/IconUserDouble.js +7 -0
- package/dist/native/icons/native/IconUserSearch.js +7 -0
- package/dist/native/icons/native/IconVisibility.js +6 -0
- package/dist/native/icons/native/IconWarningCircle.js +7 -0
- package/dist/native/icons/native/IconWarningTriangle.js +7 -0
- package/dist/native/icons/native/IconX.js +6 -0
- package/dist/native/icons/native/IconXCircle.js +7 -0
- package/dist/native/icons/native/index.js +105 -0
- package/dist/native/illustrations/native/IllustrationAge12.js +5 -0
- package/dist/native/illustrations/native/IllustrationAge15.js +5 -0
- package/dist/native/illustrations/native/IllustrationAge19.js +5 -0
- package/dist/native/illustrations/native/IllustrationAgeAll.js +5 -0
- package/dist/native/illustrations/native/IllustrationAlarm.js +5 -0
- package/dist/native/illustrations/native/IllustrationBell.js +5 -0
- package/dist/native/illustrations/native/IllustrationCalendar.js +5 -0
- package/dist/native/illustrations/native/IllustrationChart.js +5 -0
- package/dist/native/illustrations/native/IllustrationChat.js +5 -0
- package/dist/native/illustrations/native/IllustrationClapperboard.js +5 -0
- package/dist/native/illustrations/native/IllustrationCoinWon.js +5 -0
- package/dist/native/illustrations/native/IllustrationCreditcard.js +5 -0
- package/dist/native/illustrations/native/IllustrationDiscountcoupon.js +5 -0
- package/dist/native/illustrations/native/IllustrationDiscounttagMint.js +5 -0
- package/dist/native/illustrations/native/IllustrationDiscounttagPurple.js +5 -0
- package/dist/native/illustrations/native/IllustrationDiscounttagRed.js +5 -0
- package/dist/native/illustrations/native/IllustrationExel.js +5 -0
- package/dist/native/illustrations/native/IllustrationFolder.js +5 -0
- package/dist/native/illustrations/native/IllustrationHome.js +5 -0
- package/dist/native/illustrations/native/IllustrationLink.js +5 -0
- package/dist/native/illustrations/native/IllustrationMappinMint.js +5 -0
- package/dist/native/illustrations/native/IllustrationMappinRed.js +5 -0
- package/dist/native/illustrations/native/IllustrationMegaphone.js +5 -0
- package/dist/native/illustrations/native/IllustrationMoneybag.js +5 -0
- package/dist/native/illustrations/native/IllustrationPopcorn.js +5 -0
- package/dist/native/illustrations/native/IllustrationShop.js +5 -0
- package/dist/native/illustrations/native/IllustrationShoppingbag.js +5 -0
- package/dist/native/illustrations/native/IllustrationSoda.js +5 -0
- package/dist/native/illustrations/native/IllustrationVendingmachine.js +5 -0
- package/dist/native/illustrations/native/index.js +29 -0
- package/dist/native/index.native.js +4 -0
- package/dist/native/theme/colors/tokens.js +28 -0
- package/dist/native/tokens/colors.js +185 -0
- package/dist/native/types/icon.native.js +1 -0
- package/dist/native/types/illustration.native.js +1 -0
- package/dist/types/index.d.ts +17 -3
- package/dist/types-native/icons/native/IconArrowDown.d.ts +2 -0
- package/dist/types-native/icons/native/IconArrowLeft.d.ts +2 -0
- package/dist/types-native/icons/native/IconArrowRight.d.ts +2 -0
- package/dist/types-native/icons/native/IconArrowUp.d.ts +2 -0
- package/dist/types-native/icons/native/IconBookmark.d.ts +2 -0
- package/dist/types-native/icons/native/IconBriefcase.d.ts +2 -0
- package/dist/types-native/icons/native/IconCafe.d.ts +2 -0
- package/dist/types-native/icons/native/IconCalendar.d.ts +2 -0
- package/dist/types-native/icons/native/IconCalendarCancel.d.ts +2 -0
- package/dist/types-native/icons/native/IconCamera.d.ts +2 -0
- package/dist/types-native/icons/native/IconCameraSwitch.d.ts +2 -0
- package/dist/types-native/icons/native/IconCard.d.ts +2 -0
- package/dist/types-native/icons/native/IconCards.d.ts +2 -0
- package/dist/types-native/icons/native/IconCaretDown.d.ts +2 -0
- package/dist/types-native/icons/native/IconCaretUp.d.ts +2 -0
- package/dist/types-native/icons/native/IconCaution.d.ts +2 -0
- package/dist/types-native/icons/native/IconChartBar.d.ts +2 -0
- package/dist/types-native/icons/native/IconCheck.d.ts +2 -0
- package/dist/types-native/icons/native/IconCheckBadge.d.ts +2 -0
- package/dist/types-native/icons/native/IconCheckCircle.d.ts +2 -0
- package/dist/types-native/icons/native/IconChevronDown.d.ts +2 -0
- package/dist/types-native/icons/native/IconChevronLeft.d.ts +2 -0
- package/dist/types-native/icons/native/IconChevronLeftDouble.d.ts +2 -0
- package/dist/types-native/icons/native/IconChevronRight.d.ts +2 -0
- package/dist/types-native/icons/native/IconChevronRightDouble.d.ts +2 -0
- package/dist/types-native/icons/native/IconChevronUp.d.ts +2 -0
- package/dist/types-native/icons/native/IconChevronUpDown.d.ts +2 -0
- package/dist/types-native/icons/native/IconClock.d.ts +2 -0
- package/dist/types-native/icons/native/IconCoffee.d.ts +2 -0
- package/dist/types-native/icons/native/IconCopy.d.ts +2 -0
- package/dist/types-native/icons/native/IconCreditCard.d.ts +2 -0
- package/dist/types-native/icons/native/IconDev.d.ts +2 -0
- package/dist/types-native/icons/native/IconDirection.d.ts +2 -0
- package/dist/types-native/icons/native/IconDragMenu.d.ts +2 -0
- package/dist/types-native/icons/native/IconEdit.d.ts +2 -0
- package/dist/types-native/icons/native/IconEditNote.d.ts +2 -0
- package/dist/types-native/icons/native/IconExport.d.ts +2 -0
- package/dist/types-native/icons/native/IconExternalLink.d.ts +2 -0
- package/dist/types-native/icons/native/IconFilter.d.ts +2 -0
- package/dist/types-native/icons/native/IconGift.d.ts +2 -0
- package/dist/types-native/icons/native/IconGrid.d.ts +2 -0
- package/dist/types-native/icons/native/IconHamburger.d.ts +2 -0
- package/dist/types-native/icons/native/IconHeart.d.ts +2 -0
- package/dist/types-native/icons/native/IconHelp.d.ts +2 -0
- package/dist/types-native/icons/native/IconHome.d.ts +2 -0
- package/dist/types-native/icons/native/IconInfoCircle.d.ts +2 -0
- package/dist/types-native/icons/native/IconKebap.d.ts +2 -0
- package/dist/types-native/icons/native/IconLike.d.ts +2 -0
- package/dist/types-native/icons/native/IconLink.d.ts +2 -0
- package/dist/types-native/icons/native/IconList.d.ts +2 -0
- package/dist/types-native/icons/native/IconListBullet.d.ts +2 -0
- package/dist/types-native/icons/native/IconListNumber.d.ts +2 -0
- package/dist/types-native/icons/native/IconLocation.d.ts +2 -0
- package/dist/types-native/icons/native/IconMail.d.ts +2 -0
- package/dist/types-native/icons/native/IconMap.d.ts +2 -0
- package/dist/types-native/icons/native/IconMapMarker.d.ts +2 -0
- package/dist/types-native/icons/native/IconMeatBall.d.ts +2 -0
- package/dist/types-native/icons/native/IconMenu.d.ts +2 -0
- package/dist/types-native/icons/native/IconMenuCheck.d.ts +2 -0
- package/dist/types-native/icons/native/IconMessage.d.ts +2 -0
- package/dist/types-native/icons/native/IconMinus.d.ts +2 -0
- package/dist/types-native/icons/native/IconMoneyCircle.d.ts +2 -0
- package/dist/types-native/icons/native/IconNote.d.ts +2 -0
- package/dist/types-native/icons/native/IconNotification.d.ts +2 -0
- package/dist/types-native/icons/native/IconPercentBadge.d.ts +2 -0
- package/dist/types-native/icons/native/IconPhoneClock.d.ts +2 -0
- package/dist/types-native/icons/native/IconPhoto.d.ts +2 -0
- package/dist/types-native/icons/native/IconPlayCircle.d.ts +2 -0
- package/dist/types-native/icons/native/IconPlus.d.ts +2 -0
- package/dist/types-native/icons/native/IconPlusCircle.d.ts +2 -0
- package/dist/types-native/icons/native/IconPopcorn.d.ts +2 -0
- package/dist/types-native/icons/native/IconPopdeal.d.ts +2 -0
- package/dist/types-native/icons/native/IconPoppass.d.ts +2 -0
- package/dist/types-native/icons/native/IconPrinter.d.ts +2 -0
- package/dist/types-native/icons/native/IconQuestion.d.ts +2 -0
- package/dist/types-native/icons/native/IconQuestionCircle.d.ts +2 -0
- package/dist/types-native/icons/native/IconQuote.d.ts +2 -0
- package/dist/types-native/icons/native/IconRefresh.d.ts +2 -0
- package/dist/types-native/icons/native/IconReset.d.ts +2 -0
- package/dist/types-native/icons/native/IconRestaurant.d.ts +2 -0
- package/dist/types-native/icons/native/IconSearch.d.ts +2 -0
- package/dist/types-native/icons/native/IconSetting.d.ts +2 -0
- package/dist/types-native/icons/native/IconShare.d.ts +2 -0
- package/dist/types-native/icons/native/IconShop.d.ts +2 -0
- package/dist/types-native/icons/native/IconShoppingBagCheck.d.ts +2 -0
- package/dist/types-native/icons/native/IconSiren.d.ts +2 -0
- package/dist/types-native/icons/native/IconSirenImportant.d.ts +2 -0
- package/dist/types-native/icons/native/IconSmartphone.d.ts +2 -0
- package/dist/types-native/icons/native/IconSound.d.ts +2 -0
- package/dist/types-native/icons/native/IconStar.d.ts +2 -0
- package/dist/types-native/icons/native/IconStore.d.ts +2 -0
- package/dist/types-native/icons/native/IconSwapHorizontal.d.ts +2 -0
- package/dist/types-native/icons/native/IconSwapVertical.d.ts +2 -0
- package/dist/types-native/icons/native/IconText.d.ts +2 -0
- package/dist/types-native/icons/native/IconTicket.d.ts +2 -0
- package/dist/types-native/icons/native/IconTicketPlay.d.ts +2 -0
- package/dist/types-native/icons/native/IconTrash.d.ts +2 -0
- package/dist/types-native/icons/native/IconUser.d.ts +2 -0
- package/dist/types-native/icons/native/IconUserDouble.d.ts +2 -0
- package/dist/types-native/icons/native/IconUserSearch.d.ts +2 -0
- package/dist/types-native/icons/native/IconVisibility.d.ts +2 -0
- package/dist/types-native/icons/native/IconWarningCircle.d.ts +2 -0
- package/dist/types-native/icons/native/IconWarningTriangle.d.ts +2 -0
- package/dist/types-native/icons/native/IconX.d.ts +2 -0
- package/dist/types-native/icons/native/IconXCircle.d.ts +2 -0
- package/dist/types-native/icons/native/index.d.ts +105 -0
- package/dist/types-native/illustrations/native/IllustrationAge12.d.ts +2 -0
- package/dist/types-native/illustrations/native/IllustrationAge15.d.ts +2 -0
- package/dist/types-native/illustrations/native/IllustrationAge19.d.ts +2 -0
- package/dist/types-native/illustrations/native/IllustrationAgeAll.d.ts +2 -0
- package/dist/types-native/illustrations/native/IllustrationAlarm.d.ts +2 -0
- package/dist/types-native/illustrations/native/IllustrationBell.d.ts +2 -0
- package/dist/types-native/illustrations/native/IllustrationCalendar.d.ts +2 -0
- package/dist/types-native/illustrations/native/IllustrationChart.d.ts +2 -0
- package/dist/types-native/illustrations/native/IllustrationChat.d.ts +2 -0
- package/dist/types-native/illustrations/native/IllustrationClapperboard.d.ts +2 -0
- package/dist/types-native/illustrations/native/IllustrationCoinWon.d.ts +2 -0
- package/dist/types-native/illustrations/native/IllustrationCreditcard.d.ts +2 -0
- package/dist/types-native/illustrations/native/IllustrationDiscountcoupon.d.ts +2 -0
- package/dist/types-native/illustrations/native/IllustrationDiscounttagMint.d.ts +2 -0
- package/dist/types-native/illustrations/native/IllustrationDiscounttagPurple.d.ts +2 -0
- package/dist/types-native/illustrations/native/IllustrationDiscounttagRed.d.ts +2 -0
- package/dist/types-native/illustrations/native/IllustrationExel.d.ts +2 -0
- package/dist/types-native/illustrations/native/IllustrationFolder.d.ts +2 -0
- package/dist/types-native/illustrations/native/IllustrationHome.d.ts +2 -0
- package/dist/types-native/illustrations/native/IllustrationLink.d.ts +2 -0
- package/dist/types-native/illustrations/native/IllustrationMappinMint.d.ts +2 -0
- package/dist/types-native/illustrations/native/IllustrationMappinRed.d.ts +2 -0
- package/dist/types-native/illustrations/native/IllustrationMegaphone.d.ts +2 -0
- package/dist/types-native/illustrations/native/IllustrationMoneybag.d.ts +2 -0
- package/dist/types-native/illustrations/native/IllustrationPopcorn.d.ts +2 -0
- package/dist/types-native/illustrations/native/IllustrationShop.d.ts +2 -0
- package/dist/types-native/illustrations/native/IllustrationShoppingbag.d.ts +2 -0
- package/dist/types-native/illustrations/native/IllustrationSoda.d.ts +2 -0
- package/dist/types-native/illustrations/native/IllustrationVendingmachine.d.ts +2 -0
- package/dist/types-native/illustrations/native/index.d.ts +29 -0
- package/dist/types-native/index.native.d.ts +6 -0
- package/dist/types-native/theme/colors/tokens.d.ts +20 -0
- package/dist/types-native/tokens/colors.d.ts +185 -0
- package/dist/types-native/types/icon.native.d.ts +15 -0
- package/dist/types-native/types/illustration.native.d.ts +4 -0
- package/package.json +24 -6
package/README.md
CHANGED
|
@@ -1,15 +1,58 @@
|
|
|
1
1
|
# @pop-ui/foundation
|
|
2
2
|
|
|
3
|
-
Pop UI의 디자인 토큰, 아이콘,
|
|
3
|
+
Pop UI의 디자인 토큰, 아이콘, 일러스트레이션 등 기본 요소를 제공하는 패키지입니다.
|
|
4
|
+
React(웹)와 React Native를 모두 지원합니다.
|
|
4
5
|
|
|
5
6
|
## 설치
|
|
6
7
|
|
|
8
|
+
### React (웹)
|
|
9
|
+
|
|
7
10
|
```bash
|
|
8
11
|
npm install @pop-ui/foundation
|
|
9
12
|
# or
|
|
10
13
|
yarn add @pop-ui/foundation
|
|
11
14
|
```
|
|
12
15
|
|
|
16
|
+
### React Native
|
|
17
|
+
|
|
18
|
+
react-native-svg가 필요합니다 (>=13.0.0):
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install @pop-ui/foundation react-native-svg
|
|
22
|
+
# or
|
|
23
|
+
yarn add @pop-ui/foundation react-native-svg
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
> iOS: `cd ios && pod install`
|
|
27
|
+
|
|
28
|
+
## React Native 지원
|
|
29
|
+
|
|
30
|
+
`package.json`의 `exports` 조건부로 번들러가 자동으로 RN 빌드를 선택합니다.
|
|
31
|
+
**import 코드를 바꿀 필요 없습니다** — 웹과 동일한 import 경로를 사용하세요.
|
|
32
|
+
|
|
33
|
+
```tsx
|
|
34
|
+
// 웹과 완전히 동일한 코드로 React Native에서도 동작
|
|
35
|
+
import { IconBookmark, IllustrationPopcorn } from '@pop-ui/foundation';
|
|
36
|
+
|
|
37
|
+
<IconBookmark size={24} color="#333" />
|
|
38
|
+
<IllustrationPopcorn size={48} />
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### 웹과의 차이점
|
|
42
|
+
|
|
43
|
+
| 항목 | 웹 (React) | React Native |
|
|
44
|
+
|------|-----------|--------------|
|
|
45
|
+
| 렌더링 | HTML `<svg>` | `react-native-svg` 컴포넌트 |
|
|
46
|
+
| Props 타입 | `SVGProps<SVGSVGElement>` | `SvgProps` (react-native-svg) |
|
|
47
|
+
| `className` | ✅ 지원 | ❌ 미지원 |
|
|
48
|
+
| `style` | CSS 객체 | RN StyleSheet 객체 |
|
|
49
|
+
| 색상·크기 | 동일 (`size`, `color`) | 동일 (`size`, `color`) |
|
|
50
|
+
|
|
51
|
+
### 사전 요구사항
|
|
52
|
+
|
|
53
|
+
- `react-native-svg` >= 13.0.0
|
|
54
|
+
- Metro bundler >= 0.72 (React Native >= 0.71) — `exports` 조건부 지원 버전
|
|
55
|
+
|
|
13
56
|
## 구성 요소
|
|
14
57
|
|
|
15
58
|
### 1. Design Tokens
|
|
@@ -67,12 +110,12 @@ function MyComponent() {
|
|
|
67
110
|
|
|
68
111
|
모든 아이콘은 다음 props를 지원합니다:
|
|
69
112
|
|
|
70
|
-
- `size?: number` - 아이콘 크기 (기본값:
|
|
71
|
-
- `color?: string` - 아이콘 색상 (기본값: ColorGray900
|
|
72
|
-
- `variant?: 'line' | 'filled'` - 스타일 변형 (
|
|
73
|
-
- `className?: string` - CSS 클래스
|
|
74
|
-
- `style?: CSSProperties` - 인라인 스타일
|
|
75
|
-
- 기타 표준 SVG
|
|
113
|
+
- `size?: number` - 아이콘 크기 (기본값: 24)
|
|
114
|
+
- `color?: string` - 아이콘 색상 (기본값: ColorGray900)
|
|
115
|
+
- `variant?: 'line' | 'filled'` - 스타일 변형 (일부 아이콘만 `filled` 지원)
|
|
116
|
+
- `className?: string` - CSS 클래스 **(웹 전용)**
|
|
117
|
+
- `style?: CSSProperties` - 인라인 스타일 **(웹: CSS 객체 / RN: StyleSheet 객체)**
|
|
118
|
+
- 기타 표준 SVG 속성 (웹) / SvgProps 속성 (RN)
|
|
76
119
|
|
|
77
120
|
#### 현재 제공되는 아이콘
|
|
78
121
|
|
|
@@ -204,16 +247,32 @@ yarn build
|
|
|
204
247
|
|
|
205
248
|
**참고**: Token 파일을 수정한 후에는 반드시 위 과정을 거쳐 재생성해야 합니다.
|
|
206
249
|
|
|
250
|
+
### 스크립트
|
|
251
|
+
|
|
252
|
+
| 명령어 | 설명 |
|
|
253
|
+
|--------|------|
|
|
254
|
+
| `yarn build` | 웹 + React Native 전체 빌드 |
|
|
255
|
+
| `yarn build:native` | React Native 빌드만 실행 (tsc) |
|
|
256
|
+
| `yarn generate:native` | 아이콘/일러스트를 RN 컴포넌트로 변환 |
|
|
257
|
+
| `yarn token-transform` | token.json → transformed-token.json 변환 |
|
|
258
|
+
| `yarn token-build` | style-dictionary로 TypeScript/SCSS 생성 |
|
|
259
|
+
|
|
207
260
|
### 아이콘/일러스트레이션 추가 방법
|
|
208
261
|
|
|
209
262
|
1. Figma에서 SVG export
|
|
210
263
|
2. SVG → TSX 변환 (JSX 속성 변환, `viewBox` 유지, `width={size}` / `height={size}` 적용)
|
|
211
264
|
3. 해당 메타데이터 파일에 카테고리 등록
|
|
212
|
-
4. `index.ts` 배럴 파일에 export 추가
|
|
265
|
+
4. `src/icons/index.ts` (또는 `src/illustrations/index.ts`) 배럴 파일에 export 추가
|
|
266
|
+
5. **React Native 파일 자동 생성**:
|
|
267
|
+
```bash
|
|
268
|
+
yarn workspace @pop-ui/foundation generate:native
|
|
269
|
+
```
|
|
270
|
+
> `src/icons/native/`, `src/illustrations/native/` 안의 파일은 자동 생성물입니다.
|
|
271
|
+
> 직접 수정하지 말고, 원본(`src/icons/*.tsx`)을 수정한 후 스크립트를 재실행하세요.
|
|
213
272
|
|
|
214
273
|
## 타입 정의
|
|
215
274
|
|
|
216
|
-
### IIconProps
|
|
275
|
+
### IIconProps (React / 웹)
|
|
217
276
|
|
|
218
277
|
```typescript
|
|
219
278
|
import type { IIconProps } from '@pop-ui/foundation';
|
|
@@ -225,7 +284,20 @@ interface IIconProps extends SVGProps<SVGSVGElement> {
|
|
|
225
284
|
}
|
|
226
285
|
```
|
|
227
286
|
|
|
228
|
-
###
|
|
287
|
+
### IIconProps (React Native)
|
|
288
|
+
|
|
289
|
+
```typescript
|
|
290
|
+
import type { IIconProps } from '@pop-ui/foundation';
|
|
291
|
+
// react-native-svg의 SvgProps를 확장
|
|
292
|
+
|
|
293
|
+
interface IIconProps extends SvgProps {
|
|
294
|
+
size?: number;
|
|
295
|
+
color?: string;
|
|
296
|
+
variant?: 'line' | 'filled';
|
|
297
|
+
}
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
### IIllustrationProps (React / 웹)
|
|
229
301
|
|
|
230
302
|
```typescript
|
|
231
303
|
import type { IIllustrationProps } from '@pop-ui/foundation';
|
|
@@ -235,6 +307,16 @@ interface IIllustrationProps extends SVGProps<SVGSVGElement> {
|
|
|
235
307
|
}
|
|
236
308
|
```
|
|
237
309
|
|
|
310
|
+
### IIllustrationProps (React Native)
|
|
311
|
+
|
|
312
|
+
```typescript
|
|
313
|
+
import type { IIllustrationProps } from '@pop-ui/foundation';
|
|
314
|
+
|
|
315
|
+
interface IIllustrationProps extends SvgProps {
|
|
316
|
+
size?: number;
|
|
317
|
+
}
|
|
318
|
+
```
|
|
319
|
+
|
|
238
320
|
### ColorPalette
|
|
239
321
|
|
|
240
322
|
```typescript
|