@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.
- package/package.json +4 -4
- package/src/Accordion/Accordion.native.tsx +15 -0
- package/src/Accordion/Accordion.styles.tsx +17 -0
- package/src/Accordion/Accordion.web.tsx +15 -0
- package/src/Accordion/types.ts +2 -1
- package/src/Button/Button.native.tsx +55 -2
- package/src/Button/Button.styles.tsx +22 -0
- package/src/Button/Button.web.tsx +6 -2
- package/src/Button/types.ts +15 -0
- package/src/Card/Card.native.tsx +18 -5
- package/src/Card/Card.styles.tsx +123 -131
- package/src/Card/Card.web.tsx +17 -4
- package/src/Card/types.ts +3 -8
- package/src/Checkbox/Checkbox.native.tsx +7 -0
- package/src/Checkbox/Checkbox.styles.tsx +11 -0
- package/src/Checkbox/Checkbox.web.tsx +7 -0
- package/src/Checkbox/types.ts +2 -1
- package/src/Input/Input.native.tsx +7 -0
- package/src/Input/Input.styles.tsx +9 -0
- package/src/Input/Input.web.tsx +7 -0
- package/src/Input/types.ts +2 -1
- package/src/List/List.native.tsx +15 -0
- package/src/List/List.styles.tsx +17 -0
- package/src/List/List.web.tsx +15 -0
- package/src/List/types.ts +2 -1
- package/src/Pressable/Pressable.native.tsx +13 -1
- package/src/Pressable/Pressable.styles.tsx +24 -0
- package/src/Pressable/Pressable.web.tsx +24 -6
- package/src/Pressable/types.ts +3 -2
- package/src/RadioButton/RadioButton.native.tsx +7 -0
- package/src/RadioButton/RadioButton.styles.tsx +9 -0
- package/src/RadioButton/RadioButton.web.tsx +7 -0
- package/src/RadioButton/types.ts +2 -1
- package/src/Screen/Screen.native.tsx +25 -12
- package/src/Screen/Screen.styles.tsx +28 -16
- package/src/Screen/Screen.web.tsx +16 -3
- package/src/Screen/types.ts +4 -8
- package/src/Select/Select.native.tsx +7 -0
- package/src/Select/Select.styles.tsx +11 -0
- package/src/Select/Select.web.tsx +7 -0
- package/src/Select/types.ts +2 -1
- package/src/Slider/Slider.native.tsx +7 -0
- package/src/Slider/Slider.styles.tsx +11 -0
- package/src/Slider/Slider.web.tsx +7 -0
- package/src/Slider/types.ts +2 -1
- package/src/Switch/Switch.native.tsx +7 -0
- package/src/Switch/Switch.styles.tsx +11 -0
- package/src/Switch/Switch.web.tsx +7 -0
- package/src/Switch/types.ts +2 -1
- package/src/TabBar/TabBar.native.tsx +19 -1
- package/src/TabBar/TabBar.styles.tsx +17 -0
- package/src/TabBar/TabBar.web.tsx +20 -1
- package/src/TabBar/types.ts +2 -1
- package/src/Table/Table.native.tsx +15 -0
- package/src/Table/Table.styles.tsx +27 -0
- package/src/Table/Table.web.tsx +15 -0
- package/src/Table/types.ts +2 -1
- package/src/Text/Text.native.tsx +14 -3
- package/src/Text/Text.styles.tsx +36 -12
- package/src/Text/Text.web.tsx +15 -4
- package/src/Text/types.ts +15 -4
- package/src/TextArea/TextArea.native.tsx +7 -0
- package/src/TextArea/TextArea.styles.tsx +11 -0
- package/src/TextArea/TextArea.web.tsx +7 -0
- package/src/TextArea/types.ts +2 -1
- package/src/View/View.native.tsx +35 -12
- package/src/View/View.styles.tsx +78 -75
- package/src/View/View.web.tsx +18 -9
- package/src/View/types.ts +8 -23
- package/src/examples/AccordionExamples.tsx +32 -32
- package/src/examples/AlertExamples.tsx +42 -42
- package/src/examples/AvatarExamples.tsx +18 -18
- package/src/examples/BadgeExamples.tsx +30 -30
- package/src/examples/BreadcrumbExamples.tsx +64 -64
- package/src/examples/ButtonExamples.tsx +128 -16
- package/src/examples/CardExamples.tsx +28 -28
- package/src/examples/CheckboxExamples.tsx +25 -25
- package/src/examples/ChipExamples.tsx +17 -17
- package/src/examples/DialogExamples.tsx +17 -17
- package/src/examples/DividerExamples.tsx +21 -21
- package/src/examples/IconExamples.tsx +113 -113
- package/src/examples/ImageExamples.tsx +34 -34
- package/src/examples/InputExamples.tsx +20 -20
- package/src/examples/LinkExamples.tsx +23 -23
- package/src/examples/ListExamples.tsx +42 -42
- package/src/examples/MenuExamples.tsx +15 -15
- package/src/examples/PopoverExamples.tsx +23 -23
- package/src/examples/ProgressExamples.tsx +41 -41
- package/src/examples/RadioButtonExamples.tsx +21 -21
- package/src/examples/SVGImageExamples.tsx +25 -25
- package/src/examples/ScreenExamples.tsx +41 -41
- package/src/examples/SelectExamples.tsx +59 -59
- package/src/examples/SkeletonExamples.tsx +30 -30
- package/src/examples/SliderExamples.tsx +54 -54
- package/src/examples/SwitchExamples.tsx +20 -20
- package/src/examples/TabBarExamples.tsx +26 -26
- package/src/examples/TableExamples.tsx +36 -36
- package/src/examples/TextAreaExamples.tsx +25 -25
- package/src/examples/TextExamples.tsx +61 -66
- package/src/examples/ThemeExtensionExamples.tsx +12 -12
- package/src/examples/TooltipExamples.tsx +21 -21
- package/src/examples/VideoExamples.tsx +28 -28
- package/src/examples/ViewExamples.tsx +59 -59
- package/src/index.ts +4 -0
- package/src/utils/buildViewStyleVariants.ts +148 -0
- package/src/utils/viewStyleProps.ts +63 -0
|
@@ -65,87 +65,87 @@ export const BreadcrumbExamples = () => {
|
|
|
65
65
|
|
|
66
66
|
return (
|
|
67
67
|
<Screen background="primary" safeArea padding="lg">
|
|
68
|
-
<View
|
|
69
|
-
<Text
|
|
68
|
+
<View gap="xl" style={{ maxWidth: 800, width: '100%', marginHorizontal: 'auto' }}>
|
|
69
|
+
<Text typography="h3">Breadcrumb Examples</Text>
|
|
70
70
|
|
|
71
|
-
<View
|
|
72
|
-
<Text
|
|
71
|
+
<View gap="md">
|
|
72
|
+
<Text typography="h5">Basic Breadcrumb</Text>
|
|
73
73
|
<Breadcrumb items={basicItems} />
|
|
74
74
|
</View>
|
|
75
75
|
|
|
76
|
-
<View
|
|
77
|
-
<Text
|
|
76
|
+
<View gap="md">
|
|
77
|
+
<Text typography="h5">With Icons (Components)</Text>
|
|
78
78
|
<Breadcrumb items={withIconsItems} />
|
|
79
|
-
<Text
|
|
79
|
+
<Text typography="caption" color="secondary">Using Icon components</Text>
|
|
80
80
|
</View>
|
|
81
81
|
|
|
82
|
-
<View
|
|
83
|
-
<Text
|
|
82
|
+
<View gap="md">
|
|
83
|
+
<Text typography="h5">With Icons (Icon Names)</Text>
|
|
84
84
|
<Breadcrumb items={withIconNamesItems} />
|
|
85
|
-
<Text
|
|
85
|
+
<Text typography="caption" color="secondary">Using icon name strings (recommended)</Text>
|
|
86
86
|
</View>
|
|
87
87
|
|
|
88
|
-
<View
|
|
89
|
-
<Text
|
|
90
|
-
<View
|
|
88
|
+
<View gap="md">
|
|
89
|
+
<Text typography="h5">Custom Separator</Text>
|
|
90
|
+
<View gap="sm">
|
|
91
91
|
<Breadcrumb items={basicItems} separator=">" />
|
|
92
92
|
<Breadcrumb items={basicItems} separator="•" />
|
|
93
93
|
<Breadcrumb items={basicItems} separator={<Icon name="chevron-right" size="sm" />} />
|
|
94
94
|
</View>
|
|
95
95
|
</View>
|
|
96
96
|
|
|
97
|
-
<View
|
|
98
|
-
<Text
|
|
99
|
-
<View
|
|
100
|
-
<View
|
|
101
|
-
<Text
|
|
97
|
+
<View gap="md">
|
|
98
|
+
<Text typography="h5">Sizes</Text>
|
|
99
|
+
<View gap="sm">
|
|
100
|
+
<View gap="xs">
|
|
101
|
+
<Text typography="subtitle1">Small</Text>
|
|
102
102
|
<Breadcrumb items={basicItems} size="sm" />
|
|
103
103
|
</View>
|
|
104
|
-
<View
|
|
105
|
-
<Text
|
|
104
|
+
<View gap="xs">
|
|
105
|
+
<Text typography="subtitle1">Medium (Default)</Text>
|
|
106
106
|
<Breadcrumb items={basicItems} size="md" />
|
|
107
107
|
</View>
|
|
108
|
-
<View
|
|
109
|
-
<Text
|
|
108
|
+
<View gap="xs">
|
|
109
|
+
<Text typography="subtitle1">Large</Text>
|
|
110
110
|
<Breadcrumb items={basicItems} size="lg" />
|
|
111
111
|
</View>
|
|
112
112
|
</View>
|
|
113
113
|
</View>
|
|
114
114
|
|
|
115
|
-
<View
|
|
116
|
-
<Text
|
|
117
|
-
<View
|
|
118
|
-
<View
|
|
119
|
-
<Text
|
|
115
|
+
<View gap="md">
|
|
116
|
+
<Text typography="h5">Intent Colors</Text>
|
|
117
|
+
<View gap="sm">
|
|
118
|
+
<View gap="xs">
|
|
119
|
+
<Text typography="subtitle1">Primary (Default)</Text>
|
|
120
120
|
<Breadcrumb items={basicItems} intent="primary" />
|
|
121
121
|
</View>
|
|
122
|
-
<View
|
|
123
|
-
<Text
|
|
122
|
+
<View gap="xs">
|
|
123
|
+
<Text typography="subtitle1">Neutral</Text>
|
|
124
124
|
<Breadcrumb items={basicItems} intent="neutral" />
|
|
125
125
|
</View>
|
|
126
126
|
</View>
|
|
127
127
|
</View>
|
|
128
128
|
|
|
129
|
-
<View
|
|
130
|
-
<Text
|
|
131
|
-
<View
|
|
132
|
-
<View
|
|
133
|
-
<Text
|
|
129
|
+
<View gap="md">
|
|
130
|
+
<Text typography="h5">Truncation</Text>
|
|
131
|
+
<View gap="sm">
|
|
132
|
+
<View gap="xs">
|
|
133
|
+
<Text typography="caption" color="secondary">Full path (7 items):</Text>
|
|
134
134
|
<Breadcrumb items={longPathItems} />
|
|
135
135
|
</View>
|
|
136
|
-
<View
|
|
137
|
-
<Text
|
|
136
|
+
<View gap="xs">
|
|
137
|
+
<Text typography="caption" color="secondary">Truncated to 4 items (shows first + last 3):</Text>
|
|
138
138
|
<Breadcrumb items={longPathItems} maxItems={4} />
|
|
139
139
|
</View>
|
|
140
|
-
<View
|
|
141
|
-
<Text
|
|
140
|
+
<View gap="xs">
|
|
141
|
+
<Text typography="caption" color="secondary">Truncated to 3 items (shows first + last 2):</Text>
|
|
142
142
|
<Breadcrumb items={longPathItems} maxItems={3} />
|
|
143
143
|
</View>
|
|
144
144
|
</View>
|
|
145
145
|
</View>
|
|
146
146
|
|
|
147
|
-
<View
|
|
148
|
-
<Text
|
|
147
|
+
<View gap="md">
|
|
148
|
+
<Text typography="h5">With Disabled Items</Text>
|
|
149
149
|
<Breadcrumb
|
|
150
150
|
items={[
|
|
151
151
|
{ label: 'Home', onPress: () => console.log('Home') },
|
|
@@ -156,8 +156,8 @@ export const BreadcrumbExamples = () => {
|
|
|
156
156
|
/>
|
|
157
157
|
</View>
|
|
158
158
|
|
|
159
|
-
<View
|
|
160
|
-
<Text
|
|
159
|
+
<View gap="md">
|
|
160
|
+
<Text typography="h5">Non-clickable Items</Text>
|
|
161
161
|
<Breadcrumb
|
|
162
162
|
items={[
|
|
163
163
|
{ label: 'Home' },
|
|
@@ -166,11 +166,11 @@ export const BreadcrumbExamples = () => {
|
|
|
166
166
|
{ label: 'Item' },
|
|
167
167
|
]}
|
|
168
168
|
/>
|
|
169
|
-
<Text
|
|
169
|
+
<Text typography="caption" color="secondary">None of these items are clickable</Text>
|
|
170
170
|
</View>
|
|
171
171
|
|
|
172
|
-
<View
|
|
173
|
-
<Text
|
|
172
|
+
<View gap="md">
|
|
173
|
+
<Text typography="h5">Mixed Clickable & Non-clickable</Text>
|
|
174
174
|
<Breadcrumb
|
|
175
175
|
items={[
|
|
176
176
|
{ label: 'Home', onPress: () => console.log('Home') },
|
|
@@ -181,8 +181,8 @@ export const BreadcrumbExamples = () => {
|
|
|
181
181
|
/>
|
|
182
182
|
</View>
|
|
183
183
|
|
|
184
|
-
<View
|
|
185
|
-
<Text
|
|
184
|
+
<View gap="md">
|
|
185
|
+
<Text typography="h5">File System Example</Text>
|
|
186
186
|
<Breadcrumb
|
|
187
187
|
items={[
|
|
188
188
|
{
|
|
@@ -214,8 +214,8 @@ export const BreadcrumbExamples = () => {
|
|
|
214
214
|
/>
|
|
215
215
|
</View>
|
|
216
216
|
|
|
217
|
-
<View
|
|
218
|
-
<Text
|
|
217
|
+
<View gap="md">
|
|
218
|
+
<Text typography="h5">E-commerce Example</Text>
|
|
219
219
|
<Breadcrumb
|
|
220
220
|
items={[
|
|
221
221
|
{ label: 'Shop', onPress: () => console.log('Shop') },
|
|
@@ -228,32 +228,32 @@ export const BreadcrumbExamples = () => {
|
|
|
228
228
|
/>
|
|
229
229
|
</View>
|
|
230
230
|
|
|
231
|
-
<View
|
|
232
|
-
<Text
|
|
233
|
-
<Text
|
|
231
|
+
<View gap="md">
|
|
232
|
+
<Text typography="h5">Responsive Breadcrumbs</Text>
|
|
233
|
+
<Text typography="caption" color="secondary">
|
|
234
234
|
Automatically collapses middle items into a dropdown menu on narrow screens
|
|
235
235
|
</Text>
|
|
236
|
-
<View
|
|
237
|
-
<View
|
|
238
|
-
<Text
|
|
239
|
-
<Text
|
|
236
|
+
<View gap="sm">
|
|
237
|
+
<View gap="xs">
|
|
238
|
+
<Text typography="subtitle1">Default (minVisibleItems: 3)</Text>
|
|
239
|
+
<Text typography="caption" color="secondary">Shows first item + dropdown + last item</Text>
|
|
240
240
|
<Breadcrumb
|
|
241
241
|
items={longPathItems}
|
|
242
242
|
responsive
|
|
243
243
|
/>
|
|
244
244
|
</View>
|
|
245
|
-
<View
|
|
246
|
-
<Text
|
|
247
|
-
<Text
|
|
245
|
+
<View gap="xs">
|
|
246
|
+
<Text typography="subtitle1">More Visible Items (minVisibleItems: 4)</Text>
|
|
247
|
+
<Text typography="caption" color="secondary">Shows first item + dropdown + last 2 items</Text>
|
|
248
248
|
<Breadcrumb
|
|
249
249
|
items={longPathItems}
|
|
250
250
|
responsive
|
|
251
251
|
minVisibleItems={4}
|
|
252
252
|
/>
|
|
253
253
|
</View>
|
|
254
|
-
<View
|
|
255
|
-
<Text
|
|
256
|
-
<Text
|
|
254
|
+
<View gap="xs">
|
|
255
|
+
<Text typography="subtitle1">Fewer Items (minVisibleItems: 2)</Text>
|
|
256
|
+
<Text typography="caption" color="secondary">Shows first item + dropdown (all items collapsed)</Text>
|
|
257
257
|
<Breadcrumb
|
|
258
258
|
items={longPathItems}
|
|
259
259
|
responsive
|
|
@@ -263,8 +263,8 @@ export const BreadcrumbExamples = () => {
|
|
|
263
263
|
</View>
|
|
264
264
|
</View>
|
|
265
265
|
|
|
266
|
-
<View
|
|
267
|
-
<Text
|
|
266
|
+
<View gap="md">
|
|
267
|
+
<Text typography="h5">Responsive with Icons</Text>
|
|
268
268
|
<Breadcrumb
|
|
269
269
|
items={[
|
|
270
270
|
{
|
|
@@ -8,14 +8,14 @@ export const ButtonExamples = () => {
|
|
|
8
8
|
|
|
9
9
|
return (
|
|
10
10
|
<Screen background="primary">
|
|
11
|
-
<View
|
|
12
|
-
<Text
|
|
11
|
+
<View gap="xl">
|
|
12
|
+
<Text typography="h4" align="center">
|
|
13
13
|
Button Examples
|
|
14
14
|
</Text>
|
|
15
15
|
|
|
16
16
|
{/* Button Variants */}
|
|
17
|
-
<View
|
|
18
|
-
<Text
|
|
17
|
+
<View gap="md">
|
|
18
|
+
<Text typography="subtitle1">Variants</Text>
|
|
19
19
|
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap' }}>
|
|
20
20
|
<Button
|
|
21
21
|
type="contained"
|
|
@@ -42,8 +42,8 @@ export const ButtonExamples = () => {
|
|
|
42
42
|
</View>
|
|
43
43
|
|
|
44
44
|
{/* Button Sizes */}
|
|
45
|
-
<View
|
|
46
|
-
<Text
|
|
45
|
+
<View gap="md">
|
|
46
|
+
<Text typography="subtitle1">Sizes</Text>
|
|
47
47
|
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
|
|
48
48
|
<Button
|
|
49
49
|
size="sm"
|
|
@@ -73,8 +73,8 @@ export const ButtonExamples = () => {
|
|
|
73
73
|
</View>
|
|
74
74
|
|
|
75
75
|
{/* Button Intents */}
|
|
76
|
-
<View
|
|
77
|
-
<Text
|
|
76
|
+
<View gap="md">
|
|
77
|
+
<Text typography="subtitle1">Intents</Text>
|
|
78
78
|
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap' }}>
|
|
79
79
|
<Button
|
|
80
80
|
intent="primary"
|
|
@@ -115,8 +115,8 @@ export const ButtonExamples = () => {
|
|
|
115
115
|
</View>
|
|
116
116
|
|
|
117
117
|
{/* Disabled States */}
|
|
118
|
-
<View
|
|
119
|
-
<Text
|
|
118
|
+
<View gap="md">
|
|
119
|
+
<Text typography="subtitle1">Disabled States</Text>
|
|
120
120
|
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap' }}>
|
|
121
121
|
<Button
|
|
122
122
|
type="contained"
|
|
@@ -146,8 +146,8 @@ export const ButtonExamples = () => {
|
|
|
146
146
|
</View>
|
|
147
147
|
|
|
148
148
|
{/* Buttons with Icons */}
|
|
149
|
-
<View
|
|
150
|
-
<Text
|
|
149
|
+
<View gap="md">
|
|
150
|
+
<Text typography="subtitle1">Buttons with Icons</Text>
|
|
151
151
|
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap' }}>
|
|
152
152
|
<Button
|
|
153
153
|
type="contained"
|
|
@@ -194,8 +194,8 @@ export const ButtonExamples = () => {
|
|
|
194
194
|
</View>
|
|
195
195
|
|
|
196
196
|
{/* Icon-only Buttons */}
|
|
197
|
-
<View
|
|
198
|
-
<Text
|
|
197
|
+
<View gap="md">
|
|
198
|
+
<Text typography="subtitle1">Icon-only Buttons</Text>
|
|
199
199
|
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap', alignItems: 'center' }}>
|
|
200
200
|
<Button
|
|
201
201
|
type="contained"
|
|
@@ -234,8 +234,8 @@ export const ButtonExamples = () => {
|
|
|
234
234
|
</View>
|
|
235
235
|
|
|
236
236
|
{/* Different Intents with Icons */}
|
|
237
|
-
<View
|
|
238
|
-
<Text
|
|
237
|
+
<View gap="md">
|
|
238
|
+
<Text typography="subtitle1">Icons with Different Intents</Text>
|
|
239
239
|
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap' }}>
|
|
240
240
|
<Button
|
|
241
241
|
type="contained"
|
|
@@ -271,6 +271,118 @@ export const ButtonExamples = () => {
|
|
|
271
271
|
</Button>
|
|
272
272
|
</View>
|
|
273
273
|
</View>
|
|
274
|
+
|
|
275
|
+
{/* Gradient Overlay */}
|
|
276
|
+
<View gap="md">
|
|
277
|
+
<Text typography="subtitle1">Gradient Overlay</Text>
|
|
278
|
+
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap' }}>
|
|
279
|
+
<Button
|
|
280
|
+
type="contained"
|
|
281
|
+
intent="primary"
|
|
282
|
+
onPress={() => handlePress('no-gradient')}
|
|
283
|
+
>
|
|
284
|
+
No Gradient
|
|
285
|
+
</Button>
|
|
286
|
+
<Button
|
|
287
|
+
type="contained"
|
|
288
|
+
intent="primary"
|
|
289
|
+
gradient="darken"
|
|
290
|
+
onPress={() => handlePress('gradient-darken')}
|
|
291
|
+
>
|
|
292
|
+
Darken
|
|
293
|
+
</Button>
|
|
294
|
+
<Button
|
|
295
|
+
type="contained"
|
|
296
|
+
intent="primary"
|
|
297
|
+
gradient="lighten"
|
|
298
|
+
onPress={() => handlePress('gradient-lighten')}
|
|
299
|
+
>
|
|
300
|
+
Lighten
|
|
301
|
+
</Button>
|
|
302
|
+
</View>
|
|
303
|
+
</View>
|
|
304
|
+
|
|
305
|
+
{/* Gradient with Different Intents */}
|
|
306
|
+
<View gap="md">
|
|
307
|
+
<Text typography="subtitle1">Gradient Intents (Darken)</Text>
|
|
308
|
+
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap' }}>
|
|
309
|
+
<Button
|
|
310
|
+
type="contained"
|
|
311
|
+
intent="primary"
|
|
312
|
+
gradient="darken"
|
|
313
|
+
onPress={() => handlePress('gradient-primary')}
|
|
314
|
+
>
|
|
315
|
+
Primary
|
|
316
|
+
</Button>
|
|
317
|
+
<Button
|
|
318
|
+
type="contained"
|
|
319
|
+
intent="success"
|
|
320
|
+
gradient="darken"
|
|
321
|
+
onPress={() => handlePress('gradient-success')}
|
|
322
|
+
>
|
|
323
|
+
Success
|
|
324
|
+
</Button>
|
|
325
|
+
<Button
|
|
326
|
+
type="contained"
|
|
327
|
+
intent="error"
|
|
328
|
+
gradient="darken"
|
|
329
|
+
onPress={() => handlePress('gradient-error')}
|
|
330
|
+
>
|
|
331
|
+
Error
|
|
332
|
+
</Button>
|
|
333
|
+
<Button
|
|
334
|
+
type="contained"
|
|
335
|
+
intent="warning"
|
|
336
|
+
gradient="darken"
|
|
337
|
+
onPress={() => handlePress('gradient-warning')}
|
|
338
|
+
>
|
|
339
|
+
Warning
|
|
340
|
+
</Button>
|
|
341
|
+
<Button
|
|
342
|
+
type="contained"
|
|
343
|
+
intent="neutral"
|
|
344
|
+
gradient="darken"
|
|
345
|
+
onPress={() => handlePress('gradient-neutral')}
|
|
346
|
+
>
|
|
347
|
+
Neutral
|
|
348
|
+
</Button>
|
|
349
|
+
</View>
|
|
350
|
+
</View>
|
|
351
|
+
|
|
352
|
+
{/* Gradient with Icons */}
|
|
353
|
+
<View gap="md">
|
|
354
|
+
<Text typography="subtitle1">Gradient with Icons</Text>
|
|
355
|
+
<View style={{ flexDirection: 'row', gap: 12, flexWrap: 'wrap' }}>
|
|
356
|
+
<Button
|
|
357
|
+
type="contained"
|
|
358
|
+
intent="primary"
|
|
359
|
+
gradient="darken"
|
|
360
|
+
leftIcon="rocket-launch"
|
|
361
|
+
onPress={() => handlePress('gradient-icon-launch')}
|
|
362
|
+
>
|
|
363
|
+
Launch
|
|
364
|
+
</Button>
|
|
365
|
+
<Button
|
|
366
|
+
type="contained"
|
|
367
|
+
intent="success"
|
|
368
|
+
gradient="lighten"
|
|
369
|
+
leftIcon="check"
|
|
370
|
+
rightIcon="arrow-right"
|
|
371
|
+
onPress={() => handlePress('gradient-icon-submit')}
|
|
372
|
+
>
|
|
373
|
+
Submit
|
|
374
|
+
</Button>
|
|
375
|
+
<Button
|
|
376
|
+
type="contained"
|
|
377
|
+
intent="error"
|
|
378
|
+
gradient="darken"
|
|
379
|
+
leftIcon="delete"
|
|
380
|
+
onPress={() => handlePress('gradient-icon-delete')}
|
|
381
|
+
>
|
|
382
|
+
Delete
|
|
383
|
+
</Button>
|
|
384
|
+
</View>
|
|
385
|
+
</View>
|
|
274
386
|
</View>
|
|
275
387
|
</Screen>
|
|
276
388
|
);
|
|
@@ -8,39 +8,39 @@ export const CardExamples = () => {
|
|
|
8
8
|
|
|
9
9
|
return (
|
|
10
10
|
<Screen background="primary" padding="lg">
|
|
11
|
-
<View
|
|
12
|
-
<Text
|
|
11
|
+
<View gap="xl">
|
|
12
|
+
<Text typography="h4" align="center">
|
|
13
13
|
Card Examples
|
|
14
14
|
</Text>
|
|
15
15
|
|
|
16
16
|
{/* Card Variants */}
|
|
17
|
-
<View
|
|
18
|
-
<Text
|
|
19
|
-
<View
|
|
17
|
+
<View gap="md">
|
|
18
|
+
<Text typography="subtitle1">Variants</Text>
|
|
19
|
+
<View gap="sm" style={{ gap: 10 }}>
|
|
20
20
|
<Card type="default" padding="md">
|
|
21
21
|
<Text>Default Card</Text>
|
|
22
|
-
<Text
|
|
22
|
+
<Text typography="caption" color="secondary">
|
|
23
23
|
This is a default card with standard styling
|
|
24
24
|
</Text>
|
|
25
25
|
</Card>
|
|
26
26
|
|
|
27
27
|
<Card type="outlined" padding="md">
|
|
28
28
|
<Text>Outlined Card</Text>
|
|
29
|
-
<Text
|
|
29
|
+
<Text typography="caption" color="secondary">
|
|
30
30
|
This is an outlined card with border
|
|
31
31
|
</Text>
|
|
32
32
|
</Card>
|
|
33
33
|
|
|
34
34
|
<Card type="elevated" padding="md">
|
|
35
35
|
<Text>Elevated Card</Text>
|
|
36
|
-
<Text
|
|
36
|
+
<Text typography="caption" color="secondary">
|
|
37
37
|
This is an elevated card with shadow
|
|
38
38
|
</Text>
|
|
39
39
|
</Card>
|
|
40
40
|
|
|
41
41
|
<Card type="filled" padding="md">
|
|
42
42
|
<Text>Filled Card</Text>
|
|
43
|
-
<Text
|
|
43
|
+
<Text typography="caption" color="secondary">
|
|
44
44
|
This is a filled card with background
|
|
45
45
|
</Text>
|
|
46
46
|
</Card>
|
|
@@ -48,9 +48,9 @@ export const CardExamples = () => {
|
|
|
48
48
|
</View>
|
|
49
49
|
|
|
50
50
|
{/* Card Intents */}
|
|
51
|
-
<View
|
|
52
|
-
<Text
|
|
53
|
-
<View
|
|
51
|
+
<View gap="md">
|
|
52
|
+
<Text typography="subtitle1">Intents</Text>
|
|
53
|
+
<View gap="sm" style={{ gap: 10 }}>
|
|
54
54
|
<Card intent="neutral" padding="md" type="outlined">
|
|
55
55
|
<Text>Neutral Card</Text>
|
|
56
56
|
</Card>
|
|
@@ -78,10 +78,10 @@ export const CardExamples = () => {
|
|
|
78
78
|
</View>
|
|
79
79
|
|
|
80
80
|
{/* Card Padding */}
|
|
81
|
-
<View
|
|
82
|
-
<Text
|
|
83
|
-
<View
|
|
84
|
-
<Card
|
|
81
|
+
<View gap="md">
|
|
82
|
+
<Text typography="subtitle1">Padding</Text>
|
|
83
|
+
<View gap="sm">
|
|
84
|
+
<Card type="outlined">
|
|
85
85
|
<Text>No Padding</Text>
|
|
86
86
|
</Card>
|
|
87
87
|
|
|
@@ -100,9 +100,9 @@ export const CardExamples = () => {
|
|
|
100
100
|
</View>
|
|
101
101
|
|
|
102
102
|
{/* Card Radius */}
|
|
103
|
-
<View
|
|
104
|
-
<Text
|
|
105
|
-
<View
|
|
103
|
+
<View gap="md">
|
|
104
|
+
<Text typography="subtitle1">Border Radius</Text>
|
|
105
|
+
<View gap="sm">
|
|
106
106
|
<Card radius="none" type="outlined" padding="md">
|
|
107
107
|
<Text>No Radius</Text>
|
|
108
108
|
</Card>
|
|
@@ -122,9 +122,9 @@ export const CardExamples = () => {
|
|
|
122
122
|
</View>
|
|
123
123
|
|
|
124
124
|
{/* Clickable Cards */}
|
|
125
|
-
<View
|
|
126
|
-
<Text
|
|
127
|
-
<View
|
|
125
|
+
<View gap="md">
|
|
126
|
+
<Text typography="subtitle1">Interactive Cards</Text>
|
|
127
|
+
<View gap="sm">
|
|
128
128
|
<Card
|
|
129
129
|
clickable
|
|
130
130
|
onPress={() => handleCardPress('clickable')}
|
|
@@ -132,7 +132,7 @@ export const CardExamples = () => {
|
|
|
132
132
|
padding="md"
|
|
133
133
|
>
|
|
134
134
|
<Text weight="semibold">Clickable Card</Text>
|
|
135
|
-
<Text
|
|
135
|
+
<Text typography="caption" color="secondary">
|
|
136
136
|
Click me to see interaction
|
|
137
137
|
</Text>
|
|
138
138
|
</Card>
|
|
@@ -145,7 +145,7 @@ export const CardExamples = () => {
|
|
|
145
145
|
padding="md"
|
|
146
146
|
>
|
|
147
147
|
<Text weight="semibold">Disabled Card</Text>
|
|
148
|
-
<Text
|
|
148
|
+
<Text typography="caption" color="secondary">
|
|
149
149
|
This card is disabled
|
|
150
150
|
</Text>
|
|
151
151
|
</Card>
|
|
@@ -153,11 +153,11 @@ export const CardExamples = () => {
|
|
|
153
153
|
</View>
|
|
154
154
|
|
|
155
155
|
{/* Complex Card Layout */}
|
|
156
|
-
<View
|
|
157
|
-
<Text
|
|
156
|
+
<View gap="md">
|
|
157
|
+
<Text typography="subtitle1">Complex Layout</Text>
|
|
158
158
|
<Card type="elevated" padding="lg" radius="md">
|
|
159
|
-
<Text
|
|
160
|
-
<Text
|
|
159
|
+
<Text typography="h4">Product Card</Text>
|
|
160
|
+
<Text typography="caption" color="secondary" style={{ marginVertical: 8 }}>
|
|
161
161
|
This is a more complex card layout with multiple elements
|
|
162
162
|
</Text>
|
|
163
163
|
<View style={{ flexDirection: 'row', gap: 8, marginTop: 12 }}>
|