@canmingir/link 1.2.26 → 1.2.30

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 (63) hide show
  1. package/package.json +9 -5
  2. package/src/Platform.jsx +1 -0
  3. package/src/assets/illustrations/avatar-shape.jsx +6 -7
  4. package/src/assets/illustrations/booking-illustration.jsx +4 -14
  5. package/src/assets/illustrations/check-in-illustration.jsx +4 -10
  6. package/src/assets/illustrations/check-out-illustration.jsx +4 -3
  7. package/src/assets/illustrations/coming-soon-illustration.jsx +4 -17
  8. package/src/assets/illustrations/forbidden-illustration.jsx +4 -12
  9. package/src/assets/illustrations/maintenance-illustration.jsx +4 -24
  10. package/src/assets/illustrations/motivation-illustration.jsx +4 -9
  11. package/src/assets/illustrations/order-complete-illustration.jsx +4 -12
  12. package/src/assets/illustrations/page-not-found-illustration.jsx +4 -9
  13. package/src/assets/illustrations/seo-illustration.jsx +4 -16
  14. package/src/assets/illustrations/sever-error-illustration.jsx +4 -21
  15. package/src/assets/illustrations/upgrade-storage-illustration.jsx +4 -20
  16. package/src/assets/illustrations/upload-illustration.jsx +4 -81
  17. package/src/components/TopNavBar/TopNavBar.jsx +6 -2
  18. package/src/components/file-thumbnail/file-thumbnail.jsx +5 -6
  19. package/src/components/label/label.jsx +0 -4
  20. package/src/components/nav-section/horizontal/nav-section-horizontal.jsx +5 -6
  21. package/src/components/settings/drawer/layout-options.jsx +5 -4
  22. package/src/components/settings/drawer/presets-options.jsx +6 -5
  23. package/src/components/settings/drawer/settings-drawer.jsx +7 -4
  24. package/src/components/settings/drawer/stretch-options.jsx +5 -5
  25. package/src/hooks/index.js +2 -1
  26. package/src/hooks/use-beta.js +8 -0
  27. package/src/layouts/DashboardLayout/header.jsx +5 -4
  28. package/src/layouts/DashboardLayout/nav-mini.jsx +5 -7
  29. package/src/layouts/DashboardLayout/nav-vertical.jsx +11 -11
  30. package/src/layouts/FullScreenLayout/FullScreenLayout.jsx +5 -1
  31. package/src/layouts/FullScreenLayout/nav-vertical.jsx +11 -11
  32. package/src/layouts/MainLayout/footer.jsx +7 -7
  33. package/src/layouts/MainLayout/header.jsx +3 -2
  34. package/src/layouts/MainLayout/nav/desktop/nav-list.jsx +8 -8
  35. package/src/layouts/MainLayout/nav/mobile/index.jsx +7 -6
  36. package/src/layouts/TwoSideLayout/TwoSideLayout.jsx +9 -3
  37. package/src/layouts/auth/classic.jsx +6 -6
  38. package/src/layouts/auth/modern.jsx +3 -4
  39. package/src/layouts/common/ProjectBar/index.jsx +13 -11
  40. package/src/layouts/common/header-sim.jsx +3 -2
  41. package/src/layouts/common/header-simple.jsx +6 -3
  42. package/src/layouts/common/notifications-popover/index.jsx +18 -13
  43. package/src/layouts/common/notifications-popover/notification-item.jsx +28 -16
  44. package/src/lib/APIPath/APIPath.jsx +2 -2
  45. package/src/lib/APITree/APITree.jsx +3 -1
  46. package/src/lib/AddItemWizard/AddItemWizard.jsx +21 -10
  47. package/src/lib/CustomBreadcrumbs/CustomBreadcrumbs.jsx +3 -2
  48. package/src/lib/Flow/layouts/CardLayout.jsx +4 -3
  49. package/src/lib/Flow/nodes/DefaultCard.jsx +6 -8
  50. package/src/lib/IconSelector/IconSelector.jsx +5 -1
  51. package/src/lib/ItemSummary/ItemSummary.jsx +11 -6
  52. package/src/lib/ItemSummary/ItemsSummary.jsx +38 -26
  53. package/src/lib/Label/Label.jsx +0 -4
  54. package/src/lib/ResourceMenu/ResourceMenu.jsx +3 -1
  55. package/src/lib/SparkleInput/SparkleInput.jsx +31 -28
  56. package/src/lib/TableSelectedAction/TableSelectedAction.jsx +7 -8
  57. package/src/pages/ConfigError.jsx +3 -1
  58. package/src/theme/index.jsx +47 -48
  59. package/src/theme/overrides/components/loading-button.js +5 -5
  60. package/src/theme/overrides/default-props.jsx +17 -11
  61. package/src/widgets/Login/CognitoLogin.jsx +61 -53
  62. package/src/widgets/Login/DemoLogin.jsx +34 -31
  63. package/src/widgets/SettingsDialog.jsx +62 -19
