@ezpg/app-ui 0.2.0 → 0.4.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/CHANGELOG.md +23 -0
- package/lib/module/blocks/brand-profile-card/brand-profile-card.js +2 -2
- package/lib/module/blocks/brand-profile-card/brand-profile-card.js.map +1 -1
- package/lib/module/blocks/bulk-ship-list/bulk-ship-list.js +1 -1
- package/lib/module/blocks/bulk-ship-list/bulk-ship-list.js.map +1 -1
- package/lib/module/blocks/claim-row/claim-row.js +6 -5
- package/lib/module/blocks/claim-row/claim-row.js.map +1 -1
- package/lib/module/blocks/color-swatch-picker/color-swatch-picker.js +1 -1
- package/lib/module/blocks/color-swatch-picker/color-swatch-picker.js.map +1 -1
- package/lib/module/blocks/copy-variant-picker/copy-variant-picker.js +4 -4
- package/lib/module/blocks/copy-variant-picker/copy-variant-picker.js.map +1 -1
- package/lib/module/blocks/credit-wallet/credit-wallet.js +1 -1
- package/lib/module/blocks/credit-wallet/credit-wallet.js.map +1 -1
- package/lib/module/blocks/generation-progress/generation-progress.js +4 -4
- package/lib/module/blocks/generation-progress/generation-progress.js.map +1 -1
- package/lib/module/blocks/image-grid/image-grid.js +11 -11
- package/lib/module/blocks/image-grid/image-grid.js.map +1 -1
- package/lib/module/blocks/internal/format.js +4 -0
- package/lib/module/blocks/internal/format.js.map +1 -1
- package/lib/module/blocks/invoice-row/invoice-row.js +5 -5
- package/lib/module/blocks/invoice-row/invoice-row.js.map +1 -1
- package/lib/module/blocks/logo-candidate-grid/logo-candidate-grid.js +1 -1
- package/lib/module/blocks/logo-candidate-grid/logo-candidate-grid.js.map +1 -1
- package/lib/module/blocks/oauth-buttons/oauth-buttons.js +2 -2
- package/lib/module/blocks/oauth-buttons/oauth-buttons.js.map +1 -1
- package/lib/module/blocks/option-editor/option-editor.js +3 -3
- package/lib/module/blocks/option-editor/option-editor.js.map +1 -1
- package/lib/module/blocks/order-card/index.js +1 -1
- package/lib/module/blocks/order-card/index.js.map +1 -1
- package/lib/module/blocks/order-card/order-card.js +31 -9
- package/lib/module/blocks/order-card/order-card.js.map +1 -1
- package/lib/module/blocks/plan-card/plan-card.js +3 -3
- package/lib/module/blocks/plan-card/plan-card.js.map +1 -1
- package/lib/module/blocks/product-list-empty/product-list-empty.js +5 -5
- package/lib/module/blocks/product-list-empty/product-list-empty.js.map +1 -1
- package/lib/module/blocks/review-row/review-row.js +17 -17
- package/lib/module/blocks/review-row/review-row.js.map +1 -1
- package/lib/module/blocks/sales-chart/sales-chart.js +3 -3
- package/lib/module/blocks/sales-chart/sales-chart.js.map +1 -1
- package/lib/module/blocks/selection-bar/selection-bar.js +1 -1
- package/lib/module/blocks/selection-bar/selection-bar.js.map +1 -1
- package/lib/module/blocks/service-state-banner/service-state-banner.js +1 -1
- package/lib/module/blocks/service-state-banner/service-state-banner.js.map +1 -1
- package/lib/module/blocks/shipping-tracking-row/shipping-tracking-row.js +1 -1
- package/lib/module/blocks/shipping-tracking-row/shipping-tracking-row.js.map +1 -1
- package/lib/module/blocks/site-preview-frame/site-preview-frame.js +1 -1
- package/lib/module/blocks/site-preview-frame/site-preview-frame.js.map +1 -1
- package/lib/module/blocks/stat-card/stat-card.js +1 -1
- package/lib/module/blocks/stat-card/stat-card.js.map +1 -1
- package/lib/module/blocks/step-screen/step-screen.js +18 -14
- package/lib/module/blocks/step-screen/step-screen.js.map +1 -1
- package/lib/module/blocks/supply-item-card/supply-item-card.js +5 -5
- package/lib/module/blocks/supply-item-card/supply-item-card.js.map +1 -1
- package/lib/module/components/button/button.js +15 -20
- package/lib/module/components/button/button.js.map +1 -1
- package/lib/module/components/chip/chip.js +2 -2
- package/lib/module/components/chip/chip.js.map +1 -1
- package/lib/module/components/dialog/dialog.js +6 -6
- package/lib/module/components/dialog/dialog.js.map +1 -1
- package/lib/module/components/empty-state/empty-state.js +4 -4
- package/lib/module/components/empty-state/empty-state.js.map +1 -1
- package/lib/module/components/field/field.js +20 -19
- package/lib/module/components/field/field.js.map +1 -1
- package/lib/module/components/list-row/index.js.map +1 -1
- package/lib/module/components/list-row/list-row.js +38 -10
- package/lib/module/components/list-row/list-row.js.map +1 -1
- package/lib/module/components/price/price.js +1 -1
- package/lib/module/components/price/price.js.map +1 -1
- package/lib/module/components/segmented-tabs/segmented-tabs.js +2 -2
- package/lib/module/components/segmented-tabs/segmented-tabs.js.map +1 -1
- package/lib/module/components/status-badge/status-badge.js +2 -2
- package/lib/module/components/status-badge/status-badge.js.map +1 -1
- package/lib/module/components/text/text.js +7 -2
- package/lib/module/components/text/text.js.map +1 -1
- package/lib/module/components/toast/toast.js +5 -5
- package/lib/module/components/toast/toast.js.map +1 -1
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/templates/editor-template.js +142 -0
- package/lib/module/templates/editor-template.js.map +1 -0
- package/lib/module/templates/index.js +9 -0
- package/lib/module/templates/index.js.map +1 -0
- package/lib/module/templates/list-template.js +98 -0
- package/lib/module/templates/list-template.js.map +1 -0
- package/lib/module/templates/parts.js +115 -0
- package/lib/module/templates/parts.js.map +1 -0
- package/lib/module/templates/result-template.js +233 -0
- package/lib/module/templates/result-template.js.map +1 -0
- package/lib/module/templates/scroll-templates.js +100 -0
- package/lib/module/templates/scroll-templates.js.map +1 -0
- package/lib/module/templates/system-template.js +64 -0
- package/lib/module/templates/system-template.js.map +1 -0
- package/lib/module/theme/base.js +141 -0
- package/lib/module/theme/base.js.map +1 -0
- package/lib/module/theme/contract.js +6 -0
- package/lib/module/theme/contract.js.map +1 -0
- package/lib/module/theme/tokens.js +18 -114
- package/lib/module/theme/tokens.js.map +1 -1
- package/lib/typescript/src/blocks/claim-row/claim-row.d.ts.map +1 -1
- package/lib/typescript/src/blocks/color-swatch-picker/color-swatch-picker.d.ts.map +1 -1
- package/lib/typescript/src/blocks/image-grid/image-grid.d.ts.map +1 -1
- package/lib/typescript/src/blocks/internal/format.d.ts +1 -0
- package/lib/typescript/src/blocks/internal/format.d.ts.map +1 -1
- package/lib/typescript/src/blocks/invoice-row/invoice-row.d.ts.map +1 -1
- package/lib/typescript/src/blocks/oauth-buttons/oauth-buttons.d.ts.map +1 -1
- package/lib/typescript/src/blocks/order-card/index.d.ts +1 -1
- package/lib/typescript/src/blocks/order-card/index.d.ts.map +1 -1
- package/lib/typescript/src/blocks/order-card/order-card.d.ts +10 -0
- package/lib/typescript/src/blocks/order-card/order-card.d.ts.map +1 -1
- package/lib/typescript/src/blocks/product-list-empty/product-list-empty.d.ts.map +1 -1
- package/lib/typescript/src/blocks/review-row/review-row.d.ts.map +1 -1
- package/lib/typescript/src/blocks/step-screen/step-screen.d.ts +3 -1
- package/lib/typescript/src/blocks/step-screen/step-screen.d.ts.map +1 -1
- package/lib/typescript/src/components/button/button.d.ts +2 -2
- package/lib/typescript/src/components/button/button.d.ts.map +1 -1
- package/lib/typescript/src/components/dialog/dialog.d.ts +2 -2
- package/lib/typescript/src/components/dialog/dialog.d.ts.map +1 -1
- package/lib/typescript/src/components/empty-state/empty-state.d.ts.map +1 -1
- package/lib/typescript/src/components/field/field.d.ts.map +1 -1
- package/lib/typescript/src/components/list-row/index.d.ts +1 -1
- package/lib/typescript/src/components/list-row/index.d.ts.map +1 -1
- package/lib/typescript/src/components/list-row/list-row.d.ts +4 -1
- package/lib/typescript/src/components/list-row/list-row.d.ts.map +1 -1
- package/lib/typescript/src/components/status-badge/status-badge.d.ts +2 -1
- package/lib/typescript/src/components/status-badge/status-badge.d.ts.map +1 -1
- package/lib/typescript/src/components/text/text.d.ts +1 -1
- package/lib/typescript/src/components/text/text.d.ts.map +1 -1
- package/lib/typescript/src/components/toast/toast.d.ts +2 -1
- package/lib/typescript/src/components/toast/toast.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/templates/editor-template.d.ts +22 -0
- package/lib/typescript/src/templates/editor-template.d.ts.map +1 -0
- package/lib/typescript/src/templates/index.d.ts +13 -0
- package/lib/typescript/src/templates/index.d.ts.map +1 -0
- package/lib/typescript/src/templates/list-template.d.ts +27 -0
- package/lib/typescript/src/templates/list-template.d.ts.map +1 -0
- package/lib/typescript/src/templates/parts.d.ts +27 -0
- package/lib/typescript/src/templates/parts.d.ts.map +1 -0
- package/lib/typescript/src/templates/result-template.d.ts +21 -0
- package/lib/typescript/src/templates/result-template.d.ts.map +1 -0
- package/lib/typescript/src/templates/scroll-templates.d.ts +32 -0
- package/lib/typescript/src/templates/scroll-templates.d.ts.map +1 -0
- package/lib/typescript/src/templates/system-template.d.ts +12 -0
- package/lib/typescript/src/templates/system-template.d.ts.map +1 -0
- package/lib/typescript/src/theme/base.d.ts +139 -0
- package/lib/typescript/src/theme/base.d.ts.map +1 -0
- package/lib/typescript/src/theme/contract.d.ts +7 -0
- package/lib/typescript/src/theme/contract.d.ts.map +1 -0
- package/lib/typescript/src/theme/tokens.d.ts.map +1 -1
- package/lib/typescript/src/types/index.d.ts +25 -3
- package/lib/typescript/src/types/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/blocks/brand-profile-card/brand-profile-card.tsx +2 -2
- package/src/blocks/bulk-ship-list/bulk-ship-list.tsx +1 -1
- package/src/blocks/claim-row/claim-row.tsx +12 -3
- package/src/blocks/color-swatch-picker/color-swatch-picker.tsx +5 -1
- package/src/blocks/copy-variant-picker/copy-variant-picker.tsx +4 -4
- package/src/blocks/credit-wallet/credit-wallet.tsx +1 -1
- package/src/blocks/generation-progress/generation-progress.tsx +4 -4
- package/src/blocks/image-grid/image-grid.tsx +16 -9
- package/src/blocks/internal/format.ts +5 -0
- package/src/blocks/invoice-row/invoice-row.tsx +8 -4
- package/src/blocks/logo-candidate-grid/logo-candidate-grid.tsx +1 -1
- package/src/blocks/oauth-buttons/oauth-buttons.tsx +6 -2
- package/src/blocks/option-editor/option-editor.tsx +3 -3
- package/src/blocks/order-card/index.ts +4 -0
- package/src/blocks/order-card/order-card.tsx +50 -6
- package/src/blocks/plan-card/plan-card.tsx +3 -3
- package/src/blocks/product-list-empty/product-list-empty.tsx +11 -4
- package/src/blocks/review-row/review-row.tsx +26 -15
- package/src/blocks/sales-chart/sales-chart.tsx +3 -3
- package/src/blocks/selection-bar/selection-bar.tsx +1 -1
- package/src/blocks/service-state-banner/service-state-banner.tsx +1 -1
- package/src/blocks/shipping-tracking-row/shipping-tracking-row.tsx +1 -1
- package/src/blocks/site-preview-frame/site-preview-frame.tsx +1 -1
- package/src/blocks/stat-card/stat-card.tsx +1 -1
- package/src/blocks/step-screen/step-screen.tsx +24 -12
- package/src/blocks/supply-item-card/supply-item-card.tsx +5 -5
- package/src/components/button/button.tsx +24 -16
- package/src/components/chip/chip.tsx +2 -2
- package/src/components/dialog/dialog.tsx +7 -7
- package/src/components/empty-state/empty-state.tsx +8 -4
- package/src/components/field/field.tsx +20 -19
- package/src/components/list-row/index.ts +1 -1
- package/src/components/list-row/list-row.tsx +35 -8
- package/src/components/price/price.tsx +1 -1
- package/src/components/segmented-tabs/segmented-tabs.tsx +2 -2
- package/src/components/status-badge/status-badge.tsx +4 -4
- package/src/components/text/text.tsx +5 -2
- package/src/components/toast/toast.tsx +7 -6
- package/src/index.tsx +1 -0
- package/src/templates/editor-template.tsx +164 -0
- package/src/templates/index.ts +26 -0
- package/src/templates/list-template.tsx +124 -0
- package/src/templates/parts.tsx +138 -0
- package/src/templates/result-template.tsx +266 -0
- package/src/templates/scroll-templates.tsx +140 -0
- package/src/templates/system-template.tsx +70 -0
- package/src/theme/base.ts +149 -0
- package/src/theme/contract.ts +21 -0
- package/src/theme/tokens.ts +30 -81
- package/src/types/index.ts +17 -3
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { deadlineTone } from '../internal/format';
|
|
1
2
|
import { View, type StyleProp, type ViewStyle } from 'react-native';
|
|
2
3
|
import { formatPrice } from '../../components/price/price';
|
|
3
4
|
import { Text } from '../../components/text/text';
|
|
@@ -73,8 +74,16 @@ function formatDday(days: number): string {
|
|
|
73
74
|
const useStyles = makeStyles((t) => ({
|
|
74
75
|
row: { flexDirection: 'row', alignItems: 'center', gap: t.space[2] },
|
|
75
76
|
grow: { flex: 1 },
|
|
76
|
-
head: {
|
|
77
|
-
|
|
77
|
+
head: {
|
|
78
|
+
fontSize: t.typography.bodyLg.fontSize,
|
|
79
|
+
lineHeight: t.typography.bodyLg.lineHeight,
|
|
80
|
+
fontVariant: ['tabular-nums'],
|
|
81
|
+
},
|
|
82
|
+
deadline: {
|
|
83
|
+
fontSize: t.typography.label.fontSize,
|
|
84
|
+
lineHeight: t.typography.label.lineHeight,
|
|
85
|
+
fontVariant: ['tabular-nums'],
|
|
86
|
+
},
|
|
78
87
|
}));
|
|
79
88
|
|
|
80
89
|
export function ClaimRow({
|
|
@@ -112,7 +121,7 @@ export function ClaimRow({
|
|
|
112
121
|
{deadline ? (
|
|
113
122
|
<Text
|
|
114
123
|
weight="bold"
|
|
115
|
-
tone={days
|
|
124
|
+
tone={days === null ? 'muted' : deadlineTone(days)}
|
|
116
125
|
style={s.deadline}
|
|
117
126
|
>
|
|
118
127
|
{deadline}
|
|
@@ -54,7 +54,11 @@ const useStyles = makeStyles((t) => ({
|
|
|
54
54
|
alignItems: 'center',
|
|
55
55
|
justifyContent: 'center',
|
|
56
56
|
},
|
|
57
|
-
line: {
|
|
57
|
+
line: {
|
|
58
|
+
height: 6,
|
|
59
|
+
borderRadius: t.radius.full,
|
|
60
|
+
backgroundColor: t.colors.muted,
|
|
61
|
+
},
|
|
58
62
|
long: { width: '70%' },
|
|
59
63
|
short: { width: '45%' },
|
|
60
64
|
}));
|
|
@@ -38,8 +38,8 @@ const useStyles = makeStyles((t) => ({
|
|
|
38
38
|
radio: {
|
|
39
39
|
width: 18,
|
|
40
40
|
height: 18,
|
|
41
|
-
marginTop:
|
|
42
|
-
borderRadius:
|
|
41
|
+
marginTop: t.space[1],
|
|
42
|
+
borderRadius: t.radius.full,
|
|
43
43
|
borderWidth: 2,
|
|
44
44
|
borderColor: t.colors.border,
|
|
45
45
|
alignItems: 'center',
|
|
@@ -49,7 +49,7 @@ const useStyles = makeStyles((t) => ({
|
|
|
49
49
|
radioDot: {
|
|
50
50
|
width: 8,
|
|
51
51
|
height: 8,
|
|
52
|
-
borderRadius:
|
|
52
|
+
borderRadius: t.radius.full,
|
|
53
53
|
backgroundColor: t.colors.primary,
|
|
54
54
|
},
|
|
55
55
|
body: { flex: 1, gap: t.space[2] },
|
|
@@ -80,7 +80,7 @@ export function CopyVariantPicker({
|
|
|
80
80
|
<Text weight="semibold">{label}</Text>
|
|
81
81
|
{conflict ? (
|
|
82
82
|
<View style={s.conflict} accessibilityLiveRegion="polite">
|
|
83
|
-
<Text tone="
|
|
83
|
+
<Text tone="danger">다른 기기에서 먼저 수정했어요.</Text>
|
|
84
84
|
{onReload ? (
|
|
85
85
|
<Button
|
|
86
86
|
size="sm"
|
|
@@ -26,7 +26,7 @@ const useStyles = makeStyles((t) => ({
|
|
|
26
26
|
flexDirection: 'row',
|
|
27
27
|
alignItems: 'center',
|
|
28
28
|
justifyContent: 'space-between',
|
|
29
|
-
minHeight:
|
|
29
|
+
minHeight: t.controlSize.sm,
|
|
30
30
|
paddingHorizontal: t.space[3],
|
|
31
31
|
borderRadius: t.radius.md,
|
|
32
32
|
backgroundColor: `${t.colors.warning}24`,
|
|
@@ -106,8 +106,8 @@ export function GenerationProgress({
|
|
|
106
106
|
<View style={s.dot}>
|
|
107
107
|
<AlertGlyph
|
|
108
108
|
filled
|
|
109
|
-
color={t.colors.
|
|
110
|
-
onColor={t.colors.
|
|
109
|
+
color={t.colors.danger}
|
|
110
|
+
onColor={t.colors.dangerForeground}
|
|
111
111
|
size={DOT}
|
|
112
112
|
/>
|
|
113
113
|
</View>
|
|
@@ -143,7 +143,7 @@ export function GenerationProgress({
|
|
|
143
143
|
style={s.label}
|
|
144
144
|
tone={
|
|
145
145
|
state === 'failed'
|
|
146
|
-
? '
|
|
146
|
+
? 'danger'
|
|
147
147
|
: state === 'pending'
|
|
148
148
|
? 'muted'
|
|
149
149
|
: 'default'
|
|
@@ -161,7 +161,7 @@ export function GenerationProgress({
|
|
|
161
161
|
})}
|
|
162
162
|
</View>
|
|
163
163
|
{status === 'failed' && errorText ? (
|
|
164
|
-
<Text tone="
|
|
164
|
+
<Text tone="danger" accessibilityLiveRegion="polite">
|
|
165
165
|
{errorText}
|
|
166
166
|
</Text>
|
|
167
167
|
) : null}
|
|
@@ -45,14 +45,18 @@ const useStyles = makeStyles((t) => ({
|
|
|
45
45
|
borderRadius: RADIUS,
|
|
46
46
|
},
|
|
47
47
|
dim: { backgroundColor: `${t.colors.background}B3` },
|
|
48
|
-
light: { gap:
|
|
49
|
-
failed: {
|
|
48
|
+
light: { gap: t.space[1], backgroundColor: `${t.colors.background}D9` },
|
|
49
|
+
failed: {
|
|
50
|
+
fontSize: t.typography.caption.fontSize,
|
|
51
|
+
lineHeight: t.typography.caption.lineHeight,
|
|
52
|
+
color: t.colors.danger,
|
|
53
|
+
},
|
|
50
54
|
cover: {
|
|
51
55
|
position: 'absolute',
|
|
52
56
|
left: 0,
|
|
53
57
|
right: 0,
|
|
54
58
|
bottom: 0,
|
|
55
|
-
paddingVertical:
|
|
59
|
+
paddingVertical: t.space[1],
|
|
56
60
|
borderBottomLeftRadius: RADIUS,
|
|
57
61
|
borderBottomRightRadius: RADIUS,
|
|
58
62
|
backgroundColor: 'rgba(0, 0, 0, 0.6)',
|
|
@@ -62,15 +66,15 @@ const useStyles = makeStyles((t) => ({
|
|
|
62
66
|
position: 'absolute',
|
|
63
67
|
top: 0,
|
|
64
68
|
right: 0,
|
|
65
|
-
width:
|
|
66
|
-
height:
|
|
69
|
+
width: t.minTouchSize,
|
|
70
|
+
height: t.minTouchSize,
|
|
67
71
|
alignItems: 'flex-end',
|
|
68
72
|
padding: t.space[1],
|
|
69
73
|
},
|
|
70
74
|
removeDot: {
|
|
71
75
|
width: 22,
|
|
72
76
|
height: 22,
|
|
73
|
-
borderRadius:
|
|
77
|
+
borderRadius: t.radius.full,
|
|
74
78
|
alignItems: 'center',
|
|
75
79
|
justifyContent: 'center',
|
|
76
80
|
backgroundColor: t.colors.foreground,
|
|
@@ -79,13 +83,16 @@ const useStyles = makeStyles((t) => ({
|
|
|
79
83
|
aspectRatio: 1,
|
|
80
84
|
alignItems: 'center',
|
|
81
85
|
justifyContent: 'center',
|
|
82
|
-
gap:
|
|
86
|
+
gap: t.space[1],
|
|
83
87
|
borderRadius: RADIUS,
|
|
84
88
|
borderWidth: 1,
|
|
85
89
|
borderColor: t.colors.input,
|
|
86
90
|
backgroundColor: t.colors.muted,
|
|
87
91
|
},
|
|
88
|
-
count: {
|
|
92
|
+
count: {
|
|
93
|
+
fontSize: t.typography.label.fontSize,
|
|
94
|
+
fontVariant: ['tabular-nums'],
|
|
95
|
+
},
|
|
89
96
|
}));
|
|
90
97
|
|
|
91
98
|
const g = StyleSheet.create({
|
|
@@ -248,7 +255,7 @@ export function ImageGrid({
|
|
|
248
255
|
onPress={() => onRetry?.(item.id)}
|
|
249
256
|
style={[s.fill, s.light]}
|
|
250
257
|
>
|
|
251
|
-
<RetryGlyph color={t.colors.
|
|
258
|
+
<RetryGlyph color={t.colors.danger} size={22} />
|
|
252
259
|
<Text weight="bold" style={s.failed}>
|
|
253
260
|
실패
|
|
254
261
|
</Text>
|
|
@@ -13,6 +13,11 @@ export function changeRate(current: number, previous: number): number | null {
|
|
|
13
13
|
return ((current - previous) / Math.abs(previous)) * 100;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
export function deadlineTone(days: number): 'danger' | 'warning' | 'muted' {
|
|
17
|
+
if (days < 0) return 'danger';
|
|
18
|
+
return days === 0 ? 'warning' : 'muted';
|
|
19
|
+
}
|
|
20
|
+
|
|
16
21
|
export function formatDeadline(days: number): string | null {
|
|
17
22
|
if (days < 0) return '기한 지남';
|
|
18
23
|
return ['오늘 마감', '내일 마감', '모레 마감'][days] ?? null;
|
|
@@ -25,7 +25,11 @@ export type InvoiceRowProps = {
|
|
|
25
25
|
const useStyles = makeStyles((t) => ({
|
|
26
26
|
row: { flexDirection: 'row', alignItems: 'center', gap: t.space[2] },
|
|
27
27
|
grow: { flex: 1 },
|
|
28
|
-
head: {
|
|
28
|
+
head: {
|
|
29
|
+
fontSize: t.typography.bodyLg.fontSize,
|
|
30
|
+
lineHeight: t.typography.bodyLg.lineHeight,
|
|
31
|
+
fontVariant: ['tabular-nums'],
|
|
32
|
+
},
|
|
29
33
|
action: { flex: 1 },
|
|
30
34
|
}));
|
|
31
35
|
|
|
@@ -74,11 +78,11 @@ export function InvoiceRow({
|
|
|
74
78
|
<View style={s.row}>
|
|
75
79
|
<AlertGlyph
|
|
76
80
|
filled
|
|
77
|
-
color={t.colors.
|
|
78
|
-
onColor={t.colors.
|
|
81
|
+
color={t.colors.danger}
|
|
82
|
+
onColor={t.colors.dangerForeground}
|
|
79
83
|
size={t.iconSize.md}
|
|
80
84
|
/>
|
|
81
|
-
<Text weight="bold" tone="
|
|
85
|
+
<Text weight="bold" tone="danger" style={[s.head, s.grow]}>
|
|
82
86
|
결제 실패
|
|
83
87
|
</Text>
|
|
84
88
|
<Text weight="bold" style={s.head}>
|
|
@@ -47,12 +47,16 @@ const useStyles = makeStyles((t) => ({
|
|
|
47
47
|
justifyContent: 'center',
|
|
48
48
|
gap: t.space[2],
|
|
49
49
|
paddingHorizontal: t.space[4],
|
|
50
|
-
borderRadius:
|
|
50
|
+
borderRadius: t.radius.lg,
|
|
51
51
|
borderWidth: 1,
|
|
52
52
|
borderColor: 'transparent',
|
|
53
53
|
},
|
|
54
54
|
icon: { position: 'absolute', left: t.space[4] },
|
|
55
|
-
label: {
|
|
55
|
+
label: {
|
|
56
|
+
fontSize: t.typography.body.fontSize,
|
|
57
|
+
fontWeight: '600',
|
|
58
|
+
fontFamily: t.fontFamily,
|
|
59
|
+
},
|
|
56
60
|
}));
|
|
57
61
|
|
|
58
62
|
export function OAuthButtons({
|
|
@@ -49,12 +49,12 @@ const useStyles = makeStyles((t) => ({
|
|
|
49
49
|
width: 20,
|
|
50
50
|
height: t.minTouchSize,
|
|
51
51
|
justifyContent: 'center',
|
|
52
|
-
gap:
|
|
52
|
+
gap: t.space[1],
|
|
53
53
|
},
|
|
54
54
|
bar: {
|
|
55
55
|
height: 2,
|
|
56
|
-
marginHorizontal:
|
|
57
|
-
borderRadius:
|
|
56
|
+
marginHorizontal: t.space[1],
|
|
57
|
+
borderRadius: t.radius.full,
|
|
58
58
|
backgroundColor: t.colors.mutedForeground,
|
|
59
59
|
},
|
|
60
60
|
}));
|
|
@@ -2,9 +2,13 @@ export {
|
|
|
2
2
|
OrderCard,
|
|
3
3
|
OrderSection,
|
|
4
4
|
orderStatusLabel,
|
|
5
|
+
orderStatusText,
|
|
6
|
+
orderStatusTone,
|
|
5
7
|
summarizeItems,
|
|
6
8
|
type OrderAction,
|
|
7
9
|
type OrderCardProps,
|
|
10
|
+
type OrderFulfillment,
|
|
11
|
+
type OrderStatusInput,
|
|
8
12
|
type OrderItem,
|
|
9
13
|
type OrderSectionProps,
|
|
10
14
|
type OrderStatus,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { StatusBadgeTone } from '../../components/status-badge/status-badge';
|
|
1
2
|
import type { ReactNode } from 'react';
|
|
2
3
|
import { View, type StyleProp, type ViewStyle } from 'react-native';
|
|
3
4
|
import { Button, type ButtonVariant } from '../../components/button/button';
|
|
@@ -7,7 +8,7 @@ import { ChevronGlyph } from '../../internal/glyphs';
|
|
|
7
8
|
import { useTheme } from '../../theme/theme-provider';
|
|
8
9
|
import { makeStyles } from '../../utils/styles';
|
|
9
10
|
import { Card } from '../internal/card';
|
|
10
|
-
import { formatDeadline } from '../internal/format';
|
|
11
|
+
import { deadlineTone, formatDeadline } from '../internal/format';
|
|
11
12
|
|
|
12
13
|
export type OrderStatus =
|
|
13
14
|
| 'pending_payment'
|
|
@@ -21,13 +22,46 @@ export type OrderStatus =
|
|
|
21
22
|
export const orderStatusLabel: Record<OrderStatus, string> = {
|
|
22
23
|
pending_payment: '결제 대기',
|
|
23
24
|
paid: '신규',
|
|
24
|
-
preparing: '
|
|
25
|
+
preparing: '상품 준비 중',
|
|
25
26
|
shipped: '배송 중',
|
|
26
27
|
delivered: '배송 완료',
|
|
27
28
|
completed: '구매 확정',
|
|
28
|
-
canceled: '취소',
|
|
29
|
+
canceled: '주문 취소',
|
|
29
30
|
};
|
|
30
31
|
|
|
32
|
+
export type OrderFulfillment = 'ship' | 'pickup' | 'local' | 'visit' | 'none';
|
|
33
|
+
|
|
34
|
+
export type OrderStatusInput = {
|
|
35
|
+
status: OrderStatus;
|
|
36
|
+
fulfillment?: OrderFulfillment;
|
|
37
|
+
readyAt?: string | null;
|
|
38
|
+
awaitingDeposit?: boolean;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const orderStatusTone: Record<OrderStatus, StatusBadgeTone> = {
|
|
42
|
+
pending_payment: 'neutral',
|
|
43
|
+
paid: 'warning',
|
|
44
|
+
preparing: 'warning',
|
|
45
|
+
shipped: 'info',
|
|
46
|
+
delivered: 'success',
|
|
47
|
+
completed: 'neutral',
|
|
48
|
+
canceled: 'neutral',
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export function orderStatusText({
|
|
52
|
+
status,
|
|
53
|
+
fulfillment = 'ship',
|
|
54
|
+
readyAt,
|
|
55
|
+
awaitingDeposit,
|
|
56
|
+
}: OrderStatusInput): string {
|
|
57
|
+
if (status === 'pending_payment' && awaitingDeposit) return '입금 대기';
|
|
58
|
+
if (fulfillment === 'pickup') {
|
|
59
|
+
if (status === 'preparing' && readyAt) return '픽업 준비 완료';
|
|
60
|
+
if (status === 'delivered') return '수령 완료';
|
|
61
|
+
}
|
|
62
|
+
return orderStatusLabel[status];
|
|
63
|
+
}
|
|
64
|
+
|
|
31
65
|
export type OrderItem = { name: string; option?: string; quantity: number };
|
|
32
66
|
|
|
33
67
|
export type OrderAction = {
|
|
@@ -51,9 +85,15 @@ export type OrderCardProps = {
|
|
|
51
85
|
const useStyles = makeStyles((t) => ({
|
|
52
86
|
row: { flexDirection: 'row', alignItems: 'center', gap: t.space[2] },
|
|
53
87
|
grow: { flex: 1 },
|
|
54
|
-
title: {
|
|
88
|
+
title: {
|
|
89
|
+
fontSize: t.typography.bodyLg.fontSize,
|
|
90
|
+
lineHeight: t.typography.bodyLg.lineHeight,
|
|
91
|
+
},
|
|
55
92
|
amount: { fontVariant: ['tabular-nums'] },
|
|
56
|
-
deadline: {
|
|
93
|
+
deadline: {
|
|
94
|
+
fontSize: t.typography.label.fontSize,
|
|
95
|
+
lineHeight: t.typography.label.lineHeight,
|
|
96
|
+
},
|
|
57
97
|
action: { flex: 1 },
|
|
58
98
|
compact: {
|
|
59
99
|
flexDirection: 'row',
|
|
@@ -128,7 +168,11 @@ export function OrderCard({
|
|
|
128
168
|
</Text>
|
|
129
169
|
</View>
|
|
130
170
|
{deadline ? (
|
|
131
|
-
<Text
|
|
171
|
+
<Text
|
|
172
|
+
weight={deadlineTone(dueInDays!) === 'muted' ? 'regular' : 'bold'}
|
|
173
|
+
tone={deadlineTone(dueInDays!)}
|
|
174
|
+
style={s.deadline}
|
|
175
|
+
>
|
|
132
176
|
{deadline}
|
|
133
177
|
</Text>
|
|
134
178
|
) : null}
|
|
@@ -36,7 +36,7 @@ const useStyles = makeStyles((t) => ({
|
|
|
36
36
|
},
|
|
37
37
|
head: { flexDirection: 'row', alignItems: 'center', gap: t.space[2] },
|
|
38
38
|
name: { flex: 1 },
|
|
39
|
-
list: { gap:
|
|
39
|
+
list: { gap: t.space[2] },
|
|
40
40
|
feature: { flexDirection: 'row', alignItems: 'center', gap: t.space[2] },
|
|
41
41
|
change: {
|
|
42
42
|
flexDirection: 'row',
|
|
@@ -112,7 +112,7 @@ export function PlanCard({
|
|
|
112
112
|
</View>
|
|
113
113
|
{alert ? (
|
|
114
114
|
<Text
|
|
115
|
-
tone={notice ? 'muted' : '
|
|
115
|
+
tone={notice ? 'muted' : 'danger'}
|
|
116
116
|
weight={notice ? 'semibold' : undefined}
|
|
117
117
|
>
|
|
118
118
|
{alert}
|
|
@@ -136,7 +136,7 @@ export function PlanCard({
|
|
|
136
136
|
{!current && onSelect ? (
|
|
137
137
|
<Button
|
|
138
138
|
size="lg"
|
|
139
|
-
variant={recommended ? '
|
|
139
|
+
variant={recommended ? 'primary' : 'outline'}
|
|
140
140
|
onPress={onSelect}
|
|
141
141
|
>
|
|
142
142
|
{proratedAmount !== undefined && proratedAmount > 0
|
|
@@ -61,16 +61,23 @@ const useStyles = makeStyles((t) => ({
|
|
|
61
61
|
position: 'absolute',
|
|
62
62
|
top: t.space[3],
|
|
63
63
|
left: t.space[3],
|
|
64
|
-
paddingHorizontal:
|
|
64
|
+
paddingHorizontal: t.space[2],
|
|
65
65
|
paddingVertical: t.space[1],
|
|
66
66
|
borderRadius: t.radius.full,
|
|
67
67
|
backgroundColor: t.colors.foreground,
|
|
68
68
|
},
|
|
69
|
-
badgeLabel: {
|
|
69
|
+
badgeLabel: {
|
|
70
|
+
color: t.colors.background,
|
|
71
|
+
fontSize: t.typography.label.fontSize,
|
|
72
|
+
},
|
|
70
73
|
body: { gap: t.space[1], padding: t.space[4] },
|
|
71
74
|
actions: { flexDirection: 'row', gap: t.space[2], marginTop: t.space[3] },
|
|
72
|
-
edit: { flex: 1, height:
|
|
73
|
-
dismiss: {
|
|
75
|
+
edit: { flex: 1, height: t.controlSize.md },
|
|
76
|
+
dismiss: {
|
|
77
|
+
width: t.controlSize.md,
|
|
78
|
+
height: t.controlSize.md,
|
|
79
|
+
paddingHorizontal: 0,
|
|
80
|
+
},
|
|
74
81
|
}));
|
|
75
82
|
|
|
76
83
|
export function ProductListEmpty({
|
|
@@ -29,40 +29,43 @@ export type HiddenReviewsRowProps = {
|
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
const useStyles = makeStyles((t) => ({
|
|
32
|
-
root: { gap:
|
|
32
|
+
root: { gap: t.space[2], paddingVertical: t.space[4] },
|
|
33
33
|
head: { flexDirection: 'row', alignItems: 'center', gap: t.space[2] },
|
|
34
34
|
stars: { letterSpacing: 1 },
|
|
35
|
-
author: { flexShrink: 1, fontSize:
|
|
35
|
+
author: { flexShrink: 1, fontSize: t.typography.label.fontSize },
|
|
36
36
|
more: {
|
|
37
|
-
width:
|
|
38
|
-
height:
|
|
37
|
+
width: t.minTouchSize,
|
|
38
|
+
height: t.minTouchSize,
|
|
39
39
|
marginVertical: -t.space[3],
|
|
40
40
|
marginLeft: 'auto',
|
|
41
41
|
alignItems: 'center',
|
|
42
42
|
justifyContent: 'center',
|
|
43
43
|
},
|
|
44
|
-
dots: { flexDirection: 'row', gap:
|
|
45
|
-
dot: { width: 3.5, height: 3.5, borderRadius:
|
|
44
|
+
dots: { flexDirection: 'row', gap: t.space[1] },
|
|
45
|
+
dot: { width: 3.5, height: 3.5, borderRadius: t.radius.full },
|
|
46
46
|
photos: { flexDirection: 'row', gap: t.space[2] },
|
|
47
47
|
photo: { width: 72 },
|
|
48
48
|
reply: {
|
|
49
49
|
gap: t.space[1],
|
|
50
50
|
marginLeft: t.space[3],
|
|
51
51
|
paddingVertical: t.space[3],
|
|
52
|
-
paddingHorizontal:
|
|
53
|
-
borderRadius:
|
|
52
|
+
paddingHorizontal: t.space[4],
|
|
53
|
+
borderRadius: t.radius.lg,
|
|
54
54
|
backgroundColor: t.colors.muted,
|
|
55
55
|
},
|
|
56
|
-
replyTitle: {
|
|
56
|
+
replyTitle: {
|
|
57
|
+
fontSize: t.typography.label.fontSize,
|
|
58
|
+
lineHeight: t.typography.label.lineHeight,
|
|
59
|
+
},
|
|
57
60
|
replyButton: { alignSelf: 'flex-start' },
|
|
58
61
|
hidden: {
|
|
59
62
|
flexDirection: 'row',
|
|
60
63
|
alignItems: 'center',
|
|
61
64
|
gap: t.space[2],
|
|
62
|
-
minHeight:
|
|
63
|
-
paddingLeft:
|
|
65
|
+
minHeight: t.controlSize.lg,
|
|
66
|
+
paddingLeft: t.space[4],
|
|
64
67
|
paddingRight: t.space[2],
|
|
65
|
-
borderRadius:
|
|
68
|
+
borderRadius: t.radius.lg,
|
|
66
69
|
backgroundColor: t.colors.muted,
|
|
67
70
|
},
|
|
68
71
|
hiddenLabel: { flex: 1 },
|
|
@@ -184,18 +187,26 @@ export type ReviewSummaryProps = {
|
|
|
184
187
|
const useSummaryStyles = makeStyles((t) => ({
|
|
185
188
|
root: { flexDirection: 'row', alignItems: 'center', gap: t.space[5] },
|
|
186
189
|
score: { alignItems: 'center', gap: t.space[1] },
|
|
187
|
-
average: {
|
|
190
|
+
average: {
|
|
191
|
+
fontSize: t.typography.display.fontSize,
|
|
192
|
+
lineHeight: t.typography.display.lineHeight,
|
|
193
|
+
fontVariant: ['tabular-nums'],
|
|
194
|
+
},
|
|
188
195
|
bars: { flex: 1, gap: t.space[1] },
|
|
189
196
|
bar: { flexDirection: 'row', alignItems: 'center', gap: t.space[2] },
|
|
190
197
|
digit: { width: 8, fontVariant: ['tabular-nums'] },
|
|
191
198
|
track: {
|
|
192
199
|
flex: 1,
|
|
193
200
|
height: 6,
|
|
194
|
-
borderRadius:
|
|
201
|
+
borderRadius: t.radius.full,
|
|
195
202
|
overflow: 'hidden',
|
|
196
203
|
backgroundColor: t.colors.muted,
|
|
197
204
|
},
|
|
198
|
-
fill: {
|
|
205
|
+
fill: {
|
|
206
|
+
height: 6,
|
|
207
|
+
borderRadius: t.radius.full,
|
|
208
|
+
backgroundColor: t.colors.warning,
|
|
209
|
+
},
|
|
199
210
|
}));
|
|
200
211
|
|
|
201
212
|
export function ReviewSummary({
|
|
@@ -33,10 +33,10 @@ const useStyles = makeStyles((t) => ({
|
|
|
33
33
|
flexDirection: 'row',
|
|
34
34
|
alignItems: 'center',
|
|
35
35
|
justifyContent: 'space-between',
|
|
36
|
-
minHeight:
|
|
36
|
+
minHeight: t.controlSize.sm,
|
|
37
37
|
},
|
|
38
38
|
divided: { borderBottomWidth: 1, borderBottomColor: t.colors.border },
|
|
39
|
-
net: { minHeight:
|
|
39
|
+
net: { minHeight: t.listRow.oneLine },
|
|
40
40
|
netValue: { flexDirection: 'row', alignItems: 'baseline', gap: t.space[2] },
|
|
41
41
|
down: { color: t.colors.info },
|
|
42
42
|
}));
|
|
@@ -92,7 +92,7 @@ export function SalesChart({
|
|
|
92
92
|
{rate !== null ? (
|
|
93
93
|
<Text
|
|
94
94
|
weight="bold"
|
|
95
|
-
tone={up ? '
|
|
95
|
+
tone={up ? 'danger' : 'default'}
|
|
96
96
|
style={!up && s.down}
|
|
97
97
|
accessibilityLabel={`직전 기간보다 ${Math.abs(rate).toFixed(1)}% ${up ? '증가' : '감소'}`}
|
|
98
98
|
>
|
|
@@ -49,7 +49,7 @@ export function ServiceStateBanner({
|
|
|
49
49
|
const severe =
|
|
50
50
|
state === 'suspended' || state === 'closed' || state === 'stopped';
|
|
51
51
|
const [bg, fg] = severe
|
|
52
|
-
? [t.colors.
|
|
52
|
+
? [t.colors.danger, t.colors.dangerForeground]
|
|
53
53
|
: [t.colors.warning, t.colors.warningForeground];
|
|
54
54
|
return (
|
|
55
55
|
<View
|
|
@@ -57,7 +57,7 @@ export function StatCard({
|
|
|
57
57
|
{hasChange ? (
|
|
58
58
|
<Text
|
|
59
59
|
weight="bold"
|
|
60
|
-
tone={flat ? 'muted' : up ? '
|
|
60
|
+
tone={flat ? 'muted' : up ? 'danger' : 'default'}
|
|
61
61
|
style={!flat && !up && s.down}
|
|
62
62
|
>
|
|
63
63
|
{flat ? '변동 없음' : `${up ? '▲' : '▼'} ${rate}`}
|