@app-studio/web 0.9.39 → 0.9.43
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/dist/bot/Bot.d.ts +15 -0
- package/dist/bot/Cache.d.ts +13 -0
- package/dist/bot/Config.d.ts +13 -0
- package/dist/bot/ContentFetcher.d.ts +9 -0
- package/dist/bot/DocuCode.d.ts +19 -0
- package/dist/bot/FileHandler.d.ts +39 -0
- package/dist/bot/ai/AnthropicConnector.d.ts +6 -0
- package/dist/bot/ai/GeminiConnector.d.ts +7 -0
- package/dist/bot/ai/GroqConnector.d.ts +7 -0
- package/dist/bot/ai/HuggingFaceConnector.d.ts +6 -0
- package/dist/bot/ai/OpenAIConnector.d.ts +11 -0
- package/dist/bot/ai/ReplicateConnector.d.ts +7 -0
- package/dist/bot/ai/SambaNovaConnector.d.ts +6 -0
- package/dist/bot/ai/ai.config.d.ts +12 -0
- package/dist/bot/ai/ai.service.d.ts +36 -0
- package/dist/bot/data.d.ts +19 -0
- package/dist/bot/extractors.d.ts +8 -0
- package/dist/bot/index.d.ts +1 -0
- package/dist/bot/prompt/1-project.d.ts +1 -0
- package/dist/bot/prompt/2-response.d.ts +1 -0
- package/dist/bot/prompt/3-comment.d.ts +1 -0
- package/docs/components/Accordion.mdx +74 -121
- package/docs/components/Alert.mdx +18 -69
- package/docs/components/AspectRatio.mdx +11 -9
- package/docs/components/AudioInput.mdx +43 -0
- package/docs/components/Avatar.mdx +17 -42
- package/docs/components/Background.mdx +99 -491
- package/docs/components/Badge.mdx +37 -122
- package/docs/components/Button.mdx +71 -123
- package/docs/components/Calendar.mdx +7 -7
- package/docs/components/Card.mdx +238 -281
- package/docs/components/Carousel.mdx +88 -315
- package/docs/components/Center.mdx +22 -22
- package/docs/components/Chart.mdx +171 -26
- package/docs/components/ChatInput.mdx +327 -275
- package/docs/components/Checkbox.mdx +3 -5
- package/docs/components/ColorInput.mdx +10 -10
- package/docs/components/ColorPicker.mdx +452 -0
- package/docs/components/ComboBox.mdx +14 -14
- package/docs/components/Command.mdx +140 -188
- package/docs/components/ContextMenu.mdx +47 -171
- package/docs/components/CookieConsent.mdx +53 -0
- package/docs/components/CountryPicker.mdx +10 -10
- package/docs/components/DatePicker.mdx +4 -4
- package/docs/components/DragAndDrop.mdx +279 -463
- package/docs/components/Drawer.mdx +401 -100
- package/docs/components/DropdownMenu.mdx +37 -155
- package/docs/components/EmojiPicker.mdx +84 -0
- package/docs/components/File.mdx +130 -4
- package/docs/components/Flow.mdx +3 -3
- package/docs/components/Form.mdx +4 -4
- package/docs/components/Formik.mdx +41 -41
- package/docs/components/Gradient.mdx +355 -178
- package/docs/components/Horizontal.mdx +1 -2
- package/docs/components/HoverCard.mdx +57 -125
- package/docs/components/Icon.mdx +10 -10
- package/docs/components/KanbanBoard.mdx +12 -12
- package/docs/components/Label.mdx +8 -8
- package/docs/components/Link.mdx +19 -27
- package/docs/components/Loader.mdx +224 -407
- package/docs/components/Menubar.mdx +71 -67
- package/docs/components/Message.mdx +211 -526
- package/docs/components/Modal.mdx +351 -475
- package/docs/components/NavigationMenu.mdx +8 -8
- package/docs/components/OTPInput.mdx +194 -0
- package/docs/components/Pagination.mdx +451 -107
- package/docs/components/Password.mdx +8 -8
- package/docs/components/ProgressBar.mdx +460 -0
- package/docs/components/Resizable.mdx +103 -102
- package/docs/components/Select.mdx +5 -5
- package/docs/components/Separator.mdx +11 -98
- package/docs/components/ShareButton.mdx +29 -0
- package/docs/components/Sidebar.mdx +70 -131
- package/docs/components/Slider.mdx +99 -185
- package/docs/components/StatusIndicator.mdx +373 -0
- package/docs/components/Switch.mdx +3 -3
- package/docs/components/Table.mdx +25 -105
- package/docs/components/Tabs.mdx +40 -143
- package/docs/components/TagInput.mdx +32 -32
- package/docs/components/Text.mdx +3 -3
- package/docs/components/TextArea.mdx +9 -9
- package/docs/components/TextField.mdx +17 -17
- package/docs/components/Title.mdx +267 -525
- package/docs/components/Toast.mdx +65 -142
- package/docs/components/Toggle.mdx +34 -46
- package/docs/components/ToggleGroup.mdx +29 -50
- package/docs/components/Tooltip.mdx +500 -137
- package/docs/components/Tree.mdx +4 -4
- package/docs/components/Uploader.mdx +205 -351
- package/docs/components/Vertical.mdx +22 -22
- package/package.json +1 -1
- package/dist/components/AuthGuard/AuthGuard.d.ts +0 -35
- package/dist/components/AuthGuard/index.d.ts +0 -1
- package/docs/adk-components.md +0 -319
- package/docs/adk-quick-start.md +0 -268
package/docs/components/Card.mdx
CHANGED
|
@@ -1,341 +1,298 @@
|
|
|
1
1
|
# Card
|
|
2
2
|
|
|
3
|
-
A
|
|
3
|
+
A versatile card component for displaying content in a contained, styled box with support for headers, content, and footers.
|
|
4
4
|
|
|
5
5
|
### **Import**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
```tsx
|
|
7
|
+
import { Card } from '@app-studio/web';
|
|
8
|
+
```
|
|
9
9
|
|
|
10
10
|
### **Default**
|
|
11
11
|
```tsx
|
|
12
12
|
import React from 'react';
|
|
13
|
-
import { Card } from '
|
|
13
|
+
import { Card } from '@app-studio/web';
|
|
14
14
|
import { Text } from 'app-studio';
|
|
15
15
|
|
|
16
|
-
export const
|
|
17
|
-
|
|
18
|
-
<Card>
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
);
|
|
22
|
-
};
|
|
16
|
+
export const DefaultCard = () => (
|
|
17
|
+
<Card>
|
|
18
|
+
<Text>Card content</Text>
|
|
19
|
+
</Card>
|
|
20
|
+
);
|
|
23
21
|
```
|
|
24
22
|
|
|
25
|
-
### **
|
|
26
|
-
|
|
23
|
+
### **Structured Layout**
|
|
24
|
+
Use Card.Header, Card.Content, and Card.Footer for organized layouts.
|
|
27
25
|
|
|
28
26
|
```tsx
|
|
29
27
|
import React from 'react';
|
|
30
|
-
import { Card } from '
|
|
31
|
-
import { Text } from 'app-studio';
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
28
|
+
import { Card } from '@app-studio/web';
|
|
29
|
+
import { Text, Button } from 'app-studio';
|
|
30
|
+
|
|
31
|
+
export const StructuredCard = () => (
|
|
32
|
+
<Card>
|
|
33
|
+
<Card.Header>
|
|
34
|
+
<Text fontSize={18} fontWeight="bold">Card Title</Text>
|
|
35
|
+
</Card.Header>
|
|
36
|
+
<Card.Content>
|
|
37
|
+
<Text>This is the main content of the card.</Text>
|
|
38
|
+
</Card.Content>
|
|
39
|
+
<Card.Footer>
|
|
40
|
+
<Button>Action</Button>
|
|
41
|
+
</Card.Footer>
|
|
42
|
+
</Card>
|
|
43
|
+
);
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### **variant**
|
|
47
|
+
The visual style variant of the card.
|
|
48
|
+
|
|
49
|
+
- **Type:** `Variant`
|
|
50
|
+
- **Default:** `'default'`
|
|
51
|
+
- **Possible Values:** `'default' | 'elevated' | 'outlined' | 'filled'`
|
|
52
|
+
|
|
53
|
+
```tsx
|
|
54
|
+
import React from 'react';
|
|
55
|
+
import { Card } from '@app-studio/web';
|
|
56
|
+
import { Text, Vertical } from 'app-studio';
|
|
57
|
+
|
|
58
|
+
export const VariantCards = () => (
|
|
59
|
+
<Vertical gap={15}>
|
|
60
|
+
{['default', 'elevated', 'outlined', 'filled'].map((variant) => (
|
|
61
|
+
<Card key={variant} variant={variant as any}>
|
|
62
|
+
<Card.Content>
|
|
63
|
+
<Text>{variant} variant</Text>
|
|
64
|
+
</Card.Content>
|
|
42
65
|
</Card>
|
|
66
|
+
))}
|
|
67
|
+
</Vertical>
|
|
68
|
+
);
|
|
69
|
+
```
|
|
43
70
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
71
|
+
### **size**
|
|
72
|
+
The size of the card, affecting padding.
|
|
73
|
+
|
|
74
|
+
- **Type:** `Size`
|
|
75
|
+
- **Default:** `'md'`
|
|
76
|
+
- **Possible Values:** `'xs' | 'sm' | 'md' | 'lg' | 'xl'`
|
|
77
|
+
|
|
78
|
+
```tsx
|
|
79
|
+
import React from 'react';
|
|
80
|
+
import { Card } from '@app-studio/web';
|
|
81
|
+
import { Text, Vertical } from 'app-studio';
|
|
82
|
+
|
|
83
|
+
export const SizedCards = () => (
|
|
84
|
+
<Vertical gap={15}>
|
|
85
|
+
{['xs', 'sm', 'md', 'lg', 'xl'].map((size) => (
|
|
86
|
+
<Card key={size} size={size as any}>
|
|
87
|
+
<Card.Content>
|
|
88
|
+
<Text>Size: {size}</Text>
|
|
89
|
+
</Card.Content>
|
|
49
90
|
</Card>
|
|
91
|
+
))}
|
|
92
|
+
</Vertical>
|
|
93
|
+
);
|
|
94
|
+
```
|
|
50
95
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
96
|
+
### **shape**
|
|
97
|
+
The shape of the card's corners.
|
|
98
|
+
|
|
99
|
+
- **Type:** `Shape`
|
|
100
|
+
- **Default:** `'rounded'`
|
|
101
|
+
- **Possible Values:** `'sharp' | 'rounded' | 'pillShaped'`
|
|
102
|
+
|
|
103
|
+
```tsx
|
|
104
|
+
import React from 'react';
|
|
105
|
+
import { Card } from '@app-studio/web';
|
|
106
|
+
import { Text, Horizontal } from 'app-studio';
|
|
107
|
+
|
|
108
|
+
export const ShapedCards = () => (
|
|
109
|
+
<Horizontal gap={15}>
|
|
110
|
+
{['sharp', 'rounded', 'pillShaped'].map((shape) => (
|
|
111
|
+
<Card key={shape} shape={shape as any}>
|
|
112
|
+
<Card.Content>
|
|
113
|
+
<Text>{shape}</Text>
|
|
114
|
+
</Card.Content>
|
|
56
115
|
</Card>
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
116
|
+
))}
|
|
117
|
+
</Horizontal>
|
|
118
|
+
);
|
|
60
119
|
```
|
|
61
120
|
|
|
62
|
-
### **
|
|
63
|
-
|
|
121
|
+
### **isFullWidth**
|
|
122
|
+
Whether the card should take up the full width of its container.
|
|
123
|
+
|
|
124
|
+
- **Type:** `boolean`
|
|
125
|
+
- **Default:** `false`
|
|
64
126
|
|
|
65
127
|
```tsx
|
|
66
128
|
import React from 'react';
|
|
67
|
-
import { Card } from '
|
|
129
|
+
import { Card } from '@app-studio/web';
|
|
68
130
|
import { Text } from 'app-studio';
|
|
69
|
-
import { Horizontal } from 'app-studio';
|
|
70
|
-
import { Button } from '../../Button/Button';
|
|
71
131
|
|
|
72
|
-
export const
|
|
73
|
-
|
|
74
|
-
<Card>
|
|
75
|
-
<
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
<Card.Content>
|
|
80
|
-
<Text>
|
|
81
|
-
This card uses the structured layout with separate header, content, and footer sections.
|
|
82
|
-
The content area is where the main information goes.
|
|
83
|
-
</Text>
|
|
84
|
-
</Card.Content>
|
|
85
|
-
|
|
86
|
-
<Card.Footer>
|
|
87
|
-
<Horizontal justifyContent="flex-end" gap={10}>
|
|
88
|
-
<Button variant="outline">Cancel</Button>
|
|
89
|
-
<Button>Submit</Button>
|
|
90
|
-
</Horizontal>
|
|
91
|
-
</Card.Footer>
|
|
92
|
-
</Card>
|
|
93
|
-
);
|
|
94
|
-
};
|
|
132
|
+
export const FullWidthCard = () => (
|
|
133
|
+
<Card isFullWidth>
|
|
134
|
+
<Card.Content>
|
|
135
|
+
<Text>This card spans the full width</Text>
|
|
136
|
+
</Card.Content>
|
|
137
|
+
</Card>
|
|
138
|
+
);
|
|
95
139
|
```
|
|
96
140
|
|
|
97
|
-
### **
|
|
98
|
-
|
|
141
|
+
### **header**
|
|
142
|
+
Optional header content for the card (alternative to Card.Header).
|
|
143
|
+
|
|
144
|
+
- **Type:** `React.ReactNode`
|
|
99
145
|
|
|
100
146
|
```tsx
|
|
101
147
|
import React from 'react';
|
|
102
|
-
import { Card } from '
|
|
148
|
+
import { Card } from '@app-studio/web';
|
|
103
149
|
import { Text } from 'app-studio';
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
{shapes.map((shape) => (
|
|
113
|
-
<Card key={shape} shape={shape} variant="outlined">
|
|
114
|
-
<Text fontWeight="bold">{shape} Card</Text>
|
|
115
|
-
<Text color="color.gray.500">
|
|
116
|
-
This card has {shape === 'sharp' ? 'no' : shape} corners.
|
|
117
|
-
</Text>
|
|
118
|
-
</Card>
|
|
119
|
-
))}
|
|
120
|
-
</Vertical>
|
|
121
|
-
);
|
|
122
|
-
};
|
|
150
|
+
|
|
151
|
+
export const HeaderPropCard = () => (
|
|
152
|
+
<Card
|
|
153
|
+
header={<Text fontWeight="bold">Header via prop</Text>}
|
|
154
|
+
>
|
|
155
|
+
<Text>Card content</Text>
|
|
156
|
+
</Card>
|
|
157
|
+
);
|
|
123
158
|
```
|
|
124
159
|
|
|
125
|
-
### **
|
|
126
|
-
|
|
160
|
+
### **footer**
|
|
161
|
+
Optional footer content for the card (alternative to Card.Footer).
|
|
162
|
+
|
|
163
|
+
- **Type:** `React.ReactNode`
|
|
127
164
|
|
|
128
165
|
```tsx
|
|
129
166
|
import React from 'react';
|
|
130
|
-
import { Card } from '
|
|
131
|
-
import { Text } from 'app-studio';
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
{sizes.map((size) => (
|
|
141
|
-
<Card key={size} size={size} variant="outlined">
|
|
142
|
-
<Text fontWeight="bold">{size.toUpperCase()} Size</Text>
|
|
143
|
-
<Text color="color.gray.500">
|
|
144
|
-
This card has {size} padding.
|
|
145
|
-
</Text>
|
|
146
|
-
</Card>
|
|
147
|
-
))}
|
|
148
|
-
</Vertical>
|
|
149
|
-
);
|
|
150
|
-
};
|
|
167
|
+
import { Card } from '@app-studio/web';
|
|
168
|
+
import { Text, Button } from 'app-studio';
|
|
169
|
+
|
|
170
|
+
export const FooterPropCard = () => (
|
|
171
|
+
<Card
|
|
172
|
+
footer={<Button>Action</Button>}
|
|
173
|
+
>
|
|
174
|
+
<Text>Card content</Text>
|
|
175
|
+
</Card>
|
|
176
|
+
);
|
|
151
177
|
```
|
|
152
178
|
|
|
153
|
-
### **
|
|
154
|
-
|
|
179
|
+
### **views**
|
|
180
|
+
Custom styles for different parts of the card.
|
|
181
|
+
|
|
182
|
+
- **Type:** `CardStyles`
|
|
155
183
|
|
|
156
184
|
```tsx
|
|
157
185
|
import React from 'react';
|
|
158
|
-
import { Card } from '
|
|
186
|
+
import { Card } from '@app-studio/web';
|
|
159
187
|
import { Text } from 'app-studio';
|
|
160
|
-
import { Horizontal } from 'app-studio';
|
|
161
|
-
import { Button } from '../../Button/Button';
|
|
162
|
-
|
|
163
|
-
export const CustomDemo = () => {
|
|
164
|
-
return (
|
|
165
|
-
<Card
|
|
166
|
-
views={{
|
|
167
|
-
container: {
|
|
168
|
-
backgroundColor: 'color.blue.50',
|
|
169
|
-
borderRadius: '16px',
|
|
170
|
-
boxShadow: '0 4px 12px rgba(0, 0, 0, 0.1)',
|
|
171
|
-
},
|
|
172
|
-
header: {
|
|
173
|
-
backgroundColor: 'color.blue.500',
|
|
174
|
-
color: 'color.white',
|
|
175
|
-
padding: '16px',
|
|
176
|
-
borderBottomWidth: '0',
|
|
177
|
-
},
|
|
178
|
-
content: {
|
|
179
|
-
padding: '24px',
|
|
180
|
-
},
|
|
181
|
-
footer: {
|
|
182
|
-
padding: '16px',
|
|
183
|
-
backgroundColor: 'color.gray.50',
|
|
184
|
-
borderTopWidth: '0',
|
|
185
|
-
},
|
|
186
|
-
}}
|
|
187
|
-
>
|
|
188
|
-
<Card.Header>
|
|
189
|
-
<Text fontWeight="bold" fontSize={18} color="white">
|
|
190
|
-
Custom Styled Card
|
|
191
|
-
</Text>
|
|
192
|
-
</Card.Header>
|
|
193
188
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
189
|
+
export const StyledCard = () => (
|
|
190
|
+
<Card
|
|
191
|
+
views={{
|
|
192
|
+
container: {
|
|
193
|
+
backgroundColor: '#f0f9ff',
|
|
194
|
+
borderColor: '#3b82f6',
|
|
195
|
+
borderWidth: 2,
|
|
196
|
+
},
|
|
197
|
+
header: {
|
|
198
|
+
backgroundColor: '#dbeafe',
|
|
199
|
+
padding: 15,
|
|
200
|
+
},
|
|
201
|
+
content: {
|
|
202
|
+
padding: 20,
|
|
203
|
+
},
|
|
204
|
+
footer: {
|
|
205
|
+
backgroundColor: '#eff6ff',
|
|
206
|
+
padding: 15,
|
|
207
|
+
}
|
|
208
|
+
}}
|
|
209
|
+
>
|
|
210
|
+
<Card.Header>
|
|
211
|
+
<Text>Styled Header</Text>
|
|
212
|
+
</Card.Header>
|
|
213
|
+
<Card.Content>
|
|
214
|
+
<Text>Styled Content</Text>
|
|
215
|
+
</Card.Content>
|
|
216
|
+
<Card.Footer>
|
|
217
|
+
<Text>Styled Footer</Text>
|
|
218
|
+
</Card.Footer>
|
|
219
|
+
</Card>
|
|
220
|
+
);
|
|
210
221
|
```
|
|
211
222
|
|
|
212
|
-
### **
|
|
213
|
-
|
|
223
|
+
### **Complex Example**
|
|
224
|
+
A complete card with all features.
|
|
214
225
|
|
|
215
226
|
```tsx
|
|
216
227
|
import React from 'react';
|
|
217
|
-
import { Card } from '
|
|
218
|
-
import { Text } from 'app-studio';
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
padding: '16px',
|
|
243
|
-
borderTopColor: 'color.blue.200',
|
|
244
|
-
},
|
|
245
|
-
}}
|
|
246
|
-
>
|
|
247
|
-
<Card.Header>
|
|
248
|
-
<Text fontWeight="bold" fontSize={18}>
|
|
249
|
-
Context-Based Styling
|
|
250
|
-
</Text>
|
|
251
|
-
</Card.Header>
|
|
252
|
-
|
|
253
|
-
<Card.Content>
|
|
228
|
+
import { Card } from '@app-studio/web';
|
|
229
|
+
import { Text, Button, Horizontal, Vertical, Image } from 'app-studio';
|
|
230
|
+
|
|
231
|
+
export const ComplexCard = () => (
|
|
232
|
+
<Card
|
|
233
|
+
variant="elevated"
|
|
234
|
+
size="lg"
|
|
235
|
+
shape="rounded"
|
|
236
|
+
isFullWidth
|
|
237
|
+
>
|
|
238
|
+
<Card.Header>
|
|
239
|
+
<Horizontal justifyContent="space-between" alignItems="center">
|
|
240
|
+
<Text fontSize={20} fontWeight="bold">Product Card</Text>
|
|
241
|
+
<Text color="primary">$99.99</Text>
|
|
242
|
+
</Horizontal>
|
|
243
|
+
</Card.Header>
|
|
244
|
+
|
|
245
|
+
<Card.Content>
|
|
246
|
+
<Vertical gap={15}>
|
|
247
|
+
<Image
|
|
248
|
+
src="/product.jpg"
|
|
249
|
+
width="100%"
|
|
250
|
+
height={200}
|
|
251
|
+
borderRadius={8}
|
|
252
|
+
/>
|
|
254
253
|
<Text>
|
|
255
|
-
This
|
|
256
|
-
|
|
257
|
-
passed down to the Header, Content, and Footer components.
|
|
254
|
+
This is a detailed description of the product with all
|
|
255
|
+
its amazing features and benefits.
|
|
258
256
|
</Text>
|
|
259
|
-
</
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
</
|
|
266
|
-
</
|
|
267
|
-
</Card>
|
|
268
|
-
|
|
269
|
-
|
|
257
|
+
</Vertical>
|
|
258
|
+
</Card.Content>
|
|
259
|
+
|
|
260
|
+
<Card.Footer>
|
|
261
|
+
<Horizontal gap={10} justifyContent="flex-end">
|
|
262
|
+
<Button variant="outline">Learn More</Button>
|
|
263
|
+
<Button variant="filled">Add to Cart</Button>
|
|
264
|
+
</Horizontal>
|
|
265
|
+
</Card.Footer>
|
|
266
|
+
</Card>
|
|
267
|
+
);
|
|
270
268
|
```
|
|
271
269
|
|
|
272
|
-
### **
|
|
273
|
-
|
|
270
|
+
### **Interactive Card**
|
|
271
|
+
Card with hover effects and click handling.
|
|
274
272
|
|
|
275
273
|
```tsx
|
|
276
274
|
import React from 'react';
|
|
277
|
-
import { Card } from '
|
|
275
|
+
import { Card } from '@app-studio/web';
|
|
278
276
|
import { Text } from 'app-studio';
|
|
279
|
-
import { Horizontal, Vertical } from 'app-studio';
|
|
280
|
-
import { Button } from '../../Button/Button';
|
|
281
|
-
|
|
282
|
-
export const DarkModeExample = () => {
|
|
283
|
-
return (
|
|
284
|
-
<Vertical gap={20}>
|
|
285
|
-
<Text fontSize={20} fontWeight="bold">Light Mode Cards</Text>
|
|
286
|
-
<Horizontal gap={20} alignItems="flex-start">
|
|
287
|
-
<Card variant="default" themeMode="light">
|
|
288
|
-
<Card.Header>
|
|
289
|
-
<Text fontWeight="bold">Default Card (Light)</Text>
|
|
290
|
-
</Card.Header>
|
|
291
|
-
<Card.Content>
|
|
292
|
-
<Text>This card uses light mode styling.</Text>
|
|
293
|
-
</Card.Content>
|
|
294
|
-
<Card.Footer>
|
|
295
|
-
<Button size="sm">Action</Button>
|
|
296
|
-
</Card.Footer>
|
|
297
|
-
</Card>
|
|
298
|
-
|
|
299
|
-
<Card variant="outlined" themeMode="light">
|
|
300
|
-
<Card.Header>
|
|
301
|
-
<Text fontWeight="bold">Outlined Card (Light)</Text>
|
|
302
|
-
</Card.Header>
|
|
303
|
-
<Card.Content>
|
|
304
|
-
<Text>This card uses light mode styling with an outline.</Text>
|
|
305
|
-
</Card.Content>
|
|
306
|
-
<Card.Footer>
|
|
307
|
-
<Button size="sm">Action</Button>
|
|
308
|
-
</Card.Footer>
|
|
309
|
-
</Card>
|
|
310
|
-
</Horizontal>
|
|
311
277
|
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
<Text>This card uses dark mode styling with an outline.</Text>
|
|
332
|
-
</Card.Content>
|
|
333
|
-
<Card.Footer>
|
|
334
|
-
<Button size="sm">Action</Button>
|
|
335
|
-
</Card.Footer>
|
|
336
|
-
</Card>
|
|
337
|
-
</Horizontal>
|
|
338
|
-
</Vertical>
|
|
339
|
-
);
|
|
340
|
-
};
|
|
278
|
+
export const InteractiveCard = () => (
|
|
279
|
+
<Card
|
|
280
|
+
onClick={() => console.log('Card clicked')}
|
|
281
|
+
cursor="pointer"
|
|
282
|
+
views={{
|
|
283
|
+
container: {
|
|
284
|
+
transition: 'all 0.3s ease',
|
|
285
|
+
hover: {
|
|
286
|
+
transform: 'translateY(-4px)',
|
|
287
|
+
boxShadow: '0 12px 24px rgba(0,0,0,0.15)',
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}}
|
|
291
|
+
>
|
|
292
|
+
<Card.Content>
|
|
293
|
+
<Text>Click me!</Text>
|
|
294
|
+
</Card.Content>
|
|
295
|
+
</Card>
|
|
296
|
+
);
|
|
341
297
|
```
|
|
298
|
+
|