@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.
Files changed (112) hide show
  1. package/README.md +568 -0
  2. package/package.json +107 -0
  3. package/plugin/web.js +186 -0
  4. package/src/Avatar/Avatar.native.tsx +44 -0
  5. package/src/Avatar/Avatar.styles.tsx +67 -0
  6. package/src/Avatar/Avatar.web.tsx +51 -0
  7. package/src/Avatar/index.native.ts +2 -0
  8. package/src/Avatar/index.ts +2 -0
  9. package/src/Avatar/index.web.ts +2 -0
  10. package/src/Avatar/types.ts +43 -0
  11. package/src/Badge/Badge.native.tsx +43 -0
  12. package/src/Badge/Badge.styles.tsx +154 -0
  13. package/src/Badge/Badge.web.tsx +45 -0
  14. package/src/Badge/index.native.ts +2 -0
  15. package/src/Badge/index.ts +2 -0
  16. package/src/Badge/index.web.ts +2 -0
  17. package/src/Badge/types.ts +34 -0
  18. package/src/Button/Button.native.tsx +39 -0
  19. package/src/Button/Button.styles.tsx +215 -0
  20. package/src/Button/Button.types.ts +12 -0
  21. package/src/Button/Button.web.tsx +56 -0
  22. package/src/Button/index.native.ts +3 -0
  23. package/src/Button/index.ts +5 -0
  24. package/src/Button/index.web.ts +3 -0
  25. package/src/Button/types.ts +49 -0
  26. package/src/Card/Card.native.tsx +52 -0
  27. package/src/Card/Card.styles.tsx +240 -0
  28. package/src/Card/Card.web.tsx +62 -0
  29. package/src/Card/index.native.ts +3 -0
  30. package/src/Card/index.ts +5 -0
  31. package/src/Card/index.web.ts +3 -0
  32. package/src/Card/types.ts +59 -0
  33. package/src/Checkbox/Checkbox.native.tsx +99 -0
  34. package/src/Checkbox/Checkbox.styles.tsx +292 -0
  35. package/src/Checkbox/Checkbox.web.tsx +131 -0
  36. package/src/Checkbox/index.native.ts +3 -0
  37. package/src/Checkbox/index.ts +5 -0
  38. package/src/Checkbox/index.web.ts +3 -0
  39. package/src/Checkbox/types.ts +79 -0
  40. package/src/Divider/Divider.native.tsx +145 -0
  41. package/src/Divider/Divider.styles.tsx +602 -0
  42. package/src/Divider/Divider.web.tsx +73 -0
  43. package/src/Divider/index.native.ts +3 -0
  44. package/src/Divider/index.ts +5 -0
  45. package/src/Divider/index.web.ts +3 -0
  46. package/src/Divider/types.ts +54 -0
  47. package/src/Icon/Icon.native.tsx +39 -0
  48. package/src/Icon/Icon.styles.tsx +50 -0
  49. package/src/Icon/Icon.web.tsx +47 -0
  50. package/src/Icon/icon-types.ts +7452 -0
  51. package/src/Icon/index.native.ts +3 -0
  52. package/src/Icon/index.ts +5 -0
  53. package/src/Icon/index.web.ts +3 -0
  54. package/src/Icon/types.ts +36 -0
  55. package/src/Input/Input.native.tsx +75 -0
  56. package/src/Input/Input.styles.tsx +177 -0
  57. package/src/Input/Input.web.tsx +71 -0
  58. package/src/Input/index.native.ts +3 -0
  59. package/src/Input/index.ts +5 -0
  60. package/src/Input/index.web.ts +3 -0
  61. package/src/Input/types.ts +69 -0
  62. package/src/Screen/Screen.native.tsx +41 -0
  63. package/src/Screen/Screen.styles.tsx +60 -0
  64. package/src/Screen/Screen.web.tsx +33 -0
  65. package/src/Screen/index.native.ts +2 -0
  66. package/src/Screen/index.ts +2 -0
  67. package/src/Screen/index.web.ts +2 -0
  68. package/src/Screen/types.ts +38 -0
  69. package/src/Text/Text.native.tsx +36 -0
  70. package/src/Text/Text.styles.tsx +67 -0
  71. package/src/Text/Text.web.tsx +41 -0
  72. package/src/Text/index.native.ts +3 -0
  73. package/src/Text/index.ts +5 -0
  74. package/src/Text/index.web.ts +3 -0
  75. package/src/Text/types.ts +39 -0
  76. package/src/View/View.native.tsx +56 -0
  77. package/src/View/View.styles.tsx +103 -0
  78. package/src/View/View.web.tsx +60 -0
  79. package/src/View/index.native.ts +3 -0
  80. package/src/View/index.ts +5 -0
  81. package/src/View/index.web.ts +3 -0
  82. package/src/View/types.ts +73 -0
  83. package/src/examples/AllExamples.tsx +72 -0
  84. package/src/examples/AvatarExamples.tsx +97 -0
  85. package/src/examples/BadgeExamples.tsx +200 -0
  86. package/src/examples/ButtonExamples.tsx +150 -0
  87. package/src/examples/CardExamples.tsx +176 -0
  88. package/src/examples/CheckboxExamples.tsx +217 -0
  89. package/src/examples/DividerExamples.tsx +218 -0
  90. package/src/examples/IconExamples.tsx +342 -0
  91. package/src/examples/InputExamples.tsx +134 -0
  92. package/src/examples/README.md +136 -0
  93. package/src/examples/ScreenExamples.tsx +154 -0
  94. package/src/examples/TextExamples.tsx +89 -0
  95. package/src/examples/ThemeExtensionExamples.tsx +91 -0
  96. package/src/examples/ValidationExamples.tsx +95 -0
  97. package/src/examples/ViewExamples.tsx +129 -0
  98. package/src/examples/extendedTheme.ts +331 -0
  99. package/src/examples/index.ts +15 -0
  100. package/src/index.native.ts +52 -0
  101. package/src/index.ts +48 -0
  102. package/src/theme/breakpoints.ts +8 -0
  103. package/src/theme/colorResolver.ts +218 -0
  104. package/src/theme/colors.ts +315 -0
  105. package/src/theme/defaultThemes.ts +326 -0
  106. package/src/theme/index.ts +188 -0
  107. package/src/theme/themeBuilder.ts +602 -0
  108. package/src/theme/unistyles.d.ts +6 -0
  109. package/src/theme/variantHelpers.ts +584 -0
  110. package/src/theme/variants.ts +56 -0
  111. package/src/unistyles.d.ts +108 -0
  112. package/src/unistyles.ts +43 -0
