@app-studio/web 0.9.31 → 0.9.32
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/docs/components/Accordion.mdx +158 -0
- package/docs/components/Alert.mdx +123 -0
- package/docs/components/AspectRatio.mdx +55 -0
- package/docs/components/Avatar.mdx +85 -0
- package/docs/components/Background.mdx +522 -0
- package/docs/components/Badge.mdx +220 -0
- package/docs/components/Button.mdx +272 -0
- package/docs/components/Calendar.mdx +274 -0
- package/docs/components/Card.mdx +341 -0
- package/docs/components/Carousel.mdx +411 -0
- package/docs/components/Center.mdx +474 -0
- package/docs/components/Chart.mdx +232 -0
- package/docs/components/ChatInput.mdx +373 -0
- package/docs/components/Checkbox.mdx +66 -0
- package/docs/components/ColorInput.mdx +209 -0
- package/docs/components/ComboBox.mdx +364 -0
- package/docs/components/Command.mdx +252 -0
- package/docs/components/ContextMenu.mdx +219 -0
- package/docs/components/CountryPicker.mdx +123 -0
- package/docs/components/DatePicker.mdx +77 -0
- package/docs/components/DragAndDrop.mdx +539 -0
- package/docs/components/DropdownMenu.mdx +205 -0
- package/docs/components/File.mdx +8 -0
- package/docs/components/Flow.mdx +257 -0
- package/docs/components/Form.mdx +681 -0
- package/docs/components/Formik.mdx +621 -0
- package/docs/components/Gradient.mdx +271 -0
- package/docs/components/Horizontal.mdx +40 -0
- package/docs/components/HoverCard.mdx +140 -0
- package/docs/components/Icon.mdx +438 -0
- package/docs/components/Label.mdx +438 -0
- package/docs/components/Link.mdx +83 -0
- package/docs/components/Loader.mdx +527 -0
- package/docs/components/Menubar.mdx +124 -0
- package/docs/components/Message.mdx +571 -0
- package/docs/components/Modal.mdx +533 -0
- package/docs/components/NavigationMenu.mdx +165 -0
- package/docs/components/Pagination.mdx +150 -0
- package/docs/components/Password.mdx +121 -0
- package/docs/components/Resizable.mdx +148 -0
- package/docs/components/Select.mdx +126 -0
- package/docs/components/Separator.mdx +121 -0
- package/docs/components/Sidebar.mdx +147 -0
- package/docs/components/Slider.mdx +232 -0
- package/docs/components/Switch.mdx +62 -0
- package/docs/components/Table.mdx +409 -0
- package/docs/components/Tabs.mdx +215 -0
- package/docs/components/TagInput.mdx +528 -0
- package/docs/components/Text.mdx +163 -0
- package/docs/components/TextArea.mdx +136 -0
- package/docs/components/TextField.mdx +225 -0
- package/docs/components/Title.mdx +535 -0
- package/docs/components/Toast.mdx +165 -0
- package/docs/components/Toggle.mdx +141 -0
- package/docs/components/ToggleGroup.mdx +165 -0
- package/docs/components/Tooltip.mdx +191 -0
- package/docs/components/Tree.mdx +340 -0
- package/docs/components/Uploader.mdx +426 -0
- package/docs/components/Vertical.mdx +566 -0
- package/package.json +1 -1
|
@@ -0,0 +1,571 @@
|
|
|
1
|
+
### **Import**
|
|
2
|
+
|
|
3
|
+
```tsx
|
|
4
|
+
import { Message } from 'app-studio';
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
### **Default**
|
|
8
|
+
|
|
9
|
+
It uses the isOpen and onClose properties to display the message.
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
import { Button } from '../Button/Button';
|
|
13
|
+
import { useState } from 'react';
|
|
14
|
+
|
|
15
|
+
const [show, setShow] = useState(false);
|
|
16
|
+
|
|
17
|
+
<>
|
|
18
|
+
<Button onClick={() => setShow(true)} isAuto>
|
|
19
|
+
Open Message
|
|
20
|
+
</Button>
|
|
21
|
+
<Message.Overlay isOpen={show} onClose={() => setShow(false)}>
|
|
22
|
+
<Message.Container>
|
|
23
|
+
<Message.Header>Title</Message.Header>
|
|
24
|
+
<Message.Body>
|
|
25
|
+
Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam.
|
|
26
|
+
Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna, vel scelerisque
|
|
27
|
+
nisl consectetur et.
|
|
28
|
+
</Message.Body>
|
|
29
|
+
<Message.Footer>
|
|
30
|
+
<Button onClick={() => setShow(false)}>Cancel</Button>
|
|
31
|
+
</Message.Footer>
|
|
32
|
+
</Message.Container>
|
|
33
|
+
</Message.Overlay>
|
|
34
|
+
</>;
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## **Message Overlay**
|
|
38
|
+
|
|
39
|
+
It represents the overlay or backdrop that appears behind the message content when the message is displayed.
|
|
40
|
+
|
|
41
|
+
### **Props**
|
|
42
|
+
|
|
43
|
+
| Prop | Type | Description | Default |
|
|
44
|
+
| ---------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ------- |
|
|
45
|
+
| isOpen | boolean | Whether the message overlay is open. | false |
|
|
46
|
+
| onClose | function | Callback function to close the message. | |
|
|
47
|
+
| position | Position | Positions the message overlay ('top', 'left', 'right', 'bottom', 'center'). | 'center' |
|
|
48
|
+
| blur | number | Adds a blur effect on the message overlay. | |
|
|
49
|
+
| isClosePrevented | boolean | Prevents the user from closing the message when clicking outside of it. | false |
|
|
50
|
+
| styles | CSSProperties | Optional custom styles for the MessageOverlay. | |
|
|
51
|
+
| className | string | Optional className for the MessageOverlay container. | |
|
|
52
|
+
|
|
53
|
+
### **FullScreen**
|
|
54
|
+
|
|
55
|
+
“**is*fullScreen***” property changes the width and height of the message so that it fits the entire screen.
|
|
56
|
+
|
|
57
|
+
```tsx
|
|
58
|
+
import { Button } from '../Button/Button';
|
|
59
|
+
import { useState } from 'react';
|
|
60
|
+
|
|
61
|
+
const [show, setShow] = useState(false);
|
|
62
|
+
|
|
63
|
+
<>
|
|
64
|
+
<Button onClick={() => setShow(true)} isAuto>
|
|
65
|
+
Full Screen
|
|
66
|
+
</Button>
|
|
67
|
+
<Message.Overlay isOpen={show} onClose={() => setShow(false)}>
|
|
68
|
+
<Message.Container isFullScreen>
|
|
69
|
+
<Message.Header>Title</Message.Header>
|
|
70
|
+
<Message.Body>
|
|
71
|
+
Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam.
|
|
72
|
+
Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna, vel scelerisque
|
|
73
|
+
nisl consectetur et.
|
|
74
|
+
</Message.Body>
|
|
75
|
+
<Message.Footer>
|
|
76
|
+
<Button onClick={() => setShow(false)}>Cancel</Button>
|
|
77
|
+
</Message.Footer>
|
|
78
|
+
</Message.Container>
|
|
79
|
+
</Message.Overlay>
|
|
80
|
+
</>;
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### **Position**
|
|
84
|
+
|
|
85
|
+
“**_position_**” places the message in the specified direction. It has a default positioning of “center”.
|
|
86
|
+
|
|
87
|
+
```tsx
|
|
88
|
+
import { useState } from 'react';
|
|
89
|
+
import { Button } from '../Button/Button';
|
|
90
|
+
import { Horizontal } from '../Layout/Horizontal/Horizontal';
|
|
91
|
+
|
|
92
|
+
const [showTop, setShowTop] = useState(false);
|
|
93
|
+
const [showBottom, setShowBottom] = useState(false);
|
|
94
|
+
const [showRight, setShowRight] = useState(false);
|
|
95
|
+
const [showLeft, setShowLeft] = useState(false);
|
|
96
|
+
const [showCenter, setShowCenter] = useState(false);
|
|
97
|
+
|
|
98
|
+
<>
|
|
99
|
+
<Horizontal gap={10} flexWrap="nowrap">
|
|
100
|
+
<Button onClick={() => setShowTop(true)}>Top</Button>
|
|
101
|
+
<Button onClick={() => setShowBottom(true)}>Bottom</Button>
|
|
102
|
+
<Button onClick={() => setShowRight(true)}>Right</Button>
|
|
103
|
+
<Button onClick={() => setShowLeft(true)}>Left</Button>
|
|
104
|
+
<Button onClick={() => setShowCenter(true)}>Center</Button>
|
|
105
|
+
</Horizontal>
|
|
106
|
+
|
|
107
|
+
{showBottom && (
|
|
108
|
+
<Message.Overlay isOpen={showBottom} onClose={() => setShowBottom(false)} position="bottom">
|
|
109
|
+
<Message.Container>
|
|
110
|
+
<Message.Header>Title</Message.Header>
|
|
111
|
+
<Message.Body>
|
|
112
|
+
Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam.
|
|
113
|
+
Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna, vel scelerisque
|
|
114
|
+
nisl consectetur et.
|
|
115
|
+
</Message.Body>
|
|
116
|
+
<Message.Footer>
|
|
117
|
+
<Button onClick={() => setShowBottom(false)}>Cancel</Button>
|
|
118
|
+
</Message.Footer>
|
|
119
|
+
</Message.Container>
|
|
120
|
+
</Message.Overlay>
|
|
121
|
+
)}
|
|
122
|
+
{showTop && (
|
|
123
|
+
<Message.Overlay isOpen={showTop} onClose={() => setShowTop(false)} position="top">
|
|
124
|
+
<Message.Container>
|
|
125
|
+
<Message.Header>Title</Message.Header>
|
|
126
|
+
<Message.Body>
|
|
127
|
+
Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam.
|
|
128
|
+
Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna, vel scelerisque
|
|
129
|
+
nisl consectetur et.
|
|
130
|
+
</Message.Body>
|
|
131
|
+
<Message.Footer>
|
|
132
|
+
<Button onClick={() => setShowTop(false)}>Cancel</Button>
|
|
133
|
+
</Message.Footer>
|
|
134
|
+
</Message.Container>
|
|
135
|
+
</Message.Overlay>
|
|
136
|
+
)}
|
|
137
|
+
{showLeft && (
|
|
138
|
+
<Message.Overlay isOpen={showLeft} onClose={() => setShowLeft(false)} position="left">
|
|
139
|
+
<Message.Container>
|
|
140
|
+
<Message.Header>Title</Message.Header>
|
|
141
|
+
<Message.Body>
|
|
142
|
+
Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam.
|
|
143
|
+
Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna, vel scelerisque
|
|
144
|
+
nisl consectetur et.
|
|
145
|
+
</Message.Body>
|
|
146
|
+
<Message.Footer>
|
|
147
|
+
<Button onClick={() => setShowLeft(false)}>Cancel</Button>
|
|
148
|
+
</Message.Footer>
|
|
149
|
+
</Message.Container>
|
|
150
|
+
</Message.Overlay>
|
|
151
|
+
)}
|
|
152
|
+
{showRight && (
|
|
153
|
+
<Message.Overlay isOpen={showRight} onClose={() => setShowRight(false)} position="right">
|
|
154
|
+
<Message.Container>
|
|
155
|
+
<Message.Header>Title</Message.Header>
|
|
156
|
+
<Message.Body>
|
|
157
|
+
Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam.
|
|
158
|
+
Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna, vel scelerisque
|
|
159
|
+
nisl consectetur et.
|
|
160
|
+
</Message.Body>
|
|
161
|
+
<Message.Footer>
|
|
162
|
+
<Button onClick={() => setShowRight(false)}>Cancel</Button>
|
|
163
|
+
</Message.Footer>
|
|
164
|
+
</Message.Container>
|
|
165
|
+
</Message.Overlay>
|
|
166
|
+
)}
|
|
167
|
+
{showCenter && (
|
|
168
|
+
<Message.Overlay isOpen={showCenter} onClose={() => setShowCenter(false)} position="center">
|
|
169
|
+
<Message.Container>
|
|
170
|
+
<Message.Header>Title</Message.Header>
|
|
171
|
+
<Message.Body>
|
|
172
|
+
Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam.
|
|
173
|
+
Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna, vel scelerisque
|
|
174
|
+
nisl consectetur et.
|
|
175
|
+
</Message.Body>
|
|
176
|
+
<Message.Footer>
|
|
177
|
+
<Button onClick={() => setShowCenter(false)}>Cancel</Button>
|
|
178
|
+
</Message.Footer>
|
|
179
|
+
</Message.Container>
|
|
180
|
+
</Message.Overlay>
|
|
181
|
+
)}
|
|
182
|
+
</>;
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### **Blur**
|
|
186
|
+
|
|
187
|
+
“**_blur_**” adds a blur effect on the message overlay.
|
|
188
|
+
|
|
189
|
+
```tsx
|
|
190
|
+
import { useState } from 'react';
|
|
191
|
+
import { Button } from '../Button/Button';
|
|
192
|
+
|
|
193
|
+
const [show, setShow] = useState(false);
|
|
194
|
+
|
|
195
|
+
<>
|
|
196
|
+
<Button onClick={() => setShow(true)}>Blur Overlay</Button>
|
|
197
|
+
<Message.Overlay isOpen={show} onClose={() => setShow(false)} blur={10}>
|
|
198
|
+
<Message.Container>
|
|
199
|
+
<Message.Header>Title</Message.Header>
|
|
200
|
+
<Message.Body>
|
|
201
|
+
Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam.
|
|
202
|
+
Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna, vel scelerisque
|
|
203
|
+
nisl consectetur et.
|
|
204
|
+
</Message.Body>
|
|
205
|
+
<Message.Footer>
|
|
206
|
+
<Button onClick={() => setShow(false)}>Cancel</Button>
|
|
207
|
+
</Message.Footer>
|
|
208
|
+
</Message.Container>
|
|
209
|
+
</Message.Overlay>
|
|
210
|
+
</>;
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### **Prevent Close**
|
|
214
|
+
|
|
215
|
+
“**_isClosePrevented_**” prevents the user from closing the message when clicking outside of it.
|
|
216
|
+
|
|
217
|
+
```tsx
|
|
218
|
+
import { useState } from 'react';
|
|
219
|
+
import { Button } from '../Button/Button';
|
|
220
|
+
|
|
221
|
+
const [show, setShow] = useState(false);
|
|
222
|
+
|
|
223
|
+
<>
|
|
224
|
+
<Button onClick={() => setShow(true)}>Blur Overlay</Button>
|
|
225
|
+
<Message.Overlay isOpen={show} onClose={() => setShow(false)} isClosePrevented>
|
|
226
|
+
<Message.Container>
|
|
227
|
+
<Message.Header>Title</Message.Header>
|
|
228
|
+
<Message.Body>
|
|
229
|
+
Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam.
|
|
230
|
+
Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna, vel scelerisque
|
|
231
|
+
nisl consectetur et.
|
|
232
|
+
</Message.Body>
|
|
233
|
+
<Message.Footer>
|
|
234
|
+
<Button onClick={() => setShow(false)}>Cancel</Button>
|
|
235
|
+
</Message.Footer>
|
|
236
|
+
</Message.Container>
|
|
237
|
+
</Message.Overlay>
|
|
238
|
+
</>;
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
## **Message Container**
|
|
242
|
+
|
|
243
|
+
It represents the main container or wrapper that holds all the content and components of a message.
|
|
244
|
+
|
|
245
|
+
### **Props**
|
|
246
|
+
| Prop | Type | Description | Default |
|
|
247
|
+
| ----------- | ----------- | ----------- | ----------- |
|
|
248
|
+
| isFullScreen | boolean | Changes the width and height of the message so that it fits the entire screen. | false |
|
|
249
|
+
| variant | 'sharp' \| 'rounded' | Gives a sharp or rounded edges to the message container. | 'rounded' |
|
|
250
|
+
| shadow | object | Adds a shadow effect on the message container. | |
|
|
251
|
+
| styles | CSSProperties | Optional custom styles for the MessageContainer. | |
|
|
252
|
+
| className | string | Optional className for the MessageContainer. | |
|
|
253
|
+
|
|
254
|
+
### **Shapes**
|
|
255
|
+
|
|
256
|
+
“**_shape_**” gives a sharp or rounded edges to the message container.
|
|
257
|
+
|
|
258
|
+
```tsx
|
|
259
|
+
import { useState } from 'react';
|
|
260
|
+
import { Button } from '../Button/Button';
|
|
261
|
+
import { Text } from '../Text/Text';
|
|
262
|
+
import { Horizontal } from '../Layout/Horizontal/Horizontal';
|
|
263
|
+
|
|
264
|
+
const [showSharp, setShowSharp] = useState(false);
|
|
265
|
+
const [showRounded, setShowRounded] = useState(false);
|
|
266
|
+
|
|
267
|
+
<>
|
|
268
|
+
<Horizontal gap={10}>
|
|
269
|
+
<Button onClick={() => setShowSharp(true)}>Sharp</Button>
|
|
270
|
+
<Button onClick={() => setShowRounded(true)}>Rounded</Button>
|
|
271
|
+
</Horizontal>
|
|
272
|
+
|
|
273
|
+
{showSharp && (
|
|
274
|
+
<Message.Overlay isOpen={showSharp} onClose={() => setShowSharp(false)}>
|
|
275
|
+
<Message.Container variant="sharp">
|
|
276
|
+
<Message.Body>
|
|
277
|
+
<Text maxLines={2}>
|
|
278
|
+
Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget
|
|
279
|
+
quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna, vel
|
|
280
|
+
scelerisque nisl consectetur et.
|
|
281
|
+
</Text>
|
|
282
|
+
</Message.Body>
|
|
283
|
+
</Message.Container>
|
|
284
|
+
</Message.Overlay>
|
|
285
|
+
)}
|
|
286
|
+
{showRounded && (
|
|
287
|
+
<Message.Overlay isOpen={showRounded} onClose={() => setShowRounded(false)}>
|
|
288
|
+
<Message.Container variant="rounded">
|
|
289
|
+
<Message.Body>
|
|
290
|
+
<Text maxLines={2}>
|
|
291
|
+
Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget
|
|
292
|
+
quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna, vel
|
|
293
|
+
scelerisque nisl consectetur et.
|
|
294
|
+
</Text>
|
|
295
|
+
</Message.Body>
|
|
296
|
+
</Message.Container>
|
|
297
|
+
</Message.Overlay>
|
|
298
|
+
)}
|
|
299
|
+
</>;
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
### **Shadow**
|
|
303
|
+
|
|
304
|
+
“**_shadow_**” adds a shadow effect on the message container.
|
|
305
|
+
|
|
306
|
+
```tsx
|
|
307
|
+
import { useState } from 'react';
|
|
308
|
+
import { Button } from '../Button/Button';
|
|
309
|
+
import { Text } from '../Text/Text';
|
|
310
|
+
|
|
311
|
+
const [show, setShow] = useState(false);
|
|
312
|
+
|
|
313
|
+
<>
|
|
314
|
+
<Button onClick={() => setShow(true)}>Shadow</Button>
|
|
315
|
+
{show && (
|
|
316
|
+
<Message.Overlay isOpen={show} onClose={() => setShow(false)}>
|
|
317
|
+
<Message.Container shadow={{ boxShadow: '0px 2px 8px rgba(0, 0, 0, 0.6)' }}>
|
|
318
|
+
<Message.Body>
|
|
319
|
+
<Text maxLines={2}>
|
|
320
|
+
Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget
|
|
321
|
+
quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna, vel
|
|
322
|
+
scelerisque nisl consectetur et.
|
|
323
|
+
</Text>
|
|
324
|
+
</Message.Body>
|
|
325
|
+
</Message.Container>
|
|
326
|
+
</Message.Overlay>
|
|
327
|
+
)}
|
|
328
|
+
</>;
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
## **Message Header**
|
|
332
|
+
|
|
333
|
+
It represents the header section of a message, which typically contains a title or heading and optionally other elements such as a close button or additional controls.
|
|
334
|
+
|
|
335
|
+
### **Close Button Alignment**
|
|
336
|
+
|
|
337
|
+
“**_buttonPosition_**” places the closing button found in the header message in the specified direction. It has a default position of “**right**”.
|
|
338
|
+
|
|
339
|
+
```tsx
|
|
340
|
+
import { useState } from 'react';
|
|
341
|
+
import { Button } from '../Button/Button';
|
|
342
|
+
import { Horizontal } from '../Layout/Horizontal/Horizontal';
|
|
343
|
+
|
|
344
|
+
const [showRight, setShowRight] = useState(false);
|
|
345
|
+
const [showWithout, setShowWithout] = useState(false);
|
|
346
|
+
const [showLeft, setShowLeft] = useState(false);
|
|
347
|
+
|
|
348
|
+
<>
|
|
349
|
+
<Horizontal gap={10}>
|
|
350
|
+
<Button onClick={() => setShowRight(true)}>Right</Button>
|
|
351
|
+
<Button onClick={() => setShowWithout(true)}>Without</Button>
|
|
352
|
+
<Button onClick={() => setShowLeft(true)}>Left</Button>
|
|
353
|
+
</Horizontal>
|
|
354
|
+
{showRight && (
|
|
355
|
+
<Message.Overlay isOpen={showRight} onClose={() => setShowRight(false)}>
|
|
356
|
+
<Message.Container>
|
|
357
|
+
<Message.Header> Right</Message.Header>
|
|
358
|
+
<Message.Body>Cras mattis consectetur purus sit amet fermentum.</Message.Body>
|
|
359
|
+
<Message.Footer>
|
|
360
|
+
<Button onClick={() => setShowRight(false)}>Cancel</Button>
|
|
361
|
+
</Message.Footer>
|
|
362
|
+
</Message.Container>
|
|
363
|
+
</Message.Overlay>
|
|
364
|
+
)}
|
|
365
|
+
{showWithout && (
|
|
366
|
+
<Message.Overlay isOpen={showWithout} onClose={() => setShowWithout(false)}>
|
|
367
|
+
<Message.Container>
|
|
368
|
+
<Message.Header buttonPosition="none"> Without</Message.Header>
|
|
369
|
+
<Message.Body>Cras mattis consectetur purus sit amet fermentum.</Message.Body>
|
|
370
|
+
<Message.Footer>
|
|
371
|
+
<Button onClick={() => setShowWithout(false)}>Cancel</Button>
|
|
372
|
+
</Message.Footer>
|
|
373
|
+
</Message.Container>
|
|
374
|
+
</Message.Overlay>
|
|
375
|
+
)}
|
|
376
|
+
{showLeft && (
|
|
377
|
+
<Message.Overlay isOpen={showLeft} onClose={() => setShowLeft(false)}>
|
|
378
|
+
<Message.Container>
|
|
379
|
+
<Message.Header buttonPosition="left">Left</Message.Header>
|
|
380
|
+
<Message.Body>Cras mattis consectetur purus sit amet fermentum.</Message.Body>
|
|
381
|
+
<Message.Footer>
|
|
382
|
+
<Button onClick={() => setShowLeft(false)}>Cancel</Button>
|
|
383
|
+
</Message.Footer>
|
|
384
|
+
</Message.Container>
|
|
385
|
+
</Message.Overlay>
|
|
386
|
+
)}
|
|
387
|
+
</>;
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
## **Message Body**
|
|
391
|
+
|
|
392
|
+
It represents the main content area of a message, where the primary information or user interaction elements are displayed.
|
|
393
|
+
|
|
394
|
+
### **LargeContent**
|
|
395
|
+
|
|
396
|
+
A vertical scroll is displayed, if the content height exceed the body height.
|
|
397
|
+
|
|
398
|
+
```tsx
|
|
399
|
+
import { useState } from 'react';
|
|
400
|
+
import { Button } from '../Button/Button';
|
|
401
|
+
import { Text } from '../Text/Text';
|
|
402
|
+
|
|
403
|
+
const [show, setShow] = useState(false);
|
|
404
|
+
|
|
405
|
+
<>
|
|
406
|
+
<Button onClick={() => setShow(true)}>Scroll</Button>
|
|
407
|
+
{show && (
|
|
408
|
+
<Message.Overlay isOpen={show} onClose={() => setShow(false)}>
|
|
409
|
+
<Message.Container>
|
|
410
|
+
<Message.Header buttonPosition="none">
|
|
411
|
+
<Text size="lg" weight="semibold">
|
|
412
|
+
Title
|
|
413
|
+
</Text>
|
|
414
|
+
</Message.Header>
|
|
415
|
+
<Message.Body height="200px">
|
|
416
|
+
Cras mattis consectetur purus sit amet fermentum.Cras mattis consectetur purus sit amet fermentum.Cras mattis
|
|
417
|
+
consectetur purus sit amet fermentum.Cras mattis consectetur purus sit amet fermentum.Cras mattis consectetur
|
|
418
|
+
purus sit amet fermentum.Cras mattis consectetur purus sit amet fermentum.Cras mattis consectetur purus sit
|
|
419
|
+
amet fermentum.Cras mattis consectetur purus sit amet fermentum.Cras mattis consectetur purus sit amet Cras
|
|
420
|
+
mattis consectetur purus sit amet fermentum.Cras mattis consectetur purus sit amet fermentum.Cras mattis
|
|
421
|
+
consectetur purus sit amet fermentum.Cras mattis consectetur purus sit amet fermentum.Cras mattis consectetur
|
|
422
|
+
purus sit amet fermentum.Cras mattis consectetur purus sit amet fermentum.Cras mattis consectetur purus sit
|
|
423
|
+
amet fermentum.Cras mattis consectetur purus sit amet fermentum.Cras mattis consectetur purus sit amet
|
|
424
|
+
fermentum.Cras mattis consectetur purus sit amet fermentum.
|
|
425
|
+
</Message.Body>
|
|
426
|
+
<Message.Footer>
|
|
427
|
+
<Button onClick={() => setShow(false)}>Cancel</Button>
|
|
428
|
+
</Message.Footer>
|
|
429
|
+
</Message.Container>
|
|
430
|
+
</Message.Overlay>
|
|
431
|
+
)}
|
|
432
|
+
</>;
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
## **Message Footer**
|
|
436
|
+
|
|
437
|
+
It represents the footer section of a message, where the primary information or user interaction elements are displayed.
|
|
438
|
+
|
|
439
|
+
```tsx
|
|
440
|
+
import { useState } from 'react';
|
|
441
|
+
import { Button } from '../Button/Button';
|
|
442
|
+
import { Text } from '../Text/Text';
|
|
443
|
+
|
|
444
|
+
const [show, setShow] = useState(false);
|
|
445
|
+
|
|
446
|
+
<>
|
|
447
|
+
<Button onClick={() => setShow(true)}>Footer</Button>
|
|
448
|
+
{show && (
|
|
449
|
+
<Message.Overlay isOpen={show} onClose={() => setShow(false)}>
|
|
450
|
+
<Message.Container>
|
|
451
|
+
<Message.Header buttonPosition="none">
|
|
452
|
+
<Text size="lg" weight="semibold">
|
|
453
|
+
Title
|
|
454
|
+
</Text>
|
|
455
|
+
</Message.Header>
|
|
456
|
+
<Message.Body height="200px">
|
|
457
|
+
Cras mattis consectetur purus sit amet fermentum.Cras mattis consectetur purus sit amet fermentum.Cras mattis
|
|
458
|
+
consectetur purus sit amet fermentum.Cras mattis consectetur purus sit amet fermentum.Cras mattis consectetur
|
|
459
|
+
purus sit amet fermentum.
|
|
460
|
+
</Message.Body>
|
|
461
|
+
<Message.Footer>
|
|
462
|
+
<Button onClick={() => setShow(false)}>Cancel</Button>
|
|
463
|
+
</Message.Footer>
|
|
464
|
+
</Message.Container>
|
|
465
|
+
</Message.Overlay>
|
|
466
|
+
)}
|
|
467
|
+
</>;
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
## **Types**
|
|
471
|
+
|
|
472
|
+
```tsx
|
|
473
|
+
type Position = 'top' | 'left' | 'right' | 'bottom' | 'center';
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
```tsx
|
|
477
|
+
type Shape = 'sharp' | 'rounded';
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
```tsx
|
|
481
|
+
type CloseButtonPosition = 'left' | 'right' | 'none';
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
```tsx
|
|
485
|
+
type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
## **Default Styles**
|
|
489
|
+
|
|
490
|
+
#### **OverlayAlignments**
|
|
491
|
+
|
|
492
|
+
```tsx
|
|
493
|
+
const OverlayAlignments: Record<Position, CSSProperties> = {
|
|
494
|
+
center: { justifyContent: 'center', alignItems: 'center' },
|
|
495
|
+
top: { justifyContent: 'center' },
|
|
496
|
+
right: { justifyContent: 'flex-end', alignItems: 'center' },
|
|
497
|
+
bottom: { justifyContent: 'center', alignItems: 'flex-end' },
|
|
498
|
+
left: { alignItems: 'center' },
|
|
499
|
+
};
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
#### **ContainerShapes**
|
|
503
|
+
|
|
504
|
+
```tsx
|
|
505
|
+
const ContainerShapes: Record<Shape, CSSProperties> = {
|
|
506
|
+
sharp: { borderRadius: 0 },
|
|
507
|
+
rounded: { borderRadius: 4 },
|
|
508
|
+
};
|
|
509
|
+
```
|
|
510
|
+
|
|
511
|
+
#### **HeaderIconSizes**
|
|
512
|
+
|
|
513
|
+
```tsx
|
|
514
|
+
const HeaderIconSizes: Record<Size, number> = {
|
|
515
|
+
xs: 12,
|
|
516
|
+
sm: 16,
|
|
517
|
+
md: 20,
|
|
518
|
+
lg: 24,
|
|
519
|
+
xl: 28,
|
|
520
|
+
};
|
|
521
|
+
```
|
|
522
|
+
|
|
523
|
+
</file_content>
|
|
524
|
+
|
|
525
|
+
Try again with fewer/more precise SEARCH blocks.
|
|
526
|
+
(If you run into this error two times in a row, you may use the write_to_file tool as a fallback.)
|
|
527
|
+
</error><environment_details>
|
|
528
|
+
# VSCode Visible Files
|
|
529
|
+
public/files/media/Message.mdx
|
|
530
|
+
|
|
531
|
+
# VSCode Open Tabs
|
|
532
|
+
src/components/Form/CountryPicker/CountryPicker/CountryPicker.view.tsx
|
|
533
|
+
src/components/DragAndDrop/DragAndDrop.tsx
|
|
534
|
+
public/files/media/DragAndDrop.mdx
|
|
535
|
+
public/files/media/File.mdx
|
|
536
|
+
public/files/media/Form.mdx
|
|
537
|
+
public/files/media/Formik.mdx
|
|
538
|
+
public/files/media/Icon.mdx
|
|
539
|
+
public/files/media/Uploader.mdx
|
|
540
|
+
public/files/media/Alert.mdx
|
|
541
|
+
public/files/media/AspectRatio.mdx
|
|
542
|
+
public/files/media/Avatar.mdx
|
|
543
|
+
public/files/media/Badge.mdx
|
|
544
|
+
public/files/media/Button.mdx
|
|
545
|
+
public/files/media/Center.mdx
|
|
546
|
+
public/files/media/Checkbox.mdx
|
|
547
|
+
public/files/media/ComboBox.mdx
|
|
548
|
+
public/files/media/CountryPicker.mdx
|
|
549
|
+
public/files/media/DatePicker.mdx
|
|
550
|
+
public/files/media/Horizontal.mdx
|
|
551
|
+
public/files/media/Label.mdx
|
|
552
|
+
public/files/media/Link.mdx
|
|
553
|
+
public/files/media/Loader.mdx
|
|
554
|
+
public/files/media/Message.mdx
|
|
555
|
+
src/components/Button/Button/Button.view.tsx
|
|
556
|
+
src/utils/componentsPageImports.tsx
|
|
557
|
+
src/components/Uploader/Uploader.tsx
|
|
558
|
+
src/components/Uploader/Uploader.props.ts
|
|
559
|
+
src/pages/upload.page.tsx
|
|
560
|
+
src/components/index.tsx
|
|
561
|
+
src/components/Text/Text.tsx
|
|
562
|
+
src/components/Text/Text/Text.view.tsx
|
|
563
|
+
package.json
|
|
564
|
+
src/components/Button/examples/effect.tsx
|
|
565
|
+
|
|
566
|
+
# Current Time
|
|
567
|
+
22/03/2025 9:02:50 PM (Africa/Dar_es_Salaam, UTC+3:00)
|
|
568
|
+
|
|
569
|
+
# Current Mode
|
|
570
|
+
ACT MODE
|
|
571
|
+
</environment_details>
|