@idealyst/components 1.0.99 → 1.1.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 (106) hide show
  1. package/package.json +4 -4
  2. package/src/Accordion/Accordion.native.tsx +15 -0
  3. package/src/Accordion/Accordion.styles.tsx +17 -0
  4. package/src/Accordion/Accordion.web.tsx +15 -0
  5. package/src/Accordion/types.ts +2 -1
  6. package/src/Button/Button.native.tsx +55 -2
  7. package/src/Button/Button.styles.tsx +22 -0
  8. package/src/Button/Button.web.tsx +6 -2
  9. package/src/Button/types.ts +15 -0
  10. package/src/Card/Card.native.tsx +18 -5
  11. package/src/Card/Card.styles.tsx +123 -131
  12. package/src/Card/Card.web.tsx +17 -4
  13. package/src/Card/types.ts +3 -8
  14. package/src/Checkbox/Checkbox.native.tsx +7 -0
  15. package/src/Checkbox/Checkbox.styles.tsx +11 -0
  16. package/src/Checkbox/Checkbox.web.tsx +7 -0
  17. package/src/Checkbox/types.ts +2 -1
  18. package/src/Input/Input.native.tsx +7 -0
  19. package/src/Input/Input.styles.tsx +9 -0
  20. package/src/Input/Input.web.tsx +7 -0
  21. package/src/Input/types.ts +2 -1
  22. package/src/List/List.native.tsx +15 -0
  23. package/src/List/List.styles.tsx +17 -0
  24. package/src/List/List.web.tsx +15 -0
  25. package/src/List/types.ts +2 -1
  26. package/src/Pressable/Pressable.native.tsx +13 -1
  27. package/src/Pressable/Pressable.styles.tsx +24 -0
  28. package/src/Pressable/Pressable.web.tsx +24 -6
  29. package/src/Pressable/types.ts +3 -2
  30. package/src/RadioButton/RadioButton.native.tsx +7 -0
  31. package/src/RadioButton/RadioButton.styles.tsx +9 -0
  32. package/src/RadioButton/RadioButton.web.tsx +7 -0
  33. package/src/RadioButton/types.ts +2 -1
  34. package/src/Screen/Screen.native.tsx +25 -12
  35. package/src/Screen/Screen.styles.tsx +28 -16
  36. package/src/Screen/Screen.web.tsx +16 -3
  37. package/src/Screen/types.ts +4 -8
  38. package/src/Select/Select.native.tsx +7 -0
  39. package/src/Select/Select.styles.tsx +11 -0
  40. package/src/Select/Select.web.tsx +7 -0
  41. package/src/Select/types.ts +2 -1
  42. package/src/Slider/Slider.native.tsx +7 -0
  43. package/src/Slider/Slider.styles.tsx +11 -0
  44. package/src/Slider/Slider.web.tsx +7 -0
  45. package/src/Slider/types.ts +2 -1
  46. package/src/Switch/Switch.native.tsx +7 -0
  47. package/src/Switch/Switch.styles.tsx +11 -0
  48. package/src/Switch/Switch.web.tsx +7 -0
  49. package/src/Switch/types.ts +2 -1
  50. package/src/TabBar/TabBar.native.tsx +19 -1
  51. package/src/TabBar/TabBar.styles.tsx +17 -0
  52. package/src/TabBar/TabBar.web.tsx +20 -1
  53. package/src/TabBar/types.ts +2 -1
  54. package/src/Table/Table.native.tsx +15 -0
  55. package/src/Table/Table.styles.tsx +27 -0
  56. package/src/Table/Table.web.tsx +15 -0
  57. package/src/Table/types.ts +2 -1
  58. package/src/Text/Text.native.tsx +14 -3
  59. package/src/Text/Text.styles.tsx +36 -12
  60. package/src/Text/Text.web.tsx +15 -4
  61. package/src/Text/types.ts +15 -4
  62. package/src/TextArea/TextArea.native.tsx +7 -0
  63. package/src/TextArea/TextArea.styles.tsx +11 -0
  64. package/src/TextArea/TextArea.web.tsx +7 -0
  65. package/src/TextArea/types.ts +2 -1
  66. package/src/View/View.native.tsx +35 -12
  67. package/src/View/View.styles.tsx +78 -75
  68. package/src/View/View.web.tsx +18 -9
  69. package/src/View/types.ts +8 -23
  70. package/src/examples/AccordionExamples.tsx +32 -32
  71. package/src/examples/AlertExamples.tsx +42 -42
  72. package/src/examples/AvatarExamples.tsx +18 -18
  73. package/src/examples/BadgeExamples.tsx +30 -30
  74. package/src/examples/BreadcrumbExamples.tsx +64 -64
  75. package/src/examples/ButtonExamples.tsx +128 -16
  76. package/src/examples/CardExamples.tsx +28 -28
  77. package/src/examples/CheckboxExamples.tsx +25 -25
  78. package/src/examples/ChipExamples.tsx +17 -17
  79. package/src/examples/DialogExamples.tsx +17 -17
  80. package/src/examples/DividerExamples.tsx +21 -21
  81. package/src/examples/IconExamples.tsx +113 -113
  82. package/src/examples/ImageExamples.tsx +34 -34
  83. package/src/examples/InputExamples.tsx +20 -20
  84. package/src/examples/LinkExamples.tsx +23 -23
  85. package/src/examples/ListExamples.tsx +42 -42
  86. package/src/examples/MenuExamples.tsx +15 -15
  87. package/src/examples/PopoverExamples.tsx +23 -23
  88. package/src/examples/ProgressExamples.tsx +41 -41
  89. package/src/examples/RadioButtonExamples.tsx +21 -21
  90. package/src/examples/SVGImageExamples.tsx +25 -25
  91. package/src/examples/ScreenExamples.tsx +41 -41
  92. package/src/examples/SelectExamples.tsx +59 -59
  93. package/src/examples/SkeletonExamples.tsx +30 -30
  94. package/src/examples/SliderExamples.tsx +54 -54
  95. package/src/examples/SwitchExamples.tsx +20 -20
  96. package/src/examples/TabBarExamples.tsx +26 -26
  97. package/src/examples/TableExamples.tsx +36 -36
  98. package/src/examples/TextAreaExamples.tsx +25 -25
  99. package/src/examples/TextExamples.tsx +61 -66
  100. package/src/examples/ThemeExtensionExamples.tsx +12 -12
  101. package/src/examples/TooltipExamples.tsx +21 -21
  102. package/src/examples/VideoExamples.tsx +28 -28
  103. package/src/examples/ViewExamples.tsx +59 -59
  104. package/src/index.ts +4 -0
  105. package/src/utils/buildViewStyleVariants.ts +148 -0
  106. package/src/utils/viewStyleProps.ts +63 -0
