@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,21 +1,18 @@
|
|
|
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 '
|
|
17
|
-
import { View } from '
|
|
18
|
-
import { Text } from '
|
|
13
|
+
import { Carousel } from '@app-studio/web';
|
|
14
|
+
import { View } from 'app-studio';
|
|
15
|
+
import { Text } from 'app-studio';
|
|
19
16
|
|
|
20
17
|
export const DefaultDemo = () => {
|
|
21
18
|
// Create an array of slides with different background colors
|
|
@@ -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/web';
|
|
59
|
-
import { Text } from '@app-studio/web';
|
|
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.
|
|
109
|
-
|
|
110
|
-
```tsx
|
|
111
|
-
<Carousel>
|
|
112
|
-
<Carousel.Content>
|
|
113
|
-
{/* Slides here */}
|
|
114
|
-
</Carousel.Content>
|
|
115
|
-
|
|
116
|
-
<Carousel.Previous>
|
|
117
|
-
Previous
|
|
118
|
-
</Carousel.Previous>
|
|
50
|
+
### **autoPlay**
|
|
51
|
+
Enables or disables automatic slide progression.
|
|
119
52
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
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/web';
|
|
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 '
|
|
184
|
-
import { View } from '
|
|
185
|
-
import { Text } from '
|
|
59
|
+
import { Carousel } from '@app-studio/web';
|
|
60
|
+
import { View } from 'app-studio';
|
|
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/web';
|
|
229
|
-
import { Text } from '@app-studio/web';
|
|
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 '
|
|
271
|
-
import { View } from '
|
|
272
|
-
import { Text } from '
|
|
273
|
-
import {
|
|
107
|
+
import React, { useState } from 'react';
|
|
108
|
+
import { Carousel } from '@app-studio/web';
|
|
109
|
+
import { View } from 'app-studio';
|
|
110
|
+
import { Text } from 'app-studio';
|
|
111
|
+
import { Horizontal } from 'app-studio';
|
|
112
|
+
import { Button } from '@app-studio/web';
|
|
113
|
+
|
|
114
|
+
export const StepIndicesDemo = () => {
|
|
115
|
+
const [activeIndex, setActiveIndex] = useState(0);
|
|
274
116
|
|
|
275
|
-
|
|
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/web';
|
|
325
|
-
import { Text } from '@app-studio/web';
|
|
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
|
+
|