@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
|
@@ -24,7 +24,7 @@ A customizable UI component for selecting from a list of options.
|
|
|
24
24
|
### **Default**
|
|
25
25
|
```tsx
|
|
26
26
|
import React from 'react';
|
|
27
|
-
import { Select } from '
|
|
27
|
+
import { Select } from '@app-studio/web';
|
|
28
28
|
|
|
29
29
|
export const DefaultSelect = () => (
|
|
30
30
|
<Select
|
|
@@ -44,7 +44,7 @@ Flag to indicate if the select has an error state
|
|
|
44
44
|
|
|
45
45
|
```tsx
|
|
46
46
|
import React from 'react';
|
|
47
|
-
import { Select } from '
|
|
47
|
+
import { Select } from '@app-studio/web';
|
|
48
48
|
|
|
49
49
|
export const ErrorSelect = () => (
|
|
50
50
|
<Select
|
|
@@ -67,7 +67,7 @@ Helper text that appears below the select box
|
|
|
67
67
|
```tsx
|
|
68
68
|
import React from 'react';
|
|
69
69
|
|
|
70
|
-
import { Select } from '
|
|
70
|
+
import { Select } from '@app-studio/web';
|
|
71
71
|
|
|
72
72
|
export const HelperTextSelect = () => (
|
|
73
73
|
<Select
|
|
@@ -88,7 +88,7 @@ Determines the shadow property of the select component
|
|
|
88
88
|
|
|
89
89
|
```tsx
|
|
90
90
|
import React from 'react';
|
|
91
|
-
import { Select } from '
|
|
91
|
+
import { Select } from '@app-studio/web';
|
|
92
92
|
|
|
93
93
|
export const ShadowSelect = () => (
|
|
94
94
|
<Select
|
|
@@ -111,7 +111,7 @@ Boolean to control whether the select options are scrollable
|
|
|
111
111
|
|
|
112
112
|
```tsx
|
|
113
113
|
import React from 'react';
|
|
114
|
-
import { Select } from '
|
|
114
|
+
import { Select } from '@app-studio/web';
|
|
115
115
|
|
|
116
116
|
export const IsScrollableDemo = () => {
|
|
117
117
|
const timeZones = [
|
|
@@ -1,121 +1,34 @@
|
|
|
1
1
|
# Separator
|
|
2
2
|
|
|
3
|
-
A
|
|
3
|
+
A visual element used to divide or group content on a user interface.
|
|
4
4
|
|
|
5
5
|
### **Import**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
```tsx
|
|
7
|
+
import { Separator } from '@app-studio/web';
|
|
8
|
+
```
|
|
9
9
|
|
|
10
10
|
### **Default**
|
|
11
11
|
```tsx
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import { Separator } from '@app-studio/web';
|
|
14
|
-
import { Text } from '
|
|
14
|
+
import { Text } from 'app-studio';
|
|
15
|
+
import { Vertical } from 'app-studio';
|
|
15
16
|
|
|
16
17
|
export const DefaultSeparator = () => {
|
|
17
18
|
return (
|
|
18
|
-
|
|
19
|
+
<Vertical width="100%" gap={16}>
|
|
20
|
+
<Text>Default Separator</Text>
|
|
19
21
|
<Text>
|
|
20
22
|
This is some text above the separator. The separator helps to visually
|
|
21
23
|
divide content sections.
|
|
22
24
|
</Text>
|
|
23
25
|
<Separator />
|
|
24
26
|
<Text>
|
|
25
|
-
This is some text below the separator. Notice how the separator creates
|
|
26
|
-
clear visual distinction between content areas.
|
|
27
|
+
This is some text below the separator. Notice how the separator creates
|
|
28
|
+
a clear visual distinction between content areas.
|
|
27
29
|
</Text>
|
|
28
|
-
|
|
30
|
+
</Vertical>
|
|
29
31
|
);
|
|
30
32
|
};
|
|
31
33
|
```
|
|
32
34
|
|
|
33
|
-
### **Variants**
|
|
34
|
-
The Separator component supports different visual variants:
|
|
35
|
-
|
|
36
|
-
```tsx
|
|
37
|
-
<Separator variant="solid" />
|
|
38
|
-
<Separator variant="dashed" />
|
|
39
|
-
<Separator variant="dotted" />
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
### **Thicknesses**
|
|
43
|
-
The Separator component supports different thicknesses:
|
|
44
|
-
|
|
45
|
-
```tsx
|
|
46
|
-
<Separator thickness="thin" />
|
|
47
|
-
<Separator thickness="medium" />
|
|
48
|
-
<Separator thickness="thick" />
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### **Orientations**
|
|
52
|
-
The Separator component supports horizontal and vertical orientations:
|
|
53
|
-
|
|
54
|
-
```tsx
|
|
55
|
-
<Separator orientation="horizontal" />
|
|
56
|
-
|
|
57
|
-
<Horizontal height={100} alignItems="center">
|
|
58
|
-
<Text>Left Content</Text>
|
|
59
|
-
<Separator orientation="vertical" />
|
|
60
|
-
<Text>Right Content</Text>
|
|
61
|
-
</Horizontal>
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
### **Colors**
|
|
65
|
-
The Separator component can be customized with different colors:
|
|
66
|
-
|
|
67
|
-
```tsx
|
|
68
|
-
<Separator color="color.gray.200" />
|
|
69
|
-
<Separator color="color.blue.500" />
|
|
70
|
-
<Separator color="color.green.500" />
|
|
71
|
-
<Separator color="color.red.500" />
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### **With Label**
|
|
75
|
-
The Separator component can include a label in the middle:
|
|
76
|
-
|
|
77
|
-
```tsx
|
|
78
|
-
<Separator label="OR" />
|
|
79
|
-
|
|
80
|
-
<Separator
|
|
81
|
-
label="SECTION DIVIDER"
|
|
82
|
-
views={{
|
|
83
|
-
label: {
|
|
84
|
-
fontWeight: 'bold',
|
|
85
|
-
color: 'color.blue.500',
|
|
86
|
-
textTransform: 'uppercase',
|
|
87
|
-
}
|
|
88
|
-
}}
|
|
89
|
-
/>
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
### **In Card**
|
|
93
|
-
The Separator component can be used within cards to separate content sections:
|
|
94
|
-
|
|
95
|
-
```tsx
|
|
96
|
-
<Card variant="outlined" shape="rounded">
|
|
97
|
-
<Card.Header>
|
|
98
|
-
<Text fontWeight="bold" size="lg">Card Title</Text>
|
|
99
|
-
</Card.Header>
|
|
100
|
-
<Card.Content>
|
|
101
|
-
<Text>
|
|
102
|
-
This is the first section of content in the card.
|
|
103
|
-
</Text>
|
|
104
|
-
<Separator spacing="8px" />
|
|
105
|
-
<Text>
|
|
106
|
-
This is the second section of content.
|
|
107
|
-
</Text>
|
|
108
|
-
<Separator label="ADDITIONAL INFORMATION" spacing="8px" />
|
|
109
|
-
<Text>
|
|
110
|
-
This is the third section with additional information.
|
|
111
|
-
</Text>
|
|
112
|
-
</Card.Content>
|
|
113
|
-
</Card>
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
### **Accessibility**
|
|
117
|
-
By default, the Separator component has a semantic role of `separator`. If the separator is purely decorative, you can set the `decorative` prop to `true` to hide it from screen readers:
|
|
118
|
-
|
|
119
|
-
```tsx
|
|
120
|
-
<Separator decorative={true} />
|
|
121
|
-
```
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# ShareButton
|
|
2
|
+
|
|
3
|
+
A button that allows users to share content from the web application using the device's native sharing capabilities.
|
|
4
|
+
|
|
5
|
+
### **Import**
|
|
6
|
+
```tsx
|
|
7
|
+
import { ShareButton } from '@app-studio/web';
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
### **Default**
|
|
11
|
+
```tsx
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import { ShareButton } from '@app-studio/web';
|
|
14
|
+
|
|
15
|
+
export const DefaultShareButton = () => (
|
|
16
|
+
<ShareButton
|
|
17
|
+
label="Share this page"
|
|
18
|
+
shareData={{
|
|
19
|
+
title: 'App Studio',
|
|
20
|
+
text: 'Découvrez les composants App Studio.',
|
|
21
|
+
url: 'https://appstudio.example.com',
|
|
22
|
+
}}
|
|
23
|
+
onUnsupported={() =>
|
|
24
|
+
alert('Le partage natif est indisponible sur ce navigateur.')
|
|
25
|
+
}
|
|
26
|
+
/>
|
|
27
|
+
);
|
|
28
|
+
```
|
|
29
|
+
|
|
@@ -1,147 +1,86 @@
|
|
|
1
1
|
# Sidebar
|
|
2
2
|
|
|
3
|
-
A
|
|
3
|
+
A versatile layout component for navigation or content, typically positioned at the screen edges.
|
|
4
4
|
|
|
5
5
|
### **Import**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
```tsx
|
|
7
|
+
import { Sidebar } from '@app-studio/web';
|
|
8
|
+
```
|
|
9
9
|
|
|
10
10
|
### **Default**
|
|
11
11
|
```tsx
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import { Sidebar } from '@app-studio/web';
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
14
|
+
import { View } from 'app-studio';
|
|
15
|
+
import { Text } from 'app-studio';
|
|
16
|
+
import { Vertical } from 'app-studio';
|
|
17
|
+
import { Horizontal } from 'app-studio';
|
|
18
|
+
import { HomeIcon,
|
|
19
|
+
SettingsIcon,
|
|
20
|
+
UserIcon,
|
|
21
|
+
NotificationIcon,
|
|
22
|
+
HelpIcon, } from '@app-studio/web';
|
|
23
|
+
import { SideBarNavItem } from '@app-studio/web';
|
|
17
24
|
|
|
18
25
|
export const DefaultSidebar = () => {
|
|
19
26
|
return (
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
<View
|
|
28
|
+
height="500px"
|
|
29
|
+
position="relative"
|
|
30
|
+
border="1px solid #e2e8f0"
|
|
31
|
+
borderRadius="8px"
|
|
32
|
+
overflow="hidden"
|
|
33
|
+
>
|
|
34
|
+
<Horizontal width="100%" height="100%">
|
|
35
|
+
<Sidebar defaultExpanded={true} fixed={false}>
|
|
36
|
+
<Sidebar.Header>
|
|
37
|
+
<Text fontWeight="bold" size="lg">
|
|
38
|
+
App Name
|
|
39
|
+
</Text>
|
|
40
|
+
</Sidebar.Header>
|
|
41
|
+
<Sidebar.Content>
|
|
42
|
+
<Vertical gap={8}>
|
|
43
|
+
<SideBarNavItem
|
|
44
|
+
icon={<HomeIcon widthHeight={20} />}
|
|
45
|
+
label="Home"
|
|
46
|
+
isActive
|
|
47
|
+
/>
|
|
48
|
+
<SideBarNavItem
|
|
49
|
+
icon={<UserIcon widthHeight={20} />}
|
|
50
|
+
label="Profile"
|
|
51
|
+
/>
|
|
52
|
+
<SideBarNavItem
|
|
53
|
+
icon={<NotificationIcon widthHeight={20} />}
|
|
54
|
+
label="Notifications"
|
|
55
|
+
/>
|
|
56
|
+
<SideBarNavItem
|
|
57
|
+
icon={<SettingsIcon widthHeight={20} />}
|
|
58
|
+
label="Settings"
|
|
59
|
+
/>
|
|
60
|
+
<SideBarNavItem
|
|
61
|
+
icon={<HelpIcon widthHeight={20} />}
|
|
62
|
+
label="Help"
|
|
63
|
+
/>
|
|
64
|
+
</Vertical>
|
|
65
|
+
</Sidebar.Content>
|
|
66
|
+
<Sidebar.Footer>
|
|
67
|
+
<Text size="sm" color="color.gray.500">
|
|
68
|
+
© 2023 App Studio
|
|
69
|
+
</Text>
|
|
70
|
+
</Sidebar.Footer>
|
|
71
|
+
</Sidebar>
|
|
72
|
+
<View flex="1" padding="16px" backgroundColor="color.gray.50">
|
|
73
|
+
<Text fontWeight="bold" size="xl" marginBottom="16px">
|
|
74
|
+
Main Content
|
|
75
|
+
</Text>
|
|
76
|
+
<Text>
|
|
77
|
+
This is the main content area. It will adjust based on the sidebar
|
|
78
|
+
state.
|
|
79
|
+
</Text>
|
|
80
|
+
</View>
|
|
81
|
+
</Horizontal>
|
|
82
|
+
</View>
|
|
35
83
|
);
|
|
36
84
|
};
|
|
37
|
-
|
|
38
|
-
const NavItem = ({ icon, label, isActive = false }) => (
|
|
39
|
-
<Horizontal
|
|
40
|
-
alignItems="center"
|
|
41
|
-
gap={12}
|
|
42
|
-
padding="8px 12px"
|
|
43
|
-
borderRadius="4px"
|
|
44
|
-
backgroundColor={isActive ? 'color.blue.50' : 'transparent'}
|
|
45
|
-
color={isActive ? 'color.blue.600' : 'color.gray.700'}
|
|
46
|
-
fontWeight={isActive ? 'bold' : 'normal'}
|
|
47
|
-
cursor="pointer"
|
|
48
|
-
_hover={{ backgroundColor: isActive ? 'color.blue.50' : 'color.gray.100' }}
|
|
49
|
-
>
|
|
50
|
-
{icon}
|
|
51
|
-
<Text>{label}</Text>
|
|
52
|
-
</Horizontal>
|
|
53
|
-
);
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### **Variants**
|
|
57
|
-
The Sidebar component supports different visual variants:
|
|
58
|
-
|
|
59
|
-
```tsx
|
|
60
|
-
<Sidebar variant="default" />
|
|
61
|
-
<Sidebar variant="filled" />
|
|
62
|
-
<Sidebar variant="outline" />
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### **Positions**
|
|
66
|
-
The Sidebar component can be positioned on either side:
|
|
67
|
-
|
|
68
|
-
```tsx
|
|
69
|
-
<Sidebar position="left" />
|
|
70
|
-
<Sidebar position="right" />
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
### **Sizes**
|
|
74
|
-
The Sidebar component supports different sizes:
|
|
75
|
-
|
|
76
|
-
```tsx
|
|
77
|
-
<Sidebar size="sm" />
|
|
78
|
-
<Sidebar size="md" />
|
|
79
|
-
<Sidebar size="lg" />
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
### **Controlled Expansion**
|
|
83
|
-
The Sidebar component can be controlled externally:
|
|
84
|
-
|
|
85
|
-
```tsx
|
|
86
|
-
const [isExpanded, setIsExpanded] = useState(true);
|
|
87
|
-
|
|
88
|
-
<Button onClick={() => setIsExpanded(!isExpanded)}>
|
|
89
|
-
{isExpanded ? 'Collapse' : 'Expand'} Sidebar
|
|
90
|
-
</Button>
|
|
91
|
-
|
|
92
|
-
<Sidebar
|
|
93
|
-
expanded={isExpanded}
|
|
94
|
-
onExpandedChange={setIsExpanded}
|
|
95
|
-
>
|
|
96
|
-
{/* Sidebar content */}
|
|
97
|
-
</Sidebar>
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
### **Customization**
|
|
101
|
-
The Sidebar component can be customized with the views prop:
|
|
102
|
-
|
|
103
|
-
```tsx
|
|
104
|
-
<Sidebar
|
|
105
|
-
views={{
|
|
106
|
-
container: {
|
|
107
|
-
backgroundColor: 'color.blue.800',
|
|
108
|
-
color: 'color.white',
|
|
109
|
-
},
|
|
110
|
-
header: {
|
|
111
|
-
borderBottomColor: 'color.blue.700',
|
|
112
|
-
backgroundColor: 'color.blue.900',
|
|
113
|
-
},
|
|
114
|
-
content: {
|
|
115
|
-
padding: '20px',
|
|
116
|
-
},
|
|
117
|
-
footer: {
|
|
118
|
-
borderTopColor: 'color.blue.700',
|
|
119
|
-
backgroundColor: 'color.blue.900',
|
|
120
|
-
},
|
|
121
|
-
toggleButton: {
|
|
122
|
-
backgroundColor: 'color.blue.700',
|
|
123
|
-
_hover: { backgroundColor: 'color.blue.600' },
|
|
124
|
-
},
|
|
125
|
-
}}
|
|
126
|
-
>
|
|
127
|
-
{/* Sidebar content */}
|
|
128
|
-
</Sidebar>
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
### **Responsive Behavior**
|
|
132
|
-
The Sidebar component can adapt to different screen sizes:
|
|
133
|
-
|
|
134
|
-
```tsx
|
|
135
|
-
<Sidebar
|
|
136
|
-
breakpoint={768}
|
|
137
|
-
breakpointBehavior="overlay"
|
|
138
|
-
hasBackdrop={true}
|
|
139
|
-
>
|
|
140
|
-
{/* Sidebar content */}
|
|
141
|
-
</Sidebar>
|
|
142
85
|
```
|
|
143
86
|
|
|
144
|
-
Available breakpoint behaviors:
|
|
145
|
-
- `collapse`: Automatically collapses the sidebar below the breakpoint
|
|
146
|
-
- `overlay`: Converts the sidebar to an overlay below the breakpoint
|
|
147
|
-
- `hide`: Hides the sidebar completely below the breakpoint
|