@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
|
@@ -1,81 +1,55 @@
|
|
|
1
1
|
# DropdownMenu
|
|
2
2
|
|
|
3
|
-
A
|
|
3
|
+
A versatile component for displaying a list of interactive items in a popup, triggered by another element.
|
|
4
4
|
|
|
5
5
|
### **Import**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
```tsx
|
|
7
|
+
import { DropdownMenu } from '@app-studio/web';
|
|
8
|
+
```
|
|
9
9
|
|
|
10
10
|
### **Default**
|
|
11
11
|
```tsx
|
|
12
12
|
import React from 'react';
|
|
13
|
-
import { DropdownMenu } from '
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
13
|
+
import { DropdownMenu } from '@app-studio/web';
|
|
14
|
+
import { Text, Vertical } from 'app-studio';
|
|
15
|
+
import {
|
|
16
|
+
Button,
|
|
17
|
+
CopyIcon,
|
|
18
|
+
EditIcon,
|
|
19
|
+
DeleteIcon,
|
|
20
|
+
DownloadIcon,
|
|
21
|
+
ShareIcon,
|
|
22
|
+
} from 'src/components';
|
|
16
23
|
|
|
17
24
|
export const DefaultDropdownMenu = () => {
|
|
18
|
-
const
|
|
25
|
+
const handleCopy = () => alert('Copy clicked');
|
|
26
|
+
const handleEdit = () => alert('Edit clicked');
|
|
27
|
+
const handleDelete = () => alert('Delete clicked');
|
|
28
|
+
const handleDownload = () => alert('Download clicked');
|
|
29
|
+
const handleShare = () => alert('Share clicked');
|
|
30
|
+
|
|
31
|
+
const items: any[] = [
|
|
19
32
|
{
|
|
20
33
|
id: 'copy',
|
|
21
34
|
label: 'Copy',
|
|
22
35
|
icon: <CopyIcon widthHeight={16} />,
|
|
23
|
-
onClick:
|
|
36
|
+
onClick: handleCopy,
|
|
24
37
|
},
|
|
25
38
|
{
|
|
26
39
|
id: 'edit',
|
|
27
40
|
label: 'Edit',
|
|
28
41
|
icon: <EditIcon widthHeight={16} />,
|
|
29
|
-
onClick:
|
|
42
|
+
onClick: handleEdit,
|
|
30
43
|
},
|
|
31
44
|
{
|
|
32
45
|
id: 'divider-1',
|
|
33
|
-
divider: true
|
|
46
|
+
divider: true,
|
|
34
47
|
},
|
|
35
48
|
{
|
|
36
49
|
id: 'delete',
|
|
37
50
|
label: 'Delete',
|
|
38
51
|
icon: <DeleteIcon widthHeight={16} />,
|
|
39
|
-
onClick:
|
|
40
|
-
}
|
|
41
|
-
];
|
|
42
|
-
|
|
43
|
-
return (
|
|
44
|
-
<DropdownMenu
|
|
45
|
-
trigger={<Button>Open Menu</Button>}
|
|
46
|
-
items={items}
|
|
47
|
-
/>
|
|
48
|
-
);
|
|
49
|
-
};
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### **Submenu**
|
|
53
|
-
Create nested dropdown menus with submenus.
|
|
54
|
-
|
|
55
|
-
```tsx
|
|
56
|
-
import React from 'react';
|
|
57
|
-
import { DropdownMenu } from '../DropdownMenu';
|
|
58
|
-
import { Button } from '../../Button/Button';
|
|
59
|
-
import {
|
|
60
|
-
CopyIcon,
|
|
61
|
-
EditIcon,
|
|
62
|
-
DownloadIcon,
|
|
63
|
-
ShareIcon
|
|
64
|
-
} from '../../Icon/Icon';
|
|
65
|
-
|
|
66
|
-
export const SubmenuDropdownMenu = () => {
|
|
67
|
-
const items = [
|
|
68
|
-
{
|
|
69
|
-
id: 'copy',
|
|
70
|
-
label: 'Copy',
|
|
71
|
-
icon: <CopyIcon widthHeight={16} />,
|
|
72
|
-
onClick: () => alert('Copy clicked')
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
id: 'edit',
|
|
76
|
-
label: 'Edit',
|
|
77
|
-
icon: <EditIcon widthHeight={16} />,
|
|
78
|
-
onClick: () => alert('Edit clicked')
|
|
52
|
+
onClick: handleDelete,
|
|
79
53
|
},
|
|
80
54
|
{
|
|
81
55
|
id: 'more',
|
|
@@ -85,121 +59,29 @@ export const SubmenuDropdownMenu = () => {
|
|
|
85
59
|
id: 'download',
|
|
86
60
|
label: 'Download',
|
|
87
61
|
icon: <DownloadIcon widthHeight={16} />,
|
|
88
|
-
onClick:
|
|
62
|
+
onClick: handleDownload,
|
|
89
63
|
},
|
|
90
64
|
{
|
|
91
65
|
id: 'share',
|
|
92
66
|
label: 'Share',
|
|
93
67
|
icon: <ShareIcon widthHeight={16} />,
|
|
94
|
-
onClick:
|
|
95
|
-
}
|
|
96
|
-
]
|
|
97
|
-
}
|
|
98
|
-
];
|
|
99
|
-
|
|
100
|
-
return (
|
|
101
|
-
<DropdownMenu
|
|
102
|
-
trigger={<Button>Open Menu</Button>}
|
|
103
|
-
items={items}
|
|
104
|
-
/>
|
|
105
|
-
);
|
|
106
|
-
};
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### **Positioning**
|
|
110
|
-
Control the position and alignment of the dropdown menu.
|
|
111
|
-
|
|
112
|
-
```tsx
|
|
113
|
-
import React from 'react';
|
|
114
|
-
import { DropdownMenu } from '../DropdownMenu';
|
|
115
|
-
import { Button } from '../../Button/Button';
|
|
116
|
-
import { CopyIcon, EditIcon } from '../../Icon/Icon';
|
|
117
|
-
|
|
118
|
-
export const PositionedDropdownMenu = () => {
|
|
119
|
-
const items = [
|
|
120
|
-
{
|
|
121
|
-
id: 'copy',
|
|
122
|
-
label: 'Copy',
|
|
123
|
-
icon: <CopyIcon widthHeight={16} />,
|
|
124
|
-
onClick: () => alert('Copy clicked')
|
|
68
|
+
onClick: handleShare,
|
|
69
|
+
},
|
|
70
|
+
],
|
|
125
71
|
},
|
|
126
72
|
{
|
|
127
|
-
id: '
|
|
128
|
-
label: '
|
|
129
|
-
|
|
130
|
-
onClick: () => alert('Edit clicked')
|
|
131
|
-
}
|
|
132
|
-
];
|
|
133
|
-
|
|
134
|
-
return (
|
|
135
|
-
<>
|
|
136
|
-
<DropdownMenu
|
|
137
|
-
trigger={<Button>Bottom (Default)</Button>}
|
|
138
|
-
items={items}
|
|
139
|
-
side="bottom"
|
|
140
|
-
align="start"
|
|
141
|
-
/>
|
|
142
|
-
|
|
143
|
-
<DropdownMenu
|
|
144
|
-
trigger={<Button>Top Center</Button>}
|
|
145
|
-
items={items}
|
|
146
|
-
side="top"
|
|
147
|
-
align="center"
|
|
148
|
-
/>
|
|
149
|
-
|
|
150
|
-
<DropdownMenu
|
|
151
|
-
trigger={<Button>Right End</Button>}
|
|
152
|
-
items={items}
|
|
153
|
-
side="right"
|
|
154
|
-
align="end"
|
|
155
|
-
/>
|
|
156
|
-
</>
|
|
157
|
-
);
|
|
158
|
-
};
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
### **Custom Styling**
|
|
162
|
-
Customize the appearance of the dropdown menu.
|
|
163
|
-
|
|
164
|
-
```tsx
|
|
165
|
-
import React from 'react';
|
|
166
|
-
import { DropdownMenu } from '../DropdownMenu';
|
|
167
|
-
import { Button } from '../../Button/Button';
|
|
168
|
-
import { CopyIcon, EditIcon } from '../../Icon/Icon';
|
|
169
|
-
|
|
170
|
-
export const CustomDropdownMenu = () => {
|
|
171
|
-
const items = [
|
|
172
|
-
{
|
|
173
|
-
id: 'copy',
|
|
174
|
-
label: 'Copy',
|
|
175
|
-
icon: <CopyIcon widthHeight={16} />,
|
|
176
|
-
onClick: () => alert('Copy clicked')
|
|
73
|
+
id: 'disabled',
|
|
74
|
+
label: 'Disabled Option',
|
|
75
|
+
disabled: true,
|
|
177
76
|
},
|
|
178
|
-
{
|
|
179
|
-
id: 'edit',
|
|
180
|
-
label: 'Edit',
|
|
181
|
-
icon: <EditIcon widthHeight={16} />,
|
|
182
|
-
onClick: () => alert('Edit clicked')
|
|
183
|
-
}
|
|
184
77
|
];
|
|
185
78
|
|
|
186
79
|
return (
|
|
187
|
-
<
|
|
188
|
-
|
|
189
|
-
items={items}
|
|
190
|
-
|
|
191
|
-
menu: {
|
|
192
|
-
backgroundColor: 'color.blue',
|
|
193
|
-
color: 'color.white',
|
|
194
|
-
borderRadius: '8px',
|
|
195
|
-
},
|
|
196
|
-
item: {
|
|
197
|
-
_hover: {
|
|
198
|
-
backgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}}
|
|
202
|
-
/>
|
|
80
|
+
<Vertical gap={20} width="100%" maxWidth={400}>
|
|
81
|
+
<Text marginBottom={10}>Default Dropdown Menu</Text>
|
|
82
|
+
<DropdownMenu trigger={<Button>Open Menu</Button>} items={items} />
|
|
83
|
+
</Vertical>
|
|
203
84
|
);
|
|
204
85
|
};
|
|
205
86
|
```
|
|
87
|
+
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# EmojiPicker
|
|
2
|
+
|
|
3
|
+
A user-friendly tool for selecting and inserting emojis into text inputs or forms.
|
|
4
|
+
|
|
5
|
+
### **Import**
|
|
6
|
+
```tsx
|
|
7
|
+
import { EmojiPicker } from '@app-studio/web';
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
### **Default**
|
|
11
|
+
```tsx
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import { EmojiPicker } from '@app-studio/web';
|
|
14
|
+
|
|
15
|
+
export const DefaultEmojiPicker = () => (
|
|
16
|
+
<EmojiPicker
|
|
17
|
+
label="Choose an emoji"
|
|
18
|
+
placeholder="Select an emoji"
|
|
19
|
+
onChange={(emoji) => console.log('Selected emoji:', emoji)}
|
|
20
|
+
onEmojiSelect={(emoji) => console.log('Selected emoji object:', emoji)}
|
|
21
|
+
/>
|
|
22
|
+
);
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### **customEmojis**
|
|
26
|
+
An array of custom Emoji objects to include in the picker.
|
|
27
|
+
|
|
28
|
+
- **Type:** `Emoji[]`
|
|
29
|
+
- **Possible Values:** ``
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
import React from 'react';
|
|
33
|
+
import { EmojiPicker } from '@app-studio/web';
|
|
34
|
+
|
|
35
|
+
export const CustomEmojisEmojiPicker = () => (
|
|
36
|
+
<EmojiPicker
|
|
37
|
+
label="Custom emoji set"
|
|
38
|
+
customEmojis={[
|
|
39
|
+
{
|
|
40
|
+
emoji: '🚀',
|
|
41
|
+
name: 'rocket',
|
|
42
|
+
category: 'objects',
|
|
43
|
+
keywords: ['rocket', 'space', 'launch'],
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
emoji: '⭐',
|
|
47
|
+
name: 'star',
|
|
48
|
+
category: 'symbols',
|
|
49
|
+
keywords: ['star', 'favorite', 'rating'],
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
emoji: '🎯',
|
|
53
|
+
name: 'target',
|
|
54
|
+
category: 'activities',
|
|
55
|
+
keywords: ['target', 'goal', 'aim'],
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
emoji: '💎',
|
|
59
|
+
name: 'diamond',
|
|
60
|
+
category: 'objects',
|
|
61
|
+
keywords: ['diamond', 'gem', 'precious'],
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
emoji: '🔥',
|
|
65
|
+
name: 'fire',
|
|
66
|
+
category: 'symbols',
|
|
67
|
+
keywords: ['fire', 'hot', 'trending'],
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
emoji: '⚡',
|
|
71
|
+
name: 'lightning',
|
|
72
|
+
category: 'symbols',
|
|
73
|
+
keywords: ['lightning', 'fast', 'energy'],
|
|
74
|
+
},
|
|
75
|
+
]}
|
|
76
|
+
enabledCategories={['recent', 'objects', 'symbols', 'activities']}
|
|
77
|
+
showSearch={true}
|
|
78
|
+
showRecentEmojis={true}
|
|
79
|
+
placeholder="Choose from custom emojis"
|
|
80
|
+
onChange={(emoji) => console.log('Selected custom emoji:', emoji)}
|
|
81
|
+
/>
|
|
82
|
+
);
|
|
83
|
+
```
|
|
84
|
+
|
package/docs/components/File.mdx
CHANGED
|
@@ -1,8 +1,134 @@
|
|
|
1
1
|
# File
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A component for displaying file icons and images with customizable colors and theming support.
|
|
4
4
|
|
|
5
5
|
### **Import**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
```tsx
|
|
7
|
+
import { FileSVG, FileImage } from '@app-studio/web';
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
### **FileSVG - Default**
|
|
11
|
+
```tsx
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import { FileSVG } from '@app-studio/web';
|
|
14
|
+
|
|
15
|
+
export const DefaultFile = () => (
|
|
16
|
+
<FileSVG src="/icons/document.svg" width={48} height={48} />
|
|
17
|
+
);
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### **src**
|
|
21
|
+
The source URL of the SVG or image file to display.
|
|
22
|
+
|
|
23
|
+
- **Type:** `string`
|
|
24
|
+
- **Required:** `true`
|
|
25
|
+
|
|
26
|
+
```tsx
|
|
27
|
+
import React from 'react';
|
|
28
|
+
import { FileSVG } from '@app-studio/web';
|
|
29
|
+
|
|
30
|
+
export const FileWithSource = () => (
|
|
31
|
+
<FileSVG
|
|
32
|
+
src="/icons/pdf-icon.svg"
|
|
33
|
+
width={64}
|
|
34
|
+
height={64}
|
|
35
|
+
/>
|
|
36
|
+
);
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### **color**
|
|
40
|
+
Optional color to apply to the SVG file. Uses theme-aware color system.
|
|
41
|
+
|
|
42
|
+
- **Type:** `string`
|
|
43
|
+
- **Default:** `undefined`
|
|
44
|
+
|
|
45
|
+
```tsx
|
|
46
|
+
import React from 'react';
|
|
47
|
+
import { FileSVG } from '@app-studio/web';
|
|
48
|
+
import { Horizontal } from 'app-studio';
|
|
49
|
+
|
|
50
|
+
export const ColoredFiles = () => (
|
|
51
|
+
<Horizontal gap={15}>
|
|
52
|
+
<FileSVG src="/icons/file.svg" color="primary" width={48} height={48} />
|
|
53
|
+
<FileSVG src="/icons/file.svg" color="error" width={48} height={48} />
|
|
54
|
+
<FileSVG src="/icons/file.svg" color="success" width={48} height={48} />
|
|
55
|
+
</Horizontal>
|
|
56
|
+
);
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### **views**
|
|
60
|
+
Custom styles for the container and image elements.
|
|
61
|
+
|
|
62
|
+
- **Type:** `{ container?: ViewProps; image?: ImageProps }`
|
|
63
|
+
|
|
64
|
+
```tsx
|
|
65
|
+
import React from 'react';
|
|
66
|
+
import { FileSVG } from '@app-studio/web';
|
|
67
|
+
|
|
68
|
+
export const StyledFile = () => (
|
|
69
|
+
<FileSVG
|
|
70
|
+
src="/icons/file.svg"
|
|
71
|
+
width={64}
|
|
72
|
+
height={64}
|
|
73
|
+
views={{
|
|
74
|
+
container: {
|
|
75
|
+
backgroundColor: '#f0f0f0',
|
|
76
|
+
borderRadius: 8,
|
|
77
|
+
padding: 10
|
|
78
|
+
},
|
|
79
|
+
image: {
|
|
80
|
+
opacity: 0.8
|
|
81
|
+
}
|
|
82
|
+
}}
|
|
83
|
+
/>
|
|
84
|
+
);
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### **FileImage**
|
|
88
|
+
Display regular image files with standard image props.
|
|
89
|
+
|
|
90
|
+
```tsx
|
|
91
|
+
import React from 'react';
|
|
92
|
+
import { FileImage } from '@app-studio/web';
|
|
93
|
+
|
|
94
|
+
export const ImageFile = () => (
|
|
95
|
+
<FileImage
|
|
96
|
+
path="/images/document.png"
|
|
97
|
+
width={200}
|
|
98
|
+
height={150}
|
|
99
|
+
borderRadius={8}
|
|
100
|
+
/>
|
|
101
|
+
);
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### **themeMode**
|
|
105
|
+
Override the theme mode for the file component.
|
|
106
|
+
|
|
107
|
+
- **Type:** `'light' | 'dark'`
|
|
108
|
+
- **Default:** Uses context theme
|
|
109
|
+
|
|
110
|
+
```tsx
|
|
111
|
+
import React from 'react';
|
|
112
|
+
import { FileSVG } from '@app-studio/web';
|
|
113
|
+
import { Horizontal } from 'app-studio';
|
|
114
|
+
|
|
115
|
+
export const ThemedFiles = () => (
|
|
116
|
+
<Horizontal gap={15}>
|
|
117
|
+
<FileSVG
|
|
118
|
+
src="/icons/file.svg"
|
|
119
|
+
color="text"
|
|
120
|
+
themeMode="light"
|
|
121
|
+
width={48}
|
|
122
|
+
height={48}
|
|
123
|
+
/>
|
|
124
|
+
<FileSVG
|
|
125
|
+
src="/icons/file.svg"
|
|
126
|
+
color="text"
|
|
127
|
+
themeMode="dark"
|
|
128
|
+
width={48}
|
|
129
|
+
height={48}
|
|
130
|
+
/>
|
|
131
|
+
</Horizontal>
|
|
132
|
+
);
|
|
133
|
+
```
|
|
134
|
+
|
|
@@ -14,10 +14,10 @@ A basic form with Formik integration.
|
|
|
14
14
|
import React from 'react';
|
|
15
15
|
import { Formik } from 'formik';
|
|
16
16
|
import * as Yup from 'yup';
|
|
17
|
-
import { FormikForm } from '
|
|
18
|
-
import { FormikTextField } from '
|
|
19
|
-
import { FormikCheckbox } from '
|
|
20
|
-
import { Button } from '
|
|
17
|
+
import { FormikForm } from '@app-studio/web';
|
|
18
|
+
import { FormikTextField } from '@app-studio/web';
|
|
19
|
+
import { FormikCheckbox } from '@app-studio/web';
|
|
20
|
+
import { Button } from '@app-studio/web';
|
|
21
21
|
import { Vertical } from '@app-studio/web';
|
|
22
22
|
|
|
23
23
|
export const BasicFormExample = () => {
|
|
@@ -90,9 +90,9 @@ Text input field integrated with Formik.
|
|
|
90
90
|
import React from 'react';
|
|
91
91
|
import { Formik } from 'formik';
|
|
92
92
|
import * as Yup from 'yup';
|
|
93
|
-
import { FormikForm } from '
|
|
94
|
-
import { FormikTextField } from '
|
|
95
|
-
import { Button } from '
|
|
93
|
+
import { FormikForm } from '@app-studio/web';
|
|
94
|
+
import { FormikTextField } from '@app-studio/web';
|
|
95
|
+
import { Button } from '@app-studio/web';
|
|
96
96
|
|
|
97
97
|
export const FormikTextFieldExample = () => {
|
|
98
98
|
return (
|
|
@@ -128,9 +128,9 @@ Multi-line text input integrated with Formik.
|
|
|
128
128
|
import React from 'react';
|
|
129
129
|
import { Formik } from 'formik';
|
|
130
130
|
import * as Yup from 'yup';
|
|
131
|
-
import { FormikForm } from '
|
|
132
|
-
import { FormikTextArea } from '
|
|
133
|
-
import { Button } from '
|
|
131
|
+
import { FormikForm } from '@app-studio/web';
|
|
132
|
+
import { FormikTextArea } from '@app-studio/web';
|
|
133
|
+
import { Button } from '@app-studio/web';
|
|
134
134
|
|
|
135
135
|
export const FormikTextAreaExample = () => {
|
|
136
136
|
return (
|
|
@@ -166,9 +166,9 @@ Checkbox input integrated with Formik.
|
|
|
166
166
|
import React from 'react';
|
|
167
167
|
import { Formik } from 'formik';
|
|
168
168
|
import * as Yup from 'yup';
|
|
169
|
-
import { FormikForm } from '
|
|
170
|
-
import { FormikCheckbox } from '
|
|
171
|
-
import { Button } from '
|
|
169
|
+
import { FormikForm } from '@app-studio/web';
|
|
170
|
+
import { FormikCheckbox } from '@app-studio/web';
|
|
171
|
+
import { Button } from '@app-studio/web';
|
|
172
172
|
|
|
173
173
|
export const FormikCheckboxExample = () => {
|
|
174
174
|
return (
|
|
@@ -202,8 +202,8 @@ Chat input with file upload, mentions, and auto-completion integrated with Formi
|
|
|
202
202
|
import React from 'react';
|
|
203
203
|
import { Formik } from 'formik';
|
|
204
204
|
import * as Yup from 'yup';
|
|
205
|
-
import { FormikForm } from '
|
|
206
|
-
import { FormikChatInput } from '
|
|
205
|
+
import { FormikForm } from '@app-studio/web';
|
|
206
|
+
import { FormikChatInput } from '@app-studio/web';
|
|
207
207
|
import { Button, Vertical, Text } from '@app-studio/web';
|
|
208
208
|
|
|
209
209
|
export const FormikChatInputExample = () => {
|
|
@@ -289,9 +289,9 @@ Color picker input integrated with Formik.
|
|
|
289
289
|
import React from 'react';
|
|
290
290
|
import { Formik } from 'formik';
|
|
291
291
|
import * as Yup from 'yup';
|
|
292
|
-
import { FormikForm } from '
|
|
293
|
-
import { FormikColorInput } from '
|
|
294
|
-
import { Button } from '
|
|
292
|
+
import { FormikForm } from '@app-studio/web';
|
|
293
|
+
import { FormikColorInput } from '@app-studio/web';
|
|
294
|
+
import { Button } from '@app-studio/web';
|
|
295
295
|
|
|
296
296
|
export const FormikColorInputExample = () => {
|
|
297
297
|
return (
|
|
@@ -349,9 +349,9 @@ Select dropdown integrated with Formik.
|
|
|
349
349
|
import React from 'react';
|
|
350
350
|
import { Formik } from 'formik';
|
|
351
351
|
import * as Yup from 'yup';
|
|
352
|
-
import { FormikForm } from '
|
|
353
|
-
import { FormikSelect } from '
|
|
354
|
-
import { Button } from '
|
|
352
|
+
import { FormikForm } from '@app-studio/web';
|
|
353
|
+
import { FormikSelect } from '@app-studio/web';
|
|
354
|
+
import { Button } from '@app-studio/web';
|
|
355
355
|
|
|
356
356
|
export const FormikSelectExample = () => {
|
|
357
357
|
const options = [
|
|
@@ -392,9 +392,9 @@ Toggle switch integrated with Formik.
|
|
|
392
392
|
```tsx
|
|
393
393
|
import React from 'react';
|
|
394
394
|
import { Formik } from 'formik';
|
|
395
|
-
import { FormikForm } from '
|
|
396
|
-
import { FormikSwitch } from '
|
|
397
|
-
import { Button } from '
|
|
395
|
+
import { FormikForm } from '@app-studio/web';
|
|
396
|
+
import { FormikSwitch } from '@app-studio/web';
|
|
397
|
+
import { Button } from '@app-studio/web';
|
|
398
398
|
|
|
399
399
|
export const FormikSwitchExample = () => {
|
|
400
400
|
return (
|
|
@@ -425,9 +425,9 @@ Date picker integrated with Formik.
|
|
|
425
425
|
import React from 'react';
|
|
426
426
|
import { Formik } from 'formik';
|
|
427
427
|
import * as Yup from 'yup';
|
|
428
|
-
import { FormikForm } from '
|
|
429
|
-
import { FormikDatePicker } from '
|
|
430
|
-
import { Button } from '
|
|
428
|
+
import { FormikForm } from '@app-studio/web';
|
|
429
|
+
import { FormikDatePicker } from '@app-studio/web';
|
|
430
|
+
import { Button } from '@app-studio/web';
|
|
431
431
|
|
|
432
432
|
export const FormikDatePickerExample = () => {
|
|
433
433
|
return (
|
|
@@ -462,9 +462,9 @@ Country selection dropdown integrated with Formik.
|
|
|
462
462
|
import React from 'react';
|
|
463
463
|
import { Formik } from 'formik';
|
|
464
464
|
import * as Yup from 'yup';
|
|
465
|
-
import { FormikForm } from '
|
|
466
|
-
import { FormikCountryPicker } from '
|
|
467
|
-
import { Button } from '
|
|
465
|
+
import { FormikForm } from '@app-studio/web';
|
|
466
|
+
import { FormikCountryPicker } from '@app-studio/web';
|
|
467
|
+
import { Button } from '@app-studio/web';
|
|
468
468
|
|
|
469
469
|
export const FormikCountryPickerExample = () => {
|
|
470
470
|
return (
|
|
@@ -499,9 +499,9 @@ Password input with show/hide toggle integrated with Formik.
|
|
|
499
499
|
import React from 'react';
|
|
500
500
|
import { Formik } from 'formik';
|
|
501
501
|
import * as Yup from 'yup';
|
|
502
|
-
import { FormikForm } from '
|
|
503
|
-
import { FormikPassword } from '
|
|
504
|
-
import { Button } from '
|
|
502
|
+
import { FormikForm } from '@app-studio/web';
|
|
503
|
+
import { FormikPassword } from '@app-studio/web';
|
|
504
|
+
import { Button } from '@app-studio/web';
|
|
505
505
|
|
|
506
506
|
export const FormikPasswordExample = () => {
|
|
507
507
|
return (
|
|
@@ -538,9 +538,9 @@ Combobox with search functionality integrated with Formik.
|
|
|
538
538
|
import React from 'react';
|
|
539
539
|
import { Formik } from 'formik';
|
|
540
540
|
import * as Yup from 'yup';
|
|
541
|
-
import { FormikForm } from '
|
|
542
|
-
import { FormikComboBox } from '
|
|
543
|
-
import { Button } from '
|
|
541
|
+
import { FormikForm } from '@app-studio/web';
|
|
542
|
+
import { FormikComboBox } from '@app-studio/web';
|
|
543
|
+
import { Button } from '@app-studio/web';
|
|
544
544
|
|
|
545
545
|
export const FormikComboBoxExample = () => {
|
|
546
546
|
const items = [
|
|
@@ -583,9 +583,9 @@ Slider component integrated with Formik.
|
|
|
583
583
|
import React from 'react';
|
|
584
584
|
import { Formik } from 'formik';
|
|
585
585
|
import * as Yup from 'yup';
|
|
586
|
-
import { FormikForm } from '
|
|
587
|
-
import { FormikSlider } from '
|
|
588
|
-
import { Button } from '
|
|
586
|
+
import { FormikForm } from '@app-studio/web';
|
|
587
|
+
import { FormikSlider } from '@app-studio/web';
|
|
588
|
+
import { Button } from '@app-studio/web';
|
|
589
589
|
|
|
590
590
|
export const FormikSliderExample = () => {
|
|
591
591
|
return (
|