@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
|
@@ -10,8 +10,8 @@ A flexible navigation menu component that supports nested items, icons, and diff
|
|
|
10
10
|
### **Default**
|
|
11
11
|
```tsx
|
|
12
12
|
import React from 'react';
|
|
13
|
-
import { NavigationMenu } from '
|
|
14
|
-
import { HomeIcon, SettingsIcon, UserIcon } from '
|
|
13
|
+
import { NavigationMenu } from '@app-studio/web';
|
|
14
|
+
import { HomeIcon, SettingsIcon, UserIcon } from '@app-studio/web';
|
|
15
15
|
|
|
16
16
|
export const DefaultNavigationMenu = () => {
|
|
17
17
|
const items = [
|
|
@@ -51,8 +51,8 @@ Create a horizontal navigation menu.
|
|
|
51
51
|
|
|
52
52
|
```tsx
|
|
53
53
|
import React from 'react';
|
|
54
|
-
import { NavigationMenu } from '
|
|
55
|
-
import { HomeIcon, SettingsIcon } from '
|
|
54
|
+
import { NavigationMenu } from '@app-studio/web';
|
|
55
|
+
import { HomeIcon, SettingsIcon } from '@app-studio/web';
|
|
56
56
|
|
|
57
57
|
export const HorizontalNavigationMenu = () => {
|
|
58
58
|
const items = [
|
|
@@ -85,8 +85,8 @@ Different visual styles for the navigation menu.
|
|
|
85
85
|
|
|
86
86
|
```tsx
|
|
87
87
|
import React from 'react';
|
|
88
|
-
import { NavigationMenu } from '
|
|
89
|
-
import { HomeIcon } from '
|
|
88
|
+
import { NavigationMenu } from '@app-studio/web';
|
|
89
|
+
import { HomeIcon } from '@app-studio/web';
|
|
90
90
|
|
|
91
91
|
export const NavigationMenuVariants = () => {
|
|
92
92
|
const items = [
|
|
@@ -127,8 +127,8 @@ Different sizes for the navigation menu items.
|
|
|
127
127
|
|
|
128
128
|
```tsx
|
|
129
129
|
import React from 'react';
|
|
130
|
-
import { NavigationMenu } from '
|
|
131
|
-
import { HomeIcon } from '
|
|
130
|
+
import { NavigationMenu } from '@app-studio/web';
|
|
131
|
+
import { HomeIcon } from '@app-studio/web';
|
|
132
132
|
|
|
133
133
|
export const NavigationMenuSizes = () => {
|
|
134
134
|
const items = [
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
# OTPInput
|
|
2
|
+
|
|
3
|
+
A component to securely input one-time passwords or verification codes digit by digit.
|
|
4
|
+
|
|
5
|
+
### **Import**
|
|
6
|
+
```tsx
|
|
7
|
+
import { OTPInput } from '@app-studio/web';
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
### **Default**
|
|
11
|
+
```tsx
|
|
12
|
+
import React, { useState } from 'react';
|
|
13
|
+
import { Button } from '@app-studio/web';
|
|
14
|
+
import { Vertical } from 'app-studio';
|
|
15
|
+
import { Text } from 'app-studio';
|
|
16
|
+
import { OTPInput } from '@app-studio/web';
|
|
17
|
+
|
|
18
|
+
export const DefaultOTPInput = () => {
|
|
19
|
+
const [otp, setOtp] = useState('');
|
|
20
|
+
|
|
21
|
+
const handleSubmit = (event: React.FormEvent) => {
|
|
22
|
+
event.preventDefault();
|
|
23
|
+
alert(`Entered OTP: ${otp}`);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<form onSubmit={handleSubmit}>
|
|
28
|
+
<Vertical gap={20}>
|
|
29
|
+
<Text>Enter verification code:</Text>
|
|
30
|
+
<OTPInput name="otp" value={otp} onChange={setOtp} isAutoFocus />
|
|
31
|
+
<Button type="submit" isAuto>
|
|
32
|
+
Verify
|
|
33
|
+
</Button>
|
|
34
|
+
</Vertical>
|
|
35
|
+
</form>
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const CustomizedOTPInput = () => {
|
|
40
|
+
const [otp, setOtp] = useState('');
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<Vertical gap={20}>
|
|
44
|
+
<Text>Custom OTP Input:</Text>
|
|
45
|
+
<OTPInput
|
|
46
|
+
name="customOtp"
|
|
47
|
+
value={otp}
|
|
48
|
+
onChange={setOtp}
|
|
49
|
+
length={4}
|
|
50
|
+
shape="pillShaped"
|
|
51
|
+
variant="outline"
|
|
52
|
+
size="lg"
|
|
53
|
+
gap={12}
|
|
54
|
+
shadow={{ boxShadow: 'rgba(0, 0, 0, 0.1) 0px 4px 6px' }}
|
|
55
|
+
views={{
|
|
56
|
+
container: {
|
|
57
|
+
borderColor: 'theme.primary',
|
|
58
|
+
backgroundColor: 'color.gray.50',
|
|
59
|
+
},
|
|
60
|
+
input: {
|
|
61
|
+
color: 'theme.primary',
|
|
62
|
+
fontWeight: 'bold',
|
|
63
|
+
},
|
|
64
|
+
}}
|
|
65
|
+
/>
|
|
66
|
+
</Vertical>
|
|
67
|
+
);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export const OTPInputWithLabel = () => {
|
|
71
|
+
const [otp, setOtp] = useState('');
|
|
72
|
+
|
|
73
|
+
return (
|
|
74
|
+
<Vertical gap={20}>
|
|
75
|
+
<OTPInput
|
|
76
|
+
name="labeledOtp"
|
|
77
|
+
label="Verification Code"
|
|
78
|
+
helperText="Enter the 6-digit code sent to your phone"
|
|
79
|
+
value={otp}
|
|
80
|
+
onChange={setOtp}
|
|
81
|
+
/>
|
|
82
|
+
</Vertical>
|
|
83
|
+
);
|
|
84
|
+
};
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### **onComplete**
|
|
88
|
+
Callback function triggered when all OTP fields have been filled, providing the complete OTP value.
|
|
89
|
+
|
|
90
|
+
- **Type:** `(value: string) => void`
|
|
91
|
+
- **Default:** `undefined`
|
|
92
|
+
- **Possible Values:** ``
|
|
93
|
+
|
|
94
|
+
```tsx
|
|
95
|
+
import React, { useState } from 'react';
|
|
96
|
+
import { Vertical } from 'app-studio';
|
|
97
|
+
import { Text } from 'app-studio';
|
|
98
|
+
import { OTPInput } from '@app-studio/web';
|
|
99
|
+
|
|
100
|
+
export const OnCompleteDemo = () => {
|
|
101
|
+
const [otp, setOtp] = useState('');
|
|
102
|
+
const [message, setMessage] = useState('');
|
|
103
|
+
|
|
104
|
+
const handleComplete = (value: string) => {
|
|
105
|
+
setMessage(`OTP completed: ${value}`);
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
return (
|
|
109
|
+
<Vertical gap={20}>
|
|
110
|
+
<Text>Enter OTP (auto-submits when complete):</Text>
|
|
111
|
+
<OTPInput
|
|
112
|
+
name="completeOtp"
|
|
113
|
+
value={otp}
|
|
114
|
+
onChange={setOtp}
|
|
115
|
+
onComplete={handleComplete}
|
|
116
|
+
isAutoFocus
|
|
117
|
+
/>
|
|
118
|
+
{message && (
|
|
119
|
+
<Text color="theme.success" fontWeight="medium">
|
|
120
|
+
{message}
|
|
121
|
+
</Text>
|
|
122
|
+
)}
|
|
123
|
+
</Vertical>
|
|
124
|
+
);
|
|
125
|
+
};
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### **stepValues**
|
|
129
|
+
An array of numbers that defines specific allowed values for each OTP input field, often used for custom pin pads.
|
|
130
|
+
|
|
131
|
+
- **Type:** `number[]`
|
|
132
|
+
- **Default:** `undefined`
|
|
133
|
+
- **Possible Values:** ``
|
|
134
|
+
|
|
135
|
+
```tsx
|
|
136
|
+
import React, { useState } from 'react';
|
|
137
|
+
import { Vertical } from 'app-studio';
|
|
138
|
+
import { Horizontal } from 'app-studio';
|
|
139
|
+
import { Text } from 'app-studio';
|
|
140
|
+
import { OTPInput } from '@app-studio/web';
|
|
141
|
+
|
|
142
|
+
export const StepValuesOTPInput = () => {
|
|
143
|
+
const [otp, setOtp] = useState('');
|
|
144
|
+
|
|
145
|
+
// Define specific values that the OTP can take
|
|
146
|
+
const stepValues = [1234, 2468, 3579, 5678, 9876];
|
|
147
|
+
|
|
148
|
+
return (
|
|
149
|
+
<Vertical gap={20}>
|
|
150
|
+
<Text>Step-based OTP Input:</Text>
|
|
151
|
+
<OTPInput
|
|
152
|
+
name="stepOtp"
|
|
153
|
+
value={otp}
|
|
154
|
+
onChange={setOtp}
|
|
155
|
+
length={4}
|
|
156
|
+
stepValues={stepValues}
|
|
157
|
+
shape="rounded"
|
|
158
|
+
variant="outline"
|
|
159
|
+
size="lg"
|
|
160
|
+
gap={12}
|
|
161
|
+
views={{
|
|
162
|
+
container: {
|
|
163
|
+
borderColor: 'theme.primary',
|
|
164
|
+
backgroundColor: 'color.gray.50',
|
|
165
|
+
},
|
|
166
|
+
input: {
|
|
167
|
+
color: 'theme.primary',
|
|
168
|
+
fontWeight: 'bold',
|
|
169
|
+
},
|
|
170
|
+
}}
|
|
171
|
+
/>
|
|
172
|
+
|
|
173
|
+
<Horizontal justifyContent="space-between" width="100%">
|
|
174
|
+
{stepValues.map((step) => (
|
|
175
|
+
<Text key={step} fontSize={14} color="color.blueGray.500">
|
|
176
|
+
{step}
|
|
177
|
+
</Text>
|
|
178
|
+
))}
|
|
179
|
+
</Horizontal>
|
|
180
|
+
|
|
181
|
+
<Text fontSize={14} color="color.gray.600">
|
|
182
|
+
This OTP input will snap to the closest value from:{' '}
|
|
183
|
+
{stepValues.join(', ')}
|
|
184
|
+
</Text>
|
|
185
|
+
</Vertical>
|
|
186
|
+
);
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
export const FormikStepValuesOTPInput = () => {
|
|
190
|
+
// This would be implemented in the Formik examples file
|
|
191
|
+
return null;
|
|
192
|
+
};
|
|
193
|
+
```
|
|
194
|
+
|