@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
|
@@ -1,91 +1,69 @@
|
|
|
1
1
|
# Badge
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Renders a badge with various styles and states according to the design guidelines.
|
|
4
4
|
|
|
5
5
|
### **Import**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
```tsx
|
|
7
|
+
import { Badge } from '@app-studio/web';
|
|
8
|
+
```
|
|
9
9
|
|
|
10
10
|
### **Default**
|
|
11
11
|
```tsx
|
|
12
12
|
import React from 'react';
|
|
13
|
-
import { Badge } from '
|
|
13
|
+
import { Badge } from '@app-studio/web';
|
|
14
14
|
|
|
15
15
|
export const DefaultDemo = () => <Badge content="default" />;
|
|
16
|
-
|
|
17
16
|
```
|
|
18
17
|
|
|
19
18
|
### **content**
|
|
20
|
-
The content displayed
|
|
19
|
+
The content to be displayed within the badge.
|
|
20
|
+
|
|
21
|
+
- **Type:** `string | number`
|
|
21
22
|
|
|
22
23
|
```tsx
|
|
23
24
|
import React from 'react';
|
|
24
|
-
import { Badge } from '
|
|
25
|
+
import { Badge } from '@app-studio/web';
|
|
25
26
|
|
|
26
27
|
export const ContentDemo = () => <Badge content="content" />;
|
|
27
|
-
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
### **variant**
|
|
31
|
-
Determines the
|
|
31
|
+
Determines the styling variants a UI component can have, which could include filled, outlined, or ghost styles among others.
|
|
32
|
+
|
|
33
|
+
- **Type:** `Variant`
|
|
34
|
+
- **Default:** `filled`
|
|
35
|
+
- **Possible Values:** `filled, outline, link, ghost`
|
|
32
36
|
|
|
33
37
|
```tsx
|
|
34
38
|
import React from 'react';
|
|
35
39
|
import { Vertical } from 'app-studio';
|
|
36
40
|
|
|
37
|
-
import { Badge } from '
|
|
38
|
-
import { Variant } from '
|
|
41
|
+
import { Badge } from '@app-studio/web';
|
|
42
|
+
import { Variant } from '@app-studio/web';
|
|
39
43
|
import { View } from 'app-studio';
|
|
40
44
|
export const VariantDemo = () => (
|
|
41
45
|
<Vertical gap={15}>
|
|
42
46
|
{['filled', 'outline', 'link', 'ghost'].map((variant, index) => (
|
|
43
47
|
<View position={'relative'} key={index}>
|
|
44
|
-
<Badge
|
|
45
|
-
content={variant}
|
|
46
|
-
variant={variant as Variant}
|
|
47
|
-
colorScheme="theme.primary"
|
|
48
|
-
/>
|
|
48
|
+
<Badge content={variant} variant={variant as Variant} />
|
|
49
49
|
</View>
|
|
50
50
|
))}
|
|
51
51
|
</Vertical>
|
|
52
52
|
);
|
|
53
|
-
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### **colorScheme**
|
|
57
|
-
Specifies a custom color scheme for the Badge.
|
|
58
|
-
|
|
59
|
-
```tsx
|
|
60
|
-
import React from 'react';
|
|
61
|
-
import { Badge } from '../Badge';
|
|
62
|
-
import { Horizontal } from 'app-studio';
|
|
63
|
-
|
|
64
|
-
export const ColorSchemeDemo = () => (
|
|
65
|
-
<Horizontal gap={10}>
|
|
66
|
-
{[
|
|
67
|
-
'theme.primary',
|
|
68
|
-
'theme.secondary',
|
|
69
|
-
'theme.warning',
|
|
70
|
-
'theme.success',
|
|
71
|
-
'theme.error',
|
|
72
|
-
].map((color, index) => (
|
|
73
|
-
<Badge key={index} colorScheme={color} isAuto content={color} />
|
|
74
|
-
))}
|
|
75
|
-
</Horizontal>
|
|
76
|
-
);
|
|
77
|
-
|
|
78
53
|
```
|
|
79
54
|
|
|
80
55
|
### **position**
|
|
81
|
-
|
|
56
|
+
Lists possible positions for UI elements that can be placed in one of the corners of a container, like notification badges.
|
|
57
|
+
|
|
58
|
+
- **Type:** `Position`
|
|
59
|
+
- **Possible Values:** `top-right, top-left, bottom-right, bottom-left`
|
|
82
60
|
|
|
83
61
|
```tsx
|
|
84
62
|
import React from 'react';
|
|
85
|
-
import { Badge } from '
|
|
63
|
+
import { Badge } from '@app-studio/web';
|
|
86
64
|
import { View } from 'app-studio';
|
|
87
65
|
import { Horizontal } from 'app-studio';
|
|
88
|
-
import { Position } from '
|
|
66
|
+
import { Position } from '@app-studio/web';
|
|
89
67
|
|
|
90
68
|
export const PositionDemo = () => (
|
|
91
69
|
<Horizontal gap={10}>
|
|
@@ -104,18 +82,21 @@ export const PositionDemo = () => (
|
|
|
104
82
|
)}
|
|
105
83
|
</Horizontal>
|
|
106
84
|
);
|
|
107
|
-
|
|
108
85
|
```
|
|
109
86
|
|
|
110
87
|
### **size**
|
|
111
|
-
|
|
88
|
+
Specifies available sizes for UI elements, catering to a range of scalability from extra small to extra large.
|
|
89
|
+
|
|
90
|
+
- **Type:** `Size`
|
|
91
|
+
- **Default:** `md`
|
|
92
|
+
- **Possible Values:** `xs, sm, md, lg, xl`
|
|
112
93
|
|
|
113
94
|
```tsx
|
|
114
95
|
import React from 'react';
|
|
115
96
|
import { Vertical } from 'app-studio';
|
|
116
97
|
|
|
117
|
-
import { Badge } from '
|
|
118
|
-
import { Size } from '
|
|
98
|
+
import { Badge } from '@app-studio/web';
|
|
99
|
+
import { Size } from '@app-studio/web';
|
|
119
100
|
import { View } from 'app-studio';
|
|
120
101
|
export const SizeDemo = () => (
|
|
121
102
|
<Vertical gap={10}>
|
|
@@ -126,17 +107,20 @@ export const SizeDemo = () => (
|
|
|
126
107
|
))}
|
|
127
108
|
</Vertical>
|
|
128
109
|
);
|
|
129
|
-
|
|
130
110
|
```
|
|
131
111
|
|
|
132
112
|
### **shape**
|
|
133
|
-
|
|
113
|
+
Defines possible values for the shape of a UI component such as buttons or badges.
|
|
114
|
+
|
|
115
|
+
- **Type:** `Shape`
|
|
116
|
+
- **Default:** `pillShaped`
|
|
117
|
+
- **Possible Values:** `sharp, rounded, pillShaped`
|
|
134
118
|
|
|
135
119
|
```tsx
|
|
136
120
|
import React from 'react';
|
|
137
121
|
import { Horizontal } from 'app-studio';
|
|
138
|
-
import { Badge } from '
|
|
139
|
-
import { Shape } from '
|
|
122
|
+
import { Badge } from '@app-studio/web';
|
|
123
|
+
import { Shape } from '@app-studio/web';
|
|
140
124
|
import { View } from 'app-studio';
|
|
141
125
|
export const ShapeDemo = () => (
|
|
142
126
|
<Horizontal gap={15}>
|
|
@@ -147,74 +131,5 @@ export const ShapeDemo = () => (
|
|
|
147
131
|
))}
|
|
148
132
|
</Horizontal>
|
|
149
133
|
);
|
|
150
|
-
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
### **styles**
|
|
154
|
-
Custom styling that overrides default views.
|
|
155
|
-
|
|
156
|
-
```tsx
|
|
157
|
-
import React from 'react';
|
|
158
|
-
import { Badge } from '../Badge';
|
|
159
|
-
|
|
160
|
-
export const StylesDemo = () => {
|
|
161
|
-
return (
|
|
162
|
-
<Badge
|
|
163
|
-
content="styles"
|
|
164
|
-
views={{
|
|
165
|
-
container: {
|
|
166
|
-
backgroundColor: 'transparent',
|
|
167
|
-
},
|
|
168
|
-
text: {
|
|
169
|
-
color: 'purple',
|
|
170
|
-
},
|
|
171
|
-
}}
|
|
172
|
-
/>
|
|
173
|
-
);
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
### **Theme Mode Support**
|
|
179
|
-
The Badge component supports both light and dark themes through the `themeMode` prop.
|
|
180
|
-
|
|
181
|
-
```tsx
|
|
182
|
-
import React from 'react';
|
|
183
|
-
import { Badge } from '../Badge';
|
|
184
|
-
import { Vertical, Horizontal } from 'app-studio';
|
|
185
|
-
import { Text } from 'app-studio';
|
|
186
|
-
import { Variant } from '../Badge/Badge.type';
|
|
187
|
-
|
|
188
|
-
export const DarkModeDemo = () => {
|
|
189
|
-
const variants: Variant[] = ['filled', 'outline', 'link', 'ghost'];
|
|
190
|
-
|
|
191
|
-
return (
|
|
192
|
-
<Vertical gap={24}>
|
|
193
|
-
<Text fontSize={20} fontWeight="bold">Light Mode Badges</Text>
|
|
194
|
-
<Horizontal gap={16} alignItems="center">
|
|
195
|
-
{variants.map((variant) => (
|
|
196
|
-
<Badge
|
|
197
|
-
key={variant}
|
|
198
|
-
content={variant}
|
|
199
|
-
variant={variant}
|
|
200
|
-
themeMode="light"
|
|
201
|
-
/>
|
|
202
|
-
))}
|
|
203
|
-
</Horizontal>
|
|
204
|
-
|
|
205
|
-
<Text fontSize={20} fontWeight="bold" marginTop={40}>Dark Mode Badges</Text>
|
|
206
|
-
<Horizontal gap={16} alignItems="center">
|
|
207
|
-
{variants.map((variant) => (
|
|
208
|
-
<Badge
|
|
209
|
-
key={variant}
|
|
210
|
-
content={variant}
|
|
211
|
-
variant={variant}
|
|
212
|
-
themeMode="dark"
|
|
213
|
-
/>
|
|
214
|
-
))}
|
|
215
|
-
</Horizontal>
|
|
216
|
-
</Vertical>
|
|
217
|
-
);
|
|
218
|
-
};
|
|
219
134
|
```
|
|
220
135
|
|
|
@@ -1,139 +1,106 @@
|
|
|
1
1
|
# Button
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A versatile button component for user interaction with various styles, sizes, and interactive effects.
|
|
4
4
|
|
|
5
5
|
### **Import**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
```tsx
|
|
7
|
+
import { Button } from '@app-studio/web';
|
|
8
|
+
```
|
|
9
9
|
|
|
10
10
|
### **Default**
|
|
11
11
|
```tsx
|
|
12
12
|
import React from 'react';
|
|
13
|
-
import { Button } from '
|
|
13
|
+
import { Button } from '@app-studio/web';
|
|
14
14
|
|
|
15
15
|
export const DefaultButton = () => (
|
|
16
16
|
<Button onClick={() => alert('Hello, World!')}>Default</Button>
|
|
17
17
|
);
|
|
18
|
-
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
### **colorScheme**
|
|
22
|
-
Optional string to define the color scheme of the button.
|
|
23
|
-
|
|
24
|
-
```tsx
|
|
25
|
-
import React from 'react';
|
|
26
|
-
import { Button } from '../Button';
|
|
27
|
-
import { Horizontal } from 'app-studio';
|
|
28
|
-
|
|
29
|
-
export const ColoredButtons = () => (
|
|
30
|
-
<Horizontal gap={10}>
|
|
31
|
-
{[
|
|
32
|
-
'theme.primary',
|
|
33
|
-
'theme.secondary',
|
|
34
|
-
'theme.warning',
|
|
35
|
-
'theme.success',
|
|
36
|
-
'theme.error',
|
|
37
|
-
].map((color, index) => (
|
|
38
|
-
<Button key={index} colorScheme={color} isAuto>
|
|
39
|
-
{color}
|
|
40
|
-
</Button>
|
|
41
|
-
))}
|
|
42
|
-
</Horizontal>
|
|
43
|
-
);
|
|
44
|
-
|
|
45
18
|
```
|
|
46
19
|
|
|
47
20
|
### **loaderProps**
|
|
48
21
|
Optional LoaderProps object to configure the appearance and behavior of the loader animation.
|
|
49
22
|
|
|
23
|
+
- **Type:** `LoaderProps`
|
|
24
|
+
- **Possible Values:** ``
|
|
25
|
+
|
|
50
26
|
```tsx
|
|
51
27
|
import React from 'react';
|
|
52
|
-
import { Button } from '
|
|
28
|
+
import { Button } from '@app-studio/web';
|
|
53
29
|
import { Vertical } from 'app-studio';
|
|
54
30
|
|
|
55
31
|
export const LoaderButtons = () => (
|
|
56
32
|
<Vertical gap={15}>
|
|
57
|
-
<Button isLoading isFilled>
|
|
33
|
+
<Button isLoading isFilled onClick={(e) => alert('ok')}>
|
|
58
34
|
Submitting
|
|
59
35
|
</Button>
|
|
60
|
-
<Button
|
|
61
|
-
isLoading
|
|
62
|
-
loaderProps={{
|
|
63
|
-
type: 'dotted',
|
|
64
|
-
views: {
|
|
65
|
-
loader: { color: 'color.white' },
|
|
66
|
-
text: {
|
|
67
|
-
color: 'color.black',
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
}}
|
|
71
|
-
isFilled
|
|
72
|
-
>
|
|
36
|
+
<Button isLoading isFilled>
|
|
73
37
|
Submitting
|
|
74
38
|
</Button>
|
|
75
|
-
<Button
|
|
76
|
-
isLoading
|
|
77
|
-
loaderPosition="right"
|
|
78
|
-
loaderProps={{
|
|
79
|
-
type: 'quarter',
|
|
80
|
-
views: {
|
|
81
|
-
loader: { color: 'color.black' },
|
|
82
|
-
text: { color: 'color.black' },
|
|
83
|
-
},
|
|
84
|
-
}}
|
|
85
|
-
isFilled
|
|
86
|
-
>
|
|
39
|
+
<Button isLoading loaderPosition="right" isFilled>
|
|
87
40
|
Submitting
|
|
88
41
|
</Button>
|
|
89
42
|
</Vertical>
|
|
90
43
|
);
|
|
91
|
-
|
|
92
44
|
```
|
|
93
45
|
|
|
94
46
|
### **icon**
|
|
95
47
|
Optional React node(s) defining the icon to be displayed within the button.
|
|
96
48
|
|
|
49
|
+
- **Type:** `React.ReactNode`
|
|
50
|
+
- **Possible Values:** ``
|
|
51
|
+
|
|
97
52
|
```tsx
|
|
98
53
|
import React from 'react';
|
|
99
|
-
import { Button } from '
|
|
54
|
+
import { Button } from '@app-studio/web';
|
|
100
55
|
import { Center } from 'app-studio';
|
|
101
56
|
|
|
102
|
-
import { DustBinIcon } from '
|
|
57
|
+
import { DustBinIcon } from '@app-studio/web';
|
|
103
58
|
|
|
104
|
-
import { Shape } from '
|
|
59
|
+
import { Shape } from '@app-studio/web';
|
|
105
60
|
|
|
106
61
|
export const IconButtons = () => (
|
|
107
62
|
<Center gap={15}>
|
|
108
|
-
<Button icon={<DustBinIcon
|
|
63
|
+
<Button icon={<DustBinIcon widthHeight={16} />} size="md">
|
|
109
64
|
Delete
|
|
110
65
|
</Button>
|
|
111
66
|
<Button
|
|
112
|
-
|
|
113
|
-
icon={<DustBinIcon
|
|
67
|
+
size="md"
|
|
68
|
+
icon={<DustBinIcon widthHeight={16} />}
|
|
114
69
|
shape={'pillShaped' as Shape}
|
|
115
70
|
iconPosition="right"
|
|
116
|
-
colorScheme="theme.secondary"
|
|
117
71
|
>
|
|
118
72
|
Delete
|
|
119
73
|
</Button>
|
|
74
|
+
<Button icon={<DustBinIcon widthHeight={16} />} isIconRounded isAuto />
|
|
120
75
|
<Button
|
|
121
|
-
icon={<DustBinIcon
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
76
|
+
icon={<DustBinIcon widthHeight={16} />}
|
|
77
|
+
size="md"
|
|
78
|
+
iconPosition="top"
|
|
79
|
+
>
|
|
80
|
+
Delete
|
|
81
|
+
</Button>
|
|
82
|
+
<Button
|
|
83
|
+
size="md"
|
|
84
|
+
icon={<DustBinIcon widthHeight={16} />}
|
|
85
|
+
shape={'pillShaped' as Shape}
|
|
86
|
+
iconPosition="bottom"
|
|
87
|
+
>
|
|
88
|
+
Delete
|
|
89
|
+
</Button>
|
|
126
90
|
</Center>
|
|
127
91
|
);
|
|
128
|
-
|
|
129
92
|
```
|
|
130
93
|
|
|
131
94
|
### **isDisabled**
|
|
132
95
|
Optional boolean to indicate if the button is non-interactive/disabled.
|
|
133
96
|
|
|
97
|
+
- **Type:** `boolean`
|
|
98
|
+
- **Default:** `false`
|
|
99
|
+
- **Possible Values:** ``
|
|
100
|
+
|
|
134
101
|
```tsx
|
|
135
102
|
import React from 'react';
|
|
136
|
-
import { Button } from '
|
|
103
|
+
import { Button } from '@app-studio/web';
|
|
137
104
|
|
|
138
105
|
export const DisabledButton = () => (
|
|
139
106
|
<Button
|
|
@@ -145,77 +112,88 @@ export const DisabledButton = () => (
|
|
|
145
112
|
Disabled
|
|
146
113
|
</Button>
|
|
147
114
|
);
|
|
148
|
-
|
|
149
115
|
```
|
|
150
116
|
|
|
151
117
|
### **isAuto**
|
|
152
118
|
Optional boolean indicating if the button size should automatically adjust to its content.
|
|
153
119
|
|
|
120
|
+
- **Type:** `boolean`
|
|
121
|
+
- **Default:** `false`
|
|
122
|
+
- **Possible Values:** ``
|
|
123
|
+
|
|
154
124
|
```tsx
|
|
155
125
|
import React from 'react';
|
|
156
|
-
import { Button } from '
|
|
126
|
+
import { Button } from '@app-studio/web';
|
|
157
127
|
import { Horizontal } from 'app-studio';
|
|
158
128
|
|
|
159
|
-
import { Shape } from '
|
|
129
|
+
import { Shape } from '@app-studio/web';
|
|
160
130
|
|
|
161
131
|
export const BorderedButtons = () => (
|
|
162
132
|
<Horizontal gap={15}>
|
|
163
133
|
{['sharp', 'rounded', 'pillShaped'].map((border, index) => (
|
|
164
|
-
<Button key={index} shape={border as Shape}
|
|
134
|
+
<Button key={index} shape={border as Shape}>
|
|
165
135
|
{border}
|
|
166
136
|
</Button>
|
|
167
137
|
))}
|
|
168
138
|
</Horizontal>
|
|
169
139
|
);
|
|
170
|
-
|
|
171
140
|
```
|
|
172
141
|
|
|
173
142
|
### **size**
|
|
174
143
|
Optional Size to specify the size of the button.
|
|
175
144
|
|
|
145
|
+
- **Type:** `Size`
|
|
146
|
+
- **Default:** `md`
|
|
147
|
+
- **Possible Values:** `xs, sm, md, lg, xl`
|
|
148
|
+
|
|
176
149
|
```tsx
|
|
177
150
|
import React from 'react';
|
|
178
|
-
import { Button } from '
|
|
151
|
+
import { Button } from '@app-studio/web';
|
|
179
152
|
import { Vertical } from 'app-studio';
|
|
180
153
|
|
|
181
|
-
import { Size } from '
|
|
154
|
+
import { Size } from '@app-studio/web';
|
|
182
155
|
|
|
183
156
|
export const ButtonSizes = () => (
|
|
184
157
|
<Vertical gap={10}>
|
|
185
158
|
{['xs', 'sm', 'md', 'lg', 'xl'].map((size, index) => (
|
|
186
159
|
<Button key={index} size={size as Size}>
|
|
187
|
-
Button
|
|
160
|
+
Button {size.toUpperCase()}
|
|
188
161
|
</Button>
|
|
189
162
|
))}
|
|
190
163
|
</Vertical>
|
|
191
164
|
);
|
|
192
|
-
|
|
193
165
|
```
|
|
194
166
|
|
|
195
167
|
### **shadow**
|
|
196
168
|
Optional shadow property that can be a predefined Shadow, Elevation value or custom CSSProperties to apply shadow effects to the button.
|
|
197
169
|
|
|
170
|
+
- **Type:** `Shadow | Elevation | ViewProps`
|
|
171
|
+
- **Possible Values:** ``
|
|
172
|
+
|
|
198
173
|
```tsx
|
|
199
174
|
import React from 'react';
|
|
200
|
-
import { Button } from '
|
|
175
|
+
import { Button } from '@app-studio/web';
|
|
201
176
|
|
|
202
177
|
export const ShadowButton = () => (
|
|
203
178
|
<Button shadow={{ boxShadow: 'rgb(249, 115, 22) 0px 4px 14px 0px' }}>
|
|
204
179
|
Click Me
|
|
205
180
|
</Button>
|
|
206
181
|
);
|
|
207
|
-
|
|
208
182
|
```
|
|
209
183
|
|
|
210
184
|
### **variant**
|
|
211
|
-
|
|
185
|
+
Variant to define the stylistic variation of the button.
|
|
186
|
+
|
|
187
|
+
- **Type:** `Variant`
|
|
188
|
+
- **Default:** `filled`
|
|
189
|
+
- **Possible Values:** `filled, outline, link, ghost, borderMoving, animatedStroke`
|
|
212
190
|
|
|
213
191
|
```tsx
|
|
214
192
|
import React from 'react';
|
|
215
|
-
import { Button } from '
|
|
193
|
+
import { Button } from '@app-studio/web';
|
|
216
194
|
import { Vertical } from 'app-studio';
|
|
217
195
|
|
|
218
|
-
import { Variant } from '
|
|
196
|
+
import { Variant } from '@app-studio/web';
|
|
219
197
|
|
|
220
198
|
export const VariantButtons = () => (
|
|
221
199
|
<Vertical gap={15}>
|
|
@@ -224,49 +202,19 @@ export const VariantButtons = () => (
|
|
|
224
202
|
key={index}
|
|
225
203
|
to="https://www.npmjs.com/package/app-studio"
|
|
226
204
|
variant={variant as Variant}
|
|
227
|
-
colorScheme="theme.primary"
|
|
228
|
-
isFilled
|
|
229
205
|
>
|
|
230
|
-
{variant}
|
|
206
|
+
App Studio Link {variant}
|
|
231
207
|
</Button>
|
|
232
208
|
))}
|
|
233
209
|
{['filled', 'outline', 'link', 'ghost'].map((variant, index) => (
|
|
234
|
-
<Button
|
|
235
|
-
key={index}
|
|
236
|
-
to="https://www.npmjs.com/package/app-studio"
|
|
237
|
-
variant={variant as Variant}
|
|
238
|
-
isFilled
|
|
239
|
-
>
|
|
210
|
+
<Button key={index} variant={variant as Variant}>
|
|
240
211
|
{variant}
|
|
241
212
|
</Button>
|
|
242
213
|
))}
|
|
214
|
+
{/* Effect variants */}
|
|
215
|
+
<Button variant="borderMoving">Border Moving Effect</Button>
|
|
216
|
+
<Button variant="animatedStroke">Animated Stroke Effect</Button>
|
|
243
217
|
</Vertical>
|
|
244
218
|
);
|
|
245
|
-
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
### **effect**
|
|
249
|
-
Optional effect to apply interactive effects (e.g., ripple) to the button.
|
|
250
|
-
|
|
251
|
-
```tsx
|
|
252
|
-
import React from 'react';
|
|
253
|
-
import { Button } from '../../Button/Button';
|
|
254
|
-
import { Horizontal } from 'app-studio';
|
|
255
|
-
|
|
256
|
-
export const EffectButton = () => (
|
|
257
|
-
<Horizontal gap={10}>
|
|
258
|
-
<Button effect="hover">Hover</Button>
|
|
259
|
-
<Button colorScheme="theme.error" variant="ghost" effect="hover">
|
|
260
|
-
Hover
|
|
261
|
-
</Button>
|
|
262
|
-
<Button colorScheme="theme.secondary" variant="outline" effect="reverse">
|
|
263
|
-
Reverse
|
|
264
|
-
</Button>
|
|
265
|
-
<Button colorScheme="theme.warning" variant="link" effect="reverse">
|
|
266
|
-
Reverse
|
|
267
|
-
</Button>
|
|
268
|
-
</Horizontal>
|
|
269
|
-
);
|
|
270
|
-
|
|
271
219
|
```
|
|
272
220
|
|
|
@@ -10,7 +10,7 @@ A flexible calendar component with day, week, and month views for displaying and
|
|
|
10
10
|
### **Default**
|
|
11
11
|
```tsx
|
|
12
12
|
import React from 'react';
|
|
13
|
-
import { Calendar } from '
|
|
13
|
+
import { Calendar } from '@app-studio/web';
|
|
14
14
|
|
|
15
15
|
export const DefaultCalendar = () => {
|
|
16
16
|
return <Calendar />;
|
|
@@ -22,8 +22,8 @@ Display events in the calendar with customizable event objects. Hover over event
|
|
|
22
22
|
|
|
23
23
|
```tsx
|
|
24
24
|
import React from 'react';
|
|
25
|
-
import { Calendar } from '
|
|
26
|
-
import { CalendarEvent } from '
|
|
25
|
+
import { Calendar } from '@app-studio/web';
|
|
26
|
+
import { CalendarEvent } from '@app-studio/web';
|
|
27
27
|
|
|
28
28
|
export const CalendarWithEvents = () => {
|
|
29
29
|
const events: CalendarEvent[] = [
|
|
@@ -57,7 +57,7 @@ Show a single day with all events for that day.
|
|
|
57
57
|
|
|
58
58
|
```tsx
|
|
59
59
|
import React from 'react';
|
|
60
|
-
import { Calendar } from '
|
|
60
|
+
import { Calendar } from '@app-studio/web';
|
|
61
61
|
|
|
62
62
|
export const DayViewCalendar = () => {
|
|
63
63
|
return <Calendar initialView="day" />;
|
|
@@ -69,7 +69,7 @@ Display a full week with events across all days.
|
|
|
69
69
|
|
|
70
70
|
```tsx
|
|
71
71
|
import React from 'react';
|
|
72
|
-
import { Calendar } from '
|
|
72
|
+
import { Calendar } from '@app-studio/web';
|
|
73
73
|
|
|
74
74
|
export const WeekViewCalendar = () => {
|
|
75
75
|
return <Calendar initialView="week" />;
|
|
@@ -81,7 +81,7 @@ Show the entire month with events distributed across days.
|
|
|
81
81
|
|
|
82
82
|
```tsx
|
|
83
83
|
import React from 'react';
|
|
84
|
-
import { Calendar } from '
|
|
84
|
+
import { Calendar } from '@app-studio/web';
|
|
85
85
|
|
|
86
86
|
export const MonthViewCalendar = () => {
|
|
87
87
|
return <Calendar initialView="month" />;
|
|
@@ -93,7 +93,7 @@ Configure which day the week starts on (0 = Sunday, 1 = Monday, etc.).
|
|
|
93
93
|
|
|
94
94
|
```tsx
|
|
95
95
|
import React from 'react';
|
|
96
|
-
import { Calendar } from '
|
|
96
|
+
import { Calendar } from '@app-studio/web';
|
|
97
97
|
|
|
98
98
|
export const WeekStartsOnMonday = () => {
|
|
99
99
|
return <Calendar weekStartsOn={1} />;
|