@@ -0,0 +1,342 @@
1
+ import React from 'react';
2
+ import { Screen, View, Icon, Text, Button } from '../index';
3
+ import type { IconName } from '../Icon/icon-types';
4
+
5
+ export const IconExamples = () => {
6
+ return (
7
+ <Screen background="primary" padding="lg">
8
+ <View spacing="none">
9
+ <Text size="large" weight="bold" align="center">
10
+ Icon Examples
11
+ </Text>
12
+
13
+ {/* Color Variants */}
14
+ <View spacing="md">
15
+ <Text size="medium" weight="semibold">Color Variants</Text>
16
+ <View style={{ flexDirection: 'row', gap: 16, flexWrap: 'wrap', alignItems: 'center' }}>
17
+ <View style={{ alignItems: 'center', gap: 4 }}>
18
+ <Icon name="home-account" size="md" color="primary" />
19
+ <Text size="small">Primary</Text>
20
+ </View>
21
+ <View style={{ alignItems: 'center', gap: 4 }}>
22
+ <Icon name="check" size="md" color="secondary" />
23
+ <Text size="small">Secondary</Text>
24
+ </View>
25
+ <View style={{ alignItems: 'center', gap: 4 }}>
26
+ <Icon name="alert-circle" size="md" color="blue" />
27
+ <Text size="small">Blue</Text>
28
+ </View>
29
+ <View style={{ alignItems: 'center', gap: 4 }}>
30
+ <Icon name="alert" size="md" color="green" />
31
+ <Text size="small">Green</Text>
32
+ </View>
33
+ <View style={{ alignItems: 'center', gap: 4 }}>
34
+ <Icon name="cog" size="md" color="red" />
35
+ <Text size="small">Red</Text>
36
+ </View>
37
+ <View style={{ alignItems: 'center', gap: 4 }}>
38
+ <Icon name="text" size="md" color="orange" />
39
+ <Text size="small">Orange</Text>
40
+ </View>
41
+ <View style={{ alignItems: 'center', gap: 4 }}>
42
+ <Icon name="text" size="md" color="disabled" />
43
+ <Text size="small">Disabled</Text>
44
+ </View>
45
+ <View style={{ alignItems: 'center', gap: 4 }}>
46
+ <Icon name="text" size="md" color="muted" />
47
+ <Text size="small">Muted</Text>
48
+ </View>
49
+ </View>
50
+ </View>
51
+
52
+ {/* Color Shades */}
53
+ <View spacing="md">
54
+ <Text size="medium" weight="semibold">Color Shades</Text>
55
+ <View style={{ flexDirection: 'row', gap: 16, flexWrap: 'wrap', alignItems: 'center' }}>
56
+ <View style={{ alignItems: 'center', gap: 4 }}>
57
+ <Icon name="star" size="md" color="blue.200" />
58
+ <Text size="small">Blue 200</Text>
59
+ </View>
60
+ <View style={{ alignItems: 'center', gap: 4 }}>
61
+ <Icon name="star" size="md" color="blue.500" />
62
+ <Text size="small">Blue 500</Text>
63
+ </View>
64
+ <View style={{ alignItems: 'center', gap: 4 }}>
65
+ <Icon name="star" size="md" color="blue.800" />
66
+ <Text size="small">Blue 800</Text>
67
+ </View>
68
+ <View style={{ alignItems: 'center', gap: 4 }}>
69
+ <Icon name="heart" size="md" color="red.300" />
70
+ <Text size="small">Red 300</Text>
71
+ </View>
72
+ <View style={{ alignItems: 'center', gap: 4 }}>
73
+ <Icon name="heart" size="md" color="red.600" />
74
+ <Text size="small">Red 600</Text>
75
+ </View>
76
+ <View style={{ alignItems: 'center', gap: 4 }}>
77
+ <Icon name="heart" size="md" color="red.900" />
78
+ <Text size="small">Red 900</Text>
79
+ </View>
80
+ </View>
81
+ </View>
82
+
83
+ {/* Basic Icons */}
84
+ <View spacing="md">
85
+ <Text size="medium" weight="semibold">Basic Icons</Text>
86
+ <View style={{ flexDirection: 'row', gap: 16, flexWrap: 'wrap', alignItems: 'center' }}>
87
+ <Icon name="home" />
88
+ <Icon name="cog" />
89
+ <Icon name="account" />
90
+ <Icon name="magnify" />
91
+ <Icon name="heart" />
92
+ <Icon name="star" />
93
+ <Icon name="bell" />
94
+ <Icon name="mail" />
95
+ </View>
96
+ </View>
97
+
98
+ {/* Icon Sizes */}
99
+ <View spacing="md">
100
+ <Text size="medium" weight="semibold">Sizes</Text>
101
+ <View style={{ flexDirection: 'row', gap: 16, flexWrap: 'wrap', alignItems: 'center' }}>
102
+ <View style={{ alignItems: 'center', gap: 4 }}>
103
+ <Icon name="home" size="xs" />
104
+ <Text size="small">XS (12px)</Text>
105
+ </View>
106
+ <View style={{ alignItems: 'center', gap: 4 }}>
107
+ <Icon name="home" size="sm" />
108
+ <Text size="small">SM (16px)</Text>
109
+ </View>
110
+ <View style={{ alignItems: 'center', gap: 4 }}>
111
+ <Icon name="home" size="md" />
112
+ <Text size="small">MD (24px)</Text>
113
+ </View>
114
+ <View style={{ alignItems: 'center', gap: 4 }}>
115
+ <Icon name="home" size="lg" />
116
+ <Text size="small">LG (32px)</Text>
117
+ </View>
118
+ <View style={{ alignItems: 'center', gap: 4 }}>
119
+ <Icon name="home" size="xl" />
120
+ <Text size="small">XL (48px)</Text>
121
+ </View>
122
+ </View>
123
+ </View>
124
+
125
+ {/* Custom Colors vs Variants */}
126
+ <View spacing="md">
127
+ <Text size="medium" weight="semibold">Custom Colors vs Variants</Text>
128
+ <View style={{ flexDirection: 'row', gap: 16, flexWrap: 'wrap', alignItems: 'center' }}>
129
+ <View style={{ alignItems: 'center', gap: 4 }}>
130
+ <Icon name="heart" size="lg" style={{ color: '#FF0000' }} />
131
+ <Text size="small">Custom Red</Text>
132
+ </View>
133
+ <View style={{ alignItems: 'center', gap: 4 }}>
134
+ <Icon name="heart" size="lg" color="red" />
135
+ <Text size="small">Red Variant</Text>
136
+ </View>
137
+ <View style={{ alignItems: 'center', gap: 4 }}>
138
+ <Icon name="heart" size="lg" style={{ color: '#00FF00' }} />
139
+ <Text size="small">Custom Green</Text>
140
+ </View>
141
+ <View style={{ alignItems: 'center', gap: 4 }}>
142
+ <Icon name="heart" size="lg" color="green" />
143
+ <Text size="small">Green Variant</Text>
144
+ </View>
145
+ </View>
146
+ </View>
147
+
148
+ {/* Navigation Icons */}
149
+ <View spacing="md">
150
+ <Text size="medium" weight="semibold">Navigation & Movement</Text>
151
+ <View style={{ flexDirection: 'row', gap: 16, flexWrap: 'wrap', alignItems: 'center' }}>
152
+ <Icon name="arrow-left" size="md" />
153
+ <Icon name="arrow-right" size="md" />
154
+ <Icon name="arrow-up" size="md" />
155
+ <Icon name="arrow-down" size="md" />
156
+ <Icon name="chevron-left" size="md" />
157
+ <Icon name="chevron-right" size="md" />
158
+ <Icon name="arrow-left" size="md" />
159
+ <Icon name="forward" size="md" />
160
+ <Icon name="compass" size="md" />
161
+ <Icon name="map-marker" size="md" />
162
+ </View>
163
+ </View>
164
+
165
+ {/* Action Icons */}
166
+ <View spacing="md">
167
+ <Text size="medium" weight="semibold">Actions & Controls</Text>
168
+ <View style={{ flexDirection: 'row', gap: 16, flexWrap: 'wrap', alignItems: 'center' }}>
169
+ <Icon name="play" size="md" />
170
+ <Icon name="pause" size="md" />
171
+ <Icon name="stop" size="md" />
172
+ <Icon name="plus" size="md" />
173
+ <Icon name="minus" size="md" />
174
+ <Icon name="pencil" size="md" />
175
+ <Icon name="delete" size="md" />
176
+ <Icon name="content-save" size="md" />
177
+ <Icon name="content-copy" size="md" />
178
+ <Icon name="refresh" size="md" />
179
+ </View>
180
+ </View>
181
+
182
+ {/* Communication Icons */}
183
+ <View spacing="md">
184
+ <Text size="medium" weight="semibold">Communication</Text>
185
+ <View style={{ flexDirection: 'row', gap: 16, flexWrap: 'wrap', alignItems: 'center' }}>
186
+ <Icon name="mail" size="md" />
187
+ <Icon name="message" size="md" />
188
+ <Icon name="chat" size="md" />
189
+ <Icon name="phone" size="md" />
190
+ <Icon name="video" size="md" />
191
+ <Icon name="bell" size="md" />
192
+ <Icon name="bell" size="md" />
193
+ <Icon name="bullhorn" size="md" />
194
+ </View>
195
+ </View>
196
+
197
+ {/* Social Media Icons */}
198
+ <View spacing="md">
199
+ <Text size="medium" weight="semibold">Social Media</Text>
200
+ <View style={{ flexDirection: 'row', gap: 16, flexWrap: 'wrap', alignItems: 'center' }}>
201
+ <Icon name="facebook" size="md" />
202
+ <Icon name="twitter" size="md" />
203
+ <Icon name="instagram" size="md" />
204
+ <Icon name="linkedin" size="md" />
205
+ <Icon name="youtube" size="md" />
206
+ <Icon name="github" size="md" />
207
+ <Icon name="github" size="md" />
208
+ <Icon name="slack" size="md" />
209
+ </View>
210
+ </View>
211
+
212
+ {/* Status & Alert Icons with Variants */}
213
+ <View spacing="md">
214
+ <Text size="medium" weight="semibold">Status & Alerts (Using Variants)</Text>
215
+ <View style={{ flexDirection: 'row', gap: 16, flexWrap: 'wrap', alignItems: 'center' }}>
216
+ <View style={{ alignItems: 'center', gap: 4 }}>
217
+ <Icon name="check-circle" size="md" color="green" />
218
+ <Text size="small">Success</Text>
219
+ </View>
220
+ <View style={{ alignItems: 'center', gap: 4 }}>
221
+ <Icon name="alert" size="md" color="orange" />
222
+ <Text size="small">Warning</Text>
223
+ </View>
224
+ <View style={{ alignItems: 'center', gap: 4 }}>
225
+ <Icon name="alert-circle" size="md" color="red" />
226
+ <Text size="small">Error</Text>
227
+ </View>
228
+ <View style={{ alignItems: 'center', gap: 4 }}>
229
+ <Icon name="information" size="md" color="blue" />
230
+ <Text size="small">Info</Text>
231
+ </View>
232
+ </View>
233
+ </View>
234
+
235
+ {/* File & Document Icons */}
236
+ <View spacing="md">
237
+ <Text size="medium" weight="semibold">Files & Documents</Text>
238
+ <View style={{ flexDirection: 'row', gap: 16, flexWrap: 'wrap', alignItems: 'center' }}>
239
+ <Icon name="file-document" size="md" />
240
+ <Icon name="folder" size="md" />
241
+ <Icon name="file-document" size="md" />
242
+ <Icon name="file-pdf-box" size="md" />
243
+ <Icon name="file-word" size="md" />
244
+ <Icon name="file-excel" size="md" />
245
+ <Icon name="zip-box" size="md" />
246
+ <Icon name="attachment" size="md" />
247
+ </View>
248
+ </View>
249
+
250
+ {/* Media Icons */}
251
+ <View spacing="md">
252
+ <Text size="medium" weight="semibold">Media & Content</Text>
253
+ <View style={{ flexDirection: 'row', gap: 16, flexWrap: 'wrap', alignItems: 'center' }}>
254
+ <Icon name="image" size="md" />
255
+ <Icon name="camera" size="md" />
256
+ <Icon name="video" size="md" />
257
+ <Icon name="music" size="md" />
258
+ <Icon name="headphones" size="md" />
259
+ <Icon name="microphone" size="md" />
260
+ <Icon name="television" size="md" />
261
+ <Icon name="monitor" size="md" />
262
+ </View>
263
+ </View>
264
+
265
+ {/* Technology Icons */}
266
+ <View spacing="md">
267
+ <Text size="medium" weight="semibold">Technology & Devices</Text>
268
+ <View style={{ flexDirection: 'row', gap: 16, flexWrap: 'wrap', alignItems: 'center' }}>
269
+ <Icon name="cellphone" size="md" />
270
+ <Icon name="laptop" size="md" />
271
+ <Icon name="monitor" size="md" />
272
+ <Icon name="tablet" size="md" />
273
+ <Icon name="wifi" size="md" />
274
+ <Icon name="bluetooth" size="md" />
275
+ <Icon name="battery" size="md" />
276
+ <Icon name="usb" size="md" />
277
+ </View>
278
+ </View>
279
+
280
+ {/* Weather Icons */}
281
+ <View spacing="md">
282
+ <Text size="medium" weight="semibold">Weather</Text>
283
+ <View style={{ flexDirection: 'row', gap: 16, flexWrap: 'wrap', alignItems: 'center' }}>
284
+ <Icon name="weather-sunny" size="md" />
285
+ <Icon name="weather-night" size="md" />
286
+ <Icon name="cloud" size="md" />
287
+ <Icon name="weather-rainy" size="md" />
288
+ <Icon name="weather-snowy" size="md" />
289
+ <Icon name="weather-lightning" size="md" />
290
+ <Icon name="weather-windy" size="md" />
291
+ <Icon name="umbrella" size="md" />
292
+ </View>
293
+ </View>
294
+
295
+ {/* Gaming & Entertainment Icons */}
296
+ <View spacing="md">
297
+ <Text size="medium" weight="semibold">Gaming & Entertainment</Text>
298
+ <View style={{ flexDirection: 'row', gap: 16, flexWrap: 'wrap', alignItems: 'center' }}>
299
+ <Icon name="gamepad" size="md" />
300
+ <Icon name="trophy" size="md" />
301
+ <Icon name="medal" size="md" />
302
+ <Icon name="target" size="md" />
303
+ <Icon name="rocket" size="md" />
304
+ <Icon name="crown" size="md" />
305
+ <Icon name="diamond" size="md" />
306
+ <Icon name="dice-6" size="md" />
307
+ </View>
308
+ </View>
309
+
310
+ {/* Business & Work Icons */}
311
+ <View spacing="md">
312
+ <Text size="medium" weight="semibold">Business & Work</Text>
313
+ <View style={{ flexDirection: 'row', gap: 16, flexWrap: 'wrap', alignItems: 'center' }}>
314
+ <Icon name="briefcase" size="md" />
315
+ <Icon name="presentation" size="md" />
316
+ <Icon name="chart-line" size="md" />
317
+ <Icon name="chart-bar" size="md" />
318
+ <Icon name="view-dashboard" size="md" />
319
+ <Icon name="table-large" size="md" />
320
+ <Icon name="file-document" size="md" />
321
+ <Icon name="stamper" size="md" />
322
+ </View>
323
+ </View>
324
+
325
+ {/* Tool Icons */}
326
+ <View spacing="md">
327
+ <Text size="medium" weight="semibold">Tools & Utilities</Text>
328
+ <View style={{ flexDirection: 'row', gap: 16, flexWrap: 'wrap', alignItems: 'center' }}>
329
+ <Icon name="tools" size="md" />
330
+ <Icon name="hammer" size="md" />
331
+ <Icon name="wrench" size="md" />
332
+ <Icon name="screwdriver" size="md" />
333
+ <Icon name="cog" size="md" />
334
+ <Icon name="cog" size="md" />
335
+ <Icon name="toolbox" size="md" />
336
+ <Icon name="hammer-wrench" size="md" />
337
+ </View>
338
+ </View>
339
+ </View>
340
+ </Screen>
341
+ );
342
+ };
@@ -0,0 +1,134 @@
1
+ import React, { useState } from 'react';
2
+ import { Screen, View, Text, Input } from '../index';
3
+
4
+ export const InputExamples = () => {
5
+ const [textValue, setTextValue] = useState('');
6
+ const [emailValue, setEmailValue] = useState('');
7
+ const [passwordValue, setPasswordValue] = useState('');
8
+ const [numberValue, setNumberValue] = useState('');
9
+
10
+ return (
11
+ <Screen background="primary" padding="lg">
12
+ <View spacing="none">
13
+ <Text size="large" weight="bold" align="center">
14
+ Input Examples
15
+ </Text>
16
+
17
+ {/* Input Types */}
18
+ <View spacing="md">
19
+ <Text size="medium" weight="semibold">Input Types</Text>
20
+ <View spacing="sm" style={{ gap: 10 }}>
21
+ <Input
22
+ value={textValue}
23
+ onChangeText={setTextValue}
24
+ placeholder="Text input"
25
+ inputType="text"
26
+ />
27
+ <Input
28
+ value={emailValue}
29
+ onChangeText={setEmailValue}
30
+ placeholder="Email input"
31
+ inputType="email"
32
+ />
33
+ <Input
34
+ value={passwordValue}
35
+ onChangeText={setPasswordValue}
36
+ placeholder="Password input"
37
+ inputType="password"
38
+ secureTextEntry
39
+ />
40
+ <Input
41
+ value={numberValue}
42
+ onChangeText={setNumberValue}
43
+ placeholder="Number input"
44
+ inputType="number"
45
+ />
46
+ </View>
47
+ </View>
48
+
49
+ {/* Input Sizes */}
50
+ <View spacing="md">
51
+ <Text size="medium" weight="semibold">Sizes</Text>
52
+ <View spacing="sm" style={{ gap: 10 }}>
53
+ <Input
54
+ placeholder="Small input"
55
+ size="small"
56
+ />
57
+ <Input
58
+ placeholder="Medium input"
59
+ size="medium"
60
+ />
61
+ <Input
62
+ placeholder="Large input"
63
+ size="large"
64
+ />
65
+ </View>
66
+ </View>
67
+
68
+ {/* Input Variants */}
69
+ <View spacing="md">
70
+ <Text size="medium" weight="semibold">Variants</Text>
71
+ <View spacing="sm" style={{ gap: 10 }}>
72
+ <Input
73
+ placeholder="Default variant"
74
+ variant="default"
75
+ />
76
+ <Input
77
+ placeholder="Outlined variant"
78
+ variant="outlined"
79
+ />
80
+ <Input
81
+ placeholder="Filled variant"
82
+ variant="filled"
83
+ />
84
+ </View>
85
+ </View>
86
+
87
+ {/* Input States */}
88
+ <View spacing="md">
89
+ <Text size="medium" weight="semibold">States</Text>
90
+ <View spacing="sm" style={{ gap: 10 }}>
91
+ <Input
92
+ placeholder="Normal state"
93
+ />
94
+ <Input
95
+ placeholder="Disabled state"
96
+ disabled
97
+ />
98
+ <Input
99
+ placeholder="Error state"
100
+ hasError
101
+ />
102
+ <Input
103
+ value="Pre-filled value"
104
+ onChangeText={() => {}}
105
+ />
106
+ </View>
107
+ </View>
108
+
109
+ {/* Auto-capitalization Examples */}
110
+ <View spacing="md">
111
+ <Text size="medium" weight="semibold">Auto-capitalization</Text>
112
+ <View spacing="sm" style={{ gap: 10 }}>
113
+ <Input
114
+ placeholder="No capitalization"
115
+ autoCapitalize="none"
116
+ />
117
+ <Input
118
+ placeholder="Sentences capitalization"
119
+ autoCapitalize="sentences"
120
+ />
121
+ <Input
122
+ placeholder="Words capitalization"
123
+ autoCapitalize="words"
124
+ />
125
+ <Input
126
+ placeholder="Characters capitalization"
127
+ autoCapitalize="characters"
128
+ />
129
+ </View>
130
+ </View>
131
+ </View>
132
+ </Screen>
133
+ );
134
+ };
@@ -0,0 +1,136 @@
1
+ # Component Examples
2
+
3
+ This directory contains comprehensive examples showcasing all components from the Idealyst component library. Each example demonstrates the various props, variants, and use cases for each component.
4
+
5
+ ## Available Examples
6
+
7
+ ### Individual Component Examples
8
+ - **ButtonExamples**: Demonstrates all button variants, sizes, intents, and states
9
+ - **TextExamples**: Shows text sizes, weights, colors, and alignment options
10
+ - **ViewExamples**: Displays layout capabilities with spacing, backgrounds, and borders
11
+ - **InputExamples**: Covers input types, sizes, variants, and states
12
+ - **CardExamples**: Showcases card layouts, variants, intents, and interactive features
13
+ - **CheckboxExamples**: Demonstrates checkbox states, sizes, intents, and custom content
14
+ - **DividerExamples**: Shows divider orientations, variants, and styling options
15
+ - **BadgeExamples**: Displays badge variants, intents, and use cases
16
+ - **AvatarExamples**: Demonstrates avatar sizes, shapes, and fallback options
17
+
18
+ ### Master Example
19
+ - **AllExamples**: A comprehensive showcase of all components in one scrollable view
20
+
21
+ ## Usage
22
+
23
+ ### Import Individual Examples
24
+ ```typescript
25
+ import { ButtonExamples, TextExamples, CardExamples } from '@idealyst/components/examples';
26
+
27
+ // Use in your component
28
+ <ButtonExamples />
29
+ ```
30
+
31
+ ### Import All Examples
32
+ ```typescript
33
+ import { AllExamples } from '@idealyst/components/examples';
34
+
35
+ // Display all examples at once
36
+ <AllExamples />
37
+ ```
38
+
39
+ ## Example Structure
40
+
41
+ Each example component follows this structure:
42
+ - **Header**: Component name and description
43
+ - **Grouped Sections**: Related variants and properties
44
+ - **Interactive Elements**: Demonstrating user interactions
45
+ - **Edge Cases**: Disabled states, error states, etc.
46
+ - **Real-world Usage**: Practical implementation examples
47
+
48
+ ## Features Demonstrated
49
+
50
+ ### Button Examples
51
+ - Variants: contained, outlined, text
52
+ - Sizes: small, medium, large
53
+ - Intents: primary, neutral, success, error, warning
54
+ - States: normal, disabled
55
+
56
+ ### Text Examples
57
+ - Sizes: small, medium, large, xlarge
58
+ - Weights: light, normal, medium, semibold, bold
59
+ - Colors: primary, secondary, success, warning, error
60
+ - Alignment: left, center, right
61
+
62
+ ### View Examples
63
+ - Spacing: none, xs, sm, md, lg, xl
64
+ - Backgrounds: transparent, surface, primary, secondary
65
+ - Border radius: none, xs, sm, md, lg, xl
66
+ - Borders: none, thin, thick
67
+ - Layout patterns: flex layouts, positioning
68
+
69
+ ### Input Examples
70
+ - Types: text, email, password, number
71
+ - Sizes: small, medium, large
72
+ - Variants: default, outlined, filled
73
+ - States: normal, disabled, error, pre-filled
74
+ - Auto-capitalization: none, sentences, words, characters
75
+
76
+ ### Card Examples
77
+ - Variants: default, outlined, elevated, filled
78
+ - Intents: neutral, primary, success, error, warning, info
79
+ - Padding: none, small, medium, large
80
+ - Radius: none, small, medium, large
81
+ - Interactive: clickable, disabled states
82
+ - Complex layouts: multi-element cards
83
+
84
+ ### Checkbox Examples
85
+ - Basic states: checked, unchecked, indeterminate
86
+ - Sizes: small, medium, large
87
+ - Intents: primary, neutral, success, error, warning, info
88
+ - Variants: default, outlined
89
+ - States: normal, disabled
90
+ - Custom content: complex labels, helper text, errors
91
+
92
+ ### Divider Examples
93
+ - Orientations: horizontal, vertical
94
+ - Variants: solid, dashed, dotted
95
+ - Thickness: thin, medium, thick
96
+ - Intents: primary, secondary, neutral, success, error, warning, info
97
+ - Spacing: none, small, medium, large
98
+ - With content: text labels, sections
99
+
100
+ ### Badge Examples
101
+ - Variants: filled, outlined, dot
102
+ - Sizes: small, medium, large
103
+ - Intents: primary, success, error, warning, neutral, info
104
+ - Use cases: numbers, status, categories, notifications
105
+
106
+ ### Avatar Examples
107
+ - Sizes: small, medium, large, xlarge
108
+ - Shapes: circle, square
109
+ - Fallbacks: initials, placeholder text
110
+ - Images: with proper fallbacks
111
+ - Groups: overlapping avatars
112
+
113
+ ## Best Practices
114
+
115
+ 1. **Interactive Testing**: All examples include interactive elements to test functionality
116
+ 2. **Accessibility**: Examples demonstrate proper labeling and accessibility features
117
+ 3. **Responsive Design**: Components adapt to different screen sizes
118
+ 4. **Theme Integration**: All examples use the theme system properly
119
+ 5. **Real-world Context**: Examples show practical usage scenarios
120
+
121
+ ## Development Notes
122
+
123
+ - Examples are built using the same components they demonstrate
124
+ - All examples use TypeScript for type safety
125
+ - Components follow the established design system patterns
126
+ - Examples are optimized for both web and native platforms
127
+
128
+ ## Contributing
129
+
130
+ When adding new components:
131
+ 1. Create a new example file: `ComponentNameExamples.tsx`
132
+ 2. Follow the established pattern of grouped sections
133
+ 3. Include all variants, sizes, and states
134
+ 4. Add interactive elements where applicable
135
+ 5. Export the component in `index.ts`
136
+ 6. Update the `AllExamples` component to include the new example