@ceed/ads 1.35.1 → 1.36.0

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.
Files changed (122) hide show
  1. package/README.md +85 -95
  2. package/dist/components/Accordions/Accordions.d.ts +1 -0
  3. package/dist/components/Alert/Alert.d.ts +5 -5
  4. package/dist/components/Autocomplete/Autocomplete.d.ts +2 -2
  5. package/dist/components/Avatar/Avatar.d.ts +7 -17
  6. package/dist/components/Box/Box.d.ts +1 -0
  7. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +6 -5
  8. package/dist/components/Button/Button.d.ts +3 -2
  9. package/dist/components/Calendar/Calendar.d.ts +1 -0
  10. package/dist/components/Card/Card.d.ts +1 -0
  11. package/dist/components/Checkbox/Checkbox.d.ts +1 -0
  12. package/dist/components/Chip/Chip.d.ts +1 -0
  13. package/dist/components/Container/Container.d.ts +6 -1
  14. package/dist/components/DialogActions/DialogActions.d.ts +1 -0
  15. package/dist/components/DialogContent/DialogContent.d.ts +1 -0
  16. package/dist/components/DialogFrame/DialogFrame.d.ts +1 -1
  17. package/dist/components/DialogTitle/DialogTitle.d.ts +1 -0
  18. package/dist/components/Divider/Divider.d.ts +1 -0
  19. package/dist/components/Dropdown/Dropdown.d.ts +28 -1
  20. package/dist/components/FilterMenu/components/MonthRange.d.ts +11 -0
  21. package/dist/components/FilterMenu/types.d.ts +5 -1
  22. package/dist/components/FormControl/FormControl.d.ts +1 -0
  23. package/dist/components/FormHelperText/FormHelperText.d.ts +1 -0
  24. package/dist/components/FormLabel/FormLabel.d.ts +1 -0
  25. package/dist/components/Grid/Grid.d.ts +1 -0
  26. package/dist/components/IconButton/IconButton.d.ts +3 -2
  27. package/dist/components/IconMenuButton/IconMenuButton.d.ts +7 -6
  28. package/dist/components/InfoSign/InfoSign.d.ts +3 -2
  29. package/dist/components/Input/Input.d.ts +8 -22
  30. package/dist/components/InsetDrawer/InsetDrawer.d.ts +1 -0
  31. package/dist/components/Markdown/Markdown.d.ts +9 -24
  32. package/dist/components/Menu/Menu.d.ts +2 -1
  33. package/dist/components/MenuButton/MenuButton.d.ts +10 -8
  34. package/dist/components/Modal/Modal.d.ts +4 -2
  35. package/dist/components/NavigationGroup/NavigationGroup.d.ts +3 -2
  36. package/dist/components/NavigationItem/NavigationItem.d.ts +3 -2
  37. package/dist/components/Navigator/Navigator.d.ts +5 -4
  38. package/dist/components/Pagination/Pagination.d.ts +1 -1
  39. package/dist/components/ProfileMenu/ProfileMenu.d.ts +2 -2
  40. package/dist/components/Radio/Radio.d.ts +1 -0
  41. package/dist/components/RadioList/RadioList.d.ts +3 -2
  42. package/dist/components/Select/Select.d.ts +12 -10
  43. package/dist/components/Sheet/Sheet.d.ts +1 -0
  44. package/dist/components/Stack/Stack.d.ts +1 -0
  45. package/dist/components/Stepper/Stepper.d.ts +2 -1
  46. package/dist/components/Switch/Switch.d.ts +1 -0
  47. package/dist/components/Table/Table.d.ts +7 -5
  48. package/dist/components/Tabs/Tabs.d.ts +1 -0
  49. package/dist/components/Textarea/Textarea.d.ts +8 -20
  50. package/dist/components/ThemeProvider/ThemeProvider.d.ts +4 -2
  51. package/dist/components/Tooltip/Tooltip.d.ts +1 -0
  52. package/dist/components/Typography/Typography.d.ts +1 -0
  53. package/dist/components/Uploader/Uploader.d.ts +18 -17
  54. package/dist/components/data-display/Avatar.md +60 -72
  55. package/dist/components/data-display/Badge.md +197 -181
  56. package/dist/components/data-display/Chip.md +164 -142
  57. package/dist/components/data-display/DataTable.md +843 -338
  58. package/dist/components/data-display/InfoSign.md +1 -3
  59. package/dist/components/data-display/Markdown.md +93 -125
  60. package/dist/components/data-display/Table.md +1453 -1007
  61. package/dist/components/data-display/Typography.md +101 -104
  62. package/dist/components/feedback/Alert.md +80 -86
  63. package/dist/components/feedback/CircularProgress.md +32 -36
  64. package/dist/components/feedback/Dialog.md +25 -17
  65. package/dist/components/feedback/Modal.md +296 -265
  66. package/dist/components/feedback/Skeleton.md +125 -89
  67. package/dist/components/index.d.ts +60 -1
  68. package/dist/components/inputs/Autocomplete.md +191 -95
  69. package/dist/components/inputs/Button.md +83 -83
  70. package/dist/components/inputs/ButtonGroup.md +195 -185
  71. package/dist/components/inputs/Calendar.md +25 -28
  72. package/dist/components/inputs/Checkbox.md +11 -29
  73. package/dist/components/inputs/CurrencyInput.md +4 -4
  74. package/dist/components/inputs/DatePicker.md +229 -110
  75. package/dist/components/inputs/DateRangePicker.md +248 -137
  76. package/dist/components/inputs/FilterMenu.md +138 -8
  77. package/dist/components/inputs/FilterableCheckboxGroup.md +115 -55
  78. package/dist/components/inputs/FormControl.md +75 -69
  79. package/dist/components/inputs/IconButton.md +229 -205
  80. package/dist/components/inputs/Input.md +131 -98
  81. package/dist/components/inputs/MonthPicker.md +186 -84
  82. package/dist/components/inputs/MonthRangePicker.md +73 -49
  83. package/dist/components/inputs/PercentageInput.md +15 -31
  84. package/dist/components/inputs/RadioButton.md +320 -256
  85. package/dist/components/inputs/RadioList.md +66 -50
  86. package/dist/components/inputs/RadioTileGroup.md +287 -170
  87. package/dist/components/inputs/SearchBar.md +82 -60
  88. package/dist/components/inputs/Select.md +106 -95
  89. package/dist/components/inputs/Slider.md +153 -102
  90. package/dist/components/inputs/Switch.md +193 -138
  91. package/dist/components/inputs/Textarea.md +15 -20
  92. package/dist/components/inputs/Uploader/Uploader.md +68 -39
  93. package/dist/components/layout/Box.md +841 -662
  94. package/dist/components/layout/Container.md +3 -11
  95. package/dist/components/layout/Grid.md +480 -394
  96. package/dist/components/layout/Stack.md +739 -566
  97. package/dist/components/navigation/Breadcrumbs.md +182 -116
  98. package/dist/components/navigation/Dropdown.md +732 -391
  99. package/dist/components/navigation/IconMenuButton.md +14 -6
  100. package/dist/components/navigation/InsetDrawer.md +550 -378
  101. package/dist/components/navigation/Link.md +104 -94
  102. package/dist/components/navigation/Menu.md +623 -502
  103. package/dist/components/navigation/MenuButton.md +18 -10
  104. package/dist/components/navigation/NavigationGroup.md +19 -50
  105. package/dist/components/navigation/NavigationItem.md +6 -6
  106. package/dist/components/navigation/Navigator.md +26 -28
  107. package/dist/components/navigation/Pagination.md +86 -75
  108. package/dist/components/navigation/ProfileMenu.md +65 -43
  109. package/dist/components/navigation/Stepper.md +2 -12
  110. package/dist/components/navigation/Tabs.md +209 -183
  111. package/dist/components/surfaces/Accordions.md +89 -172
  112. package/dist/components/surfaces/Card.md +1094 -709
  113. package/dist/components/surfaces/Divider.md +562 -412
  114. package/dist/components/surfaces/Sheet.md +700 -518
  115. package/dist/guides/ThemeProvider.md +65 -40
  116. package/dist/index.browser.js +4 -4
  117. package/dist/index.browser.js.map +4 -4
  118. package/dist/index.cjs +1643 -1550
  119. package/dist/index.d.ts +1 -1
  120. package/dist/index.js +1303 -1202
  121. package/framer/index.js +1 -1
  122. package/package.json +32 -35