@@ -105,11 +105,14 @@ export function defaultProps(theme) {
105
105
  },
106
106
  MuiCardHeader: {
107
107
  defaultProps: {
108
- titleTypographyProps: { variant: "h6" },
109
- subheaderTypographyProps: {
110
- variant: "body2",
111
- marginTop: theme.spacing(0.5),
112
- },
108
+ slotProps: {
109
+ title: { variant: "h6" },
110
+
111
+ subheader: {
112
+ variant: "body2",
113
+ marginTop: theme.spacing(0.5),
114
+ }
115
+ }
113
116
  },
114
117
  },
115
118
  MuiChip: {
@@ -134,12 +137,15 @@ export function defaultProps(theme) {
134
137
  },
135
138
  MuiListItemText: {
136
139
  defaultProps: {
137
- primaryTypographyProps: {
138
- typography: "subtitle2",
139
- },
140
- secondaryTypographyProps: {
141
- component: "span",
142
- },
140
+ slotProps: {
141
+ primary: {
142
+ typography: "subtitle2",
143
+ },
144
+
145
+ secondary: {
146
+ component: "span",
147
+ }
148
+ }
143
149
  },
144
150
  },
145
151
  MuiPaper: {
@@ -180,28 +180,33 @@ export default function CognitoLogin() {
180
180
  )}
181
181
  </Box>
182
182
 
183
- <Typography variant="h4" fontWeight={700} gutterBottom>
183
+ <Typography variant="h4" gutterBottom sx={{
184
+ fontWeight: 700
185
+ }}>
184
186
  {titles[mode].heading}
185
187
  </Typography>
186
- <Typography variant="body2" color="text.secondary">
188
+ <Typography variant="body2" sx={{
189
+ color: "text.secondary"
190
+ }}>
187
191
  {titles[mode].sub}
188
192
  </Typography>
189
193
  </Box>
190
-
191
194
  <Stack spacing={2}>
192
195
  <TextField
193
196
  label="Email"
194
197
  value={email}
195
198
  onChange={(e) => setEmail(e.target.value)}
196
199
  fullWidth
197
- InputProps={{
198
- startAdornment: (
199
- <InputAdornment position="start">
200
- <EmailOutlined sx={{ color: "text.secondary", fontSize: 22 }} />
201
- </InputAdornment>
202
- ),
203
- }}
204
200
  sx={inputSx}
201
+ slotProps={{
202
+ input: {
203
+ startAdornment: (
204
+ <InputAdornment position="start">
205
+ <EmailOutlined sx={{ color: "text.secondary", fontSize: 22 }} />
206
+ </InputAdornment>
207
+ ),
208
+ }
209
+ }}
205
210
  />
206
211
 
207
212
  {mode !== "confirm" && (
@@ -211,17 +216,19 @@ export default function CognitoLogin() {
211
216
  value={password}
212
217
  onChange={(e) => setPassword(e.target.value)}
213
218
  fullWidth
214
- InputProps={{
215
- startAdornment: (
216
- <InputAdornment position="start">
217
- <LockOutlined
218
- sx={{ color: "text.secondary", fontSize: 22 }}
219
- />
220
- </InputAdornment>
221
- ),
222
- endAdornment: passwordAdornment,
223
- }}
224
219
  sx={inputSx}
220
+ slotProps={{
221
+ input: {
222
+ startAdornment: (
223
+ <InputAdornment position="start">
224
+ <LockOutlined
225
+ sx={{ color: "text.secondary", fontSize: 22 }}
226
+ />
227
+ </InputAdornment>
228
+ ),
229
+ endAdornment: passwordAdornment,
230
+ }
231
+ }}
225
232
  />
226
233
  )}
227
234
 
@@ -232,28 +239,30 @@ export default function CognitoLogin() {
232
239
  value={confirmPassword}
233
240
  onChange={(e) => setConfirmPassword(e.target.value)}
234
241
  fullWidth
235
- InputProps={{
236
- startAdornment: (
237
- <InputAdornment position="start">
238
- <LockOutlined
239
- sx={{ color: "text.secondary", fontSize: 22 }}
240
- />
241
- </InputAdornment>
242
- ),
243
- endAdornment: (
244
- <InputAdornment position="end">
245
- <IconButton
246
- onClick={() => setShowConfirmPassword(!showConfirmPassword)}
247
- edge="end"
248
- size="small"
249
- tabIndex={-1}
250
- >
251
- {showConfirmPassword ? <VisibilityOff /> : <Visibility />}
252
- </IconButton>
253
- </InputAdornment>
254
- ),
255
- }}
256
242
  sx={inputSx}
243
+ slotProps={{
244
+ input: {
245
+ startAdornment: (
246
+ <InputAdornment position="start">
247
+ <LockOutlined
248
+ sx={{ color: "text.secondary", fontSize: 22 }}
249
+ />
250
+ </InputAdornment>
251
+ ),
252
+ endAdornment: (
253
+ <InputAdornment position="end">
254
+ <IconButton
255
+ onClick={() => setShowConfirmPassword(!showConfirmPassword)}
256
+ edge="end"
257
+ size="small"
258
+ tabIndex={-1}
259
+ >
260
+ {showConfirmPassword ? <VisibilityOff /> : <Visibility />}
261
+ </IconButton>
262
+ </InputAdornment>
263
+ ),
264
+ }
265
+ }}
257
266
  />
258
267
  )}
259
268
 
@@ -263,20 +272,21 @@ export default function CognitoLogin() {
263
272
  value={code}
264
273
  onChange={(e) => setCode(e.target.value)}
265
274
  fullWidth
266
- InputProps={{
267
- startAdornment: (
268
- <InputAdornment position="start">
269
- <CheckOutlined
270
- sx={{ color: "text.secondary", fontSize: 22 }}
271
- />
272
- </InputAdornment>
273
- ),
274
- }}
275
275
  sx={inputSx}
276
+ slotProps={{
277
+ input: {
278
+ startAdornment: (
279
+ <InputAdornment position="start">
280
+ <CheckOutlined
281
+ sx={{ color: "text.secondary", fontSize: 22 }}
282
+ />
283
+ </InputAdornment>
284
+ ),
285
+ }
286
+ }}
276
287
  />
277
288
  )}
