@verma-consulting/design-library 0.1.37 → 0.1.39

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/index.mjs CHANGED
@@ -1,191 +1,30 @@
1
1
  // src/index.tsx
2
2
  export * from "@mui/material";
3
3
 
4
- // src/ClearableSelect.tsx
5
- import React from "react";
6
- import {
7
- FormControl,
8
- InputLabel,
9
- Select,
10
- InputAdornment,
11
- IconButton,
12
- OutlinedInput,
13
- Typography,
14
- FormLabel
15
- } from "@mui/material";
16
- import { alpha } from "@mui/material/styles";
17
- import { Clear } from "@mui/icons-material";
18
- import { makeStyles } from "@mui/styles";
19
- import { prettifyString } from "@verma-consulting/common-library";
20
- import { jsx, jsxs } from "react/jsx-runtime";
21
- var useStyles = makeStyles((theme) => ({
22
- defaultMode: {
23
- paddingTop: 14,
24
- paddingBottom: 14,
25
- paddingLeft: 12,
26
- paddingRight: 12,
27
- cursor: "pointer",
28
- borderRadius: 14,
29
- border: "1px solid rgba(255,255,255,0.55)",
30
- backdropFilter: "blur(14px) saturate(150%)",
31
- background: "linear-gradient(160deg, rgba(255,255,255,0.9), rgba(245,249,255,0.72))",
32
- "&:hover": {
33
- boxShadow: "rgba(15, 23, 42, 0.16) 0px 8px 24px"
34
- }
35
- },
36
- formLabel: {
37
- cursor: "pointer"
38
- },
39
- formValue: {
40
- cursor: "pointer",
41
- wordBreak: "break-word",
42
- whiteSpace: "pre-wrap"
43
- }
44
- }));
45
- var ClearableSelect = ({
46
- name,
47
- label,
48
- value = "",
49
- onChange,
50
- size = "small",
51
- style,
52
- disabled = false,
53
- onClear,
54
- multiple = false,
55
- defaultEditMode = false,
56
- renderValue,
57
- children
58
- }) => {
59
- const classes = useStyles();
60
- const wrapperRef = React.useRef(null);
61
- const [editMode, setEditMode] = React.useState(defaultEditMode);
62
- React.useEffect(() => {
63
- const handleClickOutside = (event) => {
64
- if (wrapperRef.current && !wrapperRef.current.contains(event.target)) {
65
- setEditMode(false);
66
- }
67
- };
68
- if (editMode) {
69
- document.addEventListener("mousedown", handleClickOutside);
70
- }
71
- return () => {
72
- document.removeEventListener("mousedown", handleClickOutside);
73
- };
74
- }, [editMode]);
75
- const isValueEmpty = multiple && Array.isArray(value) ? value.length === 0 : value === "";
76
- const handleClear = (event) => {
77
- event.stopPropagation();
78
- if (onClear) {
79
- onClear();
80
- setEditMode(false);
81
- } else {
82
- const fakeEvent = {
83
- target: { name, value: multiple ? [] : "" }
84
- };
85
- onChange(fakeEvent);
86
- }
87
- };
88
- if (editMode) {
89
- return /* @__PURE__ */ jsxs(
90
- FormControl,
91
- {
92
- variant: "outlined",
93
- size,
94
- style,
95
- disabled,
96
- fullWidth: true,
97
- children: [
98
- /* @__PURE__ */ jsx(InputLabel, { id: `${name}-select-label`, children: label }),
99
- /* @__PURE__ */ jsx(
100
- Select,
101
- {
102
- labelId: `${name}-select-label`,
103
- id: `${name}-select`,
104
- name,
105
- multiple,
106
- value: multiple ? value == null ? void 0 : value.split(", ") : value,
107
- onChange,
108
- onBlur: () => setEditMode(false),
109
- onClose: () => setEditMode(false),
110
- label,
111
- input: /* @__PURE__ */ jsx(
112
- OutlinedInput,
113
- {
114
- size,
115
- color: "primary",
116
- endAdornment: onClear && !isValueEmpty ? /* @__PURE__ */ jsx(InputAdornment, { position: "end", sx: { gap: 1 }, children: /* @__PURE__ */ jsx(
117
- IconButton,
118
- {
119
- "aria-label": `clear ${name}`,
120
- onClick: handleClear,
121
- edge: "end",
122
- size: "small",
123
- sx: { mr: 1 },
124
- children: /* @__PURE__ */ jsx(Clear, { fontSize: "inherit" })
125
- }
126
- ) }) : null,
127
- label,
128
- name,
129
- sx: {
130
- paddingRight: !isValueEmpty ? 2 : void 0,
131
- borderRadius: 1.75,
132
- backdropFilter: "blur(10px)",
133
- "& .MuiOutlinedInput-notchedOutline": {
134
- borderColor: alpha("#FFFFFF", 0.6)
135
- }
136
- }
137
- }
138
- ),
139
- renderValue,
140
- children
141
- }
142
- )
143
- ]
144
- }
145
- );
146
- }
147
- return /* @__PURE__ */ jsxs(
148
- "div",
149
- {
150
- onClick: () => {
151
- if (!disabled) {
152
- setEditMode(true);
153
- }
154
- },
155
- className: classes.defaultMode,
156
- children: [
157
- /* @__PURE__ */ jsx(FormLabel, { className: classes.formLabel, children: label }),
158
- /* @__PURE__ */ jsx(Typography, { className: classes.formValue, children: renderValue ? renderValue(value) : prettifyString(value) })
159
- ]
160
- }
161
- );
162
- };
163
- var ClearableSelect_default = ClearableSelect;
164
-
165
4
  // src/TabPanel.tsx
166
5
  import { Box } from "@mui/material";