@@ -7,133 +7,190 @@ InsetDrawer is a slide-out panel that appears from any edge of the screen, provi
7
7
  It is commonly used for mobile navigation menus, filter panels, configuration sidebars, and detail views. The component supports four anchor positions (left, right, top, bottom) and three size presets, making it adaptable to a wide range of layout requirements.
8
8
 
9
9
  ```tsx
10
- <Box sx={{
11
- display: 'flex',
12
- flexDirection: 'column',
13
- gap: 2
14
- }}>
15
- <Button variant="outlined" color="neutral" startDecorator={<FilterListIcon />} onClick={() => setOpen(true)}>
16
- Open Drawer
17
- </Button>
18
-
19
- <InsetDrawer {...args} open={open} onClose={() => setOpen(false)}>
20
- <Sheet sx={{
21
- borderRadius: 'md',
22
- p: 2,
23
- display: 'flex',
24
- flexDirection: 'column',
25
- gap: 2,
26
- height: '100%',
27
- overflow: 'auto'
28
- }}>
29
- <DialogTitle>Filters</DialogTitle>
30
- <ModalClose />
31
- <Divider sx={{
32
- mt: 'auto'
33
- }} />
34
- <DialogContent>
35
- <FormControl>
36
- <FormLabel sx={{
37
- typography: 'title-md',
38
- fontWeight: 'bold'
39
- }}>Property type</FormLabel>
40
- <RadioGroup>
41
- <Box sx={{
42
- display: 'grid',
43
- gridTemplateColumns: 'repeat(auto-fill, minmax(140px, 1fr))',
44
- gap: 1.5
45
- }}>
46
- {[{
47
- name: 'House',
48
- icon: <HomeRoundedIcon />
49
- }, {
50
- name: 'Apartment',
51
- icon: <ApartmentRoundedIcon />
52
- }, {
53
- name: 'Guesthouse',
54
- icon: <MeetingRoomRoundedIcon />
55
- }, {
56
- name: 'Hotel',
57
- icon: <HotelRoundedIcon />
58
- }].map(item => <Card key={item.name} sx={{
59
- boxShadow: 'none',
60
- '&:hover': {
61
- bgcolor: 'background.level1'
62
- }
63
- }}>
64
- <CardContent>
65
- {item.icon}
66
- <Typography level="title-md">{item.name}</Typography>
67
- </CardContent>
68
- <Radio disableIcon overlay variant="outlined" color="neutral" value={item.name} sx={{
69
- mt: -2
70
- }} slotProps={{
71
- action: {
72
- sx: {
73
- '&:hover': {
74
- bgcolor: 'transparent'
75
- }
76
- }
77
- }
78
- }} />
79
- </Card>)}
80
- </Box>
81
- </RadioGroup>
82
- </FormControl>
83
-
84
- <Typography level="title-md" fontWeight="bold" sx={{
85
- mt: 2
86
- }}>
87
- Booking options
88
- </Typography>
89
- <FormControl orientation="horizontal">
90
- <Box sx={{
91
- flex: 1,
92
- pr: 1
93
- }}>
94
- <FormLabel sx={{
95
- typography: 'title-sm'
96
- }}>Instant booking</FormLabel>
97
- <FormHelperText sx={{
98
- typography: 'body-sm'
99
- }}>
100
- Listings that you can book without waiting for host approval.
101
- </FormHelperText>
102
- </Box>
103
- <Switch />
104
- </FormControl>
105
-
106
- <FormControl orientation="horizontal">
107
- <Box sx={{
108
- flex: 1,
109
- mt: 1,
110
- mr: 1
111
- }}>
112
- <FormLabel sx={{
113
- typography: 'title-sm'
114
- }}>Self check-in</FormLabel>
115
- <FormHelperText sx={{
116
- typography: 'body-sm'
117
- }}>
118
- Easy access to the property when you arrive.
119
- </FormHelperText>
120
- </Box>
121
- <Switch />
122
- </FormControl>
123
- </DialogContent>
124
-
125
- <Divider sx={{
126
- mt: 'auto'
127
- }} />
128
- <Stack direction="row" justifyContent="space-between" useFlexGap spacing={1}>
129
- <Button variant="outlined" color="neutral">
130
- Clear
131
- </Button>
132
- <Button onClick={() => setOpen(false)}>Show 165 properties</Button>
133
- </Stack>
134
- </Sheet>
135
- </InsetDrawer>
136
- </Box>
10
+ <Box
11
+ sx={{
12
+ display: "flex",
13
+ flexDirection: "column",
14
+ gap: 2
15
+ }}
16
+ >
17
+ <Button
18
+ variant="outlined"
19
+ color="neutral"
20
+ startDecorator={<FilterListIcon />}
21
+ onClick={() => setOpen(true)}
22
+ >
23
+ Open Drawer
24
+ </Button>
25
+
26
+ <InsetDrawer {...args} open={open} onClose={() => setOpen(false)}>
27
+ <Sheet
28
+ sx={{
29
+ borderRadius: "md",
30
+ p: 2,
31
+ display: "flex",
32
+ flexDirection: "column",
33
+ gap: 2,
34
+ height: "100%",
35
+ overflow: "auto"
36
+ }}
37
+ >
38
+ <DialogTitle>Filters</DialogTitle>
39
+ <ModalClose />
40
+ <Divider
41
+ sx={{
42
+ mt: "auto"
43
+ }}
44
+ />
45
+ <DialogContent>
46
+ <FormControl>
47
+ <FormLabel
48
+ sx={{
49
+ typography: "title-md",
50
+ fontWeight: "bold"
51
+ }}
52
+ >
53
+ Property type
54
+ </FormLabel>
55
+ <RadioGroup>
56
+ <Box
57
+ sx={{
58
+ display: "grid",
59
+ gridTemplateColumns: "repeat(auto-fill, minmax(140px, 1fr))",
60
+ gap: 1.5
61
+ }}
62
+ >
63
+ {[
64
+ {
65
+ name: "House",
66
+ icon: <HomeRoundedIcon />
67
+ },
68
+ {
69
+ name: "Apartment",
70
+ icon: <ApartmentRoundedIcon />
71
+ },
72
+ {
73
+ name: "Guesthouse",
74
+ icon: <MeetingRoomRoundedIcon />
75
+ },
76
+ {
77
+ name: "Hotel",
78
+ icon: <HotelRoundedIcon />
79
+ }
80
+ ].map((item) => (
81
+ <Card
82
+ key={item.name}
83
+ sx={{
84
+ boxShadow: "none",
85
+ "&:hover": {
86
+ bgcolor: "background.level1"
87
+ }
88
+ }}
89
+ >
90
+ <CardContent>
91
+ {item.icon}
92
+ <Typography level="title-md">{item.name}</Typography>
93
+ </CardContent>
94
+ <Radio
95
+ disableIcon
96
+ overlay
97
+ variant="outlined"
98
+ color="neutral"
99
+ value={item.name}
100
+ sx={{
101
+ mt: -2
102
+ }}
103
+ slotProps={{
104
+ action: {
105
+ sx: {
106
+ "&:hover": {
107
+ bgcolor: "transparent"
108
+ }
109
+ }
110
+ }
111
+ }}
112
+ />
113
+ </Card>
114
+ ))}
115
+ </Box>
116
+ </RadioGroup>
117
+ </FormControl>
118
+
119
+ <Typography
120
+ level="title-md"
121
+ fontWeight="bold"
122
+ sx={{
123
+ mt: 2
124
+ }}
125
+ >
126
+ Booking options
127
+ </Typography>
128
+ <FormControl orientation="horizontal">
129
+ <Box
130
+ sx={{
131
+ flex: 1,
132
+ pr: 1
133
+ }}
134
+ >
135
+ <FormLabel
136
+ sx={{
137
+ typography: "title-sm"
138
+ }}
139
+ >
140
+ Instant booking
141
+ </FormLabel>
142
+ <FormHelperText
143
+ sx={{
144
+ typography: "body-sm"
145
+ }}
146
+ >
147
+ Listings that you can book without waiting for host approval.
148
+ </FormHelperText>
149
+ </Box>
150
+ <Switch />
151
+ </FormControl>
152
+
153
+ <FormControl orientation="horizontal">
154
+ <Box
155
+ sx={{
156
+ flex: 1,
157
+ mt: 1,
158
+ mr: 1
159
+ }}
160
+ >
161
+ <FormLabel
162
+ sx={{
163
+ typography: "title-sm"
164
+ }}
165
+ >
166
+ Self check-in
167
+ </FormLabel>
168
+ <FormHelperText
169
+ sx={{
170
+ typography: "body-sm"
171
+ }}
172
+ >
173
+ Easy access to the property when you arrive.
174
+ </FormHelperText>
175
+ </Box>
176
+ <Switch />
177
+ </FormControl>
178
+ </DialogContent>
179
+
180
+ <Divider
181
+ sx={{
182
+ mt: "auto"
183
+ }}
184
+ />
185
+ <Stack direction="row" justifyContent="space-between" useFlexGap spacing={1}>
186
+ <Button variant="outlined" color="neutral">
187
+ Clear
188
+ </Button>
189
+ <Button onClick={() => setOpen(false)}>Show 165 properties</Button>
190
+ </Stack>
191
+ </Sheet>
192
+ </InsetDrawer>
193
+ </Box>
137
194
  ```