278
289
  </Stack>
279
-
280
290
  {mode === "login" && (
281
291
  <Stack spacing={1.5}>
282
292
  <Button
@@ -297,7 +307,6 @@ export default function CognitoLogin() {
297
307
  </Button>
298
308
  </Stack>
299
309
  )}
300
-
301
310
  {mode === "signup" && (
302
311
  <Stack spacing={1.5}>
303
312
  <Button
@@ -318,7 +327,6 @@ export default function CognitoLogin() {
318
327
  </Button>
319
328
  </Stack>
320
329
  )}
321
-
322
330
  {mode === "confirm" && (
323
331
  <Button
324
332
  variant="contained"
@@ -62,13 +62,6 @@ export default function DemoLogin() {
62
62
  value={username}
63
63
  onChange={(e) => setUsername(e.target.value)}
64
64
  fullWidth
65
- InputProps={{
66
- startAdornment: (
67
- <InputAdornment position="start">
68
- <PersonOutline sx={{ color: "text.secondary", fontSize: 22 }} />
69
- </InputAdornment>
70
- ),
71
- }}
72
65
  sx={{
73
66
  "& .MuiOutlinedInput-root": {
74
67
  fontSize: "1rem",
@@ -80,6 +73,15 @@ export default function DemoLogin() {
80
73
  },
81
74
  },
82
75
  }}
76
+ slotProps={{
77
+ input: {
78
+ startAdornment: (
79
+ <InputAdornment position="start">
80
+ <PersonOutline sx={{ color: "text.secondary", fontSize: 22 }} />
81
+ </InputAdornment>
82
+ ),
83
+ }
84
+ }}
83
85
  />
84
86
 
85
87
  <TextField
@@ -88,25 +90,6 @@ export default function DemoLogin() {
88
90
  value={password}
89
91
  onChange={(e) => setPassword(e.target.value)}
90
92
  fullWidth
91
- InputProps={{
92
- startAdornment: (
93
- <InputAdornment position="start">
94
- <LockOutlined sx={{ color: "text.secondary", fontSize: 22 }} />
95
- </InputAdornment>
96
- ),
97
- endAdornment: (
98
- <InputAdornment position="end">
99
- <IconButton
100
- onClick={() => setShowPassword(!showPassword)}
101
- edge="end"
102
- size="small"
103
- tabIndex={-1}
104
- >
105
- {showPassword ? <VisibilityOff /> : <Visibility />}
106
- </IconButton>
107
- </InputAdornment>
108
- ),
109
- }}
110
93
  sx={{
111
94
  "& .MuiOutlinedInput-root": {
112
95
  fontSize: "1rem",
@@ -123,9 +106,29 @@ export default function DemoLogin() {
123
106
  handleLogin();
124
107
  }
125
108
  }}
109
+ slotProps={{
110
+ input: {
111
+ startAdornment: (
112
+ <InputAdornment position="start">
113
+ <LockOutlined sx={{ color: "text.secondary", fontSize: 22 }} />
114
+ </InputAdornment>
115
+ ),
116
+ endAdornment: (
117
+ <InputAdornment position="end">
118
+ <IconButton
119
+ onClick={() => setShowPassword(!showPassword)}
120
+ edge="end"
121
+ size="small"
122
+ tabIndex={-1}
123
+ >
124
+ {showPassword ? <VisibilityOff /> : <Visibility />}
125
+ </IconButton>
126
+ </InputAdornment>
127
+ ),
128
+ }
129
+ }}
126
130
  />
127
131
  </Stack>
128
-
129
132
  <Button
130
133
  variant="contained"
131
134
  onClick={handleLogin}
@@ -153,7 +156,6 @@ export default function DemoLogin() {
153
156
  >
154
157
  Sign in
155
158
  </Button>
156
-
157
159
  <Box
158
160
  sx={{
159
161
  mt: 1,
@@ -167,9 +169,10 @@ export default function DemoLogin() {
167
169
  >
168
170
  <Typography
169
171
  variant="caption"
170
- color="text.secondary"
171
- sx={{ fontSize: "0.8125rem" }}
172
- >
172
+ sx={{
173
+ color: "text.secondary",
174
+ fontSize: "0.8125rem"
175
+ }}>
173
176
  Demo credentials:{" "}
174
177
  <Box component="strong" sx={{ color: "text.primary" }}>
175
178
  admin / admin
@@ -2,6 +2,7 @@ import Iconify from "../components/Iconify";
2
2
  import config from "../config/config";
3
3
  import { useEvent } from "@nucleoidai/react-event";
4
4
  import useSettings from "../hooks/useSettings";
5
+ import { useSettingsContext } from "../components/settings/context";
5
6
  import { useUser } from "../hooks/use-user";
6
7
 
7
8
  import {
@@ -20,6 +21,7 @@ import {
20
21
  ListItemText,
21
22
  NativeSelect,
22
23
  Stack,
24
+ Switch,
23
25
  Tab,
24
26
  Tabs,
25
27
  TextField,
@@ -165,11 +167,13 @@ function SettingsDialog({ handleClose, open }) {
165
167
  maxWidth={"md"}
166
168
  onClose={() => handleClose()}
167
169
  sx={{ bgcolor: "custom.darkDialogBg", zIndex: 2147483647 }}
168
- PaperProps={{
169
- style: {
170
- color: "white",
171
- minHeight: 600,
172
- },
170
+ slotProps={{
171
+ paper: {
172
+ style: {
173
+ color: "white",
174
+ minHeight: 600,
175
+ },
176
+ }
173
177
  }}
174
178
  >
175
179
  <DialogContent>
@@ -210,9 +214,13 @@ const Permission = () => {
210
214
  }, [event, event2]);
211
215
 
212
216
  return (
213
- <Stack direction="column" spacing={2} p={2}>
217
+ <Stack direction="column" spacing={2} sx={{
218
+ p: 2
219
+ }}>
214
220
  <Typography variant="h6">Users</Typography>
215
- <Typography variant="subtitle2" color="text.secondary">
221
+ <Typography variant="subtitle2" sx={{
222
+ color: "text.secondary"
223
+ }}>
216
224
  Users with access to the project.
217
225
  </Typography>
218
226
  <List>
@@ -282,6 +290,7 @@ const Permission = () => {
282
290
  const Settings = () => {
283
291
  const projectId = localStorage.getItem("projectId");
284
292
  const { settings, updateSettings } = useSettings(projectId);
293
+ const { beta, onUpdate } = useSettingsContext();
285
294
 
286
295
  const timeZones = [
287
296
  "Asia/Kolkata",
@@ -297,9 +306,13 @@ const Settings = () => {
297
306
  };
298
307
 
299
308
  return (
300
- <Stack direction="column" spacing={2} p={2}>
309
+ <Stack direction="column" spacing={2} sx={{
310
+ p: 2
311
+ }}>
301
312
  <Typography variant="h6">Settings</Typography>
302
- <Typography variant="subtitle2" color="text.secondary">
313
+ <Typography variant="subtitle2" sx={{
314
+ color: "text.secondary"
315
+ }}>
303
316
  Configure your application settings.
304
317
  </Typography>
305
318
  <List>
@@ -333,6 +346,20 @@ const Settings = () => {
333
346
  </NativeSelect>
334
347
  </FormControl>
335
348
  </ListItem>
349
+ <ListItem
350
+ sx={{
351
+ backgroundColor: "background.paper",
352
+ boxShadow: 1,
353
+ borderRadius: 1,
354
+ m: 1,
355
+ p: 2,
356
+ ":hover": { boxShadow: 3 },
357
+ transition: "all 0.2s ease-in-out",
358
+ }}
359
+ >
360
+ <ListItemText primary="Beta" secondary="Enable beta features" />
361
+ <Switch checked={beta} onChange={() => onUpdate("beta", !beta)} />
362
+ </ListItem>
336
363
  </List>
337
364
  </Stack>
338
365
  );
@@ -346,7 +373,9 @@ const About = () => {
346
373
  const description = pkg.description;
347
374
 
348
375
  return (
349
- <Stack direction="column" spacing={2} p={2}>
376
+ <Stack direction="column" spacing={2} sx={{
377
+ p: 2
378
+ }}>
350
379
  <Box
351
380
  sx={{
352
381
  p: 3,
@@ -357,7 +386,9 @@ const About = () => {
357
386
  "linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.01))",
358
387
  }}
359
388
  >
360
- <Stack direction="row" spacing={2.5} alignItems="center">
389
+ <Stack direction="row" spacing={2.5} sx={{
390
+ alignItems: "center"
391
+ }}>
361
392
  <Avatar
362
393
  src={iconSrc}
363
394
  variant="rounded"
@@ -373,16 +404,20 @@ const About = () => {
373
404
  </Avatar>
374
405
 
375
406
  <Box sx={{ flex: 1, minWidth: 0 }}>
376
- <Typography variant="h5" fontWeight={600}>
407
+ <Typography variant="h5" sx={{
408
+ fontWeight: 600
409
+ }}>
377
410
  {appName.toUpperCase()}
378
411
  </Typography>
379
412
 
380
413
  {description && (
381
414
  <Typography
382
415
  variant="body2"
383
- color="text.secondary"
384
- sx={{ mt: 0.5, maxWidth: 520 }}
385
- >
416
+ sx={{
417
+ color: "text.secondary",
418
+ mt: 0.5,
419
+ maxWidth: 520
420
+ }}>
386
421
  {description}
387
422
  </Typography>
388
423
  )}
@@ -425,7 +460,9 @@ const About = () => {
425
460
  textAlign: "center",
426
461
  }}
427
462
  >
428
- <Typography variant="caption" color="text.secondary">
463
+ <Typography variant="caption" sx={{
464
+ color: "text.secondary"
465
+ }}>
429
466
  © 2026 greycollar.ai. All rights reserved.
430
467
  </Typography>
431
468
  </Box>
@@ -436,11 +473,17 @@ const About = () => {
436
473
 
437
474
  const InfoRow = ({ label, value, link }) => {
438
475
  return (
439
- <Stack direction="row" spacing={1.5} alignItems="center">
440
- <Typography variant="body2" color="text.secondary" sx={{ minWidth: 110 }}>
476
+ <Stack direction="row" spacing={1.5} sx={{
477
+ alignItems: "center"
478
+ }}>
479
+ <Typography
480
+ variant="body2"
481
+ sx={{
482
+ color: "text.secondary",
483
+ minWidth: 110
484
+ }}>
441
485
  {label}
442
486
  </Typography>
443
-
444
487
  {link ? (
445
488
  <Link href={link} target="_blank" rel="noreferrer" underline="hover">
446
489
  {value}