@idealyst/components 1.0.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/README.md +568 -0
- package/package.json +107 -0
- package/plugin/web.js +186 -0
- package/src/Avatar/Avatar.native.tsx +44 -0
- package/src/Avatar/Avatar.styles.tsx +67 -0
- package/src/Avatar/Avatar.web.tsx +51 -0
- package/src/Avatar/index.native.ts +2 -0
- package/src/Avatar/index.ts +2 -0
- package/src/Avatar/index.web.ts +2 -0
- package/src/Avatar/types.ts +43 -0
- package/src/Badge/Badge.native.tsx +43 -0
- package/src/Badge/Badge.styles.tsx +154 -0
- package/src/Badge/Badge.web.tsx +45 -0
- package/src/Badge/index.native.ts +2 -0
- package/src/Badge/index.ts +2 -0
- package/src/Badge/index.web.ts +2 -0
- package/src/Badge/types.ts +34 -0
- package/src/Button/Button.native.tsx +39 -0
- package/src/Button/Button.styles.tsx +215 -0
- package/src/Button/Button.types.ts +12 -0
- package/src/Button/Button.web.tsx +56 -0
- package/src/Button/index.native.ts +3 -0
- package/src/Button/index.ts +5 -0
- package/src/Button/index.web.ts +3 -0
- package/src/Button/types.ts +49 -0
- package/src/Card/Card.native.tsx +52 -0
- package/src/Card/Card.styles.tsx +240 -0
- package/src/Card/Card.web.tsx +62 -0
- package/src/Card/index.native.ts +3 -0
- package/src/Card/index.ts +5 -0
- package/src/Card/index.web.ts +3 -0
- package/src/Card/types.ts +59 -0
- package/src/Checkbox/Checkbox.native.tsx +99 -0
- package/src/Checkbox/Checkbox.styles.tsx +292 -0
- package/src/Checkbox/Checkbox.web.tsx +131 -0
- package/src/Checkbox/index.native.ts +3 -0
- package/src/Checkbox/index.ts +5 -0
- package/src/Checkbox/index.web.ts +3 -0
- package/src/Checkbox/types.ts +79 -0
- package/src/Divider/Divider.native.tsx +145 -0
- package/src/Divider/Divider.styles.tsx +602 -0
- package/src/Divider/Divider.web.tsx +73 -0
- package/src/Divider/index.native.ts +3 -0
- package/src/Divider/index.ts +5 -0
- package/src/Divider/index.web.ts +3 -0
- package/src/Divider/types.ts +54 -0
- package/src/Icon/Icon.native.tsx +39 -0
- package/src/Icon/Icon.styles.tsx +50 -0
- package/src/Icon/Icon.web.tsx +47 -0
- package/src/Icon/icon-types.ts +7452 -0
- package/src/Icon/index.native.ts +3 -0
- package/src/Icon/index.ts +5 -0
- package/src/Icon/index.web.ts +3 -0
- package/src/Icon/types.ts +36 -0
- package/src/Input/Input.native.tsx +75 -0
- package/src/Input/Input.styles.tsx +177 -0
- package/src/Input/Input.web.tsx +71 -0
- package/src/Input/index.native.ts +3 -0
- package/src/Input/index.ts +5 -0
- package/src/Input/index.web.ts +3 -0
- package/src/Input/types.ts +69 -0
- package/src/Screen/Screen.native.tsx +41 -0
- package/src/Screen/Screen.styles.tsx +60 -0
- package/src/Screen/Screen.web.tsx +33 -0
- package/src/Screen/index.native.ts +2 -0
- package/src/Screen/index.ts +2 -0
- package/src/Screen/index.web.ts +2 -0
- package/src/Screen/types.ts +38 -0
- package/src/Text/Text.native.tsx +36 -0
- package/src/Text/Text.styles.tsx +67 -0
- package/src/Text/Text.web.tsx +41 -0
- package/src/Text/index.native.ts +3 -0
- package/src/Text/index.ts +5 -0
- package/src/Text/index.web.ts +3 -0
- package/src/Text/types.ts +39 -0
- package/src/View/View.native.tsx +56 -0
- package/src/View/View.styles.tsx +103 -0
- package/src/View/View.web.tsx +60 -0
- package/src/View/index.native.ts +3 -0
- package/src/View/index.ts +5 -0
- package/src/View/index.web.ts +3 -0
- package/src/View/types.ts +73 -0
- package/src/examples/AllExamples.tsx +72 -0
- package/src/examples/AvatarExamples.tsx +97 -0
- package/src/examples/BadgeExamples.tsx +200 -0
- package/src/examples/ButtonExamples.tsx +150 -0
- package/src/examples/CardExamples.tsx +176 -0
- package/src/examples/CheckboxExamples.tsx +217 -0
- package/src/examples/DividerExamples.tsx +218 -0
- package/src/examples/IconExamples.tsx +342 -0
- package/src/examples/InputExamples.tsx +134 -0
- package/src/examples/README.md +136 -0
- package/src/examples/ScreenExamples.tsx +154 -0
- package/src/examples/TextExamples.tsx +89 -0
- package/src/examples/ThemeExtensionExamples.tsx +91 -0
- package/src/examples/ValidationExamples.tsx +95 -0
- package/src/examples/ViewExamples.tsx +129 -0
- package/src/examples/extendedTheme.ts +331 -0
- package/src/examples/index.ts +15 -0
- package/src/index.native.ts +52 -0
- package/src/index.ts +48 -0
- package/src/theme/breakpoints.ts +8 -0
- package/src/theme/colorResolver.ts +218 -0
- package/src/theme/colors.ts +315 -0
- package/src/theme/defaultThemes.ts +326 -0
- package/src/theme/index.ts +188 -0
- package/src/theme/themeBuilder.ts +602 -0
- package/src/theme/unistyles.d.ts +6 -0
- package/src/theme/variantHelpers.ts +584 -0
- package/src/theme/variants.ts +56 -0
- package/src/unistyles.d.ts +108 -0
- package/src/unistyles.ts +43 -0
|
@@ -0,0 +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
|
+
);
|
|
200
|
+
};
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Screen, View, Button, Text } from '../index';
|
|
3
|
+
|
|
4
|
+
export const ButtonExamples = () => {
|
|
5
|
+
const handlePress = (buttonType: string) => {
|
|
6
|
+
console.log(`Button pressed: ${buttonType}`);
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<Screen background="primary" padding="lg">
|
|
11
|
+
<View spacing="none">
|
|
12
|
+
<Text size="large" weight="bold" align="center">
|
|
13
|
+
Button Examples
|
|
14
|
+
</Text>
|
|
15
|
+
|
|
16
|
+
{/* Button Variants */}
|
|
17
|
+
<View spacing="md">
|
|
18
|
+
<Text size="medium" weight="semibold">Variants</Text>
|
|
19
|
+
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap' }}>
|
|
20
|
+
<Button
|
|
21
|
+
variant="contained"
|
|
22
|
+
intent="primary"
|
|
23
|
+
onPress={() => handlePress('contained')}
|
|
24
|
+
>
|
|
25
|
+
Contained
|
|
26
|
+
</Button>
|
|
27
|
+
<Button
|
|
28
|
+
variant="outlined"
|
|
29
|
+
intent="primary"
|
|
30
|
+
onPress={() => handlePress('outlined')}
|
|
31
|
+
>
|
|
32
|
+
Outlined
|
|
33
|
+
</Button>
|
|
34
|
+
<Button
|
|
35
|
+
variant="text"
|
|
36
|
+
intent="primary"
|
|
37
|
+
onPress={() => handlePress('text')}
|
|
38
|
+
>
|
|
39
|
+
Text
|
|
40
|
+
</Button>
|
|
41
|
+
</View>
|
|
42
|
+
</View>
|
|
43
|
+
|
|
44
|
+
{/* Button Sizes */}
|
|
45
|
+
<View spacing="md">
|
|
46
|
+
<Text size="medium" weight="semibold">Sizes</Text>
|
|
47
|
+
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
|
|
48
|
+
<Button
|
|
49
|
+
size="small"
|
|
50
|
+
variant="contained"
|
|
51
|
+
intent="primary"
|
|
52
|
+
onPress={() => handlePress('small')}
|
|
53
|
+
>
|
|
54
|
+
Small
|
|
55
|
+
</Button>
|
|
56
|
+
<Button
|
|
57
|
+
size="medium"
|
|
58
|
+
variant="contained"
|
|
59
|
+
intent="primary"
|
|
60
|
+
onPress={() => handlePress('medium')}
|
|
61
|
+
>
|
|
62
|
+
Medium
|
|
63
|
+
</Button>
|
|
64
|
+
<Button
|
|
65
|
+
size="large"
|
|
66
|
+
variant="contained"
|
|
67
|
+
intent="primary"
|
|
68
|
+
onPress={() => handlePress('large')}
|
|
69
|
+
>
|
|
70
|
+
Large
|
|
71
|
+
</Button>
|
|
72
|
+
</View>
|
|
73
|
+
</View>
|
|
74
|
+
|
|
75
|
+
{/* Button Intents */}
|
|
76
|
+
<View spacing="md">
|
|
77
|
+
<Text size="medium" weight="semibold">Intents</Text>
|
|
78
|
+
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap' }}>
|
|
79
|
+
<Button
|
|
80
|
+
intent="primary"
|
|
81
|
+
variant="contained"
|
|
82
|
+
onPress={() => handlePress('primary')}
|
|
83
|
+
>
|
|
84
|
+
Primary
|
|
85
|
+
</Button>
|
|
86
|
+
<Button
|
|
87
|
+
intent="neutral"
|
|
88
|
+
variant="contained"
|
|
89
|
+
onPress={() => handlePress('neutral')}
|
|
90
|
+
>
|
|
91
|
+
Neutral
|
|
92
|
+
</Button>
|
|
93
|
+
<Button
|
|
94
|
+
intent="success"
|
|
95
|
+
variant="contained"
|
|
96
|
+
onPress={() => handlePress('success')}
|
|
97
|
+
>
|
|
98
|
+
Success
|
|
99
|
+
</Button>
|
|
100
|
+
<Button
|
|
101
|
+
intent="error"
|
|
102
|
+
variant="contained"
|
|
103
|
+
onPress={() => handlePress('error')}
|
|
104
|
+
>
|
|
105
|
+
Error
|
|
106
|
+
</Button>
|
|
107
|
+
<Button
|
|
108
|
+
intent="warning"
|
|
109
|
+
variant="contained"
|
|
110
|
+
onPress={() => handlePress('warning')}
|
|
111
|
+
>
|
|
112
|
+
Warning
|
|
113
|
+
</Button>
|
|
114
|
+
</View>
|
|
115
|
+
</View>
|
|
116
|
+
|
|
117
|
+
{/* Disabled States */}
|
|
118
|
+
<View spacing="md">
|
|
119
|
+
<Text size="medium" weight="semibold">Disabled States</Text>
|
|
120
|
+
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap' }}>
|
|
121
|
+
<Button
|
|
122
|
+
variant="contained"
|
|
123
|
+
intent="primary"
|
|
124
|
+
disabled
|
|
125
|
+
onPress={() => handlePress('disabled-contained')}
|
|
126
|
+
>
|
|
127
|
+
Disabled Contained
|
|
128
|
+
</Button>
|
|
129
|
+
<Button
|
|
130
|
+
variant="outlined"
|
|
131
|
+
intent="primary"
|
|
132
|
+
disabled
|
|
133
|
+
onPress={() => handlePress('disabled-outlined')}
|
|
134
|
+
>
|
|
135
|
+
Disabled Outlined
|
|
136
|
+
</Button>
|
|
137
|
+
<Button
|
|
138
|
+
variant="text"
|
|
139
|
+
intent="primary"
|
|
140
|
+
disabled
|
|
141
|
+
onPress={() => handlePress('disabled-text')}
|
|
142
|
+
>
|
|
143
|
+
Disabled Text
|
|
144
|
+
</Button>
|
|
145
|
+
</View>
|
|
146
|
+
</View>
|
|
147
|
+
</View>
|
|
148
|
+
</Screen>
|
|
149
|
+
);
|
|
150
|
+
};
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Screen, View, Text, Card, Button } from '../index';
|
|
3
|
+
|
|
4
|
+
export const CardExamples = () => {
|
|
5
|
+
const handleCardPress = (cardType: string) => {
|
|
6
|
+
console.log(`Card pressed: ${cardType}`);
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<Screen background="primary" padding="lg">
|
|
11
|
+
<View spacing="none">
|
|
12
|
+
<Text size="large" weight="bold" align="center">
|
|
13
|
+
Card Examples
|
|
14
|
+
</Text>
|
|
15
|
+
|
|
16
|
+
{/* Card Variants */}
|
|
17
|
+
<View spacing="md">
|
|
18
|
+
<Text size="medium" weight="semibold">Variants</Text>
|
|
19
|
+
<View spacing="sm" style={{ gap: 10 }}>
|
|
20
|
+
<Card variant="default" padding="medium">
|
|
21
|
+
<Text>Default Card</Text>
|
|
22
|
+
<Text size="small" color="secondary">
|
|
23
|
+
This is a default card with standard styling
|
|
24
|
+
</Text>
|
|
25
|
+
</Card>
|
|
26
|
+
|
|
27
|
+
<Card variant="outlined" padding="medium">
|
|
28
|
+
<Text>Outlined Card</Text>
|
|
29
|
+
<Text size="small" color="secondary">
|
|
30
|
+
This is an outlined card with border
|
|
31
|
+
</Text>
|
|
32
|
+
</Card>
|
|
33
|
+
|
|
34
|
+
<Card variant="elevated" padding="medium">
|
|
35
|
+
<Text>Elevated Card</Text>
|
|
36
|
+
<Text size="small" color="secondary">
|
|
37
|
+
This is an elevated card with shadow
|
|
38
|
+
</Text>
|
|
39
|
+
</Card>
|
|
40
|
+
|
|
41
|
+
<Card variant="filled" padding="medium">
|
|
42
|
+
<Text>Filled Card</Text>
|
|
43
|
+
<Text size="small" color="secondary">
|
|
44
|
+
This is a filled card with background
|
|
45
|
+
</Text>
|
|
46
|
+
</Card>
|
|
47
|
+
</View>
|
|
48
|
+
</View>
|
|
49
|
+
|
|
50
|
+
{/* Card Intents */}
|
|
51
|
+
<View spacing="md">
|
|
52
|
+
<Text size="medium" weight="semibold">Intents</Text>
|
|
53
|
+
<View spacing="sm" style={{ gap: 10 }}>
|
|
54
|
+
<Card intent="neutral" padding="medium" variant="outlined">
|
|
55
|
+
<Text>Neutral Card</Text>
|
|
56
|
+
</Card>
|
|
57
|
+
|
|
58
|
+
<Card intent="primary" padding="medium" variant="outlined">
|
|
59
|
+
<Text>Primary Card</Text>
|
|
60
|
+
</Card>
|
|
61
|
+
|
|
62
|
+
<Card intent="success" padding="medium" variant="outlined">
|
|
63
|
+
<Text>Success Card</Text>
|
|
64
|
+
</Card>
|
|
65
|
+
|
|
66
|
+
<Card intent="error" padding="medium" variant="outlined">
|
|
67
|
+
<Text>Error Card</Text>
|
|
68
|
+
</Card>
|
|
69
|
+
|
|
70
|
+
<Card intent="warning" padding="medium" variant="outlined">
|
|
71
|
+
<Text>Warning Card</Text>
|
|
72
|
+
</Card>
|
|
73
|
+
|
|
74
|
+
<Card intent="info" padding="medium" variant="outlined">
|
|
75
|
+
<Text>Info Card</Text>
|
|
76
|
+
</Card>
|
|
77
|
+
</View>
|
|
78
|
+
</View>
|
|
79
|
+
|
|
80
|
+
{/* Card Padding */}
|
|
81
|
+
<View spacing="md">
|
|
82
|
+
<Text size="medium" weight="semibold">Padding</Text>
|
|
83
|
+
<View spacing="sm">
|
|
84
|
+
<Card padding="none" variant="outlined">
|
|
85
|
+
<Text>No Padding</Text>
|
|
86
|
+
</Card>
|
|
87
|
+
|
|
88
|
+
<Card padding="small" variant="outlined">
|
|
89
|
+
<Text>Small Padding</Text>
|
|
90
|
+
</Card>
|
|
91
|
+
|
|
92
|
+
<Card padding="medium" variant="outlined">
|
|
93
|
+
<Text>Medium Padding</Text>
|
|
94
|
+
</Card>
|
|
95
|
+
|
|
96
|
+
<Card padding="large" variant="outlined">
|
|
97
|
+
<Text>Large Padding</Text>
|
|
98
|
+
</Card>
|
|
99
|
+
</View>
|
|
100
|
+
</View>
|
|
101
|
+
|
|
102
|
+
{/* Card Radius */}
|
|
103
|
+
<View spacing="md">
|
|
104
|
+
<Text size="medium" weight="semibold">Border Radius</Text>
|
|
105
|
+
<View spacing="sm">
|
|
106
|
+
<Card radius="none" variant="outlined" padding="medium">
|
|
107
|
+
<Text>No Radius</Text>
|
|
108
|
+
</Card>
|
|
109
|
+
|
|
110
|
+
<Card radius="small" variant="outlined" padding="medium">
|
|
111
|
+
<Text>Small Radius</Text>
|
|
112
|
+
</Card>
|
|
113
|
+
|
|
114
|
+
<Card radius="medium" variant="outlined" padding="medium">
|
|
115
|
+
<Text>Medium Radius</Text>
|
|
116
|
+
</Card>
|
|
117
|
+
|
|
118
|
+
<Card radius="large" variant="outlined" padding="medium">
|
|
119
|
+
<Text>Large Radius</Text>
|
|
120
|
+
</Card>
|
|
121
|
+
</View>
|
|
122
|
+
</View>
|
|
123
|
+
|
|
124
|
+
{/* Clickable Cards */}
|
|
125
|
+
<View spacing="md">
|
|
126
|
+
<Text size="medium" weight="semibold">Interactive Cards</Text>
|
|
127
|
+
<View spacing="sm">
|
|
128
|
+
<Card
|
|
129
|
+
clickable
|
|
130
|
+
onPress={() => handleCardPress('clickable')}
|
|
131
|
+
variant="outlined"
|
|
132
|
+
padding="medium"
|
|
133
|
+
>
|
|
134
|
+
<Text weight="semibold">Clickable Card</Text>
|
|
135
|
+
<Text size="small" color="secondary">
|
|
136
|
+
Click me to see interaction
|
|
137
|
+
</Text>
|
|
138
|
+
</Card>
|
|
139
|
+
|
|
140
|
+
<Card
|
|
141
|
+
clickable
|
|
142
|
+
disabled
|
|
143
|
+
onPress={() => handleCardPress('disabled')}
|
|
144
|
+
variant="outlined"
|
|
145
|
+
padding="medium"
|
|
146
|
+
>
|
|
147
|
+
<Text weight="semibold">Disabled Card</Text>
|
|
148
|
+
<Text size="small" color="secondary">
|
|
149
|
+
This card is disabled
|
|
150
|
+
</Text>
|
|
151
|
+
</Card>
|
|
152
|
+
</View>
|
|
153
|
+
</View>
|
|
154
|
+
|
|
155
|
+
{/* Complex Card Layout */}
|
|
156
|
+
<View spacing="md">
|
|
157
|
+
<Text size="medium" weight="semibold">Complex Layout</Text>
|
|
158
|
+
<Card variant="elevated" padding="large" radius="medium">
|
|
159
|
+
<Text size="large" weight="bold">Product Card</Text>
|
|
160
|
+
<Text size="small" color="secondary" style={{ marginVertical: 8 }}>
|
|
161
|
+
This is a more complex card layout with multiple elements
|
|
162
|
+
</Text>
|
|
163
|
+
<View style={{ flexDirection: 'row', gap: 8, marginTop: 12 }}>
|
|
164
|
+
<Button size="small" variant="contained" intent="primary">
|
|
165
|
+
Buy Now
|
|
166
|
+
</Button>
|
|
167
|
+
<Button size="small" variant="outlined" intent="neutral">
|
|
168
|
+
Add to Cart
|
|
169
|
+
</Button>
|
|
170
|
+
</View>
|
|
171
|
+
</Card>
|
|
172
|
+
</View>
|
|
173
|
+
</View>
|
|
174
|
+
</Screen>
|
|
175
|
+
);
|
|
176
|
+
};
|