@0610studio/zs-ui 0.18.0 → 0.19.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/build/ZsUiModule.d.ts.map +1 -1
- package/build/ZsUiModule.js +0 -2
- package/build/ZsUiModule.js.map +1 -1
- package/build/assets/SvgExclamation.d.ts.map +1 -1
- package/build/assets/SvgExclamation.js.map +1 -1
- package/build/assets/SvgTooltipTail.d.ts +7 -0
- package/build/assets/SvgTooltipTail.d.ts.map +1 -0
- package/build/assets/SvgTooltipTail.js +7 -0
- package/build/assets/SvgTooltipTail.js.map +1 -0
- package/build/context/OverlayContext.d.ts.map +1 -1
- package/build/context/OverlayContext.js +11 -14
- package/build/context/OverlayContext.js.map +1 -1
- package/build/context/ThemeContext.d.ts +9 -0
- package/build/context/ThemeContext.d.ts.map +1 -1
- package/build/context/ThemeContext.js +24 -15
- package/build/context/ThemeContext.js.map +1 -1
- package/build/index.d.ts +16 -3
- package/build/index.d.ts.map +1 -1
- package/build/index.js +7 -7
- package/build/index.js.map +1 -1
- package/build/model/globalOverlay.d.ts +0 -8
- package/build/model/globalOverlay.d.ts.map +1 -1
- package/build/model/globalOverlay.js +0 -9
- package/build/model/globalOverlay.js.map +1 -1
- package/build/model/types.d.ts +2 -1
- package/build/model/types.d.ts.map +1 -1
- package/build/model/types.js.map +1 -1
- package/build/model/useFoldingState.d.ts.map +1 -1
- package/build/model/useFoldingState.js +51 -32
- package/build/model/useFoldingState.js.map +1 -1
- package/build/model/useKeyboard.d.ts.map +1 -1
- package/build/model/useKeyboard.js +8 -4
- package/build/model/useKeyboard.js.map +1 -1
- package/build/model/utils.d.ts +1 -1
- package/build/model/utils.d.ts.map +1 -1
- package/build/model/utils.js +2 -1
- package/build/model/utils.js.map +1 -1
- package/build/overlay/AlertOverlay/index.d.ts +1 -2
- package/build/overlay/AlertOverlay/index.d.ts.map +1 -1
- package/build/overlay/AlertOverlay/index.js +13 -11
- package/build/overlay/AlertOverlay/index.js.map +1 -1
- package/build/overlay/BottomSheetOverlay/index.d.ts.map +1 -1
- package/build/overlay/BottomSheetOverlay/index.js +22 -11
- package/build/overlay/BottomSheetOverlay/index.js.map +1 -1
- package/build/overlay/LoadingNotify/index.d.ts +2 -2
- package/build/overlay/LoadingNotify/index.d.ts.map +1 -1
- package/build/overlay/LoadingNotify/index.js +2 -2
- package/build/overlay/LoadingNotify/index.js.map +1 -1
- package/build/overlay/Modality/index.d.ts.map +1 -1
- package/build/overlay/Modality/index.js +6 -12
- package/build/overlay/Modality/index.js.map +1 -1
- package/build/overlay/PopOver/PopOverMenu.d.ts.map +1 -1
- package/build/overlay/PopOver/PopOverMenu.js +7 -8
- package/build/overlay/PopOver/PopOverMenu.js.map +1 -1
- package/build/overlay/SnackbarNotify/index.d.ts +3 -3
- package/build/overlay/SnackbarNotify/index.d.ts.map +1 -1
- package/build/overlay/SnackbarNotify/index.js +5 -4
- package/build/overlay/SnackbarNotify/index.js.map +1 -1
- package/build/overlay/SnackbarNotify/ui/SnackbarItem.d.ts +4 -4
- package/build/overlay/SnackbarNotify/ui/SnackbarItem.d.ts.map +1 -1
- package/build/overlay/SnackbarNotify/ui/SnackbarItem.js +9 -9
- package/build/overlay/SnackbarNotify/ui/SnackbarItem.js.map +1 -1
- package/build/overlay/ZSPortal/index.d.ts.map +1 -1
- package/build/overlay/ZSPortal/index.js +15 -4
- package/build/overlay/ZSPortal/index.js.map +1 -1
- package/build/overlay/ui/ModalBackground.js.map +1 -1
- package/build/theme/elevation.d.ts +94 -10
- package/build/theme/elevation.d.ts.map +1 -1
- package/build/theme/elevation.js +39 -35
- package/build/theme/elevation.js.map +1 -1
- package/build/theme/intentColors.d.ts +9 -0
- package/build/theme/intentColors.d.ts.map +1 -0
- package/build/theme/intentColors.js +30 -0
- package/build/theme/intentColors.js.map +1 -0
- package/build/theme/palette.d.ts +1 -5
- package/build/theme/palette.d.ts.map +1 -1
- package/build/theme/palette.js +3 -12
- package/build/theme/palette.js.map +1 -1
- package/build/theme/resolveColor.d.ts +4 -0
- package/build/theme/resolveColor.d.ts.map +1 -0
- package/build/theme/resolveColor.js +29 -0
- package/build/theme/resolveColor.js.map +1 -0
- package/build/theme/tokens.d.ts +35 -0
- package/build/theme/tokens.d.ts.map +1 -0
- package/build/theme/tokens.js +35 -0
- package/build/theme/tokens.js.map +1 -0
- package/build/theme/typography.d.ts.map +1 -1
- package/build/theme/typography.js +36 -72
- package/build/theme/typography.js.map +1 -1
- package/build/ui/ZSBlockButton/index.d.ts +4 -2
- package/build/ui/ZSBlockButton/index.d.ts.map +1 -1
- package/build/ui/ZSBlockButton/index.js +17 -80
- package/build/ui/ZSBlockButton/index.js.map +1 -1
- package/build/ui/ZSBorderBeam/index.d.ts +48 -0
- package/build/ui/ZSBorderBeam/index.d.ts.map +1 -0
- package/build/ui/ZSBorderBeam/index.js +135 -0
- package/build/ui/ZSBorderBeam/index.js.map +1 -0
- package/build/ui/ZSCheckBox/index.d.ts +18 -0
- package/build/ui/ZSCheckBox/index.d.ts.map +1 -0
- package/build/ui/ZSCheckBox/index.js +60 -0
- package/build/ui/ZSCheckBox/index.js.map +1 -0
- package/build/ui/ZSChip/index.d.ts +28 -0
- package/build/ui/ZSChip/index.d.ts.map +1 -0
- package/build/ui/ZSChip/index.js +76 -0
- package/build/ui/ZSChip/index.js.map +1 -0
- package/build/ui/ZSContainer/index.d.ts +19 -0
- package/build/ui/ZSContainer/index.d.ts.map +1 -1
- package/build/ui/ZSContainer/index.js +29 -15
- package/build/ui/ZSContainer/index.js.map +1 -1
- package/build/ui/ZSPressable/index.d.ts.map +1 -1
- package/build/ui/ZSPressable/index.js +9 -6
- package/build/ui/ZSPressable/index.js.map +1 -1
- package/build/ui/ZSRadioGroup/index.d.ts +4 -4
- package/build/ui/ZSRadioGroup/index.d.ts.map +1 -1
- package/build/ui/ZSRadioGroup/index.js +72 -52
- package/build/ui/ZSRadioGroup/index.js.map +1 -1
- package/build/ui/ZSSegmented/index.d.ts +26 -0
- package/build/ui/ZSSegmented/index.d.ts.map +1 -0
- package/build/ui/ZSSegmented/index.js +124 -0
- package/build/ui/ZSSegmented/index.js.map +1 -0
- package/build/ui/ZSSkeleton/SkiaShimmer.d.ts +18 -0
- package/build/ui/ZSSkeleton/SkiaShimmer.d.ts.map +1 -0
- package/build/ui/ZSSkeleton/SkiaShimmer.js +73 -0
- package/build/ui/ZSSkeleton/SkiaShimmer.js.map +1 -0
- package/build/ui/ZSSkeleton/index.d.ts +9 -3
- package/build/ui/ZSSkeleton/index.d.ts.map +1 -1
- package/build/ui/ZSSkeleton/index.js +13 -44
- package/build/ui/ZSSkeleton/index.js.map +1 -1
- package/build/ui/ZSSkeletonBox/index.d.ts +10 -3
- package/build/ui/ZSSkeletonBox/index.d.ts.map +1 -1
- package/build/ui/ZSSkeletonBox/index.js +9 -47
- package/build/ui/ZSSkeletonBox/index.js.map +1 -1
- package/build/ui/ZSSwitch/index.d.ts +4 -2
- package/build/ui/ZSSwitch/index.d.ts.map +1 -1
- package/build/ui/ZSSwitch/index.js +8 -6
- package/build/ui/ZSSwitch/index.js.map +1 -1
- package/build/ui/ZSText/index.d.ts +3 -2
- package/build/ui/ZSText/index.d.ts.map +1 -1
- package/build/ui/ZSText/index.js +5 -16
- package/build/ui/ZSText/index.js.map +1 -1
- package/build/ui/ZSTextField/index.d.ts.map +1 -1
- package/build/ui/ZSTextField/index.js +57 -40
- package/build/ui/ZSTextField/index.js.map +1 -1
- package/build/ui/ZSTextField/ui/ButtonClose.d.ts.map +1 -1
- package/build/ui/ZSTextField/ui/ButtonClose.js +4 -1
- package/build/ui/ZSTextField/ui/ButtonClose.js.map +1 -1
- package/build/ui/ZSTooltip/index.d.ts +38 -0
- package/build/ui/ZSTooltip/index.d.ts.map +1 -0
- package/build/ui/ZSTooltip/index.js +99 -0
- package/build/ui/ZSTooltip/index.js.map +1 -0
- package/build/ui/ZSView/index.d.ts +3 -2
- package/build/ui/ZSView/index.d.ts.map +1 -1
- package/build/ui/ZSView/index.js +7 -8
- package/build/ui/ZSView/index.js.map +1 -1
- package/build/ui/atoms/AnimatedWrapper.d.ts.map +1 -1
- package/build/ui/atoms/AnimatedWrapper.js +33 -40
- package/build/ui/atoms/AnimatedWrapper.js.map +1 -1
- package/build/ui/atoms/TextAtom.d.ts +1 -2
- package/build/ui/atoms/TextAtom.d.ts.map +1 -1
- package/build/ui/atoms/TextAtom.js.map +1 -1
- package/build/ui/atoms/ViewAtom.d.ts +1 -2
- package/build/ui/atoms/ViewAtom.d.ts.map +1 -1
- package/build/ui/atoms/ViewAtom.js.map +1 -1
- package/package.json +6 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/** 컴포넌트 공통 곡률 스케일 */
|
|
2
|
+
export declare const RADIUS: {
|
|
3
|
+
/** 체크박스 등 소형 요소 */
|
|
4
|
+
readonly xs: 4;
|
|
5
|
+
/** 소형 버튼 */
|
|
6
|
+
readonly sm: 6;
|
|
7
|
+
/** 중형 버튼 (Alert 버튼 등) */
|
|
8
|
+
readonly md: 12;
|
|
9
|
+
/** 입력 필드 · 카드 */
|
|
10
|
+
readonly lg: 14;
|
|
11
|
+
/** 스낵바 · pressed 배경 */
|
|
12
|
+
readonly xl: 16;
|
|
13
|
+
/** 다이얼로그 컨테이너 */
|
|
14
|
+
readonly xxl: 22;
|
|
15
|
+
/** 바텀시트 */
|
|
16
|
+
readonly sheet: 26;
|
|
17
|
+
/** 완전한 pill/원형 */
|
|
18
|
+
readonly pill: 9999;
|
|
19
|
+
};
|
|
20
|
+
/** 애니메이션 duration 공통 스케일 (ms) */
|
|
21
|
+
export declare const DURATION: {
|
|
22
|
+
/** press in/out · 오버레이 퇴장 */
|
|
23
|
+
readonly press: 100;
|
|
24
|
+
/** 입력 필드 포커스 등 빠른 전환 */
|
|
25
|
+
readonly fast: 150;
|
|
26
|
+
/** 상태 전환 기본값 (칩 선택, 스위치 등) */
|
|
27
|
+
readonly base: 200;
|
|
28
|
+
/** 이동 애니메이션 (세그먼트 thumb, 스낵바 등) */
|
|
29
|
+
readonly slow: 250;
|
|
30
|
+
/** 오버레이 진입 */
|
|
31
|
+
readonly enter: 300;
|
|
32
|
+
};
|
|
33
|
+
/** disabled 상태 공통 투명도 */
|
|
34
|
+
export declare const DISABLED_OPACITY = 0.5;
|
|
35
|
+
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/theme/tokens.ts"],"names":[],"mappings":"AAAA,qBAAqB;AACrB,eAAO,MAAM,MAAM;IACjB,mBAAmB;;IAEnB,YAAY;;IAEZ,yBAAyB;;IAEzB,iBAAiB;;IAEjB,uBAAuB;;IAEvB,iBAAiB;;IAEjB,WAAW;;IAEX,kBAAkB;;CAEV,CAAC;AAEX,iCAAiC;AACjC,eAAO,MAAM,QAAQ;IACnB,6BAA6B;;IAE7B,wBAAwB;;IAExB,8BAA8B;;IAE9B,mCAAmC;;IAEnC,cAAc;;CAEN,CAAC;AAEX,yBAAyB;AACzB,eAAO,MAAM,gBAAgB,MAAM,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/** 컴포넌트 공통 곡률 스케일 */
|
|
2
|
+
export const RADIUS = {
|
|
3
|
+
/** 체크박스 등 소형 요소 */
|
|
4
|
+
xs: 4,
|
|
5
|
+
/** 소형 버튼 */
|
|
6
|
+
sm: 6,
|
|
7
|
+
/** 중형 버튼 (Alert 버튼 등) */
|
|
8
|
+
md: 12,
|
|
9
|
+
/** 입력 필드 · 카드 */
|
|
10
|
+
lg: 14,
|
|
11
|
+
/** 스낵바 · pressed 배경 */
|
|
12
|
+
xl: 16,
|
|
13
|
+
/** 다이얼로그 컨테이너 */
|
|
14
|
+
xxl: 22,
|
|
15
|
+
/** 바텀시트 */
|
|
16
|
+
sheet: 26,
|
|
17
|
+
/** 완전한 pill/원형 */
|
|
18
|
+
pill: 9999,
|
|
19
|
+
};
|
|
20
|
+
/** 애니메이션 duration 공통 스케일 (ms) */
|
|
21
|
+
export const DURATION = {
|
|
22
|
+
/** press in/out · 오버레이 퇴장 */
|
|
23
|
+
press: 100,
|
|
24
|
+
/** 입력 필드 포커스 등 빠른 전환 */
|
|
25
|
+
fast: 150,
|
|
26
|
+
/** 상태 전환 기본값 (칩 선택, 스위치 등) */
|
|
27
|
+
base: 200,
|
|
28
|
+
/** 이동 애니메이션 (세그먼트 thumb, 스낵바 등) */
|
|
29
|
+
slow: 250,
|
|
30
|
+
/** 오버레이 진입 */
|
|
31
|
+
enter: 300,
|
|
32
|
+
};
|
|
33
|
+
/** disabled 상태 공통 투명도 */
|
|
34
|
+
export const DISABLED_OPACITY = 0.5;
|
|
35
|
+
//# sourceMappingURL=tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../src/theme/tokens.ts"],"names":[],"mappings":"AAAA,qBAAqB;AACrB,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,mBAAmB;IACnB,EAAE,EAAE,CAAC;IACL,YAAY;IACZ,EAAE,EAAE,CAAC;IACL,yBAAyB;IACzB,EAAE,EAAE,EAAE;IACN,iBAAiB;IACjB,EAAE,EAAE,EAAE;IACN,uBAAuB;IACvB,EAAE,EAAE,EAAE;IACN,iBAAiB;IACjB,GAAG,EAAE,EAAE;IACP,WAAW;IACX,KAAK,EAAE,EAAE;IACT,kBAAkB;IAClB,IAAI,EAAE,IAAI;CACF,CAAC;AAEX,iCAAiC;AACjC,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,6BAA6B;IAC7B,KAAK,EAAE,GAAG;IACV,wBAAwB;IACxB,IAAI,EAAE,GAAG;IACT,8BAA8B;IAC9B,IAAI,EAAE,GAAG;IACT,mCAAmC;IACnC,IAAI,EAAE,GAAG;IACT,cAAc;IACd,KAAK,EAAE,GAAG;CACF,CAAC;AAEX,yBAAyB;AACzB,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAC","sourcesContent":["/** 컴포넌트 공통 곡률 스케일 */\nexport const RADIUS = {\n /** 체크박스 등 소형 요소 */\n xs: 4,\n /** 소형 버튼 */\n sm: 6,\n /** 중형 버튼 (Alert 버튼 등) */\n md: 12,\n /** 입력 필드 · 카드 */\n lg: 14,\n /** 스낵바 · pressed 배경 */\n xl: 16,\n /** 다이얼로그 컨테이너 */\n xxl: 22,\n /** 바텀시트 */\n sheet: 26,\n /** 완전한 pill/원형 */\n pill: 9999,\n} as const;\n\n/** 애니메이션 duration 공통 스케일 (ms) */\nexport const DURATION = {\n /** press in/out · 오버레이 퇴장 */\n press: 100,\n /** 입력 필드 포커스 등 빠른 전환 */\n fast: 150,\n /** 상태 전환 기본값 (칩 선택, 스위치 등) */\n base: 200,\n /** 이동 애니메이션 (세그먼트 thumb, 스낵바 등) */\n slow: 250,\n /** 오버레이 진입 */\n enter: 300,\n} as const;\n\n/** disabled 상태 공통 투명도 */\nexport const DISABLED_OPACITY = 0.5;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../src/theme/typography.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAI9D,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EAAE,UAAU,EAAE,EAAE;IAAE,UAAU,CAAC,EAAE,UAAU,CAAA;CAAE,GAAG,uBAAuB,
|
|
1
|
+
{"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../src/theme/typography.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAI9D,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EAAE,UAAU,EAAE,EAAE;IAAE,UAAU,CAAC,EAAE,UAAU,CAAA;CAAE,GAAG,uBAAuB,CAgKvG"}
|
|
@@ -5,193 +5,157 @@ export default function typography({ themeFonts }) {
|
|
|
5
5
|
heading: {
|
|
6
6
|
1: {
|
|
7
7
|
fontSize: baseSize + 36,
|
|
8
|
-
fontFamily: themeFonts?.[700]
|
|
9
|
-
letterSpacing: 1
|
|
8
|
+
fontFamily: themeFonts?.[700]
|
|
10
9
|
},
|
|
11
10
|
2: {
|
|
12
11
|
fontSize: baseSize + 32,
|
|
13
|
-
fontFamily: themeFonts?.[700]
|
|
14
|
-
letterSpacing: 1
|
|
12
|
+
fontFamily: themeFonts?.[700]
|
|
15
13
|
},
|
|
16
14
|
3: {
|
|
17
15
|
fontSize: baseSize + 28,
|
|
18
|
-
fontFamily: themeFonts?.[700]
|
|
19
|
-
letterSpacing: 1
|
|
16
|
+
fontFamily: themeFonts?.[700]
|
|
20
17
|
},
|
|
21
18
|
4: {
|
|
22
19
|
fontSize: baseSize + 24,
|
|
23
|
-
fontFamily: themeFonts?.[700]
|
|
24
|
-
letterSpacing: 1
|
|
20
|
+
fontFamily: themeFonts?.[700]
|
|
25
21
|
},
|
|
26
22
|
5: {
|
|
27
23
|
fontSize: baseSize + 20,
|
|
28
|
-
fontFamily: themeFonts?.[700]
|
|
29
|
-
letterSpacing: 1
|
|
24
|
+
fontFamily: themeFonts?.[700]
|
|
30
25
|
},
|
|
31
26
|
6: {
|
|
32
27
|
fontSize: baseSize + 18,
|
|
33
|
-
fontFamily: themeFonts?.[700]
|
|
34
|
-
letterSpacing: 1
|
|
28
|
+
fontFamily: themeFonts?.[700]
|
|
35
29
|
}
|
|
36
30
|
},
|
|
37
31
|
title: {
|
|
38
32
|
1: {
|
|
39
33
|
fontSize: baseSize + 16,
|
|
40
|
-
fontFamily: themeFonts?.[700]
|
|
41
|
-
letterSpacing: 1
|
|
34
|
+
fontFamily: themeFonts?.[700]
|
|
42
35
|
},
|
|
43
36
|
2: {
|
|
44
37
|
fontSize: baseSize + 14,
|
|
45
|
-
fontFamily: themeFonts?.[700]
|
|
46
|
-
letterSpacing: 1
|
|
38
|
+
fontFamily: themeFonts?.[700]
|
|
47
39
|
},
|
|
48
40
|
3: {
|
|
49
41
|
fontSize: baseSize + 13,
|
|
50
|
-
fontFamily: themeFonts?.[700]
|
|
51
|
-
letterSpacing: 1
|
|
42
|
+
fontFamily: themeFonts?.[700]
|
|
52
43
|
},
|
|
53
44
|
4: {
|
|
54
45
|
fontSize: baseSize + 12,
|
|
55
|
-
fontFamily: themeFonts?.[700]
|
|
56
|
-
letterSpacing: 1
|
|
46
|
+
fontFamily: themeFonts?.[700]
|
|
57
47
|
},
|
|
58
48
|
5: {
|
|
59
49
|
fontSize: baseSize + 11,
|
|
60
|
-
fontFamily: themeFonts?.[700]
|
|
61
|
-
letterSpacing: 1
|
|
50
|
+
fontFamily: themeFonts?.[700]
|
|
62
51
|
},
|
|
63
52
|
6: {
|
|
64
53
|
fontSize: baseSize + 10,
|
|
65
|
-
fontFamily: themeFonts?.[700]
|
|
66
|
-
letterSpacing: 1
|
|
54
|
+
fontFamily: themeFonts?.[700]
|
|
67
55
|
}
|
|
68
56
|
},
|
|
69
57
|
subTitle: {
|
|
70
58
|
1: {
|
|
71
59
|
fontSize: baseSize + 16,
|
|
72
|
-
fontFamily: themeFonts?.[600]
|
|
73
|
-
letterSpacing: 1
|
|
60
|
+
fontFamily: themeFonts?.[600]
|
|
74
61
|
},
|
|
75
62
|
2: {
|
|
76
63
|
fontSize: baseSize + 14,
|
|
77
|
-
fontFamily: themeFonts?.[600]
|
|
78
|
-
letterSpacing: 1
|
|
64
|
+
fontFamily: themeFonts?.[600]
|
|
79
65
|
},
|
|
80
66
|
3: {
|
|
81
67
|
fontSize: baseSize + 13,
|
|
82
|
-
fontFamily: themeFonts?.[600]
|
|
83
|
-
letterSpacing: 1
|
|
68
|
+
fontFamily: themeFonts?.[600]
|
|
84
69
|
},
|
|
85
70
|
4: {
|
|
86
71
|
fontSize: baseSize + 12,
|
|
87
|
-
fontFamily: themeFonts?.[600]
|
|
88
|
-
letterSpacing: 1
|
|
72
|
+
fontFamily: themeFonts?.[600]
|
|
89
73
|
},
|
|
90
74
|
5: {
|
|
91
75
|
fontSize: baseSize + 11,
|
|
92
|
-
fontFamily: themeFonts?.[600]
|
|
93
|
-
letterSpacing: 1
|
|
76
|
+
fontFamily: themeFonts?.[600]
|
|
94
77
|
},
|
|
95
78
|
6: {
|
|
96
79
|
fontSize: baseSize + 10,
|
|
97
|
-
fontFamily: themeFonts?.[600]
|
|
98
|
-
letterSpacing: 1
|
|
80
|
+
fontFamily: themeFonts?.[600]
|
|
99
81
|
}
|
|
100
82
|
},
|
|
101
83
|
label: {
|
|
102
84
|
1: {
|
|
103
85
|
fontSize: baseSize + 16,
|
|
104
|
-
fontFamily: themeFonts?.[500]
|
|
105
|
-
letterSpacing: 1
|
|
86
|
+
fontFamily: themeFonts?.[500]
|
|
106
87
|
},
|
|
107
88
|
2: {
|
|
108
89
|
fontSize: baseSize + 14,
|
|
109
|
-
fontFamily: themeFonts?.[500]
|
|
110
|
-
letterSpacing: 1
|
|
90
|
+
fontFamily: themeFonts?.[500]
|
|
111
91
|
},
|
|
112
92
|
3: {
|
|
113
93
|
fontSize: baseSize + 13,
|
|
114
|
-
fontFamily: themeFonts?.[500]
|
|
115
|
-
letterSpacing: 1
|
|
94
|
+
fontFamily: themeFonts?.[500]
|
|
116
95
|
},
|
|
117
96
|
4: {
|
|
118
97
|
fontSize: baseSize + 12,
|
|
119
|
-
fontFamily: themeFonts?.[500]
|
|
120
|
-
letterSpacing: 1
|
|
98
|
+
fontFamily: themeFonts?.[500]
|
|
121
99
|
},
|
|
122
100
|
5: {
|
|
123
101
|
fontSize: baseSize + 11,
|
|
124
|
-
fontFamily: themeFonts?.[500]
|
|
125
|
-
letterSpacing: 1
|
|
102
|
+
fontFamily: themeFonts?.[500]
|
|
126
103
|
},
|
|
127
104
|
6: {
|
|
128
105
|
fontSize: baseSize + 10,
|
|
129
|
-
fontFamily: themeFonts?.[500]
|
|
130
|
-
letterSpacing: 1
|
|
106
|
+
fontFamily: themeFonts?.[500]
|
|
131
107
|
}
|
|
132
108
|
},
|
|
133
109
|
body: {
|
|
134
110
|
1: {
|
|
135
111
|
fontSize: baseSize + 16,
|
|
136
|
-
fontFamily: themeFonts?.[400]
|
|
137
|
-
letterSpacing: 1
|
|
112
|
+
fontFamily: themeFonts?.[400]
|
|
138
113
|
},
|
|
139
114
|
2: {
|
|
140
115
|
fontSize: baseSize + 14,
|
|
141
|
-
fontFamily: themeFonts?.[400]
|
|
142
|
-
letterSpacing: 1
|
|
116
|
+
fontFamily: themeFonts?.[400]
|
|
143
117
|
},
|
|
144
118
|
3: {
|
|
145
119
|
fontSize: baseSize + 13,
|
|
146
|
-
fontFamily: themeFonts?.[400]
|
|
147
|
-
letterSpacing: 1
|
|
120
|
+
fontFamily: themeFonts?.[400]
|
|
148
121
|
},
|
|
149
122
|
4: {
|
|
150
123
|
fontSize: baseSize + 12,
|
|
151
|
-
fontFamily: themeFonts?.[400]
|
|
152
|
-
letterSpacing: 1
|
|
124
|
+
fontFamily: themeFonts?.[400]
|
|
153
125
|
},
|
|
154
126
|
5: {
|
|
155
127
|
fontSize: baseSize + 11,
|
|
156
|
-
fontFamily: themeFonts?.[400]
|
|
157
|
-
letterSpacing: 1
|
|
128
|
+
fontFamily: themeFonts?.[400]
|
|
158
129
|
},
|
|
159
130
|
6: {
|
|
160
131
|
fontSize: baseSize + 10,
|
|
161
|
-
fontFamily: themeFonts?.[400]
|
|
162
|
-
letterSpacing: 1
|
|
132
|
+
fontFamily: themeFonts?.[400]
|
|
163
133
|
}
|
|
164
134
|
},
|
|
165
135
|
caption: {
|
|
166
136
|
1: {
|
|
167
137
|
fontSize: baseSize + 12,
|
|
168
|
-
fontFamily: themeFonts?.[400]
|
|
169
|
-
letterSpacing: 1
|
|
138
|
+
fontFamily: themeFonts?.[400]
|
|
170
139
|
},
|
|
171
140
|
2: {
|
|
172
141
|
fontSize: baseSize + 11,
|
|
173
|
-
fontFamily: themeFonts?.[400]
|
|
174
|
-
letterSpacing: 1
|
|
142
|
+
fontFamily: themeFonts?.[400]
|
|
175
143
|
},
|
|
176
144
|
3: {
|
|
177
145
|
fontSize: baseSize + 10,
|
|
178
|
-
fontFamily: themeFonts?.[400]
|
|
179
|
-
letterSpacing: 1
|
|
146
|
+
fontFamily: themeFonts?.[400]
|
|
180
147
|
},
|
|
181
148
|
4: {
|
|
182
149
|
fontSize: baseSize + 9,
|
|
183
|
-
fontFamily: themeFonts?.[400]
|
|
184
|
-
letterSpacing: 1
|
|
150
|
+
fontFamily: themeFonts?.[400]
|
|
185
151
|
},
|
|
186
152
|
5: {
|
|
187
153
|
fontSize: baseSize + 8,
|
|
188
|
-
fontFamily: themeFonts?.[400]
|
|
189
|
-
letterSpacing: 1
|
|
154
|
+
fontFamily: themeFonts?.[400]
|
|
190
155
|
},
|
|
191
156
|
6: {
|
|
192
157
|
fontSize: baseSize + 7,
|
|
193
|
-
fontFamily: themeFonts?.[400]
|
|
194
|
-
letterSpacing: 1
|
|
158
|
+
fontFamily: themeFonts?.[400]
|
|
195
159
|
}
|
|
196
160
|
},
|
|
197
161
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typography.js","sourceRoot":"","sources":["../../src/theme/typography.ts"],"names":[],"mappings":"AAEA,MAAM,QAAQ,GAAG,CAAC,CAAC;AAEnB,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EAAE,UAAU,EAA+B;IAC1E,OAAO;QACH,UAAU,EAAE,UAAU;QACtB,OAAO,EAAE;YACL,CAAC,EAAE;gBACC,QAAQ,EAAE,QAAQ,GAAG,EAAE;gBACvB,UAAU,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC;gBAC7B,aAAa,EAAE,CAAC;aACnB;YACD,CAAC,EAAE;gBACC,QAAQ,EAAE,QAAQ,GAAG,EAAE;gBACvB,UAAU,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC;gBAC7B,aAAa,EAAE,CAAC;aACnB;YACD,CAAC,EAAE;gBACC,QAAQ,EAAE,QAAQ,GAAG,EAAE;gBACv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,CAAC;gBAC7B,aAAa,EAAE,CAAC;aACnB;YACD,CAAC,EAAE;gBACC,QAAQ,EAAE,QAAQ,GAAG,EAAE;gBACvB,UAAU,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC;gBAC7B,aAAa,EAAE,CAAC;aACnB;SACJ;QACD,OAAO,EAAE;YACL,CAAC,EAAE;gBACC,QAAQ,EAAE,QAAQ,GAAG,EAAE;gBACvB,UAAU,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC;gBAC7B,aAAa,EAAE,CAAC;aACnB;YACD,CAAC,EAAE;gBACC,QAAQ,EAAE,QAAQ,GAAG,EAAE;gBACvB,UAAU,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC;gBAC7B,aAAa,EAAE,CAAC;aACnB;YACD,CAAC,EAAE;gBACC,QAAQ,EAAE,QAAQ,GAAG,EAAE;gBACvB,UAAU,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC;gBAC7B,aAAa,EAAE,CAAC;aACnB;YACD,CAAC,EAAE;gBACC,QAAQ,EAAE,QAAQ,GAAG,CAAC;gBACtB,UAAU,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC;gBAC7B,aAAa,EAAE,CAAC;aACnB;YACD,CAAC,EAAE;gBACC,QAAQ,EAAE,QAAQ,GAAG,CAAC;gBACtB,UAAU,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC;gBAC7B,aAAa,EAAE,CAAC;aACnB;YACD,CAAC,EAAE;gBACC,QAAQ,EAAE,QAAQ,GAAG,CAAC;gBACtB,UAAU,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC;gBAC7B,aAAa,EAAE,CAAC;aACnB;SACJ;KACJ,CAAA;AACL,CAAC","sourcesContent":["import { ThemeFonts, TypographyVariantsProps } from \"./types\";\n\nconst baseSize = 0;\n\nexport default function typography({ themeFonts }: { themeFonts?: ThemeFonts }): TypographyVariantsProps {\n return {\n themeFonts: themeFonts,\n heading: {\n 1: {\n fontSize: baseSize + 36,\n fontFamily: themeFonts?.[700],\n letterSpacing: 1\n },\n 2: {\n fontSize: baseSize + 32,\n fontFamily: themeFonts?.[700],\n letterSpacing: 1\n },\n 3: {\n fontSize: baseSize + 28,\n fontFamily: themeFonts?.[700],\n letterSpacing: 1\n },\n 4: {\n fontSize: baseSize + 24,\n fontFamily: themeFonts?.[700],\n letterSpacing: 1\n },\n 5: {\n fontSize: baseSize + 20,\n fontFamily: themeFonts?.[700],\n letterSpacing: 1\n },\n 6: {\n fontSize: baseSize + 18,\n fontFamily: themeFonts?.[700],\n letterSpacing: 1\n }\n },\n title: {\n 1: {\n fontSize: baseSize + 16,\n fontFamily: themeFonts?.[700],\n letterSpacing: 1\n },\n 2: {\n fontSize: baseSize + 14,\n fontFamily: themeFonts?.[700],\n letterSpacing: 1\n },\n 3: {\n fontSize: baseSize + 13,\n fontFamily: themeFonts?.[700],\n letterSpacing: 1\n },\n 4: {\n fontSize: baseSize + 12,\n fontFamily: themeFonts?.[700],\n letterSpacing: 1\n },\n 5: {\n fontSize: baseSize + 11,\n fontFamily: themeFonts?.[700],\n letterSpacing: 1\n },\n 6: {\n fontSize: baseSize + 10,\n fontFamily: themeFonts?.[700],\n letterSpacing: 1\n }\n },\n subTitle: {\n 1: {\n fontSize: baseSize + 16,\n fontFamily: themeFonts?.[600],\n letterSpacing: 1\n },\n 2: {\n fontSize: baseSize + 14,\n fontFamily: themeFonts?.[600],\n letterSpacing: 1\n },\n 3: {\n fontSize: baseSize + 13,\n fontFamily: themeFonts?.[600],\n letterSpacing: 1\n },\n 4: {\n fontSize: baseSize + 12,\n fontFamily: themeFonts?.[600],\n letterSpacing: 1\n },\n 5: {\n fontSize: baseSize + 11,\n fontFamily: themeFonts?.[600],\n letterSpacing: 1\n },\n 6: {\n fontSize: baseSize + 10,\n fontFamily: themeFonts?.[600],\n letterSpacing: 1\n }\n },\n label: {\n 1: {\n fontSize: baseSize + 16,\n fontFamily: themeFonts?.[500],\n letterSpacing: 1\n },\n 2: {\n fontSize: baseSize + 14,\n fontFamily: themeFonts?.[500],\n letterSpacing: 1\n },\n 3: {\n fontSize: baseSize + 13,\n fontFamily: themeFonts?.[500],\n letterSpacing: 1\n },\n 4: {\n fontSize: baseSize + 12,\n fontFamily: themeFonts?.[500],\n letterSpacing: 1\n },\n 5: {\n fontSize: baseSize + 11,\n fontFamily: themeFonts?.[500],\n letterSpacing: 1\n },\n 6: {\n fontSize: baseSize + 10,\n fontFamily: themeFonts?.[500],\n letterSpacing: 1\n }\n },\n body: {\n 1: {\n fontSize: baseSize + 16,\n fontFamily: themeFonts?.[400],\n letterSpacing: 1\n },\n 2: {\n fontSize: baseSize + 14,\n fontFamily: themeFonts?.[400],\n letterSpacing: 1\n },\n 3: {\n fontSize: baseSize + 13,\n fontFamily: themeFonts?.[400],\n letterSpacing: 1\n },\n 4: {\n fontSize: baseSize + 12,\n fontFamily: themeFonts?.[400],\n letterSpacing: 1\n },\n 5: {\n fontSize: baseSize + 11,\n fontFamily: themeFonts?.[400],\n letterSpacing: 1\n },\n 6: {\n fontSize: baseSize + 10,\n fontFamily: themeFonts?.[400],\n letterSpacing: 1\n }\n },\n caption: {\n 1: {\n fontSize: baseSize + 12,\n fontFamily: themeFonts?.[400],\n letterSpacing: 1\n },\n 2: {\n fontSize: baseSize + 11,\n fontFamily: themeFonts?.[400],\n letterSpacing: 1\n },\n 3: {\n fontSize: baseSize + 10,\n fontFamily: themeFonts?.[400],\n letterSpacing: 1\n },\n 4: {\n fontSize: baseSize + 9,\n fontFamily: themeFonts?.[400],\n letterSpacing: 1\n },\n 5: {\n fontSize: baseSize + 8,\n fontFamily: themeFonts?.[400],\n letterSpacing: 1\n },\n 6: {\n fontSize: baseSize + 7,\n fontFamily: themeFonts?.[400],\n letterSpacing: 1\n }\n },\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"typography.js","sourceRoot":"","sources":["../../src/theme/typography.ts"],"names":[],"mappings":"AAEA,MAAM,QAAQ,GAAG,CAAC,CAAC;AAEnB,MAAM,CAAC,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AE;gBACvB,UAAU,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC;aAChC;YACD,CAAC,EAAE;gBACC,QAAQ,EAAE,QAAQ,GAAG,EAAE;gBACvB,UAAU,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC;aAChC;YACD,CAAC,EAAE;gBACC,QAAQ,EAAE,QAAQ,GAAG,CAAC;gBACtB,UAAU,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC;aAChC;YACD,CAAC,EAAE;gBACC,QAAQ,EAAE,QAAQ,GAAG,CAAC;gBACtB,UAAU,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC;aAChC;YACD,CAAC,EAAE;gBACC,QAAQ,EAAE,QAAQ,GAAG,CAAC;gBACtB,UAAU,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC;aAChC;SACJ;KACJ,CAAA;AACL,CAAC","sourcesContent":["import { ThemeFonts, TypographyVariantsProps } from \"./types\";\n\nconst baseSize = 0;\n\nexport default function typography({ themeFonts }: { themeFonts?: ThemeFonts }): TypographyVariantsProps {\n return {\n themeFonts: themeFonts,\n heading: {\n 1: {\n fontSize: baseSize + 36,\n fontFamily: themeFonts?.[700]\n },\n 2: {\n fontSize: baseSize + 32,\n fontFamily: themeFonts?.[700]\n },\n 3: {\n fontSize: baseSize + 28,\n fontFamily: themeFonts?.[700]\n },\n 4: {\n fontSize: baseSize + 24,\n fontFamily: themeFonts?.[700]\n },\n 5: {\n fontSize: baseSize + 20,\n fontFamily: themeFonts?.[700]\n },\n 6: {\n fontSize: baseSize + 18,\n fontFamily: themeFonts?.[700]\n }\n },\n title: {\n 1: {\n fontSize: baseSize + 16,\n fontFamily: themeFonts?.[700]\n },\n 2: {\n fontSize: baseSize + 14,\n fontFamily: themeFonts?.[700]\n },\n 3: {\n fontSize: baseSize + 13,\n fontFamily: themeFonts?.[700]\n },\n 4: {\n fontSize: baseSize + 12,\n fontFamily: themeFonts?.[700]\n },\n 5: {\n fontSize: baseSize + 11,\n fontFamily: themeFonts?.[700]\n },\n 6: {\n fontSize: baseSize + 10,\n fontFamily: themeFonts?.[700]\n }\n },\n subTitle: {\n 1: {\n fontSize: baseSize + 16,\n fontFamily: themeFonts?.[600]\n },\n 2: {\n fontSize: baseSize + 14,\n fontFamily: themeFonts?.[600]\n },\n 3: {\n fontSize: baseSize + 13,\n fontFamily: themeFonts?.[600]\n },\n 4: {\n fontSize: baseSize + 12,\n fontFamily: themeFonts?.[600]\n },\n 5: {\n fontSize: baseSize + 11,\n fontFamily: themeFonts?.[600]\n },\n 6: {\n fontSize: baseSize + 10,\n fontFamily: themeFonts?.[600]\n }\n },\n label: {\n 1: {\n fontSize: baseSize + 16,\n fontFamily: themeFonts?.[500]\n },\n 2: {\n fontSize: baseSize + 14,\n fontFamily: themeFonts?.[500]\n },\n 3: {\n fontSize: baseSize + 13,\n fontFamily: themeFonts?.[500]\n },\n 4: {\n fontSize: baseSize + 12,\n fontFamily: themeFonts?.[500]\n },\n 5: {\n fontSize: baseSize + 11,\n fontFamily: themeFonts?.[500]\n },\n 6: {\n fontSize: baseSize + 10,\n fontFamily: themeFonts?.[500]\n }\n },\n body: {\n 1: {\n fontSize: baseSize + 16,\n fontFamily: themeFonts?.[400]\n },\n 2: {\n fontSize: baseSize + 14,\n fontFamily: themeFonts?.[400]\n },\n 3: {\n fontSize: baseSize + 13,\n fontFamily: themeFonts?.[400]\n },\n 4: {\n fontSize: baseSize + 12,\n fontFamily: themeFonts?.[400]\n },\n 5: {\n fontSize: baseSize + 11,\n fontFamily: themeFonts?.[400]\n },\n 6: {\n fontSize: baseSize + 10,\n fontFamily: themeFonts?.[400]\n }\n },\n caption: {\n 1: {\n fontSize: baseSize + 12,\n fontFamily: themeFonts?.[400]\n },\n 2: {\n fontSize: baseSize + 11,\n fontFamily: themeFonts?.[400]\n },\n 3: {\n fontSize: baseSize + 10,\n fontFamily: themeFonts?.[400]\n },\n 4: {\n fontSize: baseSize + 9,\n fontFamily: themeFonts?.[400]\n },\n 5: {\n fontSize: baseSize + 8,\n fontFamily: themeFonts?.[400]\n },\n 6: {\n fontSize: baseSize + 7,\n fontFamily: themeFonts?.[400]\n }\n },\n }\n}\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { type ImageSourcePropType, type StyleProp, type ViewStyle, type ViewProps } from 'react-native';
|
|
2
3
|
import { TypoOptions, IntentOptions } from '../../theme/types';
|
|
3
4
|
type Props = ViewProps & {
|
|
@@ -11,6 +12,7 @@ type Props = ViewProps & {
|
|
|
11
12
|
isLoading?: boolean;
|
|
12
13
|
disabled?: boolean;
|
|
13
14
|
};
|
|
14
|
-
declare function ZSBlockButton({ onPress, style, title, intent, typo, prefixIcon, variant, isLoading, disabled, ...props }: Props):
|
|
15
|
-
|
|
15
|
+
declare function ZSBlockButton({ onPress, style, title, intent, typo, prefixIcon, variant, isLoading, disabled, ...props }: Props): React.JSX.Element;
|
|
16
|
+
declare const _default: React.MemoExoticComponent<typeof ZSBlockButton>;
|
|
17
|
+
export default _default;
|
|
16
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/ZSBlockButton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,mBAAmB,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAC/G,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/ZSBlockButton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAS,KAAK,mBAAmB,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAC/G,OAAO,EAAoB,WAAW,EAAkC,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAajH,KAAK,KAAK,GAAG,SAAS,GAAG;IACvB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACxC,IAAI,EAAE,WAAW,CAAC;IAClB,UAAU,CAAC,EAAE,mBAAmB,CAAC;IACjC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,iBAAS,aAAa,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAkB,EAAE,IAAI,EAAE,UAAU,EAAE,OAAiB,EAAE,SAAiB,EAAE,QAAgB,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,qBA+C9J;;AAED,wBAAyC"}
|
|
@@ -1,94 +1,31 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import { Image } from 'react-native';
|
|
3
4
|
import { useTheme } from '../../context/ThemeContext';
|
|
5
|
+
import { resolveTextColor } from '../../theme/resolveColor';
|
|
6
|
+
import { PASTEL_TEXT_COLOR, SOLID_TEXT_COLOR, STROKE_TEXT_COLOR } from '../../theme/intentColors';
|
|
7
|
+
import { RADIUS } from '../../theme/tokens';
|
|
4
8
|
import ZSPressable from '../ZSPressable';
|
|
5
9
|
import ZSView from '../ZSView';
|
|
6
10
|
import ZSText from '../ZSText';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
11
|
+
// typo 크기(subStyle)별 패딩
|
|
12
|
+
const PADDING_HORIZONTAL = { '1': 11, '2': 11, '3': 10, '4': 8, '5': 7, '6': 5 };
|
|
13
|
+
const PADDING_VERTICAL = { '1': 9, '2': 9, '3': 8, '4': 6, '5': 5, '6': 4 };
|
|
10
14
|
function ZSBlockButton({ onPress, style, title, intent = 'primary', typo, prefixIcon, variant = 'solid', isLoading = false, disabled = false, ...props }) {
|
|
11
15
|
const { palette } = useTheme();
|
|
12
16
|
const size = typo.split('.')[1];
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
return {
|
|
22
|
-
backgroundColor: `${baseColor}.50`,
|
|
23
|
-
textColor: 'white',
|
|
24
|
-
borderColor: undefined,
|
|
25
|
-
borderWidth: 0,
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
else if (variant === 'pastel') {
|
|
29
|
-
return {
|
|
30
|
-
backgroundColor: `${baseColor}.10`,
|
|
31
|
-
textColor: (intent === 'danger' ? 'danger.60'
|
|
32
|
-
: intent === 'primary' ? 'primary.60'
|
|
33
|
-
: intent === 'information' ? 'information.60'
|
|
34
|
-
: intent === 'success' ? 'success.60'
|
|
35
|
-
: intent === 'warning' ? 'warning.60'
|
|
36
|
-
: 'grey.70'),
|
|
37
|
-
borderColor: undefined,
|
|
38
|
-
borderWidth: 0,
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
else { // stroke
|
|
42
|
-
return {
|
|
43
|
-
backgroundColor: 'transparent',
|
|
44
|
-
textColor: (intent === 'danger' ? 'danger.50'
|
|
45
|
-
: intent === 'primary' ? 'primary.50'
|
|
46
|
-
: intent === 'information' ? 'information.50'
|
|
47
|
-
: intent === 'success' ? 'success.50'
|
|
48
|
-
: intent === 'warning' ? 'warning.60'
|
|
49
|
-
: 'grey.60'),
|
|
50
|
-
borderColor: intent === 'danger' ? palette.danger[50]
|
|
51
|
-
: intent === 'primary' ? palette.primary[50]
|
|
52
|
-
: intent === 'information' ? palette.information[50]
|
|
53
|
-
: intent === 'success' ? palette.success[50]
|
|
54
|
-
: intent === 'warning' ? palette.warning[50]
|
|
55
|
-
: palette.grey[50],
|
|
56
|
-
borderWidth: 1,
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
const colors = getColors();
|
|
61
|
-
const paddingHorizontal = size === '1' ? 11
|
|
62
|
-
: size === '2' ? 11
|
|
63
|
-
: size === '3' ? 10
|
|
64
|
-
: size === '4' ? 8
|
|
65
|
-
: size === '5' ? 7
|
|
66
|
-
: size === '6' ? 5
|
|
67
|
-
: 10;
|
|
68
|
-
const paddingVertical = size === '1' ? 9
|
|
69
|
-
: size === '2' ? 9
|
|
70
|
-
: size === '3' ? 8
|
|
71
|
-
: size === '4' ? 6
|
|
72
|
-
: size === '5' ? 5
|
|
73
|
-
: size === '6' ? 4
|
|
74
|
-
: 8;
|
|
75
|
-
const getTextColorValue = () => {
|
|
76
|
-
const [c01, c02] = colors.textColor.split('.');
|
|
77
|
-
if (c02) {
|
|
78
|
-
if (c01 === 'text')
|
|
79
|
-
return palette.text[c02];
|
|
80
|
-
if (c01 === 'background')
|
|
81
|
-
return palette.background[c02];
|
|
82
|
-
const semanticPalette = palette[c01];
|
|
83
|
-
return isColorMap(semanticPalette) ? semanticPalette[c02] : undefined;
|
|
84
|
-
}
|
|
85
|
-
return palette.text[c01];
|
|
86
|
-
};
|
|
87
|
-
const textColorValue = getTextColorValue();
|
|
17
|
+
const colors = variant === 'solid'
|
|
18
|
+
? { backgroundColor: `${intent}.50`, textColor: SOLID_TEXT_COLOR[intent], borderColor: undefined, borderWidth: 0 }
|
|
19
|
+
: variant === 'pastel'
|
|
20
|
+
? { backgroundColor: `${intent}.10`, textColor: PASTEL_TEXT_COLOR[intent], borderColor: undefined, borderWidth: 0 }
|
|
21
|
+
: { backgroundColor: 'transparent', textColor: STROKE_TEXT_COLOR[intent], borderColor: palette[intent][50], borderWidth: 1 };
|
|
22
|
+
const paddingHorizontal = PADDING_HORIZONTAL[size] ?? 10;
|
|
23
|
+
const paddingVertical = PADDING_VERTICAL[size] ?? 8;
|
|
24
|
+
const textColorValue = resolveTextColor(palette, colors.textColor);
|
|
88
25
|
return (_jsx(ZSPressable, { onPress: onPress, style: style, isLoading: isLoading, disabled: disabled, ...props, children: _jsxs(ZSView, { style: {
|
|
89
26
|
paddingHorizontal,
|
|
90
27
|
paddingVertical,
|
|
91
|
-
borderRadius:
|
|
28
|
+
borderRadius: RADIUS.sm,
|
|
92
29
|
justifyContent: 'center',
|
|
93
30
|
alignItems: 'center',
|
|
94
31
|
flexDirection: 'row',
|
|
@@ -98,5 +35,5 @@ function ZSBlockButton({ onPress, style, title, intent = 'primary', typo, prefix
|
|
|
98
35
|
borderWidth: colors.borderWidth,
|
|
99
36
|
}, color: colors.backgroundColor !== 'transparent' ? colors.backgroundColor : undefined, children: [prefixIcon && (_jsx(Image, { style: { width: 12, height: 12, marginTop: 1 }, tintColor: textColorValue, source: prefixIcon })), _jsx(ZSText, { color: colors.textColor, typo: typo, children: title })] }) }));
|
|
100
37
|
}
|
|
101
|
-
export default ZSBlockButton;
|
|
38
|
+
export default React.memo(ZSBlockButton);
|
|
102
39
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/ZSBlockButton/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAA4E,MAAM,cAAc,CAAC;AAE/G,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/ZSBlockButton/index.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAA4E,MAAM,cAAc,CAAC;AAE/G,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,0BAA0B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9C,SAAS,EAAE,cAAc,EACzB,MAAM,EAAE,UAAU,GAClB,CACH,EACD,KAAC,MAAM,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,YAAG,KAAK,GAAU,IACtD,GACG,CACf,CAAC;AACJ,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { Image, type ImageSourcePropType, type StyleProp, type ViewStyle, type ViewProps } from 'react-native';\nimport { TypoColorOptions, TypoOptions, TypoSubStyle, ViewColorOptions, IntentOptions } from '../../theme/types';\nimport { useTheme } from '../../context/ThemeContext';\nimport { resolveTextColor } from '../../theme/resolveColor';\nimport { PASTEL_TEXT_COLOR, SOLID_TEXT_COLOR, STROKE_TEXT_COLOR } from '../../theme/intentColors';\nimport { RADIUS } from '../../theme/tokens';\nimport ZSPressable from '../ZSPressable';\nimport ZSView from '../ZSView';\nimport ZSText from '../ZSText';\n\n// typo 크기(subStyle)별 패딩\nconst PADDING_HORIZONTAL: Record<TypoSubStyle, number> = { '1': 11, '2': 11, '3': 10, '4': 8, '5': 7, '6': 5 };\nconst PADDING_VERTICAL: Record<TypoSubStyle, number> = { '1': 9, '2': 9, '3': 8, '4': 6, '5': 5, '6': 4 };\n\ntype Props = ViewProps & {\n onPress: () => void;\n style?: StyleProp<ViewStyle>;\n title: string;\n intent?: IntentOptions;\n variant?: 'solid' | 'pastel' | 'stroke';\n typo: TypoOptions;\n prefixIcon?: ImageSourcePropType;\n isLoading?: boolean;\n disabled?: boolean;\n};\n\nfunction ZSBlockButton({ onPress, style, title, intent = 'primary', typo, prefixIcon, variant = 'solid', isLoading = false, disabled = false, ...props }: Props) {\n const { palette } = useTheme();\n const size = typo.split('.')[1] as TypoSubStyle;\n\n const colors: {\n backgroundColor: ViewColorOptions | 'transparent';\n textColor: TypoColorOptions;\n borderColor?: string;\n borderWidth: number;\n } = variant === 'solid'\n ? { backgroundColor: `${intent}.50` as ViewColorOptions, textColor: SOLID_TEXT_COLOR[intent], borderColor: undefined, borderWidth: 0 }\n : variant === 'pastel'\n ? { backgroundColor: `${intent}.10` as ViewColorOptions, textColor: PASTEL_TEXT_COLOR[intent], borderColor: undefined, borderWidth: 0 }\n : { backgroundColor: 'transparent', textColor: STROKE_TEXT_COLOR[intent], borderColor: palette[intent][50], borderWidth: 1 };\n\n const paddingHorizontal = PADDING_HORIZONTAL[size] ?? 10;\n const paddingVertical = PADDING_VERTICAL[size] ?? 8;\n const textColorValue = resolveTextColor(palette, colors.textColor);\n\n return (\n <ZSPressable onPress={onPress} style={style} isLoading={isLoading} disabled={disabled} {...props}>\n <ZSView\n style={{\n paddingHorizontal,\n paddingVertical,\n borderRadius: RADIUS.sm,\n justifyContent: 'center',\n alignItems: 'center',\n flexDirection: 'row',\n gap: 4,\n backgroundColor: colors.backgroundColor === 'transparent' ? 'transparent' : undefined,\n borderColor: colors.borderColor,\n borderWidth: colors.borderWidth,\n }}\n color={colors.backgroundColor !== 'transparent' ? colors.backgroundColor : undefined}\n >\n {prefixIcon && (\n <Image\n style={{ width: 12, height: 12, marginTop: 1 }}\n tintColor={textColorValue}\n source={prefixIcon}\n />\n )}\n <ZSText color={colors.textColor} typo={typo}>{title}</ZSText>\n </ZSView>\n </ZSPressable>\n );\n}\n\nexport default React.memo(ZSBlockButton);\n"]}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type StyleProp, type ViewProps, type ViewStyle } from "react-native";
|
|
3
|
+
/** glow를 세밀하게 제어할 때 사용하는 설정 (숫자 하나로 충분하면 glow={0~1} 사용) */
|
|
4
|
+
export interface ZSBorderBeamGlowConfig {
|
|
5
|
+
/** 글로우가 stroke 바깥으로 퍼지는 폭(px) */
|
|
6
|
+
width?: number;
|
|
7
|
+
/** blur 강도 */
|
|
8
|
+
blur?: number;
|
|
9
|
+
/** 숨쉬는 한 사이클(ms) */
|
|
10
|
+
pulseDuration?: number;
|
|
11
|
+
minOpacity?: number;
|
|
12
|
+
maxOpacity?: number;
|
|
13
|
+
}
|
|
14
|
+
export interface ZSBorderBeamProps extends ViewProps {
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
/** sweep gradient 색상 배열 (꼬리 → 머리 순) — 지정 시 colorFrom/colorTo는 무시됩니다 */
|
|
17
|
+
colors?: string[];
|
|
18
|
+
/** 광선 시작(꼬리) 색상 (기본: palette.primary.main) */
|
|
19
|
+
colorFrom?: string;
|
|
20
|
+
/** 광선 끝(머리) 색상 (기본: palette.secondary.main) */
|
|
21
|
+
colorTo?: string;
|
|
22
|
+
/** 광선(혜성)이 둘레에서 차지하는 비율 (0~1). 1이면 둘레 전체 그라디언트 링 */
|
|
23
|
+
beamLength?: number;
|
|
24
|
+
/** 광선이 지나가지 않는 구간의 얇은 기본 테두리 색. 'none'이면 표시 안 함 (기본: colorFrom 12% 알파) */
|
|
25
|
+
trackColor?: string;
|
|
26
|
+
/**
|
|
27
|
+
* 글로우 강도.
|
|
28
|
+
* - `false` : 글로우 없음 (선명한 광선만)
|
|
29
|
+
* - `0~1` : 숫자 하나로 폭·blur·불투명도를 함께 스케일 (기본 0.5)
|
|
30
|
+
* - config : 세밀 제어 — { width, blur, pulseDuration, minOpacity, maxOpacity }
|
|
31
|
+
*/
|
|
32
|
+
glow?: boolean | number | ZSBorderBeamGlowConfig;
|
|
33
|
+
/** 광선이 한 바퀴 도는 시간(ms) */
|
|
34
|
+
duration?: number;
|
|
35
|
+
/** 애니메이션 시작 지연(ms) */
|
|
36
|
+
delay?: number;
|
|
37
|
+
/** 회전 방향 반전 */
|
|
38
|
+
reverse?: boolean;
|
|
39
|
+
/** false면 효과를 숨기고 애니메이션을 정지 */
|
|
40
|
+
active?: boolean;
|
|
41
|
+
borderWidth?: number;
|
|
42
|
+
borderRadius?: number;
|
|
43
|
+
style?: StyleProp<ViewStyle>;
|
|
44
|
+
}
|
|
45
|
+
declare function ZSBorderBeam({ children, colors, colorFrom, colorTo, beamLength, trackColor, glow, duration, delay, reverse, active, borderWidth, borderRadius, style, ...props }: ZSBorderBeamProps): React.JSX.Element;
|
|
46
|
+
declare const _default: React.MemoExoticComponent<typeof ZSBorderBeam>;
|
|
47
|
+
export default _default;
|
|
48
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/ZSBorderBeam/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAC5D,OAAO,EAA4C,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAkBxH,2DAA2D;AAC3D,MAAM,WAAW,sBAAsB;IACrC,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oBAAoB;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IAClD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oDAAoD;IACpD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0EAA0E;IAC1E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,sBAAsB,CAAC;IACjD,yBAAyB;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sBAAsB;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IAC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