@idealyst/components 1.0.24 → 1.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +567 -567
- package/package.json +2 -2
- package/plugin/web.js +319 -185
- package/src/Avatar/Avatar.native.tsx +43 -43
- package/src/Avatar/Avatar.styles.tsx +66 -66
- package/src/Avatar/Avatar.web.tsx +50 -50
- package/src/Avatar/index.native.ts +1 -1
- package/src/Avatar/index.ts +1 -1
- package/src/Avatar/index.web.ts +1 -1
- package/src/Avatar/types.ts +42 -42
- package/src/Badge/Badge.native.tsx +42 -42
- package/src/Badge/Badge.styles.tsx +153 -153
- package/src/Badge/Badge.web.tsx +44 -44
- package/src/Badge/index.native.ts +1 -1
- package/src/Badge/index.ts +1 -1
- package/src/Badge/index.web.ts +1 -1
- package/src/Badge/types.ts +33 -33
- package/src/Button/Button.native.tsx +38 -38
- package/src/Button/Button.styles.tsx +214 -214
- package/src/Button/Button.types.ts +11 -11
- package/src/Button/Button.web.tsx +55 -55
- package/src/Button/index.native.ts +2 -2
- package/src/Button/index.ts +4 -4
- package/src/Button/index.web.ts +2 -2
- package/src/Button/types.ts +48 -48
- package/src/Card/Card.native.tsx +51 -51
- package/src/Card/Card.styles.tsx +239 -239
- package/src/Card/Card.web.tsx +61 -61
- package/src/Card/index.native.ts +2 -2
- package/src/Card/index.ts +4 -4
- package/src/Card/index.web.ts +2 -2
- package/src/Card/types.ts +58 -58
- package/src/Checkbox/Checkbox.native.tsx +98 -98
- package/src/Checkbox/Checkbox.styles.tsx +291 -291
- package/src/Checkbox/Checkbox.web.tsx +130 -130
- package/src/Checkbox/index.native.ts +2 -2
- package/src/Checkbox/index.ts +4 -4
- package/src/Checkbox/index.web.ts +2 -2
- package/src/Checkbox/types.ts +78 -78
- package/src/Divider/Divider.native.tsx +144 -144
- package/src/Divider/Divider.styles.tsx +601 -601
- package/src/Divider/Divider.web.tsx +72 -72
- package/src/Divider/index.native.ts +2 -2
- package/src/Divider/index.ts +4 -4
- package/src/Divider/index.web.ts +2 -2
- package/src/Divider/types.ts +53 -53
- package/src/Icon/Icon.native.tsx +38 -38
- package/src/Icon/Icon.styles.tsx +49 -49
- package/src/Icon/Icon.web.tsx +46 -46
- package/src/Icon/icon-types.ts +7452 -7452
- package/src/Icon/index.native.ts +2 -2
- package/src/Icon/index.ts +4 -4
- package/src/Icon/index.web.ts +2 -2
- package/src/Icon/types.ts +35 -35
- package/src/Input/Input.native.tsx +74 -74
- package/src/Input/Input.styles.tsx +176 -176
- package/src/Input/Input.web.tsx +70 -70
- package/src/Input/index.native.ts +2 -2
- package/src/Input/index.ts +4 -4
- package/src/Input/index.web.ts +2 -2
- package/src/Input/types.ts +68 -68
- package/src/Screen/Screen.native.tsx +40 -40
- package/src/Screen/Screen.styles.tsx +59 -59
- package/src/Screen/Screen.web.tsx +32 -32
- package/src/Screen/index.native.ts +1 -1
- package/src/Screen/index.ts +1 -1
- package/src/Screen/index.web.ts +1 -1
- package/src/Screen/types.ts +37 -37
- package/src/Text/Text.native.tsx +35 -35
- package/src/Text/Text.styles.tsx +66 -66
- package/src/Text/Text.web.tsx +40 -40
- package/src/Text/index.native.ts +2 -2
- package/src/Text/index.ts +4 -4
- package/src/Text/index.web.ts +2 -2
- package/src/Text/types.ts +38 -38
- package/src/View/View.native.tsx +55 -55
- package/src/View/View.styles.tsx +102 -102
- package/src/View/View.web.tsx +59 -59
- package/src/View/index.native.ts +2 -2
- package/src/View/index.ts +4 -4
- package/src/View/index.web.ts +2 -2
- package/src/View/types.ts +72 -72
- package/src/examples/AllExamples.tsx +71 -71
- package/src/examples/AvatarExamples.tsx +96 -96
- package/src/examples/BadgeExamples.tsx +199 -199
- package/src/examples/ButtonExamples.tsx +149 -149
- package/src/examples/CardExamples.tsx +175 -175
- package/src/examples/CheckboxExamples.tsx +216 -216
- package/src/examples/DividerExamples.tsx +217 -217
- package/src/examples/IconExamples.tsx +341 -341
- package/src/examples/InputExamples.tsx +133 -133
- package/src/examples/README.md +135 -135
- package/src/examples/ScreenExamples.tsx +153 -153
- package/src/examples/TextExamples.tsx +88 -88
- package/src/examples/ThemeExtensionExamples.tsx +90 -90
- package/src/examples/ValidationExamples.tsx +94 -94
- package/src/examples/ViewExamples.tsx +128 -128
- package/src/examples/extendedTheme.ts +328 -328
- package/src/examples/index.ts +14 -14
- package/src/index.native.ts +48 -48
- package/src/index.ts +47 -47
- package/src/theme/breakpoints.ts +8 -8
- package/src/theme/colorResolver.ts +217 -217
- package/src/theme/colors.ts +314 -314
- package/src/theme/defaultThemes.ts +325 -325
- package/src/theme/index.ts +187 -187
- package/src/theme/themeBuilder.ts +601 -601
- package/src/theme/unistyles.d.ts +5 -5
- package/src/theme/variantHelpers.ts +583 -583
- package/src/theme/variants.ts +55 -55
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Screen, View, Text, Avatar } from '../index';
|
|
3
|
-
|
|
4
|
-
export const AvatarExamples = () => {
|
|
5
|
-
return (
|
|
6
|
-
<Screen background="primary" padding="lg">
|
|
7
|
-
<View spacing="none">
|
|
8
|
-
<Text size="large" weight="bold" align="center">
|
|
9
|
-
Avatar Examples
|
|
10
|
-
</Text>
|
|
11
|
-
|
|
12
|
-
{/* Avatar Sizes */}
|
|
13
|
-
<View spacing="md">
|
|
14
|
-
<Text size="medium" weight="semibold">Sizes</Text>
|
|
15
|
-
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
|
|
16
|
-
<Avatar size="small" fallback="S" />
|
|
17
|
-
<Avatar size="medium" fallback="M" />
|
|
18
|
-
<Avatar size="large" fallback="L" />
|
|
19
|
-
<Avatar size="xlarge" fallback="XL" />
|
|
20
|
-
</View>
|
|
21
|
-
</View>
|
|
22
|
-
|
|
23
|
-
{/* Avatar Shapes */}
|
|
24
|
-
<View spacing="md">
|
|
25
|
-
<Text size="medium" weight="semibold">Shapes</Text>
|
|
26
|
-
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
|
|
27
|
-
<Avatar shape="circle" fallback="C" size="large" />
|
|
28
|
-
<Avatar shape="square" fallback="S" size="large" />
|
|
29
|
-
</View>
|
|
30
|
-
</View>
|
|
31
|
-
|
|
32
|
-
{/* Avatar with Fallbacks */}
|
|
33
|
-
<View spacing="md">
|
|
34
|
-
<Text size="medium" weight="semibold">Fallback Text</Text>
|
|
35
|
-
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
|
|
36
|
-
<Avatar fallback="JD" alt="John Doe" />
|
|
37
|
-
<Avatar fallback="AB" alt="Alice Brown" />
|
|
38
|
-
<Avatar fallback="MJ" alt="Michael Johnson" />
|
|
39
|
-
<Avatar fallback="LW" alt="Lisa Wilson" />
|
|
40
|
-
</View>
|
|
41
|
-
</View>
|
|
42
|
-
|
|
43
|
-
{/* Avatar with Images */}
|
|
44
|
-
<View spacing="md">
|
|
45
|
-
<Text size="medium" weight="semibold">With Images</Text>
|
|
46
|
-
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
|
|
47
|
-
<Avatar
|
|
48
|
-
src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?w=150&h=150&fit=crop&crop=face"
|
|
49
|
-
alt="Profile 1"
|
|
50
|
-
fallback="P1"
|
|
51
|
-
/>
|
|
52
|
-
<Avatar
|
|
53
|
-
src="https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=150&h=150&fit=crop&crop=face"
|
|
54
|
-
alt="Profile 2"
|
|
55
|
-
fallback="P2"
|
|
56
|
-
/>
|
|
57
|
-
<Avatar
|
|
58
|
-
src="https://images.unsplash.com/photo-1494790108755-2616b9b5a24f?w=150&h=150&fit=crop&crop=face"
|
|
59
|
-
alt="Profile 3"
|
|
60
|
-
fallback="P3"
|
|
61
|
-
/>
|
|
62
|
-
</View>
|
|
63
|
-
</View>
|
|
64
|
-
|
|
65
|
-
{/* Avatar Group */}
|
|
66
|
-
<View spacing="md">
|
|
67
|
-
<Text size="medium" weight="semibold">Avatar Group</Text>
|
|
68
|
-
<View style={{ flexDirection: 'row', gap: -8, alignItems: 'center' }}>
|
|
69
|
-
<Avatar fallback="JD" size="medium" />
|
|
70
|
-
<Avatar fallback="AB" size="medium" />
|
|
71
|
-
<Avatar fallback="MJ" size="medium" />
|
|
72
|
-
<Avatar fallback="+3" size="medium" />
|
|
73
|
-
</View>
|
|
74
|
-
</View>
|
|
75
|
-
|
|
76
|
-
{/* Different Size Combinations */}
|
|
77
|
-
<View spacing="md">
|
|
78
|
-
<Text size="medium" weight="semibold">Size Combinations</Text>
|
|
79
|
-
<View spacing="sm">
|
|
80
|
-
<View style={{ flexDirection: 'row', gap: 8, alignItems: 'center' }}>
|
|
81
|
-
<Avatar size="small" fallback="S" />
|
|
82
|
-
<Text size="small">Small avatar with text</Text>
|
|
83
|
-
</View>
|
|
84
|
-
<View style={{ flexDirection: 'row', gap: 8, alignItems: 'center' }}>
|
|
85
|
-
<Avatar size="medium" fallback="M" />
|
|
86
|
-
<Text size="medium">Medium avatar with text</Text>
|
|
87
|
-
</View>
|
|
88
|
-
<View style={{ flexDirection: 'row', gap: 8, alignItems: 'center' }}>
|
|
89
|
-
<Avatar size="large" fallback="L" />
|
|
90
|
-
<Text size="large">Large avatar with text</Text>
|
|
91
|
-
</View>
|
|
92
|
-
</View>
|
|
93
|
-
</View>
|
|
94
|
-
</View>
|
|
95
|
-
</Screen>
|
|
96
|
-
);
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Screen, View, Text, Avatar } from '../index';
|
|
3
|
+
|
|
4
|
+
export const AvatarExamples = () => {
|
|
5
|
+
return (
|
|
6
|
+
<Screen background="primary" padding="lg">
|
|
7
|
+
<View spacing="none">
|
|
8
|
+
<Text size="large" weight="bold" align="center">
|
|
9
|
+
Avatar Examples
|
|
10
|
+
</Text>
|
|
11
|
+
|
|
12
|
+
{/* Avatar Sizes */}
|
|
13
|
+
<View spacing="md">
|
|
14
|
+
<Text size="medium" weight="semibold">Sizes</Text>
|
|
15
|
+
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
|
|
16
|
+
<Avatar size="small" fallback="S" />
|
|
17
|
+
<Avatar size="medium" fallback="M" />
|
|
18
|
+
<Avatar size="large" fallback="L" />
|
|
19
|
+
<Avatar size="xlarge" fallback="XL" />
|
|
20
|
+
</View>
|
|
21
|
+
</View>
|
|
22
|
+
|
|
23
|
+
{/* Avatar Shapes */}
|
|
24
|
+
<View spacing="md">
|
|
25
|
+
<Text size="medium" weight="semibold">Shapes</Text>
|
|
26
|
+
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
|
|
27
|
+
<Avatar shape="circle" fallback="C" size="large" />
|
|
28
|
+
<Avatar shape="square" fallback="S" size="large" />
|
|
29
|
+
</View>
|
|
30
|
+
</View>
|
|
31
|
+
|
|
32
|
+
{/* Avatar with Fallbacks */}
|
|
33
|
+
<View spacing="md">
|
|
34
|
+
<Text size="medium" weight="semibold">Fallback Text</Text>
|
|
35
|
+
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
|
|
36
|
+
<Avatar fallback="JD" alt="John Doe" />
|
|
37
|
+
<Avatar fallback="AB" alt="Alice Brown" />
|
|
38
|
+
<Avatar fallback="MJ" alt="Michael Johnson" />
|
|
39
|
+
<Avatar fallback="LW" alt="Lisa Wilson" />
|
|
40
|
+
</View>
|
|
41
|
+
</View>
|
|
42
|
+
|
|
43
|
+
{/* Avatar with Images */}
|
|
44
|
+
<View spacing="md">
|
|
45
|
+
<Text size="medium" weight="semibold">With Images</Text>
|
|
46
|
+
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
|
|
47
|
+
<Avatar
|
|
48
|
+
src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?w=150&h=150&fit=crop&crop=face"
|
|
49
|
+
alt="Profile 1"
|
|
50
|
+
fallback="P1"
|
|
51
|
+
/>
|
|
52
|
+
<Avatar
|
|
53
|
+
src="https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=150&h=150&fit=crop&crop=face"
|
|
54
|
+
alt="Profile 2"
|
|
55
|
+
fallback="P2"
|
|
56
|
+
/>
|
|
57
|
+
<Avatar
|
|
58
|
+
src="https://images.unsplash.com/photo-1494790108755-2616b9b5a24f?w=150&h=150&fit=crop&crop=face"
|
|
59
|
+
alt="Profile 3"
|
|
60
|
+
fallback="P3"
|
|
61
|
+
/>
|
|
62
|
+
</View>
|
|
63
|
+
</View>
|
|
64
|
+
|
|
65
|
+
{/* Avatar Group */}
|
|
66
|
+
<View spacing="md">
|
|
67
|
+
<Text size="medium" weight="semibold">Avatar Group</Text>
|
|
68
|
+
<View style={{ flexDirection: 'row', gap: -8, alignItems: 'center' }}>
|
|
69
|
+
<Avatar fallback="JD" size="medium" />
|
|
70
|
+
<Avatar fallback="AB" size="medium" />
|
|
71
|
+
<Avatar fallback="MJ" size="medium" />
|
|
72
|
+
<Avatar fallback="+3" size="medium" />
|
|
73
|
+
</View>
|
|
74
|
+
</View>
|
|
75
|
+
|
|
76
|
+
{/* Different Size Combinations */}
|
|
77
|
+
<View spacing="md">
|
|
78
|
+
<Text size="medium" weight="semibold">Size Combinations</Text>
|
|
79
|
+
<View spacing="sm">
|
|
80
|
+
<View style={{ flexDirection: 'row', gap: 8, alignItems: 'center' }}>
|
|
81
|
+
<Avatar size="small" fallback="S" />
|
|
82
|
+
<Text size="small">Small avatar with text</Text>
|
|
83
|
+
</View>
|
|
84
|
+
<View style={{ flexDirection: 'row', gap: 8, alignItems: 'center' }}>
|
|
85
|
+
<Avatar size="medium" fallback="M" />
|
|
86
|
+
<Text size="medium">Medium avatar with text</Text>
|
|
87
|
+
</View>
|
|
88
|
+
<View style={{ flexDirection: 'row', gap: 8, alignItems: 'center' }}>
|
|
89
|
+
<Avatar size="large" fallback="L" />
|
|
90
|
+
<Text size="large">Large avatar with text</Text>
|
|
91
|
+
</View>
|
|
92
|
+
</View>
|
|
93
|
+
</View>
|
|
94
|
+
</View>
|
|
95
|
+
</Screen>
|
|
96
|
+
);
|
|
97
97
|
};
|
|
@@ -1,200 +1,200 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Screen, View, Text, Badge, Button } from '../index';
|
|
3
|
-
|
|
4
|
-
export const BadgeExamples = () => {
|
|
5
|
-
return (
|
|
6
|
-
<Screen background="primary" padding="lg">
|
|
7
|
-
<View spacing="none">
|
|
8
|
-
<Text size="large" weight="bold" align="center">
|
|
9
|
-
Badge Examples
|
|
10
|
-
</Text>
|
|
11
|
-
|
|
12
|
-
{/* Badge Variants */}
|
|
13
|
-
<View spacing="md">
|
|
14
|
-
<Text size="medium" weight="semibold">Variants</Text>
|
|
15
|
-
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
|
|
16
|
-
<Badge variant="filled" color="blue">
|
|
17
|
-
Filled
|
|
18
|
-
</Badge>
|
|
19
|
-
<Badge variant="outlined" color="blue">
|
|
20
|
-
Outlined
|
|
21
|
-
</Badge>
|
|
22
|
-
<Badge variant="dot" color="blue" />
|
|
23
|
-
</View>
|
|
24
|
-
</View>
|
|
25
|
-
|
|
26
|
-
{/* Badge Sizes */}
|
|
27
|
-
<View spacing="md">
|
|
28
|
-
<Text size="medium" weight="semibold">Sizes</Text>
|
|
29
|
-
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
|
|
30
|
-
<Badge size="small" color="blue">
|
|
31
|
-
Small
|
|
32
|
-
</Badge>
|
|
33
|
-
<Badge size="medium" color="blue">
|
|
34
|
-
Medium
|
|
35
|
-
</Badge>
|
|
36
|
-
<Badge size="large" color="blue">
|
|
37
|
-
Large
|
|
38
|
-
</Badge>
|
|
39
|
-
</View>
|
|
40
|
-
</View>
|
|
41
|
-
|
|
42
|
-
{/* Badge Colors */}
|
|
43
|
-
<View spacing="md">
|
|
44
|
-
<Text size="medium" weight="semibold">Colors</Text>
|
|
45
|
-
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
|
|
46
|
-
<Badge color="blue">
|
|
47
|
-
Blue
|
|
48
|
-
</Badge>
|
|
49
|
-
<Badge color="green">
|
|
50
|
-
Green
|
|
51
|
-
</Badge>
|
|
52
|
-
<Badge color="red">
|
|
53
|
-
Red
|
|
54
|
-
</Badge>
|
|
55
|
-
<Badge color="orange">
|
|
56
|
-
Orange
|
|
57
|
-
</Badge>
|
|
58
|
-
<Badge color="gray">
|
|
59
|
-
Gray
|
|
60
|
-
</Badge>
|
|
61
|
-
<Badge color="purple">
|
|
62
|
-
Purple
|
|
63
|
-
</Badge>
|
|
64
|
-
</View>
|
|
65
|
-
</View>
|
|
66
|
-
|
|
67
|
-
{/* Badge Color Shades */}
|
|
68
|
-
<View spacing="md">
|
|
69
|
-
<Text size="medium" weight="semibold">Color Shades</Text>
|
|
70
|
-
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
|
|
71
|
-
<Badge color="blue.200">
|
|
72
|
-
Blue 200
|
|
73
|
-
</Badge>
|
|
74
|
-
<Badge color="blue.500">
|
|
75
|
-
Blue 500
|
|
76
|
-
</Badge>
|
|
77
|
-
<Badge color="blue.800">
|
|
78
|
-
Blue 800
|
|
79
|
-
</Badge>
|
|
80
|
-
</View>
|
|
81
|
-
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
|
|
82
|
-
<Badge color="green.100">
|
|
83
|
-
Green 100
|
|
84
|
-
</Badge>
|
|
85
|
-
<Badge color="green.600">
|
|
86
|
-
Green 600
|
|
87
|
-
</Badge>
|
|
88
|
-
<Badge color="green.900">
|
|
89
|
-
Green 900
|
|
90
|
-
</Badge>
|
|
91
|
-
</View>
|
|
92
|
-
</View>
|
|
93
|
-
|
|
94
|
-
{/* Dot Badges */}
|
|
95
|
-
<View spacing="md">
|
|
96
|
-
<Text size="medium" weight="semibold">Dot Badges</Text>
|
|
97
|
-
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
|
|
98
|
-
<Badge variant="dot" color="blue" size="small" />
|
|
99
|
-
<Badge variant="dot" color="green" size="medium" />
|
|
100
|
-
<Badge variant="dot" color="red" size="large" />
|
|
101
|
-
<Badge variant="dot" color="orange" size="medium" />
|
|
102
|
-
<Badge variant="dot" color="gray" size="medium" />
|
|
103
|
-
</View>
|
|
104
|
-
</View>
|
|
105
|
-
|
|
106
|
-
{/* Number Badges */}
|
|
107
|
-
<View spacing="md">
|
|
108
|
-
<Text size="medium" weight="semibold">Number Badges</Text>
|
|
109
|
-
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
|
|
110
|
-
<Badge color="red" size="small">
|
|
111
|
-
1
|
|
112
|
-
</Badge>
|
|
113
|
-
<Badge color="red" size="medium">
|
|
114
|
-
5
|
|
115
|
-
</Badge>
|
|
116
|
-
<Badge color="red" size="large">
|
|
117
|
-
99+
|
|
118
|
-
</Badge>
|
|
119
|
-
<Badge color="blue" size="medium">
|
|
120
|
-
42
|
|
121
|
-
</Badge>
|
|
122
|
-
</View>
|
|
123
|
-
</View>
|
|
124
|
-
|
|
125
|
-
{/* Status Badges */}
|
|
126
|
-
<View spacing="md">
|
|
127
|
-
<Text size="medium" weight="semibold">Status Badges</Text>
|
|
128
|
-
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
|
|
129
|
-
<Badge color="green" variant="filled">
|
|
130
|
-
ACTIVE
|
|
131
|
-
</Badge>
|
|
132
|
-
<Badge color="orange" variant="filled">
|
|
133
|
-
PENDING
|
|
134
|
-
</Badge>
|
|
135
|
-
<Badge color="red" variant="filled">
|
|
136
|
-
INACTIVE
|
|
137
|
-
</Badge>
|
|
138
|
-
<Badge color="gray" variant="outlined">
|
|
139
|
-
DRAFT
|
|
140
|
-
</Badge>
|
|
141
|
-
<Badge color="blue" variant="outlined">
|
|
142
|
-
REVIEW
|
|
143
|
-
</Badge>
|
|
144
|
-
</View>
|
|
145
|
-
</View>
|
|
146
|
-
|
|
147
|
-
{/* Combined with Other Components */}
|
|
148
|
-
<View spacing="md">
|
|
149
|
-
<Text size="medium" weight="semibold">With Other Components</Text>
|
|
150
|
-
<View spacing="sm">
|
|
151
|
-
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
152
|
-
<Text>Notifications</Text>
|
|
153
|
-
<Badge color="red" size="small">3</Badge>
|
|
154
|
-
</View>
|
|
155
|
-
|
|
156
|
-
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
157
|
-
<Text>Messages</Text>
|
|
158
|
-
<Badge color="blue" size="small">12</Badge>
|
|
159
|
-
</View>
|
|
160
|
-
|
|
161
|
-
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
162
|
-
<Text>Status</Text>
|
|
163
|
-
<Badge color="green" variant="dot" />
|
|
164
|
-
<Text size="small" color="secondary">Online</Text>
|
|
165
|
-
</View>
|
|
166
|
-
|
|
167
|
-
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
168
|
-
<Button size="small" variant="outlined">
|
|
169
|
-
Inbox
|
|
170
|
-
</Button>
|
|
171
|
-
<Badge color="red" size="small">99+</Badge>
|
|
172
|
-
</View>
|
|
173
|
-
</View>
|
|
174
|
-
</View>
|
|
175
|
-
|
|
176
|
-
{/* Category Badges */}
|
|
177
|
-
<View spacing="md">
|
|
178
|
-
<Text size="medium" weight="semibold">Category Badges</Text>
|
|
179
|
-
<View style={{ flexDirection: 'row', gap: 8, flexWrap: 'wrap' }}>
|
|
180
|
-
<Badge color="blue" variant="outlined">
|
|
181
|
-
React
|
|
182
|
-
</Badge>
|
|
183
|
-
<Badge color="green" variant="outlined">
|
|
184
|
-
TypeScript
|
|
185
|
-
</Badge>
|
|
186
|
-
<Badge color="yellow" variant="outlined">
|
|
187
|
-
JavaScript
|
|
188
|
-
</Badge>
|
|
189
|
-
<Badge color="orange" variant="outlined">
|
|
190
|
-
CSS
|
|
191
|
-
</Badge>
|
|
192
|
-
<Badge color="gray" variant="outlined">
|
|
193
|
-
HTML
|
|
194
|
-
</Badge>
|
|
195
|
-
</View>
|
|
196
|
-
</View>
|
|
197
|
-
</View>
|
|
198
|
-
</Screen>
|
|
199
|
-
);
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Screen, View, Text, Badge, Button } from '../index';
|
|
3
|
+
|
|
4
|
+
export const BadgeExamples = () => {
|
|
5
|
+
return (
|
|
6
|
+
<Screen background="primary" padding="lg">
|
|
7
|
+
<View spacing="none">
|
|
8
|
+
<Text size="large" weight="bold" align="center">
|
|
9
|
+
Badge Examples
|
|
10
|
+
</Text>
|
|
11
|
+
|
|
12
|
+
{/* Badge Variants */}
|
|
13
|
+
<View spacing="md">
|
|
14
|
+
<Text size="medium" weight="semibold">Variants</Text>
|
|
15
|
+
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
|
|
16
|
+
<Badge variant="filled" color="blue">
|
|
17
|
+
Filled
|
|
18
|
+
</Badge>
|
|
19
|
+
<Badge variant="outlined" color="blue">
|
|
20
|
+
Outlined
|
|
21
|
+
</Badge>
|
|
22
|
+
<Badge variant="dot" color="blue" />
|
|
23
|
+
</View>
|
|
24
|
+
</View>
|
|
25
|
+
|
|
26
|
+
{/* Badge Sizes */}
|
|
27
|
+
<View spacing="md">
|
|
28
|
+
<Text size="medium" weight="semibold">Sizes</Text>
|
|
29
|
+
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
|
|
30
|
+
<Badge size="small" color="blue">
|
|
31
|
+
Small
|
|
32
|
+
</Badge>
|
|
33
|
+
<Badge size="medium" color="blue">
|
|
34
|
+
Medium
|
|
35
|
+
</Badge>
|
|
36
|
+
<Badge size="large" color="blue">
|
|
37
|
+
Large
|
|
38
|
+
</Badge>
|
|
39
|
+
</View>
|
|
40
|
+
</View>
|
|
41
|
+
|
|
42
|
+
{/* Badge Colors */}
|
|
43
|
+
<View spacing="md">
|
|
44
|
+
<Text size="medium" weight="semibold">Colors</Text>
|
|
45
|
+
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
|
|
46
|
+
<Badge color="blue">
|
|
47
|
+
Blue
|
|
48
|
+
</Badge>
|
|
49
|
+
<Badge color="green">
|
|
50
|
+
Green
|
|
51
|
+
</Badge>
|
|
52
|
+
<Badge color="red">
|
|
53
|
+
Red
|
|
54
|
+
</Badge>
|
|
55
|
+
<Badge color="orange">
|
|
56
|
+
Orange
|
|
57
|
+
</Badge>
|
|
58
|
+
<Badge color="gray">
|
|
59
|
+
Gray
|
|
60
|
+
</Badge>
|
|
61
|
+
<Badge color="purple">
|
|
62
|
+
Purple
|
|
63
|
+
</Badge>
|
|
64
|
+
</View>
|
|
65
|
+
</View>
|
|
66
|
+
|
|
67
|
+
{/* Badge Color Shades */}
|
|
68
|
+
<View spacing="md">
|
|
69
|
+
<Text size="medium" weight="semibold">Color Shades</Text>
|
|
70
|
+
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
|
|
71
|
+
<Badge color="blue.200">
|
|
72
|
+
Blue 200
|
|
73
|
+
</Badge>
|
|
74
|
+
<Badge color="blue.500">
|
|
75
|
+
Blue 500
|
|
76
|
+
</Badge>
|
|
77
|
+
<Badge color="blue.800">
|
|
78
|
+
Blue 800
|
|
79
|
+
</Badge>
|
|
80
|
+
</View>
|
|
81
|
+
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
|
|
82
|
+
<Badge color="green.100">
|
|
83
|
+
Green 100
|
|
84
|
+
</Badge>
|
|
85
|
+
<Badge color="green.600">
|
|
86
|
+
Green 600
|
|
87
|
+
</Badge>
|
|
88
|
+
<Badge color="green.900">
|
|
89
|
+
Green 900
|
|
90
|
+
</Badge>
|
|
91
|
+
</View>
|
|
92
|
+
</View>
|
|
93
|
+
|
|
94
|
+
{/* Dot Badges */}
|
|
95
|
+
<View spacing="md">
|
|
96
|
+
<Text size="medium" weight="semibold">Dot Badges</Text>
|
|
97
|
+
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
|
|
98
|
+
<Badge variant="dot" color="blue" size="small" />
|
|
99
|
+
<Badge variant="dot" color="green" size="medium" />
|
|
100
|
+
<Badge variant="dot" color="red" size="large" />
|
|
101
|
+
<Badge variant="dot" color="orange" size="medium" />
|
|
102
|
+
<Badge variant="dot" color="gray" size="medium" />
|
|
103
|
+
</View>
|
|
104
|
+
</View>
|
|
105
|
+
|
|
106
|
+
{/* Number Badges */}
|
|
107
|
+
<View spacing="md">
|
|
108
|
+
<Text size="medium" weight="semibold">Number Badges</Text>
|
|
109
|
+
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
|
|
110
|
+
<Badge color="red" size="small">
|
|
111
|
+
1
|
|
112
|
+
</Badge>
|
|
113
|
+
<Badge color="red" size="medium">
|
|
114
|
+
5
|
|
115
|
+
</Badge>
|
|
116
|
+
<Badge color="red" size="large">
|
|
117
|
+
99+
|
|
118
|
+
</Badge>
|
|
119
|
+
<Badge color="blue" size="medium">
|
|
120
|
+
42
|
|
121
|
+
</Badge>
|
|
122
|
+
</View>
|
|
123
|
+
</View>
|
|
124
|
+
|
|
125
|
+
{/* Status Badges */}
|
|
126
|
+
<View spacing="md">
|
|
127
|
+
<Text size="medium" weight="semibold">Status Badges</Text>
|
|
128
|
+
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
|
|
129
|
+
<Badge color="green" variant="filled">
|
|
130
|
+
ACTIVE
|
|
131
|
+
</Badge>
|
|
132
|
+
<Badge color="orange" variant="filled">
|
|
133
|
+
PENDING
|
|
134
|
+
</Badge>
|
|
135
|
+
<Badge color="red" variant="filled">
|
|
136
|
+
INACTIVE
|
|
137
|
+
</Badge>
|
|
138
|
+
<Badge color="gray" variant="outlined">
|
|
139
|
+
DRAFT
|
|
140
|
+
</Badge>
|
|
141
|
+
<Badge color="blue" variant="outlined">
|
|
142
|
+
REVIEW
|
|
143
|
+
</Badge>
|
|
144
|
+
</View>
|
|
145
|
+
</View>
|
|
146
|
+
|
|
147
|
+
{/* Combined with Other Components */}
|
|
148
|
+
<View spacing="md">
|
|
149
|
+
<Text size="medium" weight="semibold">With Other Components</Text>
|
|
150
|
+
<View spacing="sm">
|
|
151
|
+
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
152
|
+
<Text>Notifications</Text>
|
|
153
|
+
<Badge color="red" size="small">3</Badge>
|
|
154
|
+
</View>
|
|
155
|
+
|
|
156
|
+
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
157
|
+
<Text>Messages</Text>
|
|
158
|
+
<Badge color="blue" size="small">12</Badge>
|
|
159
|
+
</View>
|
|
160
|
+
|
|
161
|
+
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
162
|
+
<Text>Status</Text>
|
|
163
|
+
<Badge color="green" variant="dot" />
|
|
164
|
+
<Text size="small" color="secondary">Online</Text>
|
|
165
|
+
</View>
|
|
166
|
+
|
|
167
|
+
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
168
|
+
<Button size="small" variant="outlined">
|
|
169
|
+
Inbox
|
|
170
|
+
</Button>
|
|
171
|
+
<Badge color="red" size="small">99+</Badge>
|
|
172
|
+
</View>
|
|
173
|
+
</View>
|
|
174
|
+
</View>
|
|
175
|
+
|
|
176
|
+
{/* Category Badges */}
|
|
177
|
+
<View spacing="md">
|
|
178
|
+
<Text size="medium" weight="semibold">Category Badges</Text>
|
|
179
|
+
<View style={{ flexDirection: 'row', gap: 8, flexWrap: 'wrap' }}>
|
|
180
|
+
<Badge color="blue" variant="outlined">
|
|
181
|
+
React
|
|
182
|
+
</Badge>
|
|
183
|
+
<Badge color="green" variant="outlined">
|
|
184
|
+
TypeScript
|
|
185
|
+
</Badge>
|
|
186
|
+
<Badge color="yellow" variant="outlined">
|
|
187
|
+
JavaScript
|
|
188
|
+
</Badge>
|
|
189
|
+
<Badge color="orange" variant="outlined">
|
|
190
|
+
CSS
|
|
191
|
+
</Badge>
|
|
192
|
+
<Badge color="gray" variant="outlined">
|
|
193
|
+
HTML
|
|
194
|
+
</Badge>
|
|
195
|
+
</View>
|
|
196
|
+
</View>
|
|
197
|
+
</View>
|
|
198
|
+
</Screen>
|
|
199
|
+
);
|
|
200
200
|
};
|