@app-studio/web 0.9.41 → 0.9.44
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/dist/components/Title/Title/SlideEffect.d.ts +14 -0
- package/dist/components/Title/Title/Title.props.d.ts +20 -0
- package/dist/components/Title/Title/Title.state.d.ts +4 -0
- package/dist/web.cjs.development.js +265 -78
- package/dist/web.cjs.development.js.map +1 -1
- package/dist/web.cjs.production.min.js +1 -1
- package/dist/web.cjs.production.min.js.map +1 -1
- package/dist/web.esm.js +265 -78
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.development.js +265 -78
- package/dist/web.umd.development.js.map +1 -1
- package/dist/web.umd.production.min.js +1 -1
- package/dist/web.umd.production.min.js.map +1 -1
- package/docs/components/Accordion.mdx +74 -121
- package/docs/components/Alert.mdx +19 -70
- package/docs/components/AspectRatio.mdx +13 -11
- package/docs/components/AudioInput.mdx +43 -0
- package/docs/components/Avatar.mdx +18 -43
- package/docs/components/Background.mdx +100 -492
- package/docs/components/Badge.mdx +45 -130
- package/docs/components/Button.mdx +76 -128
- package/docs/components/Calendar.mdx +7 -7
- package/docs/components/Card.mdx +247 -290
- package/docs/components/Carousel.mdx +94 -321
- 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 +6 -6
- package/docs/components/ColorPicker.mdx +452 -0
- package/docs/components/ComboBox.mdx +13 -13
- 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 +8 -8
- package/docs/components/DatePicker.mdx +3 -3
- package/docs/components/DragAndDrop.mdx +279 -463
- package/docs/components/Drawer.mdx +392 -231
- package/docs/components/DropdownMenu.mdx +37 -155
- package/docs/components/EmojiPicker.mdx +84 -0
- package/docs/components/File.mdx +130 -4
- package/docs/components/Formik.mdx +39 -39
- package/docs/components/Gradient.mdx +359 -182
- package/docs/components/Horizontal.mdx +1 -2
- package/docs/components/HoverCard.mdx +57 -125
- package/docs/components/KanbanBoard.mdx +9 -9
- package/docs/components/Link.mdx +22 -30
- package/docs/components/Loader.mdx +230 -413
- package/docs/components/Menubar.mdx +73 -69
- package/docs/components/Message.mdx +210 -525
- 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 +17 -17
- package/docs/components/Text.mdx +3 -3
- package/docs/components/TextArea.mdx +6 -6
- package/docs/components/TextField.mdx +12 -12
- package/docs/components/Title.mdx +267 -525
- package/docs/components/Toast.mdx +65 -142
- package/docs/components/Toggle.mdx +37 -49
- package/docs/components/ToggleGroup.mdx +36 -57
- package/docs/components/Tooltip.mdx +501 -138
- package/docs/components/Uploader.mdx +205 -351
- 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 '
|
|
14
|
-
import { Text } from '
|
|
15
|
-
|
|
16
|
-
export const
|
|
17
|
-
|
|
18
|
-
<Card>
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
);
|
|
22
|
-
};
|
|
13
|
+
import { Card } from '@app-studio/web';
|
|
14
|
+
import { Text } from 'app-studio';
|
|
15
|
+
|
|
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 '
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
</
|
|
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
|
+
```
|
|
43
45
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
<Text color="color.gray.500">
|
|
47
|
-
This card has a border around it.
|
|
48
|
-
</Text>
|
|
49
|
-
</Card>
|
|
46
|
+
### **variant**
|
|
47
|
+
The visual style variant of the card.
|
|
50
48
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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>
|
|
56
65
|
</Card>
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
66
|
+
))}
|
|
67
|
+
</Vertical>
|
|
68
|
+
);
|
|
60
69
|
```
|
|
61
70
|
|
|
62
|
-
### **
|
|
63
|
-
|
|
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'`
|
|
64
77
|
|
|
65
78
|
```tsx
|
|
66
79
|
import React from 'react';
|
|
67
|
-
import { Card } from '
|
|
68
|
-
import { Text } from '
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
</Card
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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
|
-
};
|
|
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>
|
|
90
|
+
</Card>
|
|
91
|
+
))}
|
|
92
|
+
</Vertical>
|
|
93
|
+
);
|
|
95
94
|
```
|
|
96
95
|
|
|
97
|
-
### **
|
|
98
|
-
|
|
96
|
+
### **shape**
|
|
97
|
+
The shape of the card's corners.
|
|
98
|
+
|
|
99
|
+
- **Type:** `Shape`
|
|
100
|
+
- **Default:** `'rounded'`
|
|
101
|
+
- **Possible Values:** `'sharp' | 'rounded' | 'pillShaped'`
|
|
99
102
|
|
|
100
103
|
```tsx
|
|
101
104
|
import React from 'react';
|
|
102
|
-
import { Card } from '
|
|
103
|
-
import { Text } from '
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
This card has {shape === 'sharp' ? 'no' : shape} corners.
|
|
117
|
-
</Text>
|
|
118
|
-
</Card>
|
|
119
|
-
))}
|
|
120
|
-
</Vertical>
|
|
121
|
-
);
|
|
122
|
-
};
|
|
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>
|
|
115
|
+
</Card>
|
|
116
|
+
))}
|
|
117
|
+
</Horizontal>
|
|
118
|
+
);
|
|
123
119
|
```
|
|
124
120
|
|
|
125
|
-
### **
|
|
126
|
-
|
|
121
|
+
### **isFullWidth**
|
|
122
|
+
Whether the card should take up the full width of its container.
|
|
123
|
+
|
|
124
|
+
- **Type:** `boolean`
|
|
125
|
+
- **Default:** `false`
|
|
127
126
|
|
|
128
127
|
```tsx
|
|
129
128
|
import React from 'react';
|
|
130
|
-
import { Card } from '
|
|
131
|
-
import { Text } from '
|
|
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
|
-
};
|
|
129
|
+
import { Card } from '@app-studio/web';
|
|
130
|
+
import { Text } from 'app-studio';
|
|
131
|
+
|
|
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
|
+
);
|
|
151
139
|
```
|
|
152
140
|
|
|
153
|
-
### **
|
|
154
|
-
|
|
141
|
+
### **header**
|
|
142
|
+
Optional header content for the card (alternative to Card.Header).
|
|
143
|
+
|
|
144
|
+
- **Type:** `React.ReactNode`
|
|
155
145
|
|
|
156
146
|
```tsx
|
|
157
147
|
import React from 'react';
|
|
158
|
-
import { Card } from '
|
|
159
|
-
import { Text } from '
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
<Card
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
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>
|
|
148
|
+
import { Card } from '@app-studio/web';
|
|
149
|
+
import { Text } from 'app-studio';
|
|
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
|
+
);
|
|
158
|
+
```
|
|
193
159
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
160
|
+
### **footer**
|
|
161
|
+
Optional footer content for the card (alternative to Card.Footer).
|
|
162
|
+
|
|
163
|
+
- **Type:** `React.ReactNode`
|
|
164
|
+
|
|
165
|
+
```tsx
|
|
166
|
+
import React from 'react';
|
|
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
|
+
);
|
|
210
177
|
```
|
|
211
178
|
|
|
212
|
-
### **
|
|
213
|
-
|
|
179
|
+
### **views**
|
|
180
|
+
Custom styles for different parts of the card.
|
|
181
|
+
|
|
182
|
+
- **Type:** `CardStyles`
|
|
214
183
|
|
|
215
184
|
```tsx
|
|
216
185
|
import React from 'react';
|
|
217
|
-
import { Card } from '
|
|
218
|
-
import { Text } from '
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
>
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
186
|
+
import { Card } from '@app-studio/web';
|
|
187
|
+
import { Text } from 'app-studio';
|
|
188
|
+
|
|
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
|
+
);
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### **Complex Example**
|
|
224
|
+
A complete card with all features.
|
|
252
225
|
|
|
253
|
-
|
|
226
|
+
```tsx
|
|
227
|
+
import React from 'react';
|
|
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 '
|
|
278
|
-
import { Text } from '
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
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
|
-
|
|
312
|
-
<Text fontSize={20} fontWeight="bold" marginTop={40}>Dark Mode Cards</Text>
|
|
313
|
-
<Horizontal gap={20} alignItems="flex-start">
|
|
314
|
-
<Card variant="default" themeMode="dark">
|
|
315
|
-
<Card.Header>
|
|
316
|
-
<Text fontWeight="bold">Default Card (Dark)</Text>
|
|
317
|
-
</Card.Header>
|
|
318
|
-
<Card.Content>
|
|
319
|
-
<Text>This card uses dark mode styling.</Text>
|
|
320
|
-
</Card.Content>
|
|
321
|
-
<Card.Footer>
|
|
322
|
-
<Button size="sm">Action</Button>
|
|
323
|
-
</Card.Footer>
|
|
324
|
-
</Card>
|
|
325
|
-
|
|
326
|
-
<Card variant="outlined" themeMode="dark">
|
|
327
|
-
<Card.Header>
|
|
328
|
-
<Text fontWeight="bold">Outlined Card (Dark)</Text>
|
|
329
|
-
</Card.Header>
|
|
330
|
-
<Card.Content>
|
|
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
|
-
};
|
|
275
|
+
import { Card } from '@app-studio/web';
|
|
276
|
+
import { Text } from 'app-studio';
|
|
277
|
+
|
|
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
|
+
|