167
- import { jsx as jsx2 } from "react/jsx-runtime";
6
+ import { jsx } from "react/jsx-runtime";
168
7
  var TabPanel = (props) => {
169
8
  const { children, value, index, ...other } = props;
170
- return /* @__PURE__ */ jsx2(
9
+ return /* @__PURE__ */ jsx(
171
10
  "div",
172
11
  {
173
12
  role: "tabpanel",
174
13
  hidden: value !== index,
175
14
  id: `simple-tabpanel-${index}`,
176
15
  ...other,
177
- children: value === index && /* @__PURE__ */ jsx2(Box, { sx: { p: 1 }, children })
16
+ children: value === index && /* @__PURE__ */ jsx(Box, { sx: { p: 1 }, children })
178
17
  }
179
18
  );
180
19
  };
181
20
  var TabPanel_default = TabPanel;
182
21
 
183
22
  // src/TablePagination.tsx
184
- import * as React2 from "react";
23
+ import * as React from "react";
185
24
  import MuiTablePagination from "@mui/material/TablePagination";
186
25
  import tablePaginationClasses from "@mui/material/TablePagination/tablePaginationClasses";
187
- import { alpha as alpha2 } from "@mui/material/styles";
188
- import { jsx as jsx3 } from "react/jsx-runtime";
26
+ import { alpha } from "@mui/material/styles";
27
+ import { jsx as jsx2 } from "react/jsx-runtime";
189
28
  function mergeSx(...parts) {
190
29
  const flat = [];
191
30
  for (const p of parts) {
@@ -293,7 +132,7 @@ var rootSx = {
293
132
  }
294
133
  }
295
134
  };
296
- var TablePagination = React2.forwardRef(function TablePagination2(props, ref) {
135
+ var TablePagination = React.forwardRef(function TablePagination2(props, ref) {
297
136
  var _a2, _b;
298
137
  const {
299
138
  sx,
@@ -324,12 +163,12 @@ var TablePagination = React2.forwardRef(function TablePagination2(props, ref) {
324
163
  minWidth: 64,
325
164
  fontSize: theme.typography.body2.fontSize,
326
165
  backdropFilter: "blur(10px)",
327
- backgroundColor: alpha2(
166
+ backgroundColor: alpha(
328
167
  theme.palette.background.paper,
329
168
  theme.palette.mode === "dark" ? 0.2 : 0.74
330
169
  ),
331
170
  "& .MuiOutlinedInput-notchedOutline": {
332
- borderColor: alpha2(
171
+ borderColor: alpha(
333
172
  "#FFFFFF",
334
173
  theme.palette.mode === "dark" ? 0.16 : 0.56
335
174
  )
@@ -351,7 +190,7 @@ var TablePagination = React2.forwardRef(function TablePagination2(props, ref) {
351
190
  slotSelectSx
352
191
  )
353
192
  };
354
- return /* @__PURE__ */ jsx3(
193
+ return /* @__PURE__ */ jsx2(
355
194
  MuiTablePagination,
356
195
  {
357
196
  ref,
@@ -378,20 +217,20 @@ import {
378
217
  createTheme,
379
218
  ThemeProvider
380
219
  } from "@mui/material/styles";
381
- import { makeStyles as makeStyles4 } from "@mui/styles";
220
+ import { makeStyles as makeStyles3 } from "@mui/styles";
382
221
 
383
222
  // src/Logo.tsx
384
223
  import { memo } from "react";
385
224
  import {
386
225
  Grid,
387
- Typography as Typography2,
226
+ Typography,
388
227
  Avatar,
389
228
  Tooltip,
390
229
  Box as Box2,
391
230
  useTheme,
392
231
  useMediaQuery
393
232
  } from "@mui/material";
394
- import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
233
+ import { jsx as jsx3, jsxs } from "react/jsx-runtime";
395
234
  var Logo = memo(
396
235
  ({
397
236
  loggedIn = false,
@@ -408,7 +247,7 @@ var Logo = memo(
408
247
  const companyName = (organization == null ? void 0 : organization.name) || "\u2013";
409
248
  const logoUrl = (_a2 = organization == null ? void 0 : organization.logo) == null ? void 0 : _a2.url;
410
249
  if (centered) {
411
- return /* @__PURE__ */ jsxs2(
250
+ return /* @__PURE__ */ jsxs(
412
251
  Grid,
413
252
  {
414
253
  container: true,
@@ -419,7 +258,7 @@ var Logo = memo(
419
258
  sx: { cursor: "pointer" },
420
259
  onClick: handleClick,
421
260
  children: [
422
- (logoUrl || defaultLogo) && /* @__PURE__ */ jsx4(Grid, { item: true, children: logoUrl ? /* @__PURE__ */ jsx4(
261
+ (logoUrl || defaultLogo) && /* @__PURE__ */ jsx3(Grid, { item: true, children: logoUrl ? /* @__PURE__ */ jsx3(
423
262
  Avatar,
424
263
  {
425
264
  alt: companyName || "avatar",
@@ -436,8 +275,8 @@ var Logo = memo(
436
275
  children: (companyName == null ? void 0 : companyName.charAt(0)) || "?"
437
276
  }
438
277
  ) : defaultLogo }),
439
- /* @__PURE__ */ jsx4(Grid, { item: true, sx: { maxWidth, textAlign: "center" }, children: loggedIn ? /* @__PURE__ */ jsx4(Tooltip, { title: companyName, placement: "top", arrow: true, children: /* @__PURE__ */ jsx4(
440
- Typography2,
278
+ /* @__PURE__ */ jsx3(Grid, { item: true, sx: { maxWidth, textAlign: "center" }, children: loggedIn ? /* @__PURE__ */ jsx3(Tooltip, { title: companyName, placement: "top", arrow: true, children: /* @__PURE__ */ jsx3(
279
+ Typography,
441
280
  {
442
281
  variant: "h6",
443
282
  sx: {
@@ -447,12 +286,12 @@ var Logo = memo(
447
286
  },
448
287
  children: companyName
449
288
  }
450
- ) }) : /* @__PURE__ */ jsx4(Box2, { sx: { display: "flex", justifyContent: "center" }, children: companyComponent }) })
289
+ ) }) : /* @__PURE__ */ jsx3(Box2, { sx: { display: "flex", justifyContent: "center" }, children: companyComponent }) })
451
290
  ]
452
291
  }
453
292
  );
454
293
  }
455
- return /* @__PURE__ */ jsxs2(
294
+ return /* @__PURE__ */ jsxs(
456
295
  Grid,
457
296
  {
458
297
  container: true,
@@ -464,7 +303,7 @@ var Logo = memo(
464
303
  },
465
304
  onClick: handleClick,
466
305
  children: [
467
- (logoUrl || defaultLogo) && /* @__PURE__ */ jsx4(Box2, { sx: { mr: 1, display: "flex", alignItems: "center" }, children: logoUrl ? /* @__PURE__ */ jsx4(
306
+ (logoUrl || defaultLogo) && /* @__PURE__ */ jsx3(Box2, { sx: { mr: 1, display: "flex", alignItems: "center" }, children: logoUrl ? /* @__PURE__ */ jsx3(
468
307
  Avatar,
469
308
  {
470
309
  alt: companyName || "avatar",
@@ -480,8 +319,8 @@ var Logo = memo(
480
319
  children: (companyName == null ? void 0 : companyName.charAt(0)) || "?"
481
320
  }
482
321
  ) : defaultLogo }),
483
- /* @__PURE__ */ jsx4(Box2, { sx: { maxWidth, flexShrink: 1, minWidth: 0 }, children: loggedIn ? /* @__PURE__ */ jsx4(Tooltip, { title: companyName, placement: "top", arrow: true, children: /* @__PURE__ */ jsx4(
484
- Typography2,
322
+ /* @__PURE__ */ jsx3(Box2, { sx: { maxWidth, flexShrink: 1, minWidth: 0 }, children: loggedIn ? /* @__PURE__ */ jsx3(Tooltip, { title: companyName, placement: "top", arrow: true, children: /* @__PURE__ */ jsx3(
323
+ Typography,
485
324
  {
486
325
  variant: "h6",
487
326
  noWrap: true,
@@ -512,11 +351,11 @@ import {
512
351
  DialogTitle,
513
352
  DialogContent,
514
353
  DialogActions,
515
- IconButton as IconButton2
354
+ IconButton
516
355
  } from "@mui/material";
517
356
  import { useTheme as useTheme3 } from "@mui/material/styles";
518
357
  import { Close } from "@mui/icons-material";
519
- import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
358
+ import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
520
359
  var BootstrapDialog = styled(Dialog)(({ theme }) => ({
521
360
  "& .MuiDialog-paper": {
522
361
  borderRadius: "24px"
@@ -530,7 +369,7 @@ var BootstrapDialog = styled(Dialog)(({ theme }) => ({
530
369
  }));
531
370
  var BootstrapDialogTitle = (props) => {
532
371
  const { children, onClose, ...other } = props;
533
- return /* @__PURE__ */ jsxs3(
372
+ return /* @__PURE__ */ jsxs2(
534
373
  DialogTitle,
535
374
  {
536
375
  sx: {
@@ -547,8 +386,8 @@ var BootstrapDialogTitle = (props) => {
547
386
  ...other,
548
387
  children: [
549
388
  children,
550
- onClose ? /* @__PURE__ */ jsx5(
551
- IconButton2,
389
+ onClose ? /* @__PURE__ */ jsx4(
390
+ IconButton,
552
391
  {
553
392
  onClick: onClose,
554
393
  sx: {
@@ -556,7 +395,7 @@ var BootstrapDialogTitle = (props) => {
556
395
  right: 16,
557
396
  top: 16
558
397
  },
559
- children: /* @__PURE__ */ jsx5(Close, { color: "primary" })
398
+ children: /* @__PURE__ */ jsx4(Close, { color: "primary" })
560
399
  }
561
400
  ) : null
562
401
  ]
@@ -574,7 +413,7 @@ var FormDialog = ({
574
413
  }) => {
575
414
  const theme = useTheme2();
576
415
  const mdMatches = useMediaQuery2(theme.breakpoints.down("md"));
577
- return /* @__PURE__ */ jsxs3(
416
+ return /* @__PURE__ */ jsxs2(
578
417
  BootstrapDialog,
579
418
  {
580
419
  fullWidth: true,
@@ -583,9 +422,9 @@ var FormDialog = ({
583
422
  maxWidth,
584
423
  fullScreen: mdMatches,
585
424
  children: [
586
- /* @__PURE__ */ jsx5(BootstrapDialogTitle, { onClose: () => setOpen(false), children: title }),
587
- /* @__PURE__ */ jsx5(DialogContent, { dividers: true, children }),
588
- /* @__PURE__ */ jsx5(DialogActions, { children: actions })
425
+ /* @__PURE__ */ jsx4(BootstrapDialogTitle, { onClose: () => setOpen(false), children: title }),
426
+ /* @__PURE__ */ jsx4(DialogContent, { dividers: true, children }),
427
+ /* @__PURE__ */ jsx4(DialogActions, { children: actions })
589
428
  ]
590
429
  }
591
430
  );
@@ -593,18 +432,18 @@ var FormDialog = ({
593
432
  var FormDialog_default = FormDialog;
594
433
 
595
434
  // src/InputFileUpload.tsx
596
- import { alpha as alpha4, styled as styled2 } from "@mui/material/styles";
435
+ import { alpha as alpha3, styled as styled2 } from "@mui/material/styles";
597
436
  import { Button } from "@mui/material";
598
437
  import { CloudUpload } from "@mui/icons-material";
599
438
 
600
439
  // src/glassStyles.ts
601
- import { alpha as alpha3 } from "@mui/material/styles";
602
- var glassBorder = (theme) => `1px solid ${alpha3(
440
+ import { alpha as alpha2 } from "@mui/material/styles";
441
+ var glassBorder = (theme) => `1px solid ${alpha2(
603
442
  "#FFFFFF",
604
443
  theme.palette.mode === "dark" ? 0.16 : 0.62
605
444
  )}`;
606
445
  var glassSurface = (theme) => ({
607
- background: theme.palette.mode === "dark" ? `linear-gradient(160deg, ${alpha3("#1F2937", 0.78)} 0%, ${alpha3("#111827", 0.68)} 100%)` : `linear-gradient(160deg, ${alpha3("#FFFFFF", 0.88)} 0%, ${alpha3("#F5F9FF", 0.72)} 100%)`,
446
+ background: theme.palette.mode === "dark" ? `linear-gradient(160deg, ${alpha2("#1F2937", 0.78)} 0%, ${alpha2("#111827", 0.68)} 100%)` : `linear-gradient(160deg, ${alpha2("#FFFFFF", 0.88)} 0%, ${alpha2("#F5F9FF", 0.72)} 100%)`,
608
447
  border: glassBorder(theme),
609
448
  backdropFilter: "blur(18px) saturate(155%)",
610
449
  WebkitBackdropFilter: "blur(18px) saturate(155%)",
@@ -612,7 +451,7 @@ var glassSurface = (theme) => ({
612
451
  });
613
452
 
614
453
  // src/InputFileUpload.tsx
615
- import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
454
+ import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
616
455
  var VisuallyHiddenInput = styled2("input")({
617
456
  clip: "rect(0 0 0 0)",
618
457
  clipPath: "inset(50%)",
@@ -624,7 +463,7 @@ var VisuallyHiddenInput = styled2("input")({
624
463
  whiteSpace: "nowrap",
625
464
  width: 1
626
465
  });
627
- var InputFileUpload = ({ name = "", onChange = () => null, title = "" }) => /* @__PURE__ */ jsxs4(
466
+ var InputFileUpload = ({ name = "", onChange = () => null, title = "" }) => /* @__PURE__ */ jsxs3(
628
467
  Button,
629
468
  {
630
469
  role: void 0,
@@ -632,7 +471,7 @@ var InputFileUpload = ({ name = "", onChange = () => null, title = "" }) => /* @
632
471
  size: "small",
633
472
  variant: "contained",
634
473
  tabIndex: -1,
635
- startIcon: /* @__PURE__ */ jsx6(CloudUpload, { fontSize: "inherit" }),
474
+ startIcon: /* @__PURE__ */ jsx5(CloudUpload, { fontSize: "inherit" }),
636
475
  sx: {
637
476
  ...(theme) => glassSurface(theme),
638
477
  textTransform: "none",
@@ -640,14 +479,14 @@ var InputFileUpload = ({ name = "", onChange = () => null, title = "" }) => /* @
640
479
  px: 2.25,
641
480
  py: 0.75,
642
481
  color: "text.primary",
643
- borderColor: (theme) => alpha4(theme.palette.primary.main, 0.24),
482
+ borderColor: (theme) => alpha3(theme.palette.primary.main, 0.24),
644
483
  "&:hover": {
645
- borderColor: (theme) => alpha4(theme.palette.primary.main, 0.42)
484
+ borderColor: (theme) => alpha3(theme.palette.primary.main, 0.42)
646
485
  }
647
486
  },
648
487
  children: [
649
488
  title,
650
- /* @__PURE__ */ jsx6(VisuallyHiddenInput, { type: "file", name, onChange })
489
+ /* @__PURE__ */ jsx5(VisuallyHiddenInput, { type: "file", name, onChange })
651
490
  ]
652
491
  }
653
492
  );
@@ -655,10 +494,10 @@ var InputFileUpload_default = InputFileUpload;
655
494
 
656
495
  // src/ImageUploadAvatar.tsx
657
496
  import { useEffect, useRef, useState } from "react";
658
- import { Box as Box3, IconButton as IconButton3 } from "@mui/material";
659
- import { alpha as alpha5, styled as styled3 } from "@mui/material/styles";
497
+ import { Box as Box3, IconButton as IconButton2 } from "@mui/material";
498
+ import { alpha as alpha4, styled as styled3 } from "@mui/material/styles";
660
499
  import { CloudUpload as CloudUpload2, Close as CloseIcon } from "@mui/icons-material";
661
- import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
500
+ import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
662
501
  var HiddenInput = styled3("input")({
663
502
  position: "absolute",
664
503
  width: 1,
@@ -677,7 +516,7 @@ var Wrapper = styled3(Box3, {
677
516
  height: size,
678
517
  borderRadius: variant === "circular" ? "50%" : variant === "rounded" ? theme.shape.borderRadius * 2 : 0,
679
518
  ...glassSurface(theme),
680
- border: `1px dashed ${alpha5(theme.palette.primary.main, 0.28)}`,
519
+ border: `1px dashed ${alpha4(theme.palette.primary.main, 0.28)}`,
681
520
  overflow: "hidden",
682
521
  cursor: "pointer",
683
522
  display: "flex",
@@ -712,14 +551,14 @@ var Overlay = styled3(Box3)(({ theme }) => ({
712
551
  "& .uploadIcon": { opacity: 1, transform: "scale(1)" }
713
552
  }
714
553
  }));
715
- var ClearButton = styled3(IconButton3)(({ theme }) => ({
554
+ var ClearButton = styled3(IconButton2)(({ theme }) => ({
716
555
  position: "absolute",
717
556
  top: -8,
718
557
  right: -8,
719
558
  ...glassSurface(theme),
720
559
  boxShadow: theme.shadows[2],
721
560
  "&:hover": {
722
- background: alpha5(theme.palette.background.paper, 0.9)
561
+ background: alpha4(theme.palette.background.paper, 0.9)
723
562
  }
724
563
  }));
725
564
  var ImageUploadAvatar = ({
@@ -776,7 +615,7 @@ var ImageUploadAvatar = ({
776
615
  setInternalSrc(null);
777
616
  onChange == null ? void 0 : onChange(null, null);
778
617
  };
779
- return /* @__PURE__ */ jsxs5(
618
+ return /* @__PURE__ */ jsxs4(
780
619
  Wrapper,
781
620
  {
782
621
  role: "button",
@@ -786,10 +625,10 @@ var ImageUploadAvatar = ({
786
625
  onPointerLeave: () => setHover(false),
787
626
  onClick: triggerPick,
788
627
  children: [
789
- internalSrc && /* @__PURE__ */ jsx7(PreviewImg, { src: internalSrc }),
790
- /* @__PURE__ */ jsx7(Overlay, { className: `${!internalSrc ? "empty" : ""} ${hover && !disabled ? "hover" : ""}`, children: /* @__PURE__ */ jsx7(CloudUpload2, { className: "uploadIcon", fontSize: "large" }) }),
791
- allowClear && internalSrc && !disabled && /* @__PURE__ */ jsx7(ClearButton, { size: "small", "aria-label": "Clear image", onClick: handleClear, sx: { m: 1 }, children: /* @__PURE__ */ jsx7(CloseIcon, { fontSize: "inherit" }) }),
792
- /* @__PURE__ */ jsx7(HiddenInput, { ref: inputRef, type: "file", name, accept, onChange: handlePick, disabled })
628
+ internalSrc && /* @__PURE__ */ jsx6(PreviewImg, { src: internalSrc }),
629
+ /* @__PURE__ */ jsx6(Overlay, { className: `${!internalSrc ? "empty" : ""} ${hover && !disabled ? "hover" : ""}`, children: /* @__PURE__ */ jsx6(CloudUpload2, { className: "uploadIcon", fontSize: "large" }) }),
630
+ allowClear && internalSrc && !disabled && /* @__PURE__ */ jsx6(ClearButton, { size: "small", "aria-label": "Clear image", onClick: handleClear, sx: { m: 1 }, children: /* @__PURE__ */ jsx6(CloseIcon, { fontSize: "inherit" }) }),
631
+ /* @__PURE__ */ jsx6(HiddenInput, { ref: inputRef, type: "file", name, accept, onChange: handlePick, disabled })
793
632
  ]
794
633
  }
795
634
  );
@@ -801,12 +640,12 @@ import { useEffect as useEffect2, useRef as useRef2, useState as useState2 } fro
801
640
  import {
802
641
  Alert,
803
642
  Grow,
804
- IconButton as IconButton4
643
+ IconButton as IconButton3
805
644
  } from "@mui/material";
806
- import { alpha as alpha6, useTheme as useTheme4 } from "@mui/material/styles";
645
+ import { alpha as alpha5, useTheme as useTheme4 } from "@mui/material/styles";
807
646
  import CloseIcon2 from "@mui/icons-material/Close";
808
647
  import { constants } from "@verma-consulting/common-library";
809
- import { jsx as jsx8 } from "react/jsx-runtime";
648
+ import { jsx as jsx7 } from "react/jsx-runtime";
810
649
  var _a;
811
650
  var SNACKBAR_TYPES = (_a = constants) == null ? void 0 : _a.SNACKBAR_TYPES;
812
651
  var DULL_SNACKBAR_COLORS = {
@@ -879,12 +718,12 @@ var FormSnackBar = ({
879
718
  const typeStyles = (severity2) => {
880
719
  const baseHex = severity2 === "success" ? DULL_SNACKBAR_COLORS.success : severity2 === "error" ? DULL_SNACKBAR_COLORS.error : severity2 === "warning" ? DULL_SNACKBAR_COLORS.warning : DULL_SNACKBAR_COLORS.info;
881
720
  return {
882
- bg: theme.palette.mode === "dark" ? alpha6(baseHex, 0.34) : alpha6(baseHex, 0.24),
721
+ bg: theme.palette.mode === "dark" ? alpha5(baseHex, 0.34) : alpha5(baseHex, 0.24),
883
722
  text: theme.palette.mode === "dark" ? "rgba(255,255,255,0.94)" : baseHex,
884
723
  icon: baseHex
885
724
  };
886
725
  };
887
- return /* @__PURE__ */ jsx8(
726
+ return /* @__PURE__ */ jsx7(
888
727
  "div",
889
728
  {
890
729
  "aria-live": "polite",
@@ -903,7 +742,7 @@ var FormSnackBar = ({
903
742
  children: queue.map((item) => {
904
743
  const localSeverity = isSnackbarType(item.type) ? item.type : "info";
905
744
  const colors = typeStyles(localSeverity);
906
- return /* @__PURE__ */ jsx8(Grow, { in: true, timeout: 280, children: /* @__PURE__ */ jsx8(
745
+ return /* @__PURE__ */ jsx7(Grow, { in: true, timeout: 280, children: /* @__PURE__ */ jsx7(
907
746
  Alert,
908
747
  {
909
748
  variant: "filled",
@@ -920,7 +759,7 @@ var FormSnackBar = ({
920
759
  color: colors.text,
921
760
  backdropFilter: "blur(14px) saturate(150%)",
922
761
  WebkitBackdropFilter: "blur(14px) saturate(150%)",
923
- border: `1px solid ${alpha6("#FFFFFF", theme.palette.mode === "dark" ? 0.16 : 0.55)}`,
762
+ border: `1px solid ${alpha5("#FFFFFF", theme.palette.mode === "dark" ? 0.16 : 0.55)}`,
924
763
  "& .MuiAlert-icon": {
925
764
  color: colors.icon
926
765
  },
@@ -931,14 +770,14 @@ var FormSnackBar = ({
931
770
  letterSpacing: "-0.01em"
932
771
  }
933
772
  },
934
- action: /* @__PURE__ */ jsx8(
935
- IconButton4,
773
+ action: /* @__PURE__ */ jsx7(
774
+ IconButton3,
936
775
  {
937
776
  "aria-label": "close",
938
777
  color: "inherit",
939
778
  size: "small",
940
779
  onClick: () => handleDismiss(item.id),
941
- children: /* @__PURE__ */ jsx8(CloseIcon2, { fontSize: "small" })
780
+ children: /* @__PURE__ */ jsx7(CloseIcon2, { fontSize: "small" })
942
781
  }
943
782
  ),
944
783
  children: item.message
@@ -952,10 +791,10 @@ var FormSnackBar_default = FormSnackBar;
952
791
 
953
792
  // src/Loader.tsx
954
793
  import { CircularProgress, Backdrop } from "@mui/material";
955
- import { makeStyles as makeStyles2 } from "@mui/styles";
956
- import { alpha as alpha7 } from "@mui/material/styles";
957
- import { jsx as jsx9 } from "react/jsx-runtime";
958
- var useStyles2 = makeStyles2({
794
+ import { makeStyles } from "@mui/styles";
795
+ import { alpha as alpha6 } from "@mui/material/styles";
796
+ import { jsx as jsx8 } from "react/jsx-runtime";
797
+ var useStyles = makeStyles({
959
798
  "@keyframes pulse": {
960
799
  "0%": { transform: "scale(1)", opacity: 0.9 },
961
800
  "50%": { transform: "scale(1.05)", opacity: 1 },
@@ -966,8 +805,8 @@ var useStyles2 = makeStyles2({
966
805
  }
967
806
  });
968
807
  var Loader = ({ size = 48, color = "primary" }) => {
969
- const classes = useStyles2();
970
- return /* @__PURE__ */ jsx9(
808
+ const classes = useStyles();
809
+ return /* @__PURE__ */ jsx8(
971
810
  Backdrop,
972
811
  {
973
812
  open: true,
@@ -976,7 +815,7 @@ var Loader = ({ size = 48, color = "primary" }) => {
976
815
  backgroundColor: "transparent",
977
816
  backdropFilter: "blur(10px) saturate(145%)"
978
817
  },
979
- children: /* @__PURE__ */ jsx9(
818
+ children: /* @__PURE__ */ jsx8(
980
819
  CircularProgress,
981
820
  {
982
821
  size,
@@ -987,7 +826,7 @@ var Loader = ({ size = 48, color = "primary" }) => {
987
826
  p: 1,
988
827
  borderRadius: "50%",
989
828
  backgroundColor: "transparent",
990
- border: (theme) => `1px solid ${alpha7("#FFFFFF", theme.palette.mode === "dark" ? 0.14 : 0.56)}`,
829
+ border: (theme) => `1px solid ${alpha6("#FFFFFF", theme.palette.mode === "dark" ? 0.14 : 0.56)}`,
991
830
  boxShadow: (theme) => theme.palette.mode === "dark" ? "0 10px 24px rgba(0,0,0,0.32)" : "0 10px 20px rgba(15,23,42,0.14)"
992
831
  }
993
832
  }
@@ -999,7 +838,7 @@ var Loader_default = Loader;
999
838
 
1000
839
  // src/SkeletonBar.tsx
1001
840
  import { Box as Box4, useTheme as useTheme5 } from "@mui/material";
1002
- import { jsx as jsx10 } from "react/jsx-runtime";
841
+ import { jsx as jsx9 } from "react/jsx-runtime";
1003
842
  var SHIMMER_KEYFRAMES = {
1004
843
  "@keyframes skeletonShimmer": {
1005
844
  "0%": { backgroundPosition: "200% 0" },
@@ -1015,7 +854,7 @@ var SkeletonBar = ({
1015
854
  const theme = useTheme5();
1016
855
  const base = theme.palette.mode === "dark" ? (_b = (_a2 = theme.palette.grey) == null ? void 0 : _a2[700]) != null ? _b : "#424242" : (_d = (_c = theme.palette.grey) == null ? void 0 : _c[200]) != null ? _d : "#e0e0e0";
1017
856
  const highlight = theme.palette.mode === "dark" ? (_f = (_e = theme.palette.grey) == null ? void 0 : _e[600]) != null ? _f : "#616161" : (_h = (_g = theme.palette.grey) == null ? void 0 : _g[100]) != null ? _h : "#f5f5f5";
1018
- return /* @__PURE__ */ jsx10(
857
+ return /* @__PURE__ */ jsx9(
1019
858
  Box4,
1020
859
  {
1021
860
  sx: {
@@ -1036,16 +875,16 @@ var SkeletonBar = ({
1036
875
  var SkeletonBar_default = SkeletonBar;
1037
876
 
1038
877
  // src/EmptyState.tsx
1039
- import React6 from "react";
1040
- import { Box as Box5, Typography as Typography3, useTheme as useTheme6 } from "@mui/material";
878
+ import React5 from "react";
879
+ import { Box as Box5, Typography as Typography2, useTheme as useTheme6 } from "@mui/material";
1041
880
  import { DatasetOutlined } from "@mui/icons-material";
1042
- import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
881
+ import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
1043
882
  var EmptyState = ({ label, m = 8, icon }) => {
1044
883
  const theme = useTheme6();
1045
884
  const text = label != null ? label : "No data created yet";
1046
885
  const iconColor = theme.palette.mode === "dark" ? "rgba(255,255,255,0.42)" : "rgba(0,0,0,0.42)";
1047
886
  const labelColor = theme.palette.mode === "dark" ? "rgba(255,255,255,0.50)" : "rgba(0,0,0,0.38)";
1048
- const iconEl = icon != null && React6.isValidElement(icon) ? icon : /* @__PURE__ */ jsx11(
887
+ const iconEl = icon != null && React5.isValidElement(icon) ? icon : /* @__PURE__ */ jsx10(
1049
888
  DatasetOutlined,
1050
889
  {
1051
890
  sx: {
@@ -1055,7 +894,7 @@ var EmptyState = ({ label, m = 8, icon }) => {
1055
894
  }
1056
895
  }
1057
896
  );
1058
- return /* @__PURE__ */ jsxs6(
897
+ return /* @__PURE__ */ jsxs5(
1059
898
  Box5,
1060
899
  {
1061
900
  sx: {
@@ -1071,8 +910,8 @@ var EmptyState = ({ label, m = 8, icon }) => {
1071
910
  },
1072
911
  children: [
1073
912
  iconEl,
1074
- /* @__PURE__ */ jsx11(
1075
- Typography3,
913
+ /* @__PURE__ */ jsx10(
914
+ Typography2,
1076
915
  {
1077
916
  variant: "body2",
1078
917
  align: "center",
@@ -1094,9 +933,9 @@ var EmptyState = ({ label, m = 8, icon }) => {
1094
933
  var EmptyState_default = EmptyState;
1095
934
 
1096
935
  // src/Pill.tsx
1097
- import { Button as Button2, Typography as Typography4, Icon } from "@mui/material";
1098
- import { alpha as alpha8, useTheme as useTheme7 } from "@mui/material/styles";
1099
- import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
936
+ import { Button as Button2, Typography as Typography3, Icon } from "@mui/material";
937
+ import { alpha as alpha7, useTheme as useTheme7 } from "@mui/material/styles";
938
+ import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
1100
939
  var Pill = ({
1101
940
  variant = "filter",
1102
941
  leftIcon = null,
@@ -1108,7 +947,7 @@ var Pill = ({
1108
947
  disabled = false
1109
948
  }) => {
1110
949
  const theme = useTheme7();
1111
- return /* @__PURE__ */ jsx12(
950
+ return /* @__PURE__ */ jsx11(
1112
951
  Button2,
1113
952
  {
1114
953
  variant: isSelected ? "contained" : "outlined",
@@ -1119,17 +958,17 @@ var Pill = ({
1119
958
  padding: "8px 16px",
1120
959
  minHeight: 38,
1121
960
  textTransform: "none",
1122
- borderColor: isSelected ? alpha8(theme.palette.primary.main, 0.34) : alpha8(theme.palette.text.primary, 0.18),
961
+ borderColor: isSelected ? alpha7(theme.palette.primary.main, 0.34) : alpha7(theme.palette.text.primary, 0.18),
1123
962
  color: isSelected ? "primary.main" : "text.primary",
1124
963
  "&:hover": {
1125
- borderColor: alpha8(theme.palette.primary.main, 0.42),
964
+ borderColor: alpha7(theme.palette.primary.main, 0.42),
1126
965
  boxShadow: theme.palette.mode === "dark" ? "0 10px 22px rgba(0,0,0,0.34)" : "0 10px 20px rgba(15,23,42,0.14)"
1127
966
  }
1128
967
  },
1129
968
  onClick,
1130
969
  disabled,
1131
- children: /* @__PURE__ */ jsxs7("div", { style: { display: "flex", alignItems: "center" }, children: [
1132
- leftIcon && /* @__PURE__ */ jsx12(
970
+ children: /* @__PURE__ */ jsxs6("div", { style: { display: "flex", alignItems: "center" }, children: [
971
+ leftIcon && /* @__PURE__ */ jsx11(
1133
972
  Icon,
1134
973
  {
1135
974
  className: leftIcon,
@@ -1139,8 +978,8 @@ var Pill = ({
1139
978
  "data-testid": "pill-left-icon"
1140
979
  }
1141
980
  ),
1142
- /* @__PURE__ */ jsx12(Typography4, { variant: "subtitle2", color: "inherit", fontWeight: 700, children: label }),
1143
- rightIcon && /* @__PURE__ */ jsx12(
981
+ /* @__PURE__ */ jsx11(Typography3, { variant: "subtitle2", color: "inherit", fontWeight: 700, children: label }),
982
+ rightIcon && /* @__PURE__ */ jsx11(
1144
983
  Icon,
1145
984
  {
1146
985
  className: rightIcon,
@@ -1157,10 +996,10 @@ var Pill = ({
1157
996
  var Pill_default = Pill;
1158
997
 
1159
998
  // src/IOSSwitch.tsx
1160
- import { alpha as alpha9, styled as styled4 } from "@mui/material/styles";
999
+ import { alpha as alpha8, styled as styled4 } from "@mui/material/styles";
1161
1000
  import Switch from "@mui/material/Switch";
1162
- import { jsx as jsx13 } from "react/jsx-runtime";
1163
- var IOSSwitch = styled4((props) => /* @__PURE__ */ jsx13(Switch, { focusVisibleClassName: ".Mui-focusVisible", disableRipple: true, ...props }))(({ theme }) => ({
1001
+ import { jsx as jsx12 } from "react/jsx-runtime";
1002
+ var IOSSwitch = styled4((props) => /* @__PURE__ */ jsx12(Switch, { focusVisibleClassName: ".Mui-focusVisible", disableRipple: true, ...props }))(({ theme }) => ({
1164
1003
  width: 46,
1165
1004
  height: 30,
1166
1005
  padding: 0,
@@ -1172,7 +1011,7 @@ var IOSSwitch = styled4((props) => /* @__PURE__ */ jsx13(Switch, { focusVisibleC
1172
1011
  transform: "translateX(16px)",
1173
1012
  color: "#fff",
1174
1013
  "& + .MuiSwitch-track": {
1175
- background: `linear-gradient(120deg, ${alpha9(theme.palette.primary.light, 0.92)} 0%, ${alpha9(theme.palette.primary.main, 0.94)} 100%)`,
1014
+ background: `linear-gradient(120deg, ${alpha8(theme.palette.primary.light, 0.92)} 0%, ${alpha8(theme.palette.primary.main, 0.94)} 100%)`,
1176
1015
  opacity: 1,
1177
1016
  border: 0
1178
1017
  },
@@ -1200,7 +1039,7 @@ var IOSSwitch = styled4((props) => /* @__PURE__ */ jsx13(Switch, { focusVisibleC
1200
1039
  "& .MuiSwitch-track": {
1201
1040
  borderRadius: 30 / 2,
1202
1041
  background: theme.palette.mode === "light" ? "linear-gradient(120deg, rgba(245,248,255,0.92) 0%, rgba(224,232,245,0.92) 100%)" : "linear-gradient(120deg, rgba(55,65,81,0.74) 0%, rgba(31,41,55,0.8) 100%)",
1203
- border: `1px solid ${alpha9("#FFFFFF", theme.palette.mode === "dark" ? 0.16 : 0.56)}`,
1042
+ border: `1px solid ${alpha8("#FFFFFF", theme.palette.mode === "dark" ? 0.16 : 0.56)}`,
1204
1043
  backdropFilter: "blur(10px) saturate(145%)",
1205
1044
  WebkitBackdropFilter: "blur(10px) saturate(145%)",
1206
1045
  opacity: 1,
@@ -1213,29 +1052,42 @@ var IOSSwitch_default = IOSSwitch;
1213
1052
 
1214
1053
  // src/StatusPill.tsx
1215
1054
  import { Chip } from "@mui/material";
1216
- import { alpha as alpha10, useTheme as useTheme8 } from "@mui/material/styles";
1055
+ import { alpha as alpha9, useTheme as useTheme8 } from "@mui/material/styles";
1217
1056
  import { userStatus } from "@verma-consulting/common-library";
1218
- import { jsx as jsx14 } from "react/jsx-runtime";
1057
+ import { jsx as jsx13 } from "react/jsx-runtime";
1219
1058
  var statusColorMap = {
1220
- [userStatus.Pending]: "warning",
1221
- [userStatus.Active]: "success",
1222
- [userStatus.Inactive]: "error",
1223
- [userStatus.Invited]: "info"
1059
+ [userStatus.Pending]: "#B06A00",
1060
+ [userStatus.Active]: "#087443",
1061
+ [userStatus.Inactive]: "#B42318",
1062
+ [userStatus.Invited]: "#175CD3"
1224
1063
  };
1225
1064
  var StatusPill = ({ status }) => {
1065
+ var _a2, _b, _c;
1226
1066
  const theme = useTheme8();
1227
- return /* @__PURE__ */ jsx14(
1067
+ return /* @__PURE__ */ jsx13(
1228
1068
  Chip,
1229
1069
  {
1230
1070
  label: status,
1231
- color: statusColorMap[status],
1232
- variant: "filled",
1071
+ variant: "outlined",
1233
1072
  sx: {
1234
1073
  ...glassSurface(theme),
1074
+ minHeight: 38,
1235
1075
  fontWeight: 700,
1236
1076
  borderRadius: "999px",
1237
- px: 1,
1238
- borderColor: alpha10(theme.palette.text.primary, 0.14)
1077
+ px: 1.25,
1078
+ letterSpacing: "0.01em",
1079
+ color: (_a2 = statusColorMap[status]) != null ? _a2 : theme.palette.text.primary,
1080
+ backgroundColor: alpha9(
1081
+ (_b = statusColorMap[status]) != null ? _b : theme.palette.text.primary,
1082
+ theme.palette.mode === "dark" ? 0.24 : 0.12
1083
+ ),
1084
+ borderColor: alpha9(
1085
+ (_c = statusColorMap[status]) != null ? _c : theme.palette.text.primary,
1086
+ theme.palette.mode === "dark" ? 0.36 : 0.28
1087
+ ),
1088
+ "& .MuiChip-label": {
1089
+ px: 1.25
1090
+ }
1239
1091
  }
1240
1092
  }
1241
1093
  );
@@ -1244,9 +1096,9 @@ var StatusPill_default = StatusPill;
1244
1096
 
1245
1097
  // src/FormPopover.tsx
1246
1098
  import { useState as useState3 } from "react";
1247
- import { Tooltip as Tooltip2, IconButton as IconButton5, Popover } from "@mui/material";
1099
+ import { Tooltip as Tooltip2, IconButton as IconButton4, Popover } from "@mui/material";
1248
1100
  import { MoreHoriz } from "@mui/icons-material";
1249
- import { Fragment, jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
1101
+ import { Fragment, jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
1250
1102
  var FormPopover = ({ row, children, title }) => {
1251
1103
  const [anchorEl, setAnchorEl] = useState3(null);
1252
1104
  const handleClick = (event) => {
@@ -1256,9 +1108,9 @@ var FormPopover = ({ row, children, title }) => {
1256
1108
  setAnchorEl(null);
1257
1109
  };
1258
1110
  const open = Boolean(anchorEl);
1259
- return /* @__PURE__ */ jsxs8(Fragment, { children: [
1260
- /* @__PURE__ */ jsx15(Tooltip2, { title, children: /* @__PURE__ */ jsx15(
1261
- IconButton5,
1111
+ return /* @__PURE__ */ jsxs7(Fragment, { children: [
1112
+ /* @__PURE__ */ jsx14(Tooltip2, { title, children: /* @__PURE__ */ jsx14(
1113
+ IconButton4,
1262
1114
  {
1263
1115
  onClick: handleClick,
1264
1116
  size: "small",
@@ -1272,10 +1124,10 @@ var FormPopover = ({ row, children, title }) => {
1272
1124
  backgroundColor: "#f0f0f0"
1273
1125
  }
1274
1126
  },
1275
- children: /* @__PURE__ */ jsx15(MoreHoriz, { fontSize: "inherit", color: "primary" })
1127
+ children: /* @__PURE__ */ jsx14(MoreHoriz, { fontSize: "inherit", color: "primary" })
1276
1128
  }
1277
1129
  ) }),
1278
- /* @__PURE__ */ jsx15(
1130
+ /* @__PURE__ */ jsx14(
1279
1131
  Popover,
1280
1132
  {
1281
1133
  open,
@@ -1293,26 +1145,26 @@ var FormPopover = ({ row, children, title }) => {
1293
1145
  var FormPopover_default = FormPopover;
1294
1146
 
1295
1147
  // src/SearchableSelect.tsx
1296
- import React8, { useEffect as useEffect3, useRef as useRef3, useState as useState4, useMemo } from "react";
1148
+ import React7, { useEffect as useEffect3, useRef as useRef3, useState as useState4, useMemo } from "react";
1297
1149
  import {
1298
1150
  Autocomplete,
1299
1151
  TextField,
1300
- Typography as Typography5,
1301
- FormLabel as FormLabel2,
1302
- FormControl as FormControl2,
1303
- IconButton as IconButton6
1152
+ Typography as Typography4,
1153
+ FormLabel,
1154
+ FormControl,
1155
+ IconButton as IconButton5
1304
1156
  } from "@mui/material";
1305
- import { alpha as alpha11, useTheme as useTheme9 } from "@mui/material/styles";
1306
- import { Clear as Clear2 } from "@mui/icons-material";
1307
- import { makeStyles as makeStyles3 } from "@mui/styles";
1308
- import { Fragment as Fragment2, jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
1309
- var useStyles3 = makeStyles3((theme) => ({
1157
+ import { alpha as alpha10, useTheme as useTheme9 } from "@mui/material/styles";
1158
+ import { Clear } from "@mui/icons-material";
1159
+ import { makeStyles as makeStyles2 } from "@mui/styles";
1160
+ import { Fragment as Fragment2, jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
1161
+ var useStyles2 = makeStyles2((theme) => ({
1310
1162
  defaultMode: {
1311
1163
  margin: "4px",
1312
1164
  padding: "14px 8px",
1313
1165
  cursor: "pointer",
1314
1166
  borderRadius: 14,
1315
- border: `1px solid ${alpha11("#FFFFFF", theme.palette.mode === "dark" ? 0.16 : 0.55)}`,
1167
+ border: `1px solid ${alpha10("#FFFFFF", theme.palette.mode === "dark" ? 0.16 : 0.55)}`,
1316
1168
  backdropFilter: "blur(14px) saturate(150%)",
1317
1169
  background: theme.palette.mode === "dark" ? "linear-gradient(160deg, rgba(31,41,55,0.78), rgba(17,24,39,0.68))" : "linear-gradient(160deg, rgba(255,255,255,0.9), rgba(245,249,255,0.72))",
1318
1170
  "&:hover": {
@@ -1328,7 +1180,7 @@ var useStyles3 = makeStyles3((theme) => ({
1328
1180
  whiteSpace: "pre-wrap"
1329
1181
  }
1330
1182
  }));
1331
- var SearchableSelect = React8.memo(
1183
+ var SearchableSelect = React7.memo(
1332
1184
  ({
1333
1185
  name,
1334
1186
  label,
@@ -1338,12 +1190,12 @@ var SearchableSelect = React8.memo(
1338
1190
  size = "small",
1339
1191
  style,
1340
1192
  disabled = false,
1341
- onClear,
1193
+ onClear = null,
1342
1194
  defaultEditMode = false,
1343
1195
  multiple = false
1344
1196
  }) => {
1345
1197
  const theme = useTheme9();
1346
- const classes = useStyles3();
1198
+ const classes = useStyles2();
1347
1199
  const wrapperRef = useRef3(null);
1348
1200
  const inputRef = useRef3(null);
1349
1201
  const [editMode, setEditMode] = useState4(defaultEditMode);
@@ -1372,8 +1224,6 @@ var SearchableSelect = React8.memo(
1372
1224
  event.stopPropagation();
1373
1225
  if (onClear) {
1374
1226
  onClear();
1375
- } else {
1376
- onChange("");
1377
1227
  }
1378
1228
  setEditMode(false);
1379
1229
  setOpen(false);
@@ -1398,7 +1248,8 @@ var SearchableSelect = React8.memo(
1398
1248
  }
1399
1249
  }, [selected, multiple]);
1400
1250
  const isValueEmpty = !value.trim();
1401
- return editMode ? /* @__PURE__ */ jsx16(FormControl2, { fullWidth: true, style, disabled, size, children: /* @__PURE__ */ jsx16(
1251
+ const showClear = onClear != null;
1252
+ return editMode ? /* @__PURE__ */ jsx15(FormControl, { fullWidth: true, style, disabled, size, children: /* @__PURE__ */ jsx15(
1402
1253
  Autocomplete,
1403
1254
  {
1404
1255
  multiple,
@@ -1459,17 +1310,17 @@ var SearchableSelect = React8.memo(
1459
1310
  sx: {
1460
1311
  background: glassBackground,
1461
1312
  backdropFilter: "blur(12px) saturate(150%)",
1462
- border: `1px solid ${alpha11("#FFFFFF", theme.palette.mode === "dark" ? 0.16 : 0.55)}`,
1313
+ border: `1px solid ${alpha10("#FFFFFF", theme.palette.mode === "dark" ? 0.16 : 0.55)}`,
1463
1314
  boxShadow: theme.palette.mode === "dark" ? "rgba(0, 0, 0, 0.34) 0px 10px 26px" : "rgba(15, 23, 42, 0.16) 0px 8px 24px",
1464
1315
  "& .MuiAutocomplete-option": {
1465
1316
  "&[aria-selected='true']": {
1466
- backgroundColor: alpha11(
1317
+ backgroundColor: alpha10(
1467
1318
  theme.palette.primary.main,
1468
1319
  theme.palette.mode === "dark" ? 0.28 : 0.14
1469
1320
  )
1470
1321
  },
1471
1322
  "&.Mui-focused": {
1472
- backgroundColor: alpha11(
1323
+ backgroundColor: alpha10(
1473
1324
  theme.palette.primary.main,
1474
1325
  theme.palette.mode === "dark" ? 0.2 : 0.1
1475
1326
  )
@@ -1478,7 +1329,7 @@ var SearchableSelect = React8.memo(
1478
1329
  }
1479
1330
  }
1480
1331
  },
1481
- renderInput: (params) => /* @__PURE__ */ jsx16(
1332
+ renderInput: (params) => /* @__PURE__ */ jsx15(
1482
1333
  TextField,
1483
1334
  {
1484
1335
  ...params,
@@ -1505,15 +1356,15 @@ var SearchableSelect = React8.memo(
1505
1356
  WebkitTextFillColor: "currentColor"
1506
1357
  },
1507
1358
  "& .MuiOutlinedInput-notchedOutline": {
1508
- borderColor: alpha11(
1359
+ borderColor: alpha10(
1509
1360
  "#FFFFFF",
1510
1361
  theme.palette.mode === "dark" ? 0.18 : 0.6
1511
1362
  )
1512
1363
  }
1513
1364
  },
1514
- endAdornment: /* @__PURE__ */ jsxs9(Fragment2, { children: [
1515
- !isValueEmpty && /* @__PURE__ */ jsx16(
1516
- IconButton6,
1365
+ endAdornment: /* @__PURE__ */ jsxs8(Fragment2, { children: [
1366
+ showClear && !isValueEmpty && /* @__PURE__ */ jsx15(
1367
+ IconButton5,
1517
1368
  {
1518
1369
  "aria-label": `clear ${name}`,
1519
1370
  onClick: handleClear,
@@ -1523,7 +1374,7 @@ var SearchableSelect = React8.memo(
1523
1374
  boxShadow: "none",
1524
1375
  mr: 0.25
1525
1376
  },
1526
- children: /* @__PURE__ */ jsx16(Clear2, { fontSize: "inherit" })
1377
+ children: /* @__PURE__ */ jsx15(Clear, { fontSize: "inherit" })
1527
1378
  }
1528
1379
  ),
1529
1380
  params.InputProps.endAdornment
@@ -1536,7 +1387,7 @@ var SearchableSelect = React8.memo(
1536
1387
  setOpen(false);
1537
1388
  }
1538
1389
  }
1539
- ) }) : /* @__PURE__ */ jsxs9(
1390
+ ) }) : /* @__PURE__ */ jsxs8(
1540
1391
  "div",
1541
1392
  {
1542
1393
  ref: wrapperRef,
@@ -1549,8 +1400,8 @@ var SearchableSelect = React8.memo(
1549
1400
  className: classes.defaultMode,
1550
1401
  style,
1551
1402
  children: [
1552
- /* @__PURE__ */ jsx16(FormLabel2, { className: classes.formLabel, sx: { color: "text.secondary" }, children: label }),
1553
- /* @__PURE__ */ jsx16(Typography5, { className: classes.formValue, sx: { color: "text.primary" }, children: displayValue })
1403
+ /* @__PURE__ */ jsx15(FormLabel, { className: classes.formLabel, sx: { color: "text.secondary" }, children: label }),
1404
+ /* @__PURE__ */ jsx15(Typography4, { className: classes.formValue, sx: { color: "text.primary" }, children: displayValue })
1554
1405
  ]
1555
1406
  }
1556
1407
  );
@@ -1561,16 +1412,16 @@ var SearchableSelect_default = SearchableSelect;
1561
1412
  // src/FormDrawer.tsx
1562
1413
  import {
1563
1414
  Drawer,
1564
- Typography as Typography6,
1415
+ Typography as Typography5,
1565
1416
  Box as Box6,
1566
- IconButton as IconButton7,
1417
+ IconButton as IconButton6,
1567
1418
  Grid as Grid2,
1568
1419
  useTheme as useTheme10,
1569
1420
  useMediaQuery as useMediaQuery3
1570
1421
  } from "@mui/material";
1571
- import { alpha as alpha12 } from "@mui/material/styles";
1422
+ import { alpha as alpha11 } from "@mui/material/styles";
1572
1423
  import { Close as Close2 } from "@mui/icons-material";
1573
- import { jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
1424
+ import { jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
1574
1425
  var FormDrawer = ({
1575
1426
  open,
1576
1427
  setOpen,
@@ -1580,7 +1431,7 @@ var FormDrawer = ({
1580
1431
  }) => {
1581
1432
  const theme = useTheme10();
1582
1433
  const mdMatches = useMediaQuery3(theme.breakpoints.down("md"));
1583
- return /* @__PURE__ */ jsxs10(
1434
+ return /* @__PURE__ */ jsxs9(
1584
1435
  Drawer,
1585
1436
  {
1586
1437
  anchor: mdMatches ? "bottom" : "right",
@@ -1596,15 +1447,15 @@ var FormDrawer = ({
1596
1447
  }
1597
1448
  },
1598
1449
  children: [
1599
- /* @__PURE__ */ jsx17(
1450
+ /* @__PURE__ */ jsx16(
1600
1451
  Box6,
1601
1452
  {
1602
1453
  p: 3,
1603
- borderBottom: `1px solid ${alpha12(theme.palette.divider, 0.36)}`,
1604
- children: /* @__PURE__ */ jsxs10(Grid2, { container: true, children: [
1605
- /* @__PURE__ */ jsx17(Grid2, { item: true, children: title && /* @__PURE__ */ jsx17(Typography6, { variant: "h6", fontWeight: "bold", children: title }) }),
1606
- /* @__PURE__ */ jsx17(Grid2, { item: true, children: /* @__PURE__ */ jsx17(
1607
- IconButton7,
1454
+ borderBottom: `1px solid ${alpha11(theme.palette.divider, 0.36)}`,
1455
+ children: /* @__PURE__ */ jsxs9(Grid2, { container: true, children: [
1456
+ /* @__PURE__ */ jsx16(Grid2, { item: true, children: title && /* @__PURE__ */ jsx16(Typography5, { variant: "h6", fontWeight: "bold", children: title }) }),
1457
+ /* @__PURE__ */ jsx16(Grid2, { item: true, children: /* @__PURE__ */ jsx16(
1458
+ IconButton6,
1608
1459
  {
1609
1460
  size: "medium",
1610
1461
  onClick: () => setOpen(false),
@@ -1613,25 +1464,25 @@ var FormDrawer = ({
1613
1464
  top: 8,
1614
1465
  right: 8,
1615
1466
  zIndex: 2,
1616
- backgroundColor: alpha12(theme.palette.background.paper, 0.46)
1467
+ backgroundColor: alpha11(theme.palette.background.paper, 0.46)
1617
1468
  },
1618
- children: /* @__PURE__ */ jsx17(Close2, { fontSize: "inherit" })
1469
+ children: /* @__PURE__ */ jsx16(Close2, { fontSize: "inherit" })
1619
1470
  }
1620
1471
  ) })
1621
1472
  ] })
1622
1473
  }
1623
1474
  ),
1624
- /* @__PURE__ */ jsx17(Box6, { flex: 1, overflow: "auto", p: 3, children }),
1625
- actions && /* @__PURE__ */ jsx17(
1475
+ /* @__PURE__ */ jsx16(Box6, { flex: 1, overflow: "auto", p: 3, children }),
1476
+ actions && /* @__PURE__ */ jsx16(
1626
1477
  Box6,
1627
1478
  {
1628
1479
  p: 2,
1629
- borderTop: `1px solid ${alpha12(theme.palette.divider, 0.36)}`,
1480
+ borderTop: `1px solid ${alpha11(theme.palette.divider, 0.36)}`,
1630
1481
  sx: {
1631
1482
  position: "sticky",
1632
1483
  bottom: 0,
1633
1484
  zIndex: 1,
1634
- backgroundColor: alpha12(theme.palette.background.paper, 0.38),
1485
+ backgroundColor: alpha11(theme.palette.background.paper, 0.38),
1635
1486
  backdropFilter: "blur(10px)"
1636
1487
  },
1637
1488
  children: actions
@@ -1658,9 +1509,9 @@ import {
1658
1509
  useTheme as useTheme11,
1659
1510
  useMediaQuery as useMediaQuery4
1660
1511
  } from "@mui/material";
1661
- import { alpha as alpha13 } from "@mui/material/styles";
1512
+ import { alpha as alpha12 } from "@mui/material/styles";
1662
1513
  import { constants as constants2 } from "@verma-consulting/common-library";
1663
- import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
1514
+ import { jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
1664
1515
  var PhoneNumberField = ({
1665
1516
  value = "",
1666
1517
  onChange,
@@ -1677,7 +1528,7 @@ var PhoneNumberField = ({
1677
1528
  const glassInputSx = {
1678
1529
  backdropFilter: "blur(10px) saturate(150%)",
1679
1530
  "& .MuiOutlinedInput-notchedOutline": {
1680
- borderColor: alpha13(
1531
+ borderColor: alpha12(
1681
1532
  "#FFFFFF",
1682
1533
  theme.palette.mode === "dark" ? 0.16 : 0.58
1683
1534
  )
@@ -1771,14 +1622,14 @@ var PhoneNumberField = ({
1771
1622
  onBlur == null ? void 0 : onBlur();
1772
1623
  }
1773
1624
  };
1774
- return /* @__PURE__ */ jsx18(
1625
+ return /* @__PURE__ */ jsx17(
1775
1626
  Box7,
1776
1627
  {
1777
1628
  ref: wrapperRef,
1778
1629
  onFocusCapture: () => setIsFocused(true),
1779
1630
  onBlurCapture: handleWrapperBlur,
1780
1631
  sx: { display: "flex", alignItems: "center", width: "100%" },
1781
- children: /* @__PURE__ */ jsxs11(
1632
+ children: /* @__PURE__ */ jsxs10(
1782
1633
  Stack,
1783
1634
  {
1784
1635
  direction: "row",
@@ -1786,7 +1637,7 @@ var PhoneNumberField = ({
1786
1637
  alignItems: "center",
1787
1638
  sx: { width: "100%" },
1788
1639
  children: [
1789
- /* @__PURE__ */ jsx18(
1640
+ /* @__PURE__ */ jsx17(
1790
1641
  TextField2,
1791
1642
  {
1792
1643
  select: true,
@@ -1814,7 +1665,7 @@ var PhoneNumberField = ({
1814
1665
  },
1815
1666
  onClose: () => setSelectOpen(false)
1816
1667
  },
1817
- children: countries.map((option) => /* @__PURE__ */ jsxs11(MenuItem, { value: option.code, children: [
1668
+ children: countries.map((option) => /* @__PURE__ */ jsxs10(MenuItem, { value: option.code, children: [
1818
1669
  option.code,
1819
1670
  " (+",
1820
1671
  option.phone,
@@ -1822,7 +1673,7 @@ var PhoneNumberField = ({
1822
1673
  ] }, option.code))
1823
1674
  }
1824
1675
  ),
1825
- /* @__PURE__ */ jsx18(
1676
+ /* @__PURE__ */ jsx17(
1826
1677
  TextField2,
1827
1678
  {
1828
1679
  label,
@@ -1855,7 +1706,6 @@ var PhoneNumberField = ({
1855
1706
  };
1856
1707
  var PhoneNumberField_default = PhoneNumberField;
1857
1708
  export {
1858
- ClearableSelect_default as ClearableSelect,
1859
1709
  EmptyState_default as EmptyState,
1860
1710
  FormDialog_default as FormDialog,
1861
1711
  FormDrawer_default as FormDrawer,
@@ -1875,7 +1725,7 @@ export {
1875
1725
  TablePagination_default as TablePagination,
1876
1726
  ThemeProvider,
1877
1727
  createTheme,
1878
- makeStyles4 as makeStyles,
1728
+ makeStyles3 as makeStyles,
1879
1729
  styled5 as styled,
1880
1730
  useTheme12 as useTheme
1881
1731
  };