package/src/View/types.ts CHANGED
@@ -1,29 +1,19 @@
1
1
  import { Size, Surface } from '@idealyst/theme';
2
2
  import type { ReactNode } from 'react';
3
3
  import type { StyleProp, ViewStyle } from 'react-native';
4
+ import { ContainerStyleProps } from '../utils/viewStyleProps';
4
5
 
5
6
  // Component-specific type aliases for future extensibility
6
7
  export type ViewBackgroundVariant = Surface | 'transparent';
7
- export type ViewSpacingVariant = Size | 'none';
8
8
  export type ViewRadiusVariant = Size | 'none';
9
9
  export type ViewBorderVariant = 'none' | 'thin' | 'thick';
10
10
 
11
- export interface ViewProps {
11
+ export interface ViewProps extends ContainerStyleProps {
12
12
  /**
13
13
  * The content to display inside the view
14
14
  */
15
15
  children?: ReactNode;
16
16
 
17
- /**
18
- * Padding/spacing variant
19
- */
20
- spacing?: ViewSpacingVariant;
21
-
22
- /**
23
- * Margin variant
24
- */
25
- marginVariant?: ViewSpacingVariant;
26
-
27
17
  /**
28
18
  * Background variant
29
19
  */
@@ -44,16 +34,6 @@ export interface ViewProps {
44
34
  */
45
35
  backgroundColor?: string;
46
36
 
47
- /**
48
- * Custom padding (overrides spacing variant)
49
- */
50
- padding?: number;
51
-
52
- /**
53
- * Custom margin (overrides marginVariant)
54
- */
55
- margin?: number;
56
-
57
37
  /**
58
38
  * Custom border radius (overrides radius variant)
59
39
  */
@@ -74,8 +54,13 @@ export interface ViewProps {
74
54
  */
75
55
  style?: React.CSSProperties | StyleProp<ViewStyle>;
76
56
 
57
+ /**
58
+ * Enable scrollable content (uses ScrollView on native, overflow:auto on web)
59
+ */
60
+ scrollable?: boolean;
61
+
77
62
  /**
78
63
  * Test ID for testing
79
64
  */
80
65
  testID?: string;
81
- }
66
+ }
@@ -27,7 +27,7 @@ export const AccordionExamples: React.FC = () => {
27
27
  id: 'rich1',
28
28
  title: 'Rich Content Example',
29
29
  content: (
30
- <View spacing="sm">
30
+ <View gap="sm">
31
31
  <Text weight="semibold">Features:</Text>
32
32
  <Text>• Cross-platform support</Text>
33
33
  <Text>• Type-safe styling</Text>
@@ -39,7 +39,7 @@ export const AccordionExamples: React.FC = () => {
39
39
  id: 'rich2',
40
40
  title: 'Another Section',
41
41
  content: (
42
- <View>
42
+ <View gap="xl">
43
43
  <Text>This section contains rich content with multiple paragraphs.</Text>
44
44
  <Text style={{ marginTop: 8 }}>You can include any React components here.</Text>
45
45
  </View>
@@ -55,67 +55,67 @@ export const AccordionExamples: React.FC = () => {
55
55
 
56
56
  return (
57
57
  <Screen background="primary" padding="lg">
58
- <View spacing="lg">
59
- <Text size="xl" weight="bold">Accordion Examples</Text>
58
+ <View gap="lg">
59
+ <Text typography="h3">Accordion Examples</Text>
60
60
 
61
- <View spacing="md">
62
- <Text size="lg" weight="semibold">Basic Accordion</Text>
61
+ <View gap="md">
62
+ <Text typography="h5">Basic Accordion</Text>
63
63
  <Accordion items={basicItems} />
64
64
  </View>
65
65
 
66
- <View spacing="md">
67
- <Text size="lg" weight="semibold">Allow Multiple Expanded</Text>
66
+ <View gap="md">
67
+ <Text typography="h5">Allow Multiple Expanded</Text>
68
68
  <Accordion items={basicItems} allowMultiple />
69
69
  </View>
70
70
 
71
- <View spacing="md">
72
- <Text size="lg" weight="semibold">Default Expanded</Text>
71
+ <View gap="md">
72
+ <Text typography="h5">Default Expanded</Text>
73
73
  <Accordion items={basicItems} defaultExpanded={['item1', 'item2']} allowMultiple />
74
74
  </View>
75
75
 
76
- <View spacing="md">
77
- <Text size="lg" weight="semibold">Variants</Text>
78
- <View spacing="sm">
79
- <View spacing="xs">
80
- <Text size="sm" weight="medium">Default</Text>
76
+ <View gap="md">
77
+ <Text typography="h5">Variants</Text>
78
+ <View gap="sm">
79
+ <View gap="xs">
80
+ <Text typography="body2">Default</Text>
81
81
  <Accordion items={basicItems} type="standard" />
82
82
  </View>
83
- <View spacing="xs">
84
- <Text size="sm" weight="medium">Separated</Text>
83
+ <View gap="xs">
84
+ <Text typography="body2">Separated</Text>
85
85
  <Accordion items={basicItems} type="separated" />
86
86
  </View>
87
- <View spacing="xs">
88
- <Text size="sm" weight="medium">Bordered</Text>
87
+ <View gap="xs">
88
+ <Text typography="body2">Bordered</Text>
89
89
  <Accordion items={basicItems} type="bordered" />
90
90
  </View>
91
91
  </View>
92
92
  </View>
93
93
 
94
- <View spacing="md">
95
- <Text size="lg" weight="semibold">Sizes</Text>
96
- <View spacing="sm">
97
- <View spacing="xs">
98
- <Text size="sm" weight="medium">Small</Text>
94
+ <View gap="md">
95
+ <Text typography="h5">Sizes</Text>
96
+ <View gap="sm">
97
+ <View gap="xs">
98
+ <Text typography="body2">Small</Text>
99
99
  <Accordion items={basicItems} size="sm" type="separated" />
100
100
  </View>
101
- <View spacing="xs">
102
- <Text size="sm" weight="medium">Medium (default)</Text>
101
+ <View gap="xs">
102
+ <Text typography="body2">Medium (default)</Text>
103
103
  <Accordion items={basicItems} size="md" type="separated" />
104
104
  </View>
105
- <View spacing="xs">
106
- <Text size="sm" weight="medium">Large</Text>
105
+ <View gap="xs">
106
+ <Text typography="body2">Large</Text>
107
107
  <Accordion items={basicItems} size="lg" type="separated" />
108
108
  </View>
109
109
  </View>
110
110
  </View>
111
111
 
112
- <View spacing="md">
113
- <Text size="lg" weight="semibold">Rich Content</Text>
112
+ <View gap="md">
113
+ <Text typography="h5">Rich Content</Text>
114
114
  <Accordion items={richContentItems} type="bordered" />
115
115
  </View>
116
116
 
117
- <View spacing="md">
118
- <Text size="lg" weight="semibold">Disabled Items</Text>
117
+ <View gap="md">
118
+ <Text typography="h5">Disabled Items</Text>
119
119
  <Accordion items={disabledItems} type="separated" />
120
120
  </View>
121
121
  </View>
@@ -6,13 +6,13 @@ export const AlertExamples = () => {
6
6
 
7
7
  return (
8
8
  <Screen background="primary" safeArea>
9
- <View spacing="lg" style={{ maxWidth: 800, width: '100%', paddingHorizontal: 16, marginHorizontal: 'auto' }}>
10
- <Text size="xl" weight="bold">Alert Examples</Text>
9
+ <View gap="lg" style={{ maxWidth: 800, width: '100%', paddingHorizontal: 16, marginHorizontal: 'auto' }}>
10
+ <Text typography="h3">Alert Examples</Text>
11
11
 
12
- <View spacing="md">
13
- <Text size="lg" weight="semibold">Intent Variants</Text>
12
+ <View gap="md">
13
+ <Text typography="h5">Intent Variants</Text>
14
14
 
15
- <View spacing="sm">
15
+ <View gap="sm">
16
16
  <Alert
17
17
  intent="primary"
18
18
  title="Primary"
@@ -51,11 +51,11 @@ export const AlertExamples = () => {
51
51
  </View>
52
52
  </View>
53
53
 
54
- <View spacing="md">
55
- <Text size="lg" weight="semibold">Style Variants</Text>
54
+ <View gap="md">
55
+ <Text typography="h5">Style Variants</Text>
56
56
 
57
- <View spacing="sm">
58
- <Text size="md" weight="semibold">Filled</Text>
57
+ <View gap="sm">
58
+ <Text typography="subtitle1">Filled</Text>
59
59
  <Alert
60
60
  type="filled"
61
61
  intent="primary"
@@ -64,8 +64,8 @@ export const AlertExamples = () => {
64
64
  />
65
65
  </View>
66
66
 
67
- <View spacing="sm">
68
- <Text size="md" weight="semibold">Outlined</Text>
67
+ <View gap="sm">
68
+ <Text typography="subtitle1">Outlined</Text>
69
69
  <Alert
70
70
  type="outlined"
71
71
  intent="primary"
@@ -74,8 +74,8 @@ export const AlertExamples = () => {
74
74
  />
75
75
  </View>
76
76
 
77
- <View spacing="sm">
78
- <Text size="md" weight="semibold">Soft (Default)</Text>
77
+ <View gap="sm">
78
+ <Text typography="subtitle1">Soft (Default)</Text>
79
79
  <Alert
80
80
  type="soft"
81
81
  intent="primary"
@@ -85,8 +85,8 @@ export const AlertExamples = () => {
85
85
  </View>
86
86
  </View>
87
87
 
88
- <View spacing="md">
89
- <Text size="lg" weight="semibold">Without Icons</Text>
88
+ <View gap="md">
89
+ <Text typography="h5">Without Icons</Text>
90
90
 
91
91
  <Alert
92
92
  intent="success"
@@ -96,10 +96,10 @@ export const AlertExamples = () => {
96
96
  />
97
97
  </View>
98
98
 
99
- <View spacing="md">
100
- <Text size="lg" weight="semibold">Custom Icons</Text>
99
+ <View gap="md">
100
+ <Text typography="h5">Custom Icons</Text>
101
101
 
102
- <View spacing="sm">
102
+ <View gap="sm">
103
103
  <Alert
104
104
  intent="info"
105
105
  title="Custom Icon"
@@ -116,10 +116,10 @@ export const AlertExamples = () => {
116
116
  </View>
117
117
  </View>
118
118
 
119
- <View spacing="md">
120
- <Text size="lg" weight="semibold">Dismissible Alerts</Text>
119
+ <View gap="md">
120
+ <Text typography="h5">Dismissible Alerts</Text>
121
121
 
122
- <View spacing="sm">
122
+ <View gap="sm">
123
123
  {successVisible && (
124
124
  <Alert
125
125
  intent="success"
@@ -155,10 +155,10 @@ export const AlertExamples = () => {
155
155
  </View>
156
156
  </View>
157
157
 
158
- <View spacing="md">
159
- <Text size="lg" weight="semibold">With Actions</Text>
158
+ <View gap="md">
159
+ <Text typography="h5">With Actions</Text>
160
160
 
161
- <View spacing="sm">
161
+ <View gap="sm">
162
162
  <Alert
163
163
  intent="warning"
164
164
  title="Unsaved Changes"
@@ -189,26 +189,26 @@ export const AlertExamples = () => {
189
189
  </View>
190
190
  </View>
191
191
 
192
- <View spacing="md">
193
- <Text size="lg" weight="semibold">With Children</Text>
192
+ <View gap="md">
193
+ <Text typography="h5">With Children</Text>
194
194
 
195
195
  <Alert
196
196
  intent="info"
197
197
  title="Custom Content"
198
198
  >
199
- <View spacing="sm">
200
- <Text size="sm">You can use children to add custom content:</Text>
199
+ <View gap="sm">
200
+ <Text typography="body2">You can use children to add custom content:</Text>
201
201
  <View style={{ paddingLeft: 16 }}>
202
- <Text size="sm">• Custom formatted text</Text>
203
- <Text size="sm">• Lists and structured content</Text>
204
- <Text size="sm">• Any React components</Text>
202
+ <Text typography="body2">• Custom formatted text</Text>
203
+ <Text typography="body2">• Lists and structured content</Text>
204
+ <Text typography="body2">• Any React components</Text>
205
205
  </View>
206
206
  </View>
207
207
  </Alert>
208
208
  </View>
209
209
 
210
- <View spacing="md">
211
- <Text size="lg" weight="semibold">Complex Example</Text>
210
+ <View gap="md">
211
+ <Text typography="h5">Complex Example</Text>
212
212
 
213
213
  <Alert
214
214
  type="filled"
@@ -230,10 +230,10 @@ export const AlertExamples = () => {
230
230
  />
231
231
  </View>
232
232
 
233
- <View spacing="md">
234
- <Text size="lg" weight="semibold">All Intent Colors (Soft Variant)</Text>
233
+ <View gap="md">
234
+ <Text typography="h5">All Intent Colors (Soft Variant)</Text>
235
235
 
236
- <View spacing="sm">
236
+ <View gap="sm">
237
237
  {(['primary', 'success', 'error', 'warning', 'info', 'neutral'] as const).map((intent) => (
238
238
  <Alert
239
239
  key={intent}
@@ -245,10 +245,10 @@ export const AlertExamples = () => {
245
245
  </View>
246
246
  </View>
247
247
 
248
- <View spacing="md">
249
- <Text size="lg" weight="semibold">All Intent Colors (Outlined Variant)</Text>
248
+ <View gap="md">
249
+ <Text typography="h5">All Intent Colors (Outlined Variant)</Text>
250
250
 
251
- <View spacing="sm">
251
+ <View gap="sm">
252
252
  {(['primary', 'success', 'error', 'warning', 'info', 'neutral'] as const).map((intent) => (
253
253
  <Alert
254
254
  key={intent}
@@ -260,10 +260,10 @@ export const AlertExamples = () => {
260
260
  </View>
261
261
  </View>
262
262
 
263
- <View spacing="md">
264
- <Text size="lg" weight="semibold">All Intent Colors (Filled Variant)</Text>
263
+ <View gap="md">
264
+ <Text typography="h5">All Intent Colors (Filled Variant)</Text>
265
265
 
266
- <View spacing="sm">
266
+ <View gap="sm">
267
267
  {(['primary', 'success', 'error', 'warning', 'info', 'neutral'] as const).map((intent) => (
268
268
  <Alert
269
269
  key={intent}
@@ -4,14 +4,14 @@ import { Screen, View, Text, Avatar } from '../index';
4
4
  export const AvatarExamples = () => {
5
5
  return (
6
6
  <Screen background="primary" padding="lg">
7
- <View spacing="none">
8
- <Text size="lg" weight="bold" align="center">
7
+ <View gap="xl">
8
+ <Text typography="h4" align="center">
9
9
  Avatar Examples
10
10
  </Text>
11
11
 
12
12
  {/* Avatar Sizes */}
13
- <View spacing="md">
14
- <Text size="md" weight="semibold">Sizes</Text>
13
+ <View gap="md">
14
+ <Text typography="subtitle1">Sizes</Text>
15
15
  <View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
16
16
  <Avatar size="sm" fallback="S" />
17
17
  <Avatar size="md" fallback="M" />
@@ -21,8 +21,8 @@ export const AvatarExamples = () => {
21
21
  </View>
22
22
 
23
23
  {/* Avatar Shapes */}
24
- <View spacing="md">
25
- <Text size="md" weight="semibold">Shapes</Text>
24
+ <View gap="md">
25
+ <Text typography="subtitle1">Shapes</Text>
26
26
  <View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
27
27
  <Avatar shape="circle" fallback="C" size="lg" />
28
28
  <Avatar shape="square" fallback="S" size="lg" />
@@ -30,8 +30,8 @@ export const AvatarExamples = () => {
30
30
  </View>
31
31
 
32
32
  {/* Avatar with Fallbacks */}
33
- <View spacing="md">
34
- <Text size="md" weight="semibold">Fallback Text</Text>
33
+ <View gap="md">
34
+ <Text typography="subtitle1">Fallback Text</Text>
35
35
  <View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
36
36
  <Avatar fallback="JD" alt="John Doe" />
37
37
  <Avatar fallback="AB" alt="Alice Brown" />
@@ -41,8 +41,8 @@ export const AvatarExamples = () => {
41
41
  </View>
42
42
 
43
43
  {/* Avatar with Images */}
44
- <View spacing="md">
45
- <Text size="md" weight="semibold">With Images</Text>
44
+ <View gap="md">
45
+ <Text typography="subtitle1">With Images</Text>
46
46
  <View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
47
47
  <Avatar
48
48
  src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?w=150&h=150&fit=crop&crop=face"
@@ -63,8 +63,8 @@ export const AvatarExamples = () => {
63
63
  </View>
64
64
 
65
65
  {/* Avatar Group */}
66
- <View spacing="md">
67
- <Text size="md" weight="semibold">Avatar Group</Text>
66
+ <View gap="md">
67
+ <Text typography="subtitle1">Avatar Group</Text>
68
68
  <View style={{ flexDirection: 'row', gap: -8, alignItems: 'center' }}>
69
69
  <Avatar fallback="JD" size="md" />
70
70
  <Avatar fallback="AB" size="md" />
@@ -74,20 +74,20 @@ export const AvatarExamples = () => {
74
74
  </View>
75
75
 
76
76
  {/* Different Size Combinations */}
77
- <View spacing="md">
78
- <Text size="md" weight="semibold">Size Combinations</Text>
79
- <View spacing="sm">
77
+ <View gap="md">
78
+ <Text typography="subtitle1">Size Combinations</Text>
79
+ <View gap="sm">
80
80
  <View style={{ flexDirection: 'row', gap: 8, alignItems: 'center' }}>
81
81
  <Avatar size="sm" fallback="S" />
82
- <Text size="sm">Small avatar with text</Text>
82
+ <Text typography="body2">Small avatar with text</Text>
83
83
  </View>
84
84
  <View style={{ flexDirection: 'row', gap: 8, alignItems: 'center' }}>
85
85
  <Avatar size="md" fallback="M" />
86
- <Text size="md">Medium avatar with text</Text>
86
+ <Text typography="body1">Medium avatar with text</Text>
87
87
  </View>
88
88
  <View style={{ flexDirection: 'row', gap: 8, alignItems: 'center' }}>
89
89
  <Avatar size="lg" fallback="L" />
90
- <Text size="lg">Large avatar with text</Text>
90
+ <Text typography="h5">Large avatar with text</Text>
91
91
  </View>
92
92
  </View>
93
93
  </View>
@@ -4,14 +4,14 @@ import { Screen, View, Text, Badge, Button } from '../index';
4
4
  export const BadgeExamples = () => {
5
5
  return (
6
6
  <Screen background="primary" padding="lg">
7
- <View spacing="none">
8
- <Text size="lg" weight="bold" align="center">
7
+ <View gap="md">
8
+ <Text typography="h4" align="center">
9
9
  Badge Examples
10
10
  </Text>
11
11
 
12
12
  {/* Badge Variants */}
13
- <View spacing="md">
14
- <Text size="md" weight="semibold">Variants</Text>
13
+ <View gap="xs">
14
+ <Text typography="subtitle1">Variants</Text>
15
15
  <View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
16
16
  <Badge type="filled" color="blue">
17
17
  Filled
@@ -24,8 +24,8 @@ export const BadgeExamples = () => {
24
24
  </View>
25
25
 
26
26
  {/* Badge Sizes */}
27
- <View spacing="md">
28
- <Text size="md" weight="semibold">Sizes</Text>
27
+ <View gap="sm">
28
+ <Text typography="subtitle1">Sizes</Text>
29
29
  <View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
30
30
  <Badge size="sm" color="blue">
31
31
  Small
@@ -40,8 +40,8 @@ export const BadgeExamples = () => {
40
40
  </View>
41
41
 
42
42
  {/* Badge Colors */}
43
- <View spacing="md">
44
- <Text size="md" weight="semibold">Colors</Text>
43
+ <View gap="sm">
44
+ <Text typography="subtitle1">Colors</Text>
45
45
  <View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
46
46
  <Badge color="blue">
47
47
  Blue
@@ -65,8 +65,8 @@ export const BadgeExamples = () => {
65
65
  </View>
66
66
 
67
67
  {/* Badge Color Shades */}
68
- <View spacing="md">
69
- <Text size="md" weight="semibold">Color Shades</Text>
68
+ <View gap="sm">
69
+ <Text typography="subtitle1">Color Shades</Text>
70
70
  <View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
71
71
  <Badge color="blue.200">
72
72
  Blue 200
@@ -92,8 +92,8 @@ export const BadgeExamples = () => {
92
92
  </View>
93
93
 
94
94
  {/* Dot Badges */}
95
- <View spacing="md">
96
- <Text size="md" weight="semibold">Dot Badges</Text>
95
+ <View gap="sm">
96
+ <Text typography="subtitle1">Dot Badges</Text>
97
97
  <View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
98
98
  <Badge type="dot" color="blue" size="sm" />
99
99
  <Badge type="dot" color="green" size="md" />
@@ -104,8 +104,8 @@ export const BadgeExamples = () => {
104
104
  </View>
105
105
 
106
106
  {/* Number Badges */}
107
- <View spacing="md">
108
- <Text size="md" weight="semibold">Number Badges</Text>
107
+ <View gap="sm">
108
+ <Text typography="subtitle1">Number Badges</Text>
109
109
  <View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
110
110
  <Badge color="red" size="sm">
111
111
  1
@@ -123,8 +123,8 @@ export const BadgeExamples = () => {
123
123
  </View>
124
124
 
125
125
  {/* Status Badges */}
126
- <View spacing="md">
127
- <Text size="md" weight="semibold">Status Badges</Text>
126
+ <View gap="sm">
127
+ <Text typography="subtitle1">Status Badges</Text>
128
128
  <View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
129
129
  <Badge color="green" type="filled">
130
130
  ACTIVE
@@ -145,9 +145,9 @@ export const BadgeExamples = () => {
145
145
  </View>
146
146
 
147
147
  {/* Combined with Other Components */}
148
- <View spacing="md">
149
- <Text size="md" weight="semibold">With Other Components</Text>
150
- <View spacing="sm">
148
+ <View gap="sm">
149
+ <Text typography="subtitle1">With Other Components</Text>
150
+ <View gap="sm">
151
151
  <View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
152
152
  <Text>Notifications</Text>
153
153
  <Badge color="red" size="sm">3</Badge>
@@ -161,7 +161,7 @@ export const BadgeExamples = () => {
161
161
  <View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
162
162
  <Text>Status</Text>
163
163
  <Badge color="green" type="dot" />
164
- <Text size="sm" color="secondary">Online</Text>
164
+ <Text typography="caption" color="secondary">Online</Text>
165
165
  </View>
166
166
 
167
167
  <View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
@@ -174,8 +174,8 @@ export const BadgeExamples = () => {
174
174
  </View>
175
175
 
176
176
  {/* Category Badges */}
177
- <View spacing="md">
178
- <Text size="md" weight="semibold">Category Badges</Text>
177
+ <View gap="sm">
178
+ <Text typography="subtitle1">Category Badges</Text>
179
179
  <View style={{ flexDirection: 'row', gap: 8, flexWrap: 'wrap' }}>
180
180
  <Badge color="blue" type="outlined">
181
181
  React
@@ -196,8 +196,8 @@ export const BadgeExamples = () => {
196
196
  </View>
197
197
 
198
198
  {/* Badges with Icons */}
199
- <View spacing="md">
200
- <Text size="md" weight="semibold">Badges with Icons</Text>
199
+ <View gap="sm">
200
+ <Text typography="subtitle1">Badges with Icons</Text>
201
201
  <View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
202
202
  <Badge color="blue" icon="information">
203
203
  Info
@@ -215,8 +215,8 @@ export const BadgeExamples = () => {
215
215
  </View>
216
216
 
217
217
  {/* Icon-only Badges */}
218
- <View spacing="md">
219
- <Text size="md" weight="semibold">Icon-only Badges</Text>
218
+ <View gap="sm">
219
+ <Text typography="subtitle1">Icon-only Badges</Text>
220
220
  <View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
221
221
  <Badge color="blue" icon="star" size="sm" />
222
222
  <Badge color="green" icon="heart" size="md" />
@@ -226,8 +226,8 @@ export const BadgeExamples = () => {
226
226
  </View>
227
227
 
228
228
  {/* Status Badges with Icons */}
229
- <View spacing="md">
230
- <Text size="md" weight="semibold">Status with Icons</Text>
229
+ <View gap="sm">
230
+ <Text typography="subtitle1">Status with Icons</Text>
231
231
  <View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
232
232
  <Badge color="green" icon="check">
233
233
  VERIFIED
@@ -245,8 +245,8 @@ export const BadgeExamples = () => {
245
245
  </View>
246
246
 
247
247
  {/* Outlined Badges with Icons */}
248
- <View spacing="md">
249
- <Text size="md" weight="semibold">Outlined with Icons</Text>
248
+ <View gap="sm">
249
+ <Text typography="subtitle1">Outlined with Icons</Text>
250
250
  <View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
251
251
  <Badge color="blue" type="outlined" icon="download">
252
252
  Download