138
195
 
139
196
  | Field | Description | Default |
@@ -155,9 +212,7 @@ function FilterDrawer() {
155
212
  <Sheet sx={{ p: 2, height: '100%' }}>
156
213
  <DialogTitle>Filters</DialogTitle>
157
214
  <ModalClose />
158
- <DialogContent>
159
- {/* Filter content */}
160
- </DialogContent>
215
+ <DialogContent>{/* Filter content */}</DialogContent>
161
216
  </Sheet>
162
217
  </InsetDrawer>
163
218
  </>
@@ -170,48 +225,63 @@ function FilterDrawer() {
170
225
  InsetDrawer supports four anchor positions. Use `left` for navigation, `right` for details or filters, `top` for search bars, and `bottom` for mobile action sheets.
171
226
 
172
227
  ```tsx
173
- <Box sx={{
174
- display: 'flex',
175
- flexDirection: 'column',
176
- gap: 2
177
- }}>
178
- <Stack direction="row" spacing={2}>
179
- <Button variant="outlined" onClick={() => setAnchor('left')}>
180
- Left
181
- </Button>
182
- <Button variant="outlined" onClick={() => setAnchor('right')}>
183
- Right
184
- </Button>
185
- <Button variant="outlined" onClick={() => setAnchor('top')}>
186
- Top
187
- </Button>
188
- <Button variant="outlined" onClick={() => setAnchor('bottom')}>
189
- Bottom
190
- </Button>
191
- </Stack>
192
-
193
- {(['left', 'right', 'top', 'bottom'] as const).map(anchorValue => <InsetDrawer key={anchorValue} anchor={anchorValue} open={anchor === anchorValue} onClose={() => setAnchor(null)}>
194
- <Sheet sx={{
195
- borderRadius: 'md',
196
- p: 2,
197
- display: 'flex',
198
- flexDirection: 'column',
199
- gap: 2,
200
- height: '100%'
201
- }}>
202
- <DialogTitle>Drawer from {anchorValue}</DialogTitle>
203
- <ModalClose />
204
- <Divider />
205
- <DialogContent>
206
- <Typography>This drawer slides in from the {anchorValue} side of the screen.</Typography>
207
- </DialogContent>
208
- <Divider sx={{
209
- mt: 'auto'
210
- }} />
211
- <Button onClick={() => setAnchor(null)}>Close</Button>
212
- </Sheet>
213
- </InsetDrawer>)}
214
- </Box>
228
+ <Box
229
+ sx={{
230
+ display: "flex",
231
+ flexDirection: "column",
232
+ gap: 2
233
+ }}
234
+ >
235
+ <Stack direction="row" spacing={2}>
236
+ <Button variant="outlined" onClick={() => setAnchor("left")}>
237
+ Left
238
+ </Button>
239
+ <Button variant="outlined" onClick={() => setAnchor("right")}>
240
+ Right
241
+ </Button>
242
+ <Button variant="outlined" onClick={() => setAnchor("top")}>
243
+ Top
244
+ </Button>
245
+ <Button variant="outlined" onClick={() => setAnchor("bottom")}>
246
+ Bottom
247
+ </Button>
248
+ </Stack>
249
+
250
+ {(["left", "right", "top", "bottom"] as const).map((anchorValue) => (
251
+ <InsetDrawer
252
+ key={anchorValue}
253
+ anchor={anchorValue}
254
+ open={anchor === anchorValue}
255
+ onClose={() => setAnchor(null)}
256
+ >
257
+ <Sheet
258
+ sx={{
259
+ borderRadius: "md",
260
+ p: 2,
261
+ display: "flex",
262
+ flexDirection: "column",
263
+ gap: 2,
264
+ height: "100%"
265
+ }}
266
+ >
267
+ <DialogTitle>Drawer from {anchorValue}</DialogTitle>
268
+ <ModalClose />
269
+ <Divider />
270
+ <DialogContent>
271
+ <Typography>
272
+ This drawer slides in from the {anchorValue} side of the screen.
273
+ </Typography>
274
+ </DialogContent>
275
+ <Divider
276
+ sx={{
277
+ mt: "auto"
278
+ }}
279
+ />
280
+ <Button onClick={() => setAnchor(null)}>Close</Button>
281
+ </Sheet>
282
+ </InsetDrawer>
283
+ ))}
284
+ </Box>
215
285
  ```
216
286
 
217
287
  ## Sizes
@@ -219,45 +289,58 @@ InsetDrawer supports four anchor positions. Use `left` for navigation, `right` f
219
289
  Three size presets are available: `sm`, `md`, and `lg`. The size controls width for left/right anchors and height for top/bottom anchors.
220
290
 
221
291
  ```tsx
222
- <Box sx={{
223
- display: 'flex',
224
- flexDirection: 'column',
225
- gap: 2
226
- }}>
227
- <Stack direction="row" spacing={2}>
228
- <Button variant="outlined" size="sm" onClick={() => setSize('sm')}>
229
- Small
230
- </Button>
231
- <Button variant="outlined" onClick={() => setSize('md')}>
232
- Medium
233
- </Button>
234
- <Button variant="outlined" size="lg" onClick={() => setSize('lg')}>
235
- Large
236
- </Button>
237
- </Stack>
238
-
239
- {(['sm', 'md', 'lg'] as const).map(sizeValue => <InsetDrawer key={sizeValue} size={sizeValue} open={size === sizeValue} onClose={() => setSize(null)}>
240
- <Sheet sx={{
241
- borderRadius: 'md',
242
- p: 2,
243
- display: 'flex',
244
- flexDirection: 'column',
245
- gap: 2,
246
- height: '100%'
247
- }}>
248
- <DialogTitle>Size: {sizeValue}</DialogTitle>
249
- <ModalClose />
250
- <Divider />
251
- <DialogContent>
252
- <Typography>This is a {sizeValue} sized drawer.</Typography>
253
- </DialogContent>
254
- <Divider sx={{
255
- mt: 'auto'
256
- }} />
257
- <Button onClick={() => setSize(null)}>Close</Button>
258
- </Sheet>
259
- </InsetDrawer>)}
260
- </Box>
292
+ <Box
293
+ sx={{
294
+ display: "flex",
295
+ flexDirection: "column",
296
+ gap: 2
297
+ }}
298
+ >
299
+ <Stack direction="row" spacing={2}>
300
+ <Button variant="outlined" size="sm" onClick={() => setSize("sm")}>
301
+ Small
302
+ </Button>
303
+ <Button variant="outlined" onClick={() => setSize("md")}>
304
+ Medium
305
+ </Button>
306
+ <Button variant="outlined" size="lg" onClick={() => setSize("lg")}>
307
+ Large
308
+ </Button>
309
+ </Stack>
310
+
311
+ {(["sm", "md", "lg"] as const).map((sizeValue) => (
312
+ <InsetDrawer
313
+ key={sizeValue}
314
+ size={sizeValue}
315
+ open={size === sizeValue}
316
+ onClose={() => setSize(null)}
317
+ >
318
+ <Sheet
319
+ sx={{
320
+ borderRadius: "md",
321
+ p: 2,
322
+ display: "flex",
323
+ flexDirection: "column",
324
+ gap: 2,
325
+ height: "100%"
326
+ }}
327
+ >
328
+ <DialogTitle>Size: {sizeValue}</DialogTitle>
329
+ <ModalClose />
330
+ <Divider />
331
+ <DialogContent>
332
+ <Typography>This is a {sizeValue} sized drawer.</Typography>
333
+ </DialogContent>
334
+ <Divider
335
+ sx={{
336
+ mt: "auto"
337
+ }}
338
+ />
339
+ <Button onClick={() => setSize(null)}>Close</Button>
340
+ </Sheet>
341
+ </InsetDrawer>
342
+ ))}
343
+ </Box>
261
344
  ```
262
345
 
263
346
  ## Navigation Menu
@@ -266,32 +349,50 @@ A typical mobile navigation menu pattern using InsetDrawer anchored to the left
266
349
 
267
350
  ```tsx
268
351
  <Box>
269
- <IconButton variant="outlined" color="neutral" onClick={() => setOpen(true)} aria-label="Open navigation menu">
270
- <MenuIcon />
271
- </IconButton>
272
-
273
- <InsetDrawer open={open} onClose={() => setOpen(false)} anchor="left" size="sm">
274
- <Sheet sx={{
275
- p: 2,
276
- display: 'flex',
277
- flexDirection: 'column',
278
- height: '100%'
279
- }}>
280
- <DialogTitle>Navigation</DialogTitle>
281
- <ModalClose />
282
- <Divider sx={{
283
- my: 2
284
- }} />
285
- <Stack spacing={1}>
286
- {menuItems.map(item => <Button key={item.label} variant="plain" color="neutral" startDecorator={item.icon} sx={{
287
- justifyContent: 'flex-start'
288
- }} onClick={() => setOpen(false)}>
289
- {item.label}
290
- </Button>)}
291
- </Stack>
292
- </Sheet>
293
- </InsetDrawer>
294
- </Box>
352
+ <IconButton
353
+ variant="outlined"
354
+ color="neutral"
355
+ onClick={() => setOpen(true)}
356
+ aria-label="Open navigation menu"
357
+ >
358
+ <MenuIcon />
359
+ </IconButton>
360
+
361
+ <InsetDrawer open={open} onClose={() => setOpen(false)} anchor="left" size="sm">
362
+ <Sheet
363
+ sx={{
364
+ p: 2,
365
+ display: "flex",
366
+ flexDirection: "column",
367
+ height: "100%"
368
+ }}
369
+ >
370
+ <DialogTitle>Navigation</DialogTitle>
371
+ <ModalClose />
372
+ <Divider
373
+ sx={{
374
+ my: 2
375
+ }}
376
+ />
377
+ <Stack spacing={1}>
378
+ {menuItems.map((item) => (
379
+ <Button
380
+ key={item.label}
381
+ variant="plain"
382
+ color="neutral"
383
+ startDecorator={item.icon}
384
+ sx={{
385
+ justifyContent: "flex-start"
386
+ }}
387
+ onClick={() => setOpen(false)}
388
+ >
389
+ {item.label}
390
+ </Button>
391
+ ))}
392
+ </Stack>
393
+ </Sheet>
394
+ </InsetDrawer>
395
+ </Box>
295
396
  ```
296
397
 
297
398
  ## Filter Panel
@@ -300,139 +401,213 @@ A filter panel that slides in from the right, containing form controls for refin
300
401
 
301
402
  ```tsx
302
403
  <Box>
303
- <Button variant="outlined" color="neutral" startDecorator={<FilterListIcon />} onClick={() => setOpen(true)}>
304
- Filters
305
- </Button>
306
-
307
- <InsetDrawer open={open} onClose={() => setOpen(false)} anchor="right">
308
- <Sheet sx={{
309
- borderRadius: 'md',
310
- p: 2,
311
- display: 'flex',
312
- flexDirection: 'column',
313
- gap: 2,
314
- height: '100%',
315
- overflow: 'auto'
316
- }}>
317
- <DialogTitle>Filters</DialogTitle>
318
- <ModalClose />
319
- <Divider />
320
- <DialogContent>
321
- <FormControl>
322
- <FormLabel sx={{
323
- typography: 'title-md',
324
- fontWeight: 'bold'
325
- }}>Property type</FormLabel>
326
- <RadioGroup value={filters.propertyType} onChange={e => setFilters(prev => ({
327
- ...prev,
328
- propertyType: e.target.value
329
- }))}>
330
- <Box sx={{
331
- display: 'grid',
332
- gridTemplateColumns: 'repeat(auto-fill, minmax(140px, 1fr))',
333
- gap: 1.5
334
- }}>
335
- {[{
336
- name: 'House',
337
- icon: <HomeRoundedIcon />
338
- }, {
339
- name: 'Apartment',
340
- icon: <ApartmentRoundedIcon />
341
- }, {
342
- name: 'Guesthouse',
343
- icon: <MeetingRoomRoundedIcon />
344
- }, {
345
- name: 'Hotel',
346
- icon: <HotelRoundedIcon />
347
- }].map(item => <Card key={item.name} sx={{
348
- boxShadow: 'none',
349
- '&:hover': {
350
- bgcolor: 'background.level1'
351
- }
352
- }}>
353
- <CardContent>
354
- {item.icon}
355
- <Typography level="title-md">{item.name}</Typography>
356
- </CardContent>
357
- <Radio disableIcon overlay variant="outlined" color="neutral" value={item.name} sx={{
358
- mt: -2
359
- }} slotProps={{
360
- action: {
361
- sx: {
362
- '&:hover': {
363
- bgcolor: 'transparent'
404
+ <Button
405
+ variant="outlined"
406
+ color="neutral"
407
+ startDecorator={<FilterListIcon />}
408
+ onClick={() => setOpen(true)}
409
+ >
410
+ Filters
411
+ </Button>
412
+
413
+ <InsetDrawer open={open} onClose={() => setOpen(false)} anchor="right">
414
+ <Sheet
415
+ sx={{
416
+ borderRadius: "md",
417
+ p: 2,
418
+ display: "flex",
419
+ flexDirection: "column",
420
+ gap: 2,
421
+ height: "100%",
422
+ overflow: "auto"
423
+ }}
424
+ >
425
+ <DialogTitle>Filters</DialogTitle>
426
+ <ModalClose />
427
+ <Divider />
428
+ <DialogContent>
429
+ <FormControl>
430
+ <FormLabel
431
+ sx={{
432
+ typography: "title-md",
433
+ fontWeight: "bold"
434
+ }}
435
+ >
436
+ Property type
437
+ </FormLabel>
438
+ <RadioGroup
439
+ value={filters.propertyType}
440
+ onChange={(e) =>
441
+ setFilters((prev) => ({
442
+ ...prev,
443
+ propertyType: e.target.value
444
+ }))
364
445
  }
446
+ >
447
+ <Box
448
+ sx={{
449
+ display: "grid",
450
+ gridTemplateColumns: "repeat(auto-fill, minmax(140px, 1fr))",
451
+ gap: 1.5
452
+ }}
453
+ >
454
+ {[
455
+ {
456
+ name: "House",
457
+ icon: <HomeRoundedIcon />
458
+ },
459
+ {
460
+ name: "Apartment",
461
+ icon: <ApartmentRoundedIcon />
462
+ },
463
+ {
464
+ name: "Guesthouse",
465
+ icon: <MeetingRoomRoundedIcon />
466
+ },
467
+ {
468
+ name: "Hotel",
469
+ icon: <HotelRoundedIcon />
470
+ }
471
+ ].map((item) => (
472
+ <Card
473
+ key={item.name}
474
+ sx={{
475
+ boxShadow: "none",
476
+ "&:hover": {
477
+ bgcolor: "background.level1"
478
+ }
479
+ }}
480
+ >
481
+ <CardContent>
482
+ {item.icon}
483
+ <Typography level="title-md">{item.name}</Typography>
484
+ </CardContent>
485
+ <Radio
486
+ disableIcon
487
+ overlay
488
+ variant="outlined"
489
+ color="neutral"
490
+ value={item.name}
491
+ sx={{
492
+ mt: -2
493
+ }}
494
+ slotProps={{
495
+ action: {
496
+ sx: {
497
+ "&:hover": {
498
+ bgcolor: "transparent"
499
+ }
500
+ }
501
+ }
502
+ }}
503
+ />
504
+ </Card>
505
+ ))}
506
+ </Box>
507
+ </RadioGroup>
508
+ </FormControl>
509
+
510
+ <Typography
511
+ level="title-md"
512
+ fontWeight="bold"
513
+ sx={{
514
+ mt: 2
515
+ }}
516
+ >
517
+ Booking options
518
+ </Typography>
519
+ <FormControl orientation="horizontal">
520
+ <Box
521
+ sx={{
522
+ flex: 1,
523
+ pr: 1
524
+ }}
525
+ >
526
+ <FormLabel
527
+ sx={{
528
+ typography: "title-sm"
529
+ }}
530
+ >
531
+ Instant booking
532
+ </FormLabel>
533
+ <FormHelperText
534
+ sx={{
535
+ typography: "body-sm"
536
+ }}
537
+ >
538
+ Listings that you can book without waiting for host approval.
539
+ </FormHelperText>
540
+ </Box>
541
+ <Switch
542
+ checked={filters.instantBooking}
543
+ onChange={(e) =>
544
+ setFilters((prev) => ({
545
+ ...prev,
546
+ instantBooking: e.target.checked
547
+ }))
548
+ }
549
+ />
550
+ </FormControl>
551
+
552
+ <FormControl orientation="horizontal">
553
+ <Box
554
+ sx={{
555
+ flex: 1,
556
+ mt: 1,
557
+ mr: 1
558
+ }}
559
+ >
560
+ <FormLabel
561
+ sx={{
562
+ typography: "title-sm"
563
+ }}
564
+ >
565
+ Self check-in
566
+ </FormLabel>
567
+ <FormHelperText
568
+ sx={{
569
+ typography: "body-sm"
570
+ }}
571
+ >
572
+ Easy access to the property when you arrive.
573
+ </FormHelperText>
574
+ </Box>
575
+ <Switch
576
+ checked={filters.selfCheckIn}
577
+ onChange={(e) =>
578
+ setFilters((prev) => ({
579
+ ...prev,
580
+ selfCheckIn: e.target.checked
581
+ }))
582
+ }
583
+ />
584
+ </FormControl>
585
+ </DialogContent>
586
+
587
+ <Divider
588
+ sx={{
589
+ mt: "auto"
590
+ }}
591
+ />
592
+ <Stack direction="row" justifyContent="space-between" useFlexGap spacing={1}>
593
+ <Button
594
+ variant="outlined"
595
+ color="neutral"
596
+ onClick={() =>
597
+ setFilters({
598
+ propertyType: "",
599
+ instantBooking: false,
600
+ selfCheckIn: false
601
+ })
365
602
  }
366
- }
367
- }} />
368
- </Card>)}
369
- </Box>
370
- </RadioGroup>
371
- </FormControl>
372
-
373
- <Typography level="title-md" fontWeight="bold" sx={{
374
- mt: 2
375
- }}>
376
- Booking options
377
- </Typography>
378
- <FormControl orientation="horizontal">
379
- <Box sx={{
380
- flex: 1,
381
- pr: 1
382
- }}>
383
- <FormLabel sx={{
384
- typography: 'title-sm'
385
- }}>Instant booking</FormLabel>
386
- <FormHelperText sx={{
387
- typography: 'body-sm'
388
- }}>
389
- Listings that you can book without waiting for host approval.
390
- </FormHelperText>
391
- </Box>
392
- <Switch checked={filters.instantBooking} onChange={e => setFilters(prev => ({
393
- ...prev,
394
- instantBooking: e.target.checked
395
- }))} />
396
- </FormControl>
397
-
398
- <FormControl orientation="horizontal">
399
- <Box sx={{
400
- flex: 1,
401
- mt: 1,
402
- mr: 1
403
- }}>
404
- <FormLabel sx={{
405
- typography: 'title-sm'
406
- }}>Self check-in</FormLabel>
407
- <FormHelperText sx={{
408
- typography: 'body-sm'
409
- }}>
410
- Easy access to the property when you arrive.
411
- </FormHelperText>
412
- </Box>
413
- <Switch checked={filters.selfCheckIn} onChange={e => setFilters(prev => ({
414
- ...prev,
415
- selfCheckIn: e.target.checked
416
- }))} />
417
- </FormControl>
418
- </DialogContent>
419
-
420
- <Divider sx={{
421
- mt: 'auto'
422
- }} />
423
- <Stack direction="row" justifyContent="space-between" useFlexGap spacing={1}>
424
- <Button variant="outlined" color="neutral" onClick={() => setFilters({
425
- propertyType: '',
426
- instantBooking: false,
427
- selfCheckIn: false
428
- })}>
429
- Clear
430
- </Button>
431
- <Button onClick={() => setOpen(false)}>Show 165 properties</Button>
432
- </Stack>
433
- </Sheet>
434
- </InsetDrawer>
435
- </Box>
603
+ >
604
+ Clear
605
+ </Button>
606
+ <Button onClick={() => setOpen(false)}>Show 165 properties</Button>
607
+ </Stack>
608
+ </Sheet>
609
+ </InsetDrawer>
610
+ </Box>
436
611
  ```
437
612
 
438
613
  ## Settings Drawer
@@ -460,9 +635,7 @@ function SettingsDrawer({ open, onClose }) {
460
635
  </Box>
461
636
  <Switch
462
637
  checked={settings.notifications}
463
- onChange={(e) =>
464
- setSettings({ ...settings, notifications: e.target.checked })
465
- }
638
+ onChange={(e) => setSettings({ ...settings, notifications: e.target.checked })}
466
639
  />
467
640
  </FormControl>
468
641
  <FormControl orientation="horizontal">
@@ -472,9 +645,7 @@ function SettingsDrawer({ open, onClose }) {
472
645
  </Box>
473
646
  <Switch
474
647
  checked={settings.darkMode}
475
- onChange={(e) =>
476
- setSettings({ ...settings, darkMode: e.target.checked })
477
- }
648
+ onChange={(e) => setSettings({ ...settings, darkMode: e.target.checked })}
478
649
  />
479
650
  </FormControl>
480
651
  </Stack>
@@ -531,7 +702,10 @@ function ActionSheet({ open, onClose, onAction }) {
531
702
  <ListItem key={action.id}>
532
703
  <ListItemButton
533
704
  color={action.color}
534
- onClick={() => { onAction(action.id); onClose(); }}
705
+ onClick={() => {
706
+ onAction(action.id);
707
+ onClose();
708
+ }}
535
709
  >
536
710
  <ListItemDecorator>{action.icon}</ListItemDecorator>
537
711
  {action.label}
@@ -593,9 +767,7 @@ function ActionSheet({ open, onClose, onAction }) {
593
767
  <DialogTitle>Title</DialogTitle>
594
768
  <ModalClose />
595
769
  </Box>
596
- <DialogContent sx={{ flex: 1, overflow: 'auto', p: 2 }}>
597
- {/* Scrollable content */}
598
- </DialogContent>
770
+ <DialogContent sx={{ flex: 1, overflow: 'auto', p: 2 }}>{/* Scrollable content */}</DialogContent>
599
771
  <Box sx={{ p: 2, borderTop: '1px solid', borderColor: 'divider' }}>
600
772
  <Button>Save</Button>
601
773
  </Box>