@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,19 +1,16 @@
|
|
|
1
1
|
# Carousel
|
|
2
2
|
|
|
3
|
-
A component for displaying a
|
|
4
|
-
|
|
5
|
-
1. **Traditional approach**: Direct children as slides
|
|
6
|
-
2. **Compound component pattern**: Using `Carousel.Content`, `Carousel.Item`, `Carousel.Previous`, and `Carousel.Next`
|
|
3
|
+
A versatile component for displaying a collection of content in a rotating sequence with navigation.
|
|
7
4
|
|
|
8
5
|
### **Import**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
```tsx
|
|
7
|
+
import { Carousel } from '@app-studio/web';
|
|
8
|
+
```
|
|
12
9
|
|
|
13
10
|
### **Default**
|
|
14
11
|
```tsx
|
|
15
12
|
import React from 'react';
|
|
16
|
-
import { Carousel } from '
|
|
13
|
+
import { Carousel } from '@app-studio/web';
|
|
17
14
|
import { View } from 'app-studio';
|
|
18
15
|
import { Text } from 'app-studio';
|
|
19
16
|
|
|
@@ -23,6 +20,7 @@ export const DefaultDemo = () => {
|
|
|
23
20
|
{ color: 'color.blue.500', text: 'Slide 1' },
|
|
24
21
|
{ color: 'color.green.500', text: 'Slide 2' },
|
|
25
22
|
{ color: 'color.purple.500', text: 'Slide 3' },
|
|
23
|
+
{ color: 'color.orange.500', text: 'Slide 4' },
|
|
26
24
|
];
|
|
27
25
|
|
|
28
26
|
return (
|
|
@@ -49,157 +47,34 @@ export const DefaultDemo = () => {
|
|
|
49
47
|
};
|
|
50
48
|
```
|
|
51
49
|
|
|
52
|
-
### **
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
```tsx
|
|
56
|
-
import React from 'react';
|
|
57
|
-
import { Carousel } from '../Carousel';
|
|
58
|
-
import { View } from 'app-studio';
|
|
59
|
-
import { Text } from 'app-studio';
|
|
60
|
-
|
|
61
|
-
export const CompoundDemo = () => {
|
|
62
|
-
const slides = [
|
|
63
|
-
{ color: 'color.blue.500', text: 'Slide 1' },
|
|
64
|
-
{ color: 'color.green.500', text: 'Slide 2' },
|
|
65
|
-
{ color: 'color.purple.500', text: 'Slide 3' },
|
|
66
|
-
];
|
|
67
|
-
|
|
68
|
-
return (
|
|
69
|
-
<View height="300px" width="100%">
|
|
70
|
-
<Carousel
|
|
71
|
-
aria-label="Compound Carousel Example"
|
|
72
|
-
views={{
|
|
73
|
-
container: {
|
|
74
|
-
borderRadius: '8px',
|
|
75
|
-
overflow: 'hidden',
|
|
76
|
-
boxShadow: '0 4px 8px rgba(0, 0, 0, 0.1)',
|
|
77
|
-
},
|
|
78
|
-
}}
|
|
79
|
-
>
|
|
80
|
-
<Carousel.Content>
|
|
81
|
-
{slides.map((slide, index) => (
|
|
82
|
-
<Carousel.Item key={index}>
|
|
83
|
-
<View
|
|
84
|
-
backgroundColor={slide.color}
|
|
85
|
-
width="100%"
|
|
86
|
-
height="100%"
|
|
87
|
-
display="flex"
|
|
88
|
-
alignItems="center"
|
|
89
|
-
justifyContent="center"
|
|
90
|
-
>
|
|
91
|
-
<Text color="white" fontSize="24px" fontWeight="bold">
|
|
92
|
-
{slide.text}
|
|
93
|
-
</Text>
|
|
94
|
-
</View>
|
|
95
|
-
</Carousel.Item>
|
|
96
|
-
))}
|
|
97
|
-
</Carousel.Content>
|
|
98
|
-
|
|
99
|
-
<Carousel.Previous />
|
|
100
|
-
<Carousel.Next />
|
|
101
|
-
</Carousel>
|
|
102
|
-
</View>
|
|
103
|
-
);
|
|
104
|
-
};
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
### **Custom Navigation**
|
|
108
|
-
Customize the navigation buttons with your own content.
|
|
50
|
+
### **autoPlay**
|
|
51
|
+
Enables or disables automatic slide progression.
|
|
109
52
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
{/* Slides here */}
|
|
114
|
-
</Carousel.Content>
|
|
115
|
-
|
|
116
|
-
<Carousel.Previous>
|
|
117
|
-
Previous
|
|
118
|
-
</Carousel.Previous>
|
|
119
|
-
|
|
120
|
-
<Carousel.Next>
|
|
121
|
-
Next
|
|
122
|
-
</Carousel.Next>
|
|
123
|
-
</Carousel>
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
### **Step Navigation**
|
|
127
|
-
Restrict navigation to specific slide indices using the `stepIndices` prop.
|
|
128
|
-
|
|
129
|
-
```tsx
|
|
130
|
-
import React, { useState } from 'react';
|
|
131
|
-
import { Carousel } from '../Carousel';
|
|
132
|
-
import { View } from 'app-studio';
|
|
133
|
-
import { Button } from '../../Button/Button';
|
|
134
|
-
|
|
135
|
-
export const StepIndicesDemo = () => {
|
|
136
|
-
const [activeIndex, setActiveIndex] = useState(0);
|
|
137
|
-
|
|
138
|
-
// Create an array of slides
|
|
139
|
-
const slides = [
|
|
140
|
-
{ text: 'Introduction', id: 0 },
|
|
141
|
-
{ text: 'Step 1', id: 1 },
|
|
142
|
-
{ text: 'Step 2', id: 2 },
|
|
143
|
-
{ text: 'Step 3', id: 3 },
|
|
144
|
-
{ text: 'Step 4', id: 4 },
|
|
145
|
-
{ text: 'Summary', id: 5 },
|
|
146
|
-
];
|
|
147
|
-
|
|
148
|
-
// Only allow navigation to specific slides
|
|
149
|
-
const stepIndices = [0, 2, 4, 5];
|
|
150
|
-
|
|
151
|
-
return (
|
|
152
|
-
<View height="300px" width="100%">
|
|
153
|
-
<Carousel
|
|
154
|
-
activeIndex={activeIndex}
|
|
155
|
-
onChange={setActiveIndex}
|
|
156
|
-
stepIndices={stepIndices}
|
|
157
|
-
>
|
|
158
|
-
{/* Slides here */}
|
|
159
|
-
</Carousel>
|
|
160
|
-
|
|
161
|
-
{/* External navigation */}
|
|
162
|
-
<Horizontal justifyContent="center" gap={4} marginTop={4}>
|
|
163
|
-
{stepIndices.map((index) => (
|
|
164
|
-
<Button
|
|
165
|
-
key={index}
|
|
166
|
-
onClick={() => setActiveIndex(index)}
|
|
167
|
-
variant={activeIndex === index ? 'filled' : 'outline'}
|
|
168
|
-
>
|
|
169
|
-
{slides[index].text}
|
|
170
|
-
</Button>
|
|
171
|
-
))}
|
|
172
|
-
</Horizontal>
|
|
173
|
-
</View>
|
|
174
|
-
);
|
|
175
|
-
};
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
### **Auto-Play**
|
|
179
|
-
Automatically advance through slides with customizable interval.
|
|
53
|
+
- **Type:** `boolean`
|
|
54
|
+
- **Default:** `false`
|
|
55
|
+
- **Possible Values:** ``
|
|
180
56
|
|
|
181
57
|
```tsx
|
|
182
58
|
import React from 'react';
|
|
183
|
-
import { Carousel } from '
|
|
59
|
+
import { Carousel } from '@app-studio/web';
|
|
184
60
|
import { View } from 'app-studio';
|
|
185
61
|
import { Text } from 'app-studio';
|
|
62
|
+
import { Vertical } from 'app-studio';
|
|
186
63
|
|
|
187
64
|
export const AutoPlayDemo = () => {
|
|
65
|
+
// Create an array of slides with different background colors
|
|
188
66
|
const slides = [
|
|
189
67
|
{ color: 'color.red.500', text: 'Auto-play Slide 1' },
|
|
190
68
|
{ color: 'color.yellow.500', text: 'Auto-play Slide 2' },
|
|
191
69
|
{ color: 'color.teal.500', text: 'Auto-play Slide 3' },
|
|
70
|
+
{ color: 'color.pink.500', text: 'Auto-play Slide 4' },
|
|
192
71
|
];
|
|
193
72
|
|
|
194
73
|
return (
|
|
195
74
|
<View height="300px" width="100%">
|
|
196
|
-
<Carousel
|
|
197
|
-
autoPlay
|
|
198
|
-
autoPlayInterval={2000}
|
|
199
|
-
pauseOnHover
|
|
200
|
-
>
|
|
75
|
+
<Carousel autoPlay autoPlayInterval={2000} pauseOnHover>
|
|
201
76
|
{slides.map((slide, index) => (
|
|
202
|
-
<
|
|
77
|
+
<Vertical
|
|
203
78
|
key={index}
|
|
204
79
|
backgroundColor={slide.color}
|
|
205
80
|
width="100%"
|
|
@@ -211,50 +86,10 @@ export const AutoPlayDemo = () => {
|
|
|
211
86
|
<Text color="white" fontSize="24px" fontWeight="bold">
|
|
212
87
|
{slide.text}
|
|
213
88
|
</Text>
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
</Carousel>
|
|
217
|
-
</View>
|
|
218
|
-
);
|
|
219
|
-
};
|
|
220
|
-
```
|
|
221
|
-
|
|
222
|
-
### **Indicators**
|
|
223
|
-
Different styles of indicators to show the current slide position.
|
|
224
|
-
|
|
225
|
-
```tsx
|
|
226
|
-
import React from 'react';
|
|
227
|
-
import { Carousel } from '../Carousel';
|
|
228
|
-
import { View } from 'app-studio';
|
|
229
|
-
import { Text } from 'app-studio';
|
|
230
|
-
|
|
231
|
-
export const IndicatorsDemo = () => {
|
|
232
|
-
const slides = [
|
|
233
|
-
{ color: 'color.indigo.500', text: 'Slide 1' },
|
|
234
|
-
{ color: 'color.cyan.500', text: 'Slide 2' },
|
|
235
|
-
{ color: 'color.amber.500', text: 'Slide 3' },
|
|
236
|
-
];
|
|
237
|
-
|
|
238
|
-
return (
|
|
239
|
-
<View height="300px" width="100%">
|
|
240
|
-
<Carousel
|
|
241
|
-
indicatorVariant="dot" // Options: 'dot', 'line', 'number'
|
|
242
|
-
indicatorPosition="bottom" // Options: 'top', 'bottom'
|
|
243
|
-
>
|
|
244
|
-
{slides.map((slide, index) => (
|
|
245
|
-
<View
|
|
246
|
-
key={index}
|
|
247
|
-
backgroundColor={slide.color}
|
|
248
|
-
width="100%"
|
|
249
|
-
height="100%"
|
|
250
|
-
display="flex"
|
|
251
|
-
alignItems="center"
|
|
252
|
-
justifyContent="center"
|
|
253
|
-
>
|
|
254
|
-
<Text color="white" fontSize="24px" fontWeight="bold">
|
|
255
|
-
{slide.text}
|
|
89
|
+
<Text color="white" fontSize="16px" marginTop="10px">
|
|
90
|
+
Auto-advances every 2 seconds. Hover to pause.
|
|
256
91
|
</Text>
|
|
257
|
-
</
|
|
92
|
+
</Vertical>
|
|
258
93
|
))}
|
|
259
94
|
</Carousel>
|
|
260
95
|
</View>
|
|
@@ -262,150 +97,88 @@ export const IndicatorsDemo = () => {
|
|
|
262
97
|
};
|
|
263
98
|
```
|
|
264
99
|
|
|
265
|
-
### **
|
|
266
|
-
|
|
100
|
+
### **stepIndices**
|
|
101
|
+
An optional array of indices that define specific steps or points in the carousel navigation.
|
|
102
|
+
|
|
103
|
+
- **Type:** `number[]`
|
|
104
|
+
- **Possible Values:** ``
|
|
267
105
|
|
|
268
106
|
```tsx
|
|
269
|
-
import React from 'react';
|
|
270
|
-
import { Carousel } from '
|
|
107
|
+
import React, { useState } from 'react';
|
|
108
|
+
import { Carousel } from '@app-studio/web';
|
|
271
109
|
import { View } from 'app-studio';
|
|
272
110
|
import { Text } from 'app-studio';
|
|
273
|
-
import {
|
|
111
|
+
import { Horizontal } from 'app-studio';
|
|
112
|
+
import { Button } from '@app-studio/web';
|
|
274
113
|
|
|
275
|
-
export const
|
|
114
|
+
export const StepIndicesDemo = () => {
|
|
115
|
+
const [activeIndex, setActiveIndex] = useState(0);
|
|
116
|
+
|
|
117
|
+
// Create an array of slides
|
|
276
118
|
const slides = [
|
|
277
|
-
{ color: 'color.blue.500', text: '
|
|
278
|
-
{ color: 'color.
|
|
279
|
-
{ color: 'color.
|
|
119
|
+
{ color: 'color.blue.500', text: 'Introduction', id: 0 },
|
|
120
|
+
{ color: 'color.gray.400', text: 'Step 1', id: 1 },
|
|
121
|
+
{ color: 'color.gray.400', text: 'Step 2', id: 2 },
|
|
122
|
+
{ color: 'color.gray.400', text: 'Step 3', id: 3 },
|
|
123
|
+
{ color: 'color.gray.400', text: 'Step 4', id: 4 },
|
|
124
|
+
{ color: 'color.green.500', text: 'Summary', id: 5 },
|
|
280
125
|
];
|
|
281
126
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
<Carousel
|
|
285
|
-
navigationPosition="inside" // Options: 'inside', 'outside'
|
|
286
|
-
prevButton={
|
|
287
|
-
<Button size="sm" variant="outline">
|
|
288
|
-
Previous
|
|
289
|
-
</Button>
|
|
290
|
-
}
|
|
291
|
-
nextButton={
|
|
292
|
-
<Button size="sm" variant="outline">
|
|
293
|
-
Next
|
|
294
|
-
</Button>
|
|
295
|
-
}
|
|
296
|
-
>
|
|
297
|
-
{slides.map((slide, index) => (
|
|
298
|
-
<View
|
|
299
|
-
key={index}
|
|
300
|
-
backgroundColor={slide.color}
|
|
301
|
-
width="100%"
|
|
302
|
-
height="100%"
|
|
303
|
-
display="flex"
|
|
304
|
-
alignItems="center"
|
|
305
|
-
justifyContent="center"
|
|
306
|
-
>
|
|
307
|
-
<Text color="white" fontSize="24px" fontWeight="bold">
|
|
308
|
-
{slide.text}
|
|
309
|
-
</Text>
|
|
310
|
-
</View>
|
|
311
|
-
))}
|
|
312
|
-
</Carousel>
|
|
313
|
-
</View>
|
|
314
|
-
);
|
|
315
|
-
};
|
|
316
|
-
```
|
|
317
|
-
|
|
318
|
-
### **Custom Styling**
|
|
319
|
-
Customize the appearance of the carousel.
|
|
320
|
-
|
|
321
|
-
```tsx
|
|
322
|
-
import React from 'react';
|
|
323
|
-
import { Carousel } from '../Carousel';
|
|
324
|
-
import { View } from 'app-studio';
|
|
325
|
-
import { Text } from 'app-studio';
|
|
326
|
-
import { Card } from '../../Card/Card';
|
|
327
|
-
|
|
328
|
-
export const CustomDemo = () => {
|
|
329
|
-
const cards = [
|
|
330
|
-
{
|
|
331
|
-
title: 'Mountain Retreat',
|
|
332
|
-
description: 'Peaceful mountain cabin with stunning views.',
|
|
333
|
-
},
|
|
334
|
-
{
|
|
335
|
-
title: 'Beach Paradise',
|
|
336
|
-
description: 'Relax on white sandy beaches with crystal clear water.',
|
|
337
|
-
},
|
|
338
|
-
{
|
|
339
|
-
title: 'City Adventure',
|
|
340
|
-
description: 'Explore the vibrant streets and culture of the city.',
|
|
341
|
-
},
|
|
342
|
-
];
|
|
127
|
+
// Only allow navigation to specific slides (introduction, steps 2 & 4, summary)
|
|
128
|
+
const stepIndices = [0, 2, 4, 5];
|
|
343
129
|
|
|
344
130
|
return (
|
|
345
|
-
<View
|
|
346
|
-
<
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
131
|
+
<View>
|
|
132
|
+
<Text fontWeight="bold" marginBottom={2}>
|
|
133
|
+
Step Navigation (Only specific slides)
|
|
134
|
+
</Text>
|
|
135
|
+
<View height="300px" width="100%">
|
|
136
|
+
<Carousel
|
|
137
|
+
activeIndex={activeIndex}
|
|
138
|
+
onChange={setActiveIndex}
|
|
139
|
+
stepIndices={stepIndices}
|
|
140
|
+
showIndicators={false}
|
|
141
|
+
>
|
|
142
|
+
{slides.map((slide, index) => (
|
|
143
|
+
<View
|
|
144
|
+
key={index}
|
|
145
|
+
backgroundColor={
|
|
146
|
+
stepIndices.includes(index) ? slide.color : 'color.gray.400'
|
|
147
|
+
}
|
|
148
|
+
width="100%"
|
|
149
|
+
height="100%"
|
|
150
|
+
display="flex"
|
|
151
|
+
alignItems="center"
|
|
152
|
+
justifyContent="center"
|
|
153
|
+
flexDirection="column"
|
|
154
|
+
gap={4}
|
|
155
|
+
>
|
|
156
|
+
<Text color="white" fontSize="24px" fontWeight="bold">
|
|
157
|
+
{slide.text}
|
|
158
|
+
</Text>
|
|
159
|
+
<Text color="white" fontSize="16px">
|
|
160
|
+
{stepIndices.includes(index)
|
|
161
|
+
? 'This is an allowed step'
|
|
162
|
+
: 'This slide is skipped in navigation'}
|
|
163
|
+
</Text>
|
|
164
|
+
</View>
|
|
165
|
+
))}
|
|
166
|
+
</Carousel>
|
|
167
|
+
</View>
|
|
168
|
+
|
|
169
|
+
<Horizontal justifyContent="center" gap={4} marginTop={4}>
|
|
170
|
+
{stepIndices.map((index) => (
|
|
171
|
+
<Button
|
|
379
172
|
key={index}
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
padding="20px"
|
|
383
|
-
backgroundColor="color.blue.50"
|
|
384
|
-
display="flex"
|
|
385
|
-
alignItems="center"
|
|
386
|
-
justifyContent="center"
|
|
173
|
+
onClick={() => setActiveIndex(index)}
|
|
174
|
+
variant={activeIndex === index ? 'filled' : 'outline'}
|
|
387
175
|
>
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
width="80%"
|
|
391
|
-
maxWidth="500px"
|
|
392
|
-
padding="20px"
|
|
393
|
-
>
|
|
394
|
-
<Card.Header>
|
|
395
|
-
<Text fontSize="24px" fontWeight="bold">
|
|
396
|
-
{card.title}
|
|
397
|
-
</Text>
|
|
398
|
-
</Card.Header>
|
|
399
|
-
<Card.Content>
|
|
400
|
-
<Text fontSize="16px">
|
|
401
|
-
{card.description}
|
|
402
|
-
</Text>
|
|
403
|
-
</Card.Content>
|
|
404
|
-
</Card>
|
|
405
|
-
</View>
|
|
176
|
+
{slides[index].text}
|
|
177
|
+
</Button>
|
|
406
178
|
))}
|
|
407
|
-
</
|
|
179
|
+
</Horizontal>
|
|
408
180
|
</View>
|
|
409
181
|
);
|
|
410
182
|
};
|
|
411
183
|
```
|
|
184
|
+
|
|
@@ -6,14 +6,14 @@ A layout component that centers its children both horizontally and vertically wi
|
|
|
6
6
|
```tsx
|
|
7
7
|
import { Center } from '@app-studio/web';
|
|
8
8
|
// or from app-studio
|
|
9
|
-
import { Center } from 'app-studio';
|
|
9
|
+
import { Center } from '@app-studio/web';
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
### **Basic Usage**
|
|
13
13
|
```tsx
|
|
14
14
|
import React from 'react';
|
|
15
|
-
import { Center } from 'app-studio';
|
|
16
|
-
import { Text } from 'app-studio';
|
|
15
|
+
import { Center } from '@app-studio/web';
|
|
16
|
+
import { Text } from '@app-studio/web';
|
|
17
17
|
|
|
18
18
|
export const BasicCenter = () => (
|
|
19
19
|
<Center height={200} backgroundColor="color.gray.100">
|
|
@@ -27,9 +27,9 @@ export const BasicCenter = () => (
|
|
|
27
27
|
### **Loading State Example**
|
|
28
28
|
```tsx
|
|
29
29
|
import React from 'react';
|
|
30
|
-
import { Center } from 'app-studio';
|
|
30
|
+
import { Center } from '@app-studio/web';
|
|
31
31
|
import { Loader } from '@app-studio/web';
|
|
32
|
-
import { Text, Vertical } from 'app-studio';
|
|
32
|
+
import { Text, Vertical } from '@app-studio/web';
|
|
33
33
|
|
|
34
34
|
export const LoadingCenter = () => (
|
|
35
35
|
<Center height="100vh" backgroundColor="color.white">
|
|
@@ -44,9 +44,9 @@ export const LoadingCenter = () => (
|
|
|
44
44
|
### **Empty State Example**
|
|
45
45
|
```tsx
|
|
46
46
|
import React from 'react';
|
|
47
|
-
import { Center } from 'app-studio';
|
|
47
|
+
import { Center } from '@app-studio/web';
|
|
48
48
|
import { Button } from '@app-studio/web';
|
|
49
|
-
import { Text, Vertical } from 'app-studio';
|
|
49
|
+
import { Text, Vertical } from '@app-studio/web';
|
|
50
50
|
import { EmptyIcon } from '@app-studio/web';
|
|
51
51
|
|
|
52
52
|
export const EmptyStateCenter = () => (
|
|
@@ -72,9 +72,9 @@ export const EmptyStateCenter = () => (
|
|
|
72
72
|
### **Modal Content Example**
|
|
73
73
|
```tsx
|
|
74
74
|
import React from 'react';
|
|
75
|
-
import { Center } from 'app-studio';
|
|
75
|
+
import { Center } from '@app-studio/web';
|
|
76
76
|
import { Modal, Button } from '@app-studio/web';
|
|
77
|
-
import { Text, Vertical, Horizontal } from 'app-studio';
|
|
77
|
+
import { Text, Vertical, Horizontal } from '@app-studio/web';
|
|
78
78
|
|
|
79
79
|
export const ModalCenter = () => {
|
|
80
80
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
@@ -120,9 +120,9 @@ export const ModalCenter = () => {
|
|
|
120
120
|
### **Hero Section Example**
|
|
121
121
|
```tsx
|
|
122
122
|
import React from 'react';
|
|
123
|
-
import { Center } from 'app-studio';
|
|
123
|
+
import { Center } from '@app-studio/web';
|
|
124
124
|
import { Button } from '@app-studio/web';
|
|
125
|
-
import { Text, Vertical, Horizontal } from 'app-studio';
|
|
125
|
+
import { Text, Vertical, Horizontal } from '@app-studio/web';
|
|
126
126
|
|
|
127
127
|
export const HeroCenter = () => (
|
|
128
128
|
<Center
|
|
@@ -167,8 +167,8 @@ export const HeroCenter = () => (
|
|
|
167
167
|
### **Card Center Example**
|
|
168
168
|
```tsx
|
|
169
169
|
import React from 'react';
|
|
170
|
-
import { Center } from 'app-studio';
|
|
171
|
-
import { View, Text, Vertical } from 'app-studio';
|
|
170
|
+
import { Center } from '@app-studio/web';
|
|
171
|
+
import { View, Text, Vertical } from '@app-studio/web';
|
|
172
172
|
import { StarIcon } from '@app-studio/web';
|
|
173
173
|
|
|
174
174
|
export const CardCenter = () => (
|
|
@@ -216,8 +216,8 @@ The Center component extends ViewProps from app-studio, inheriting all standard
|
|
|
216
216
|
### **Responsive Centering**
|
|
217
217
|
```tsx
|
|
218
218
|
import React from 'react';
|
|
219
|
-
import { Center } from 'app-studio';
|
|
220
|
-
import { Text, Vertical } from 'app-studio';
|
|
219
|
+
import { Center } from '@app-studio/web';
|
|
220
|
+
import { Text, Vertical } from '@app-studio/web';
|
|
221
221
|
|
|
222
222
|
export const ResponsiveCenter = () => (
|
|
223
223
|
<Center
|
|
@@ -250,8 +250,8 @@ export const ResponsiveCenter = () => (
|
|
|
250
250
|
### **Multiple Children with Gap**
|
|
251
251
|
```tsx
|
|
252
252
|
import React from 'react';
|
|
253
|
-
import { Center } from 'app-studio';
|
|
254
|
-
import { View } from 'app-studio';
|
|
253
|
+
import { Center } from '@app-studio/web';
|
|
254
|
+
import { View } from '@app-studio/web';
|
|
255
255
|
|
|
256
256
|
export const CenterWithGap = () => (
|
|
257
257
|
<Center height={300} gap={16}>
|
|
@@ -280,9 +280,9 @@ export const CenterWithGap = () => (
|
|
|
280
280
|
### **Error State Example**
|
|
281
281
|
```tsx
|
|
282
282
|
import React from 'react';
|
|
283
|
-
import { Center } from 'app-studio';
|
|
283
|
+
import { Center } from '@app-studio/web';
|
|
284
284
|
import { Button } from '@app-studio/web';
|
|
285
|
-
import { Text, Vertical } from 'app-studio';
|
|
285
|
+
import { Text, Vertical } from '@app-studio/web';
|
|
286
286
|
import { ErrorIcon } from '@app-studio/web';
|
|
287
287
|
|
|
288
288
|
export const ErrorStateCenter = () => (
|
|
@@ -319,8 +319,8 @@ export const ErrorStateCenter = () => (
|
|
|
319
319
|
### **Image Placeholder Example**
|
|
320
320
|
```tsx
|
|
321
321
|
import React from 'react';
|
|
322
|
-
import { Center } from 'app-studio';
|
|
323
|
-
import { Text } from 'app-studio';
|
|
322
|
+
import { Center } from '@app-studio/web';
|
|
323
|
+
import { Text } from '@app-studio/web';
|
|
324
324
|
import { ImageIcon } from '@app-studio/web';
|
|
325
325
|
|
|
326
326
|
export const ImagePlaceholder = () => (
|
|
@@ -412,7 +412,7 @@ export const ImagePlaceholder = () => (
|
|
|
412
412
|
The Center component works well with other layout components:
|
|
413
413
|
|
|
414
414
|
```tsx
|
|
415
|
-
import { Center, Vertical, Horizontal } from 'app-studio';
|
|
415
|
+
import { Center, Vertical, Horizontal } from '@app-studio/web';
|
|
416
416
|
|
|
417
417
|
// Centered content within a larger layout
|
|
418
418
|
<Vertical height="100vh">
|