@compsych/mobile-ui 1.0.23 → 1.0.25
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
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
+
I18nManager,
|
|
4
5
|
Image,
|
|
5
6
|
type ImageSourcePropType,
|
|
6
7
|
Pressable,
|
|
@@ -368,7 +369,9 @@ export function ServiceCard({
|
|
|
368
369
|
style={{
|
|
369
370
|
position: 'absolute',
|
|
370
371
|
bottom: s.paddingV,
|
|
371
|
-
|
|
372
|
+
...(I18nManager.isRTL
|
|
373
|
+
? { left: s.paddingH }
|
|
374
|
+
: { right: s.paddingH }),
|
|
372
375
|
}}
|
|
373
376
|
pointerEvents="none"
|
|
374
377
|
>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { G, Path, Svg } from 'react-native-svg';
|
|
3
|
+
|
|
4
|
+
interface UserCallProps {
|
|
5
|
+
size?: number;
|
|
6
|
+
color?: string;
|
|
7
|
+
strokeWidth?: number;
|
|
8
|
+
style?: object;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function UserCall({
|
|
12
|
+
size = 24,
|
|
13
|
+
color = '#1a1a1a',
|
|
14
|
+
strokeWidth = 1.5,
|
|
15
|
+
style,
|
|
16
|
+
}: UserCallProps) {
|
|
17
|
+
return (
|
|
18
|
+
<Svg
|
|
19
|
+
width={size}
|
|
20
|
+
height={size}
|
|
21
|
+
viewBox="0 0 24 24"
|
|
22
|
+
fill="none"
|
|
23
|
+
style={style}
|
|
24
|
+
>
|
|
25
|
+
<G transform="translate(3, 2)">
|
|
26
|
+
<Path
|
|
27
|
+
d="M 8 8 C 10.2091 8 12 6.20914 12 4 C 12 1.79086 10.2091 0 8 0 C 5.79086 0 4 1.79086 4 4 C 4 6.20914 5.79086 8 8 8 Z"
|
|
28
|
+
stroke={color}
|
|
29
|
+
strokeWidth={strokeWidth}
|
|
30
|
+
strokeLinecap="round"
|
|
31
|
+
strokeLinejoin="round"
|
|
32
|
+
fill="none"
|
|
33
|
+
/>
|
|
34
|
+
<Path
|
|
35
|
+
d="M 15.2892 17.7358 L 16.4228 16.3183 L 19.5 17.6848 L 18.9014 19.9919 C 18.8136 20.329 18.4871 20.5469 18.1421 20.4994 C 13.6595 19.8701 10.1362 16.3469 9.5066 11.8641 C 9.4587 11.5191 9.6769 11.1927 10.0141 11.1044 L 12.322 10.5059 L 13.6888 13.5834 L 12.2709 14.7176"
|
|
36
|
+
stroke={color}
|
|
37
|
+
strokeWidth={strokeWidth}
|
|
38
|
+
strokeLinecap="round"
|
|
39
|
+
strokeLinejoin="round"
|
|
40
|
+
fill="none"
|
|
41
|
+
/>
|
|
42
|
+
<Path
|
|
43
|
+
d="M 5.5 11.3984 C 2.3062 12.4483 0 15.455 0 19 C 3 19.7498 6 20.0779 9 19.9841"
|
|
44
|
+
stroke={color}
|
|
45
|
+
strokeWidth={strokeWidth}
|
|
46
|
+
strokeLinecap="round"
|
|
47
|
+
strokeLinejoin="round"
|
|
48
|
+
fill="none"
|
|
49
|
+
/>
|
|
50
|
+
</G>
|
|
51
|
+
</Svg>
|
|
52
|
+
);
|
|
53
|
+
}
|
package/src/icons/index.ts
CHANGED
|
@@ -1,16 +1,27 @@
|
|
|
1
1
|
import type { LucideIcon } from 'lucide-react-native';
|
|
2
2
|
|
|
3
|
+
import { UserCall } from './UserCall';
|
|
4
|
+
|
|
3
5
|
export type { IconProps, IconSize, IconName } from './types';
|
|
4
6
|
export { DEFAULT_ICON_COLOR, SIZE_MAP } from './types';
|
|
7
|
+
export { UserCall } from './UserCall';
|
|
8
|
+
|
|
9
|
+
const CUSTOM_ICONS: Record<string, unknown> = {
|
|
10
|
+
UserCall,
|
|
11
|
+
};
|
|
5
12
|
|
|
6
13
|
/**
|
|
7
|
-
* Resolves an icon name to a Lucide React Native component.
|
|
14
|
+
* Resolves an icon name to a Lucide React Native component or a custom icon.
|
|
8
15
|
* Accepts both "StethoscopeIcon" (trailing Icon suffix) and "Stethoscope".
|
|
9
|
-
* Returns undefined if the icon name is not found
|
|
16
|
+
* Returns undefined if the icon name is not found.
|
|
10
17
|
*/
|
|
11
18
|
export function resolveIcon(name: string): LucideIcon | undefined {
|
|
12
19
|
const componentName = name.endsWith('Icon') ? name.slice(0, -4) : name;
|
|
13
20
|
|
|
21
|
+
if (CUSTOM_ICONS[componentName]) {
|
|
22
|
+
return CUSTOM_ICONS[componentName] as LucideIcon;
|
|
23
|
+
}
|
|
24
|
+
|
|
14
25
|
const icons = require('lucide-react-native') as Record<string, unknown>;
|
|
15
26
|
return icons[componentName] as LucideIcon | undefined;
|
|
16
27
|
}
|
package/src/index.ts
CHANGED
|
@@ -153,5 +153,5 @@ export { ThemeProvider, useTheme, defaultTheme } from './theme';
|
|
|
153
153
|
export type { ThemeProviderProps, Theme, ThemeOverride } from './theme';
|
|
154
154
|
|
|
155
155
|
// Icons — resolved from lucide-react-native at runtime
|
|
156
|
-
export { resolveIcon, SIZE_MAP, DEFAULT_ICON_COLOR } from './icons';
|
|
156
|
+
export { resolveIcon, SIZE_MAP, DEFAULT_ICON_COLOR, UserCall } from './icons';
|
|
157
157
|
export type { IconProps, IconSize, IconName } from './icons';
|