@compsych/mobile-ui 1.0.13 → 1.0.15
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/package.json +2 -1
- package/src/components/SelectionCard/index.tsx +7 -6
- package/src/components/ServiceCard/index.tsx +26 -61
- package/src/icons/index.ts +12 -59
- package/src/icons/types.ts +7 -23
- package/src/index.ts +2 -30
- package/src/components/PromotionCard/PromotionCard.test.tsx +0 -73
- package/src/components/PromotionCard/index.tsx +0 -543
- package/src/icons/AtomIcon.tsx +0 -32
- package/src/icons/BinocularsIcon.tsx +0 -45
- package/src/icons/FileChartColumnIncreasingIcon.tsx +0 -44
- package/src/icons/FlagIcon.tsx +0 -20
- package/src/icons/GlobeIcon.tsx +0 -20
- package/src/icons/GraduationCapIcon.tsx +0 -32
- package/src/icons/HandHeartIcon.tsx +0 -38
- package/src/icons/HandshakeIcon.tsx +0 -39
- package/src/icons/HazeIcon.tsx +0 -42
- package/src/icons/HeartHandshakeIcon.tsx +0 -20
- package/src/icons/HourglassIcon.tsx +0 -33
- package/src/icons/IdCardIcon.tsx +0 -44
- package/src/icons/MessageCirclePlusIcon.tsx +0 -32
- package/src/icons/MountainSnowIcon.tsx +0 -26
- package/src/icons/SnowflakeIcon.tsx +0 -86
- package/src/icons/StethoscopeIcon.tsx +0 -34
- package/src/icons/UserRoundIcon.tsx +0 -26
- package/src/icons/WheatIcon.tsx +0 -62
|
@@ -1,543 +0,0 @@
|
|
|
1
|
-
import React, { useMemo } from 'react';
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
Image,
|
|
5
|
-
type ImageSourcePropType,
|
|
6
|
-
Pressable,
|
|
7
|
-
StyleProp,
|
|
8
|
-
StyleSheet,
|
|
9
|
-
View,
|
|
10
|
-
ViewStyle,
|
|
11
|
-
} from 'react-native';
|
|
12
|
-
|
|
13
|
-
import { Ionicons } from '@expo/vector-icons';
|
|
14
|
-
import Svg, { Circle as SvgCircle } from 'react-native-svg';
|
|
15
|
-
|
|
16
|
-
import { useTheme } from '../../theme';
|
|
17
|
-
import { BodyText } from '../BodyText';
|
|
18
|
-
import { HeaderText } from '../HeaderText';
|
|
19
|
-
|
|
20
|
-
export type PromotionCardVariant = 'filled' | 'tonal';
|
|
21
|
-
export type PromotionCardUsage =
|
|
22
|
-
| 'neutral'
|
|
23
|
-
| 'informative'
|
|
24
|
-
| 'positive'
|
|
25
|
-
| 'danger'
|
|
26
|
-
| 'warning'
|
|
27
|
-
| 'image';
|
|
28
|
-
export type PromotionCardSize = 'md' | 'lg';
|
|
29
|
-
|
|
30
|
-
export interface PromotionCardProps {
|
|
31
|
-
size?: PromotionCardSize;
|
|
32
|
-
variant?: PromotionCardVariant;
|
|
33
|
-
usage?: PromotionCardUsage;
|
|
34
|
-
title?: string;
|
|
35
|
-
description?: string;
|
|
36
|
-
chipLabel?: string;
|
|
37
|
-
chipIcon?: React.ReactNode;
|
|
38
|
-
image?: ImageSourcePropType;
|
|
39
|
-
progress?: number;
|
|
40
|
-
showProgressBar?: boolean;
|
|
41
|
-
showRingTimer?: boolean;
|
|
42
|
-
onPress?: () => void;
|
|
43
|
-
disabled?: boolean;
|
|
44
|
-
accessibilityLabel?: string;
|
|
45
|
-
style?: StyleProp<ViewStyle>;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
type VariantTokens = {
|
|
49
|
-
cardBg: string;
|
|
50
|
-
chipBg: string;
|
|
51
|
-
chipTextColor: string;
|
|
52
|
-
titleColor: string;
|
|
53
|
-
descColor: string;
|
|
54
|
-
descOpacity: number;
|
|
55
|
-
buttonBg: string;
|
|
56
|
-
buttonIconColor: string;
|
|
57
|
-
progressColor: string;
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
const MD_HEIGHT = 197;
|
|
61
|
-
const LG_HEIGHT = 363;
|
|
62
|
-
const MD_BUTTON = 32;
|
|
63
|
-
const LG_BUTTON = 48;
|
|
64
|
-
const MD_RING_R = 14;
|
|
65
|
-
const LG_RING_R = 21;
|
|
66
|
-
const MD_RING_C = 2 * Math.PI * MD_RING_R;
|
|
67
|
-
const LG_RING_C = 2 * Math.PI * LG_RING_R;
|
|
68
|
-
const LG_DOTS_BOTTOM = 53;
|
|
69
|
-
const LG_DOTS_LEFT = 32;
|
|
70
|
-
const LG_DOT_SIZE = 6;
|
|
71
|
-
const LG_DOT_GAP = 4;
|
|
72
|
-
const LG_DOT_COUNT = 5;
|
|
73
|
-
|
|
74
|
-
export function PromotionCard({
|
|
75
|
-
size = 'md',
|
|
76
|
-
variant = 'filled',
|
|
77
|
-
usage = 'neutral',
|
|
78
|
-
title,
|
|
79
|
-
description,
|
|
80
|
-
chipLabel,
|
|
81
|
-
chipIcon,
|
|
82
|
-
image,
|
|
83
|
-
progress = 0.25,
|
|
84
|
-
showProgressBar = true,
|
|
85
|
-
showRingTimer = true,
|
|
86
|
-
onPress,
|
|
87
|
-
disabled = false,
|
|
88
|
-
accessibilityLabel,
|
|
89
|
-
style,
|
|
90
|
-
}: PromotionCardProps) {
|
|
91
|
-
const { colorRoles: cr, dimensions: dim } = useTheme();
|
|
92
|
-
|
|
93
|
-
const tokens = useMemo(
|
|
94
|
-
(): Record<
|
|
95
|
-
PromotionCardVariant,
|
|
96
|
-
Record<PromotionCardUsage, VariantTokens>
|
|
97
|
-
> => ({
|
|
98
|
-
filled: {
|
|
99
|
-
neutral: {
|
|
100
|
-
cardBg: cr.surface.surfaceContainer.sysSurfaceContainerLowest,
|
|
101
|
-
chipBg: cr.surface.surfaceContainer.sysSurfaceContainerHighest,
|
|
102
|
-
chipTextColor: cr.surface.surface.sysOnSurface,
|
|
103
|
-
titleColor: '#0f0f0f',
|
|
104
|
-
descColor: cr.surface.surface.sysOnSurfaceVariant,
|
|
105
|
-
descOpacity: 1,
|
|
106
|
-
buttonBg: cr.addOn.primaryFixed.sysPrimaryFixedDim,
|
|
107
|
-
buttonIconColor: cr.addOn.primaryFixed.sysOnPrimaryFixed,
|
|
108
|
-
progressColor: cr.accent.primary.sysPrimary,
|
|
109
|
-
},
|
|
110
|
-
informative: {
|
|
111
|
-
cardBg: cr.custom.info.sysOnInfoContainer,
|
|
112
|
-
chipBg: cr.custom.info.sysInfoContainer,
|
|
113
|
-
chipTextColor: cr.custom.info.sysOnInfoContainer,
|
|
114
|
-
titleColor: cr.custom.info.sysOnInfo,
|
|
115
|
-
descColor: cr.transparent.neutral.sysWhite80,
|
|
116
|
-
descOpacity: 1,
|
|
117
|
-
buttonBg: cr.custom.info.sysOnInfo,
|
|
118
|
-
buttonIconColor: cr.custom.info.sysOnInfoContainer,
|
|
119
|
-
progressColor: cr.custom.info.sysOnInfo,
|
|
120
|
-
},
|
|
121
|
-
positive: {
|
|
122
|
-
cardBg: cr.custom.success.sysOnSuccessContainer,
|
|
123
|
-
chipBg: cr.custom.success.sysSuccessContainer,
|
|
124
|
-
chipTextColor: cr.custom.success.sysOnSuccessContainer,
|
|
125
|
-
titleColor: cr.custom.success.sysOnSuccess,
|
|
126
|
-
descColor: cr.transparent.neutral.sysWhite80,
|
|
127
|
-
descOpacity: 1,
|
|
128
|
-
buttonBg: cr.custom.success.sysOnSuccess,
|
|
129
|
-
buttonIconColor: cr.custom.success.sysOnSuccessContainer,
|
|
130
|
-
progressColor: cr.custom.success.sysOnSuccess,
|
|
131
|
-
},
|
|
132
|
-
danger: {
|
|
133
|
-
cardBg: cr.error.sysOnErrorContainer,
|
|
134
|
-
chipBg: cr.error.sysErrorContainer,
|
|
135
|
-
chipTextColor: cr.error.sysOnErrorContainer,
|
|
136
|
-
titleColor: cr.error.sysOnError,
|
|
137
|
-
descColor: cr.transparent.neutral.sysWhite80,
|
|
138
|
-
descOpacity: 1,
|
|
139
|
-
buttonBg: cr.error.sysOnError,
|
|
140
|
-
buttonIconColor: cr.error.sysOnErrorContainer,
|
|
141
|
-
progressColor: cr.error.sysOnError,
|
|
142
|
-
},
|
|
143
|
-
warning: {
|
|
144
|
-
cardBg: cr.custom.warning.sysOnWarningContainer,
|
|
145
|
-
chipBg: cr.custom.warning.sysWarningContainer,
|
|
146
|
-
chipTextColor: cr.custom.warning.sysOnWarningContainer,
|
|
147
|
-
titleColor: cr.custom.warning.sysOnWarning,
|
|
148
|
-
descColor: cr.transparent.neutral.sysWhite80,
|
|
149
|
-
descOpacity: 1,
|
|
150
|
-
buttonBg: cr.custom.warning.sysOnWarning,
|
|
151
|
-
buttonIconColor: cr.custom.warning.sysOnWarningContainer,
|
|
152
|
-
progressColor: cr.custom.warning.sysOnWarning,
|
|
153
|
-
},
|
|
154
|
-
image: {
|
|
155
|
-
cardBg: 'transparent',
|
|
156
|
-
chipBg: 'rgba(255,255,255,0.2)',
|
|
157
|
-
chipTextColor: cr.surface.inverse.sysInverseOnSurface,
|
|
158
|
-
titleColor: cr.accent.primary.sysOnPrimary,
|
|
159
|
-
descColor: cr.transparent.neutral.sysWhite80,
|
|
160
|
-
descOpacity: 1,
|
|
161
|
-
buttonBg: cr.surface.surfaceContainer.sysSurfaceContainerLowest,
|
|
162
|
-
buttonIconColor: cr.surface.surface.sysOnSurface,
|
|
163
|
-
progressColor: cr.accent.primary.sysOnPrimary,
|
|
164
|
-
},
|
|
165
|
-
},
|
|
166
|
-
tonal: {
|
|
167
|
-
neutral: {
|
|
168
|
-
cardBg: cr.surface.surfaceContainer.sysSurfaceContainerLowest,
|
|
169
|
-
chipBg: cr.surface.surfaceContainer.sysSurfaceContainerHighest,
|
|
170
|
-
chipTextColor: cr.surface.surface.sysOnSurface,
|
|
171
|
-
titleColor: '#0f0f0f',
|
|
172
|
-
descColor: cr.surface.surface.sysOnSurfaceVariant,
|
|
173
|
-
descOpacity: 1,
|
|
174
|
-
buttonBg: cr.addOn.primaryFixed.sysPrimaryFixedDim,
|
|
175
|
-
buttonIconColor: cr.addOn.primaryFixed.sysOnPrimaryFixed,
|
|
176
|
-
progressColor: cr.accent.primary.sysPrimary,
|
|
177
|
-
},
|
|
178
|
-
informative: {
|
|
179
|
-
cardBg: cr.custom.info.sysInfoContainer,
|
|
180
|
-
chipBg: cr.custom.info.sysOnInfo,
|
|
181
|
-
chipTextColor: cr.custom.info.sysOnInfoContainer,
|
|
182
|
-
titleColor: cr.custom.info.sysOnInfoContainer,
|
|
183
|
-
descColor: cr.custom.info.sysOnInfoContainer,
|
|
184
|
-
descOpacity: 0.64,
|
|
185
|
-
buttonBg: cr.custom.info.sysInfo,
|
|
186
|
-
buttonIconColor: cr.custom.info.sysOnInfo,
|
|
187
|
-
progressColor: cr.custom.info.sysInfo,
|
|
188
|
-
},
|
|
189
|
-
positive: {
|
|
190
|
-
cardBg: cr.custom.success.sysSuccessContainer,
|
|
191
|
-
chipBg: cr.custom.success.sysOnSuccess,
|
|
192
|
-
chipTextColor: cr.custom.success.sysOnSuccessContainer,
|
|
193
|
-
titleColor: cr.custom.success.sysOnSuccessContainer,
|
|
194
|
-
descColor: cr.custom.success.sysOnSuccessContainer,
|
|
195
|
-
descOpacity: 0.64,
|
|
196
|
-
buttonBg: cr.custom.success.sysSuccess,
|
|
197
|
-
buttonIconColor: cr.custom.success.sysOnSuccess,
|
|
198
|
-
progressColor: cr.custom.success.sysSuccess,
|
|
199
|
-
},
|
|
200
|
-
danger: {
|
|
201
|
-
cardBg: cr.error.sysErrorContainer,
|
|
202
|
-
chipBg: cr.error.sysOnError,
|
|
203
|
-
chipTextColor: cr.error.sysOnErrorContainer,
|
|
204
|
-
titleColor: cr.error.sysOnErrorContainer,
|
|
205
|
-
descColor: cr.error.sysOnErrorContainer,
|
|
206
|
-
descOpacity: 0.64,
|
|
207
|
-
buttonBg: cr.error.sysError,
|
|
208
|
-
buttonIconColor: cr.error.sysOnError,
|
|
209
|
-
progressColor: cr.error.sysError,
|
|
210
|
-
},
|
|
211
|
-
warning: {
|
|
212
|
-
cardBg: cr.custom.warning.sysWarningContainer,
|
|
213
|
-
chipBg: cr.custom.warning.sysOnWarning,
|
|
214
|
-
chipTextColor: cr.custom.warning.sysOnWarningContainer,
|
|
215
|
-
titleColor: cr.custom.warning.sysOnWarningContainer,
|
|
216
|
-
descColor: cr.custom.warning.sysOnWarningContainer,
|
|
217
|
-
descOpacity: 0.64,
|
|
218
|
-
buttonBg: cr.custom.warning.sysWarning,
|
|
219
|
-
buttonIconColor: cr.custom.warning.sysOnWarning,
|
|
220
|
-
progressColor: cr.custom.warning.sysWarning,
|
|
221
|
-
},
|
|
222
|
-
image: {
|
|
223
|
-
cardBg: 'transparent',
|
|
224
|
-
chipBg: 'rgba(255,255,255,0.2)',
|
|
225
|
-
chipTextColor: cr.surface.inverse.sysInverseOnSurface,
|
|
226
|
-
titleColor: cr.accent.primary.sysOnPrimary,
|
|
227
|
-
descColor: cr.transparent.neutral.sysWhite80,
|
|
228
|
-
descOpacity: 1,
|
|
229
|
-
buttonBg: cr.surface.surfaceContainer.sysSurfaceContainerLowest,
|
|
230
|
-
buttonIconColor: cr.surface.surface.sysOnSurface,
|
|
231
|
-
progressColor: cr.accent.primary.sysOnPrimary,
|
|
232
|
-
},
|
|
233
|
-
},
|
|
234
|
-
}),
|
|
235
|
-
[cr],
|
|
236
|
-
);
|
|
237
|
-
|
|
238
|
-
// lg tokens: neutral uses filled, others use tonal
|
|
239
|
-
function getLgTokens(u: PromotionCardUsage): VariantTokens {
|
|
240
|
-
if (u === 'neutral') return tokens.filled.neutral;
|
|
241
|
-
return tokens.tonal[u];
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
const isLg = size === 'lg';
|
|
245
|
-
const t = isLg ? getLgTokens(usage) : tokens[variant][usage];
|
|
246
|
-
const isImage = usage === 'image';
|
|
247
|
-
const p = Math.max(0, Math.min(1, progress));
|
|
248
|
-
|
|
249
|
-
const buttonSize = isLg ? LG_BUTTON : MD_BUTTON;
|
|
250
|
-
const ringR = isLg ? LG_RING_R : MD_RING_R;
|
|
251
|
-
const ringC = isLg ? LG_RING_C : MD_RING_C;
|
|
252
|
-
const ringArcLength = ringC * p;
|
|
253
|
-
|
|
254
|
-
const containerStyle = [
|
|
255
|
-
styles.card,
|
|
256
|
-
isLg
|
|
257
|
-
? {
|
|
258
|
-
height: LG_HEIGHT,
|
|
259
|
-
borderRadius: dim.borderRadius.sysRadiusXl,
|
|
260
|
-
padding: dim.spacing.padding.sysPadding32,
|
|
261
|
-
flexDirection: 'column' as const,
|
|
262
|
-
gap: dim.spacing.padding.sysPadding24,
|
|
263
|
-
}
|
|
264
|
-
: {
|
|
265
|
-
height: MD_HEIGHT,
|
|
266
|
-
borderRadius: dim.borderRadius.sysRadiusLg,
|
|
267
|
-
paddingHorizontal: dim.spacing.padding.sysPadding16,
|
|
268
|
-
paddingVertical: dim.spacing.padding.sysPadding16,
|
|
269
|
-
justifyContent: 'space-between' as const,
|
|
270
|
-
},
|
|
271
|
-
{ backgroundColor: t.cardBg, opacity: disabled ? 0.48 : 1 },
|
|
272
|
-
style,
|
|
273
|
-
];
|
|
274
|
-
|
|
275
|
-
const inner = (
|
|
276
|
-
<>
|
|
277
|
-
{isImage && image && (
|
|
278
|
-
<>
|
|
279
|
-
<Image
|
|
280
|
-
source={image}
|
|
281
|
-
style={[
|
|
282
|
-
StyleSheet.absoluteFillObject,
|
|
283
|
-
{
|
|
284
|
-
borderRadius: isLg
|
|
285
|
-
? dim.borderRadius.sysRadiusXl
|
|
286
|
-
: dim.borderRadius.sysRadiusLg,
|
|
287
|
-
},
|
|
288
|
-
]}
|
|
289
|
-
resizeMode="cover"
|
|
290
|
-
accessible={false}
|
|
291
|
-
/>
|
|
292
|
-
<View
|
|
293
|
-
style={[
|
|
294
|
-
StyleSheet.absoluteFillObject,
|
|
295
|
-
{
|
|
296
|
-
borderRadius: isLg
|
|
297
|
-
? dim.borderRadius.sysRadiusXl
|
|
298
|
-
: dim.borderRadius.sysRadiusLg,
|
|
299
|
-
backgroundColor: 'rgba(0,0,0,0.35)',
|
|
300
|
-
},
|
|
301
|
-
]}
|
|
302
|
-
pointerEvents="none"
|
|
303
|
-
/>
|
|
304
|
-
</>
|
|
305
|
-
)}
|
|
306
|
-
|
|
307
|
-
{/* Chip */}
|
|
308
|
-
{chipLabel && (
|
|
309
|
-
<View
|
|
310
|
-
style={[
|
|
311
|
-
isLg
|
|
312
|
-
? {
|
|
313
|
-
flexDirection: 'row' as const,
|
|
314
|
-
alignItems: 'center' as const,
|
|
315
|
-
alignSelf: 'flex-start' as const,
|
|
316
|
-
borderRadius: dim.borderRadius.sysRadiusFull,
|
|
317
|
-
paddingHorizontal: dim.spacing.padding.sysPadding16,
|
|
318
|
-
paddingVertical: dim.spacing.padding.sysPadding4,
|
|
319
|
-
gap: dim.spacing.padding.sysPadding8,
|
|
320
|
-
height: 32,
|
|
321
|
-
}
|
|
322
|
-
: {
|
|
323
|
-
flexDirection: 'row' as const,
|
|
324
|
-
alignItems: 'center' as const,
|
|
325
|
-
alignSelf: 'flex-start' as const,
|
|
326
|
-
borderRadius: dim.borderRadius.sysRadiusFull,
|
|
327
|
-
paddingHorizontal: dim.spacing.padding.sysPadding12,
|
|
328
|
-
paddingVertical: dim.spacing.padding.sysPadding4,
|
|
329
|
-
gap: dim.spacing.padding.sysPadding4,
|
|
330
|
-
height: 24,
|
|
331
|
-
},
|
|
332
|
-
{ backgroundColor: t.chipBg },
|
|
333
|
-
]}
|
|
334
|
-
>
|
|
335
|
-
{chipIcon && (
|
|
336
|
-
<View
|
|
337
|
-
style={
|
|
338
|
-
isLg
|
|
339
|
-
? {
|
|
340
|
-
width: 20,
|
|
341
|
-
height: 20,
|
|
342
|
-
alignItems: 'center',
|
|
343
|
-
justifyContent: 'center',
|
|
344
|
-
}
|
|
345
|
-
: {
|
|
346
|
-
width: 16,
|
|
347
|
-
height: 16,
|
|
348
|
-
alignItems: 'center',
|
|
349
|
-
justifyContent: 'center',
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
>
|
|
353
|
-
{chipIcon}
|
|
354
|
-
</View>
|
|
355
|
-
)}
|
|
356
|
-
<BodyText variant="labelMedium" color={t.chipTextColor}>
|
|
357
|
-
{chipLabel}
|
|
358
|
-
</BodyText>
|
|
359
|
-
</View>
|
|
360
|
-
)}
|
|
361
|
-
|
|
362
|
-
{/* Content (title + description) */}
|
|
363
|
-
<View
|
|
364
|
-
style={
|
|
365
|
-
isLg
|
|
366
|
-
? { gap: dim.spacing.padding.sysPadding8, flex: 1 }
|
|
367
|
-
: { gap: dim.spacing.padding.sysPadding4, maxWidth: '78%' }
|
|
368
|
-
}
|
|
369
|
-
>
|
|
370
|
-
{title &&
|
|
371
|
-
(isLg ? (
|
|
372
|
-
<HeaderText variant="titleLarge" color={t.titleColor}>
|
|
373
|
-
{title}
|
|
374
|
-
</HeaderText>
|
|
375
|
-
) : (
|
|
376
|
-
<HeaderText variant="titleSmall" color={t.titleColor}>
|
|
377
|
-
{title}
|
|
378
|
-
</HeaderText>
|
|
379
|
-
))}
|
|
380
|
-
{description && (
|
|
381
|
-
<View style={{ opacity: t.descOpacity }}>
|
|
382
|
-
<BodyText variant={isLg ? 'medium' : 'small'} color={t.descColor}>
|
|
383
|
-
{description}
|
|
384
|
-
</BodyText>
|
|
385
|
-
</View>
|
|
386
|
-
)}
|
|
387
|
-
</View>
|
|
388
|
-
|
|
389
|
-
{/* Arrow button (absolute, bottom-right) */}
|
|
390
|
-
<View
|
|
391
|
-
style={[
|
|
392
|
-
styles.buttonWrap,
|
|
393
|
-
{
|
|
394
|
-
bottom: isLg
|
|
395
|
-
? dim.spacing.padding.sysPadding32
|
|
396
|
-
: dim.spacing.padding.sysPadding16,
|
|
397
|
-
right: isLg
|
|
398
|
-
? dim.spacing.padding.sysPadding32
|
|
399
|
-
: dim.spacing.padding.sysPadding16,
|
|
400
|
-
width: buttonSize,
|
|
401
|
-
height: buttonSize,
|
|
402
|
-
},
|
|
403
|
-
]}
|
|
404
|
-
>
|
|
405
|
-
<View
|
|
406
|
-
style={[
|
|
407
|
-
styles.button,
|
|
408
|
-
{
|
|
409
|
-
width: buttonSize,
|
|
410
|
-
height: buttonSize,
|
|
411
|
-
borderRadius: dim.borderRadius.sysRadiusFull,
|
|
412
|
-
backgroundColor: t.buttonBg,
|
|
413
|
-
},
|
|
414
|
-
]}
|
|
415
|
-
>
|
|
416
|
-
<Ionicons
|
|
417
|
-
name="arrow-forward"
|
|
418
|
-
size={isLg ? 24 : 16}
|
|
419
|
-
color={t.buttonIconColor}
|
|
420
|
-
accessible={false}
|
|
421
|
-
/>
|
|
422
|
-
</View>
|
|
423
|
-
{showRingTimer && (
|
|
424
|
-
<Svg
|
|
425
|
-
width={buttonSize}
|
|
426
|
-
height={buttonSize}
|
|
427
|
-
style={StyleSheet.absoluteFillObject}
|
|
428
|
-
>
|
|
429
|
-
<SvgCircle
|
|
430
|
-
cx={buttonSize / 2}
|
|
431
|
-
cy={buttonSize / 2}
|
|
432
|
-
r={ringR}
|
|
433
|
-
stroke={t.progressColor}
|
|
434
|
-
strokeWidth={2}
|
|
435
|
-
fill="transparent"
|
|
436
|
-
strokeDasharray={`${ringArcLength} ${ringC - ringArcLength}`}
|
|
437
|
-
strokeLinecap="round"
|
|
438
|
-
rotation={-90}
|
|
439
|
-
origin={`${buttonSize / 2}, ${buttonSize / 2}`}
|
|
440
|
-
/>
|
|
441
|
-
</Svg>
|
|
442
|
-
)}
|
|
443
|
-
</View>
|
|
444
|
-
|
|
445
|
-
{/* Pagination dots (lg only) */}
|
|
446
|
-
{isLg && (
|
|
447
|
-
<View style={styles.dotsRow}>
|
|
448
|
-
{Array.from({ length: LG_DOT_COUNT }).map((_, i) => (
|
|
449
|
-
<View
|
|
450
|
-
key={i}
|
|
451
|
-
style={[
|
|
452
|
-
styles.dot,
|
|
453
|
-
{
|
|
454
|
-
backgroundColor: i === 0 ? t.progressColor : 'transparent',
|
|
455
|
-
borderColor: t.progressColor,
|
|
456
|
-
borderWidth: i === 0 ? 0 : 1.5,
|
|
457
|
-
opacity: i === 0 ? 1 : 0.4,
|
|
458
|
-
},
|
|
459
|
-
]}
|
|
460
|
-
/>
|
|
461
|
-
))}
|
|
462
|
-
</View>
|
|
463
|
-
)}
|
|
464
|
-
|
|
465
|
-
{/* Progress bar */}
|
|
466
|
-
{showProgressBar && (
|
|
467
|
-
<View
|
|
468
|
-
style={[styles.progressTrack, { height: isLg ? 4 : 2 }]}
|
|
469
|
-
pointerEvents="none"
|
|
470
|
-
>
|
|
471
|
-
<View
|
|
472
|
-
style={[
|
|
473
|
-
styles.progressFill,
|
|
474
|
-
{
|
|
475
|
-
width: `${p * 100}%` as any,
|
|
476
|
-
height: isLg ? 4 : 2,
|
|
477
|
-
backgroundColor: t.progressColor,
|
|
478
|
-
},
|
|
479
|
-
]}
|
|
480
|
-
/>
|
|
481
|
-
</View>
|
|
482
|
-
)}
|
|
483
|
-
</>
|
|
484
|
-
);
|
|
485
|
-
|
|
486
|
-
if (onPress) {
|
|
487
|
-
return (
|
|
488
|
-
<Pressable
|
|
489
|
-
onPress={disabled ? undefined : onPress}
|
|
490
|
-
accessibilityRole="button"
|
|
491
|
-
accessibilityLabel={accessibilityLabel ?? title}
|
|
492
|
-
accessibilityState={{ disabled }}
|
|
493
|
-
style={({ pressed }: { pressed: boolean }) => [
|
|
494
|
-
...containerStyle,
|
|
495
|
-
pressed && !disabled && styles.pressed,
|
|
496
|
-
]}
|
|
497
|
-
>
|
|
498
|
-
{inner}
|
|
499
|
-
</Pressable>
|
|
500
|
-
);
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
return <View style={containerStyle}>{inner}</View>;
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
const styles = StyleSheet.create({
|
|
507
|
-
card: {
|
|
508
|
-
overflow: 'hidden',
|
|
509
|
-
alignSelf: 'stretch',
|
|
510
|
-
},
|
|
511
|
-
buttonWrap: {
|
|
512
|
-
position: 'absolute',
|
|
513
|
-
},
|
|
514
|
-
button: {
|
|
515
|
-
alignItems: 'center',
|
|
516
|
-
justifyContent: 'center',
|
|
517
|
-
overflow: 'hidden',
|
|
518
|
-
},
|
|
519
|
-
dotsRow: {
|
|
520
|
-
position: 'absolute',
|
|
521
|
-
bottom: LG_DOTS_BOTTOM,
|
|
522
|
-
left: LG_DOTS_LEFT,
|
|
523
|
-
flexDirection: 'row',
|
|
524
|
-
alignItems: 'center',
|
|
525
|
-
gap: LG_DOT_GAP,
|
|
526
|
-
},
|
|
527
|
-
dot: {
|
|
528
|
-
width: LG_DOT_SIZE,
|
|
529
|
-
height: LG_DOT_SIZE,
|
|
530
|
-
borderRadius: LG_DOT_SIZE / 2,
|
|
531
|
-
},
|
|
532
|
-
progressTrack: {
|
|
533
|
-
position: 'absolute',
|
|
534
|
-
bottom: 0,
|
|
535
|
-
left: 0,
|
|
536
|
-
right: 0,
|
|
537
|
-
backgroundColor: 'rgba(0,0,0,0.08)',
|
|
538
|
-
},
|
|
539
|
-
progressFill: {},
|
|
540
|
-
pressed: {
|
|
541
|
-
opacity: 0.84,
|
|
542
|
-
},
|
|
543
|
-
});
|
package/src/icons/AtomIcon.tsx
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import Svg, { Path } from 'react-native-svg';
|
|
2
|
-
|
|
3
|
-
import { COMMON, DEFAULT_ICON_COLOR, type IconProps, SIZE_MAP } from './types';
|
|
4
|
-
|
|
5
|
-
export function AtomIcon({
|
|
6
|
-
size = 'medium',
|
|
7
|
-
color = DEFAULT_ICON_COLOR,
|
|
8
|
-
}: IconProps) {
|
|
9
|
-
const { size: px, strokeWidth } = SIZE_MAP[size];
|
|
10
|
-
return (
|
|
11
|
-
<Svg width={px} height={px} viewBox="0 0 48 48" fill="none">
|
|
12
|
-
<Path
|
|
13
|
-
d="M24 26C25.1046 26 26 25.1046 26 24C26 22.8954 25.1046 22 24 22C22.8954 22 22 22.8954 22 24C22 25.1046 22.8954 26 24 26Z"
|
|
14
|
-
stroke={color}
|
|
15
|
-
strokeWidth={strokeWidth}
|
|
16
|
-
{...COMMON}
|
|
17
|
-
/>
|
|
18
|
-
<Path
|
|
19
|
-
d="M40.4 40.4C44.48 36.34 40.44 25.68 31.4 16.6C22.32 7.56002 11.66 3.52002 7.60002 7.60002C3.52002 11.66 7.56002 22.32 16.6 31.4C25.68 40.44 36.34 44.48 40.4 40.4Z"
|
|
20
|
-
stroke={color}
|
|
21
|
-
strokeWidth={strokeWidth}
|
|
22
|
-
{...COMMON}
|
|
23
|
-
/>
|
|
24
|
-
<Path
|
|
25
|
-
d="M31.4 31.4C40.44 22.32 44.48 11.66 40.4 7.60002C36.34 3.52002 25.68 7.56002 16.6 16.6C7.56002 25.68 3.52002 36.34 7.60002 40.4C11.66 44.48 22.32 40.44 31.4 31.4Z"
|
|
26
|
-
stroke={color}
|
|
27
|
-
strokeWidth={strokeWidth}
|
|
28
|
-
{...COMMON}
|
|
29
|
-
/>
|
|
30
|
-
</Svg>
|
|
31
|
-
);
|
|
32
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import Svg, { Path } from 'react-native-svg';
|
|
2
|
-
|
|
3
|
-
import { COMMON, DEFAULT_ICON_COLOR, type IconProps, SIZE_MAP } from './types';
|
|
4
|
-
|
|
5
|
-
export function BinocularsIcon({
|
|
6
|
-
size = 'medium',
|
|
7
|
-
color = DEFAULT_ICON_COLOR,
|
|
8
|
-
}: IconProps) {
|
|
9
|
-
const { size: px, strokeWidth } = SIZE_MAP[size];
|
|
10
|
-
return (
|
|
11
|
-
<Svg width={px} height={px} viewBox="0 0 48 48" fill="none">
|
|
12
|
-
<Path
|
|
13
|
-
d="M20 20H28"
|
|
14
|
-
stroke={color}
|
|
15
|
-
strokeWidth={strokeWidth}
|
|
16
|
-
{...COMMON}
|
|
17
|
-
/>
|
|
18
|
-
<Path
|
|
19
|
-
d="M38 14V8C38 7.46957 37.7893 6.96086 37.4142 6.58579C37.0391 6.21071 36.5304 6 36 6H32C31.4696 6 30.9609 6.21071 30.5858 6.58579C30.2107 6.96086 30 7.46957 30 8V14"
|
|
20
|
-
stroke={color}
|
|
21
|
-
strokeWidth={strokeWidth}
|
|
22
|
-
{...COMMON}
|
|
23
|
-
/>
|
|
24
|
-
<Path
|
|
25
|
-
d="M40 42C41.0609 42 42.0783 41.5786 42.8284 40.8284C43.5786 40.0783 44 39.0609 44 38V30.298C44 27.518 40 24.374 40 20.64V16C40 15.4696 39.7893 14.9609 39.4142 14.5858C39.0391 14.2107 38.5304 14 38 14H30C29.4696 14 28.9609 14.2107 28.5858 14.5858C28.2107 14.9609 28 15.4696 28 16V38C28 39.0609 28.4214 40.0783 29.1716 40.8284C29.9217 41.5786 30.9391 42 32 42H40Z"
|
|
26
|
-
stroke={color}
|
|
27
|
-
strokeWidth={strokeWidth}
|
|
28
|
-
{...COMMON}
|
|
29
|
-
/>
|
|
30
|
-
<Path d="M44 32H4" stroke={color} strokeWidth={strokeWidth} {...COMMON} />
|
|
31
|
-
<Path
|
|
32
|
-
d="M8 42C6.93913 42 5.92172 41.5786 5.17157 40.8284C4.42143 40.0783 4 39.0609 4 38V30.298C4 27.518 8 24.374 8 20.64V16C8 15.4696 8.21071 14.9609 8.58579 14.5858C8.96086 14.2107 9.46957 14 10 14H18C18.5304 14 19.0391 14.2107 19.4142 14.5858C19.7893 14.9609 20 15.4696 20 16V38C20 39.0609 19.5786 40.0783 18.8284 40.8284C18.0783 41.5786 17.0609 42 16 42H8Z"
|
|
33
|
-
stroke={color}
|
|
34
|
-
strokeWidth={strokeWidth}
|
|
35
|
-
{...COMMON}
|
|
36
|
-
/>
|
|
37
|
-
<Path
|
|
38
|
-
d="M18 14V8C18 7.46957 17.7893 6.96086 17.4142 6.58579C17.0391 6.21071 16.5304 6 16 6H12C11.4696 6 10.9609 6.21071 10.5858 6.58579C10.2107 6.96086 10 7.46957 10 8V14"
|
|
39
|
-
stroke={color}
|
|
40
|
-
strokeWidth={strokeWidth}
|
|
41
|
-
{...COMMON}
|
|
42
|
-
/>
|
|
43
|
-
</Svg>
|
|
44
|
-
);
|
|
45
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import Svg, { Path } from 'react-native-svg';
|
|
2
|
-
|
|
3
|
-
import { COMMON, DEFAULT_ICON_COLOR, type IconProps, SIZE_MAP } from './types';
|
|
4
|
-
|
|
5
|
-
export function FileChartColumnIncreasingIcon({
|
|
6
|
-
size = 'medium',
|
|
7
|
-
color = DEFAULT_ICON_COLOR,
|
|
8
|
-
}: IconProps) {
|
|
9
|
-
const { size: px, strokeWidth } = SIZE_MAP[size];
|
|
10
|
-
return (
|
|
11
|
-
<Svg width={px} height={px} viewBox="0 0 48 48" fill="none">
|
|
12
|
-
<Path
|
|
13
|
-
d="M12 44C10.9391 44 9.92172 43.5786 9.17157 42.8284C8.42143 42.0783 8 41.0609 8 40V8.00001C8 6.93914 8.42143 5.92172 9.17157 5.17158C9.92172 4.42143 10.9391 4.00001 12 4.00001H28C28.6331 3.99898 29.2602 4.12321 29.8451 4.36554C30.43 4.60788 30.9611 4.96353 31.408 5.41201L38.584 12.588C39.0337 13.035 39.3903 13.5667 39.6334 14.1523C39.8764 14.738 40.001 15.3659 40 16V40C40 41.0609 39.5786 42.0783 38.8284 42.8284C38.0783 43.5786 37.0609 44 36 44H12Z"
|
|
14
|
-
stroke={color}
|
|
15
|
-
strokeWidth={strokeWidth}
|
|
16
|
-
{...COMMON}
|
|
17
|
-
/>
|
|
18
|
-
<Path
|
|
19
|
-
d="M28 4V14C28 14.5304 28.2107 15.0391 28.5858 15.4142C28.9609 15.7893 29.4696 16 30 16H40"
|
|
20
|
-
stroke={color}
|
|
21
|
-
strokeWidth={strokeWidth}
|
|
22
|
-
{...COMMON}
|
|
23
|
-
/>
|
|
24
|
-
<Path
|
|
25
|
-
d="M16 36V32"
|
|
26
|
-
stroke={color}
|
|
27
|
-
strokeWidth={strokeWidth}
|
|
28
|
-
{...COMMON}
|
|
29
|
-
/>
|
|
30
|
-
<Path
|
|
31
|
-
d="M24 36V28"
|
|
32
|
-
stroke={color}
|
|
33
|
-
strokeWidth={strokeWidth}
|
|
34
|
-
{...COMMON}
|
|
35
|
-
/>
|
|
36
|
-
<Path
|
|
37
|
-
d="M32 36V24"
|
|
38
|
-
stroke={color}
|
|
39
|
-
strokeWidth={strokeWidth}
|
|
40
|
-
{...COMMON}
|
|
41
|
-
/>
|
|
42
|
-
</Svg>
|
|
43
|
-
);
|
|
44
|
-
}
|
package/src/icons/FlagIcon.tsx
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import Svg, { Path } from 'react-native-svg';
|
|
2
|
-
|
|
3
|
-
import { COMMON, DEFAULT_ICON_COLOR, type IconProps, SIZE_MAP } from './types';
|
|
4
|
-
|
|
5
|
-
export function FlagIcon({
|
|
6
|
-
size = 'medium',
|
|
7
|
-
color = DEFAULT_ICON_COLOR,
|
|
8
|
-
}: IconProps) {
|
|
9
|
-
const { size: px, strokeWidth } = SIZE_MAP[size];
|
|
10
|
-
return (
|
|
11
|
-
<Svg width={px} height={px} viewBox="0 0 48 48" fill="none">
|
|
12
|
-
<Path
|
|
13
|
-
d="M8 44V8C8 7.68951 8.07229 7.38328 8.21115 7.10557C8.35 6.82786 8.55161 6.58629 8.8 6.4C10.8772 4.84213 13.4036 4 16 4C22 4 26 8 30.666 8C33.3327 8 35.3773 7.46667 36.8 6.4C37.0971 6.17715 37.4505 6.04144 37.8204 6.00808C38.1903 5.97473 38.5622 6.04504 38.8944 6.21115C39.2266 6.37725 39.506 6.63259 39.7013 6.94854C39.8966 7.26449 40 7.62858 40 8V28C40 28.3105 39.9277 28.6167 39.7889 28.8944C39.65 29.1721 39.4484 29.4137 39.2 29.6C37.1228 31.1579 34.5964 32 32 32C26 32 22 28 16 28C13.0482 28.0001 10.2 29.0881 8 31.056"
|
|
14
|
-
stroke={color}
|
|
15
|
-
strokeWidth={strokeWidth}
|
|
16
|
-
{...COMMON}
|
|
17
|
-
/>
|
|
18
|
-
</Svg>
|
|
19
|
-
);
|
|
20
|
-
}
|
package/src/icons/GlobeIcon.tsx
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import Svg, { Path } from 'react-native-svg';
|
|
2
|
-
|
|
3
|
-
import { COMMON, DEFAULT_ICON_COLOR, type IconProps, SIZE_MAP } from './types';
|
|
4
|
-
|
|
5
|
-
export function GlobeIcon({
|
|
6
|
-
size = 'medium',
|
|
7
|
-
color = DEFAULT_ICON_COLOR,
|
|
8
|
-
}: IconProps) {
|
|
9
|
-
const { size: px, strokeWidth } = SIZE_MAP[size];
|
|
10
|
-
return (
|
|
11
|
-
<Svg width={px} height={px} viewBox="0 0 48 48" fill="none">
|
|
12
|
-
<Path
|
|
13
|
-
d="M44 24C44 35.0457 35.0457 44 24 44M44 24C44 12.9543 35.0457 4 24 4M44 24H4M24 44C12.9543 44 4 35.0457 4 24M24 44C18.8645 38.6077 16 31.4465 16 24C16 16.5535 18.8645 9.39231 24 4M24 44C29.1355 38.6077 32 31.4465 32 24C32 16.5535 29.1355 9.39231 24 4M4 24C4 12.9543 12.9543 4 24 4"
|
|
14
|
-
stroke={color}
|
|
15
|
-
strokeWidth={strokeWidth}
|
|
16
|
-
{...COMMON}
|
|
17
|
-
/>
|
|
18
|
-
</Svg>
|
|
19
|
-
);
|
|
20
|
-
}
|