@verma-consulting/design-library 0.1.35 → 0.1.36
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.js +234 -116
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +220 -102
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
Typography,
|
|
14
14
|
FormLabel
|
|
15
15
|
} from "@mui/material";
|
|
16
|
+
import { alpha } from "@mui/material/styles";
|
|
16
17
|
import { Clear } from "@mui/icons-material";
|
|
17
18
|
import { makeStyles } from "@mui/styles";
|
|
18
19
|
import { prettifyString } from "@verma-consulting/common-library";
|
|
@@ -21,12 +22,15 @@ var useStyles = makeStyles((theme) => ({
|
|
|
21
22
|
defaultMode: {
|
|
22
23
|
paddingTop: 14,
|
|
23
24
|
paddingBottom: 14,
|
|
24
|
-
paddingLeft:
|
|
25
|
-
paddingRight:
|
|
25
|
+
paddingLeft: 12,
|
|
26
|
+
paddingRight: 12,
|
|
26
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))",
|
|
27
32
|
"&:hover": {
|
|
28
|
-
|
|
29
|
-
boxShadow: "rgba(100, 100, 111, 0.2) 0px 7px 29px 0px"
|
|
33
|
+
boxShadow: "rgba(15, 23, 42, 0.16) 0px 8px 24px"
|
|
30
34
|
}
|
|
31
35
|
},
|
|
32
36
|
formLabel: {
|
|
@@ -123,7 +127,12 @@ var ClearableSelect = ({
|
|
|
123
127
|
label,
|
|
124
128
|
name,
|
|
125
129
|
sx: {
|
|
126
|
-
paddingRight: !isValueEmpty ? 2 : void 0
|
|
130
|
+
paddingRight: !isValueEmpty ? 2 : void 0,
|
|
131
|
+
borderRadius: 1.75,
|
|
132
|
+
backdropFilter: "blur(10px)",
|
|
133
|
+
"& .MuiOutlinedInput-notchedOutline": {
|
|
134
|
+
borderColor: alpha("#FFFFFF", 0.6)
|
|
135
|
+
}
|
|
127
136
|
}
|
|
128
137
|
}
|
|
129
138
|
),
|
|
@@ -175,6 +184,7 @@ var TabPanel_default = TabPanel;
|
|
|
175
184
|
import * as React2 from "react";
|
|
176
185
|
import MuiTablePagination from "@mui/material/TablePagination";
|
|
177
186
|
import tablePaginationClasses from "@mui/material/TablePagination/tablePaginationClasses";
|
|
187
|
+
import { alpha as alpha2 } from "@mui/material/styles";
|
|
178
188
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
179
189
|
function mergeSx(...parts) {
|
|
180
190
|
const flat = [];
|
|
@@ -221,6 +231,8 @@ var rootSx = {
|
|
|
221
231
|
boxSizing: "border-box",
|
|
222
232
|
verticalAlign: "middle",
|
|
223
233
|
bgcolor: "transparent",
|
|
234
|
+
backdropFilter: "blur(12px) saturate(150%)",
|
|
235
|
+
borderRadius: 2,
|
|
224
236
|
py: 0.75,
|
|
225
237
|
px: { xs: 1, sm: 1.5 },
|
|
226
238
|
[`& .${tablePaginationClasses.toolbar}`]: {
|
|
@@ -266,11 +278,13 @@ var rootSx = {
|
|
|
266
278
|
display: "flex",
|
|
267
279
|
alignItems: "center",
|
|
268
280
|
[`& .MuiIconButton-root`]: {
|
|
269
|
-
borderRadius:
|
|
281
|
+
borderRadius: 2,
|
|
270
282
|
color: "text.secondary",
|
|
271
283
|
padding: 0.5,
|
|
284
|
+
border: "1px solid",
|
|
285
|
+
borderColor: "divider",
|
|
272
286
|
"&:hover": {
|
|
273
|
-
bgcolor: "action.
|
|
287
|
+
bgcolor: "action.selected",
|
|
274
288
|
color: "text.primary"
|
|
275
289
|
},
|
|
276
290
|
"&.Mui-disabled": {
|
|
@@ -306,11 +320,19 @@ var TablePagination = React2.forwardRef(function TablePagination2(props, ref) {
|
|
|
306
320
|
...slotSelectRest,
|
|
307
321
|
sx: mergeSx(
|
|
308
322
|
(theme) => ({
|
|
309
|
-
borderRadius:
|
|
323
|
+
borderRadius: 2,
|
|
310
324
|
minWidth: 64,
|
|
311
325
|
fontSize: theme.typography.body2.fontSize,
|
|
326
|
+
backdropFilter: "blur(10px)",
|
|
327
|
+
backgroundColor: alpha2(
|
|
328
|
+
theme.palette.background.paper,
|
|
329
|
+
theme.palette.mode === "dark" ? 0.2 : 0.74
|
|
330
|
+
),
|
|
312
331
|
"& .MuiOutlinedInput-notchedOutline": {
|
|
313
|
-
borderColor:
|
|
332
|
+
borderColor: alpha2(
|
|
333
|
+
"#FFFFFF",
|
|
334
|
+
theme.palette.mode === "dark" ? 0.16 : 0.56
|
|
335
|
+
)
|
|
314
336
|
},
|
|
315
337
|
"&:hover .MuiOutlinedInput-notchedOutline": {
|
|
316
338
|
borderColor: "text.disabled"
|
|
@@ -351,12 +373,12 @@ var TablePagination_default = TablePagination;
|
|
|
351
373
|
|
|
352
374
|
// src/index.tsx
|
|
353
375
|
import {
|
|
354
|
-
useTheme as
|
|
376
|
+
useTheme as useTheme11,
|
|
355
377
|
styled as styled5,
|
|
356
378
|
createTheme,
|
|
357
379
|
ThemeProvider
|
|
358
380
|
} from "@mui/material/styles";
|
|
359
|
-
import { makeStyles as
|
|
381
|
+
import { makeStyles as makeStyles4 } from "@mui/styles";
|
|
360
382
|
|
|
361
383
|
// src/Logo.tsx
|
|
362
384
|
import { memo } from "react";
|
|
@@ -496,6 +518,9 @@ import { useTheme as useTheme3 } from "@mui/material/styles";
|
|
|
496
518
|
import { Close } from "@mui/icons-material";
|
|
497
519
|
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
498
520
|
var BootstrapDialog = styled(Dialog)(({ theme }) => ({
|
|
521
|
+
"& .MuiDialog-paper": {
|
|
522
|
+
borderRadius: "24px"
|
|
523
|
+
},
|
|
499
524
|
"& .MuiDialogContent-root": {
|
|
500
525
|
padding: theme.spacing(4)
|
|
501
526
|
},
|
|
@@ -568,9 +593,25 @@ var FormDialog = ({
|
|
|
568
593
|
var FormDialog_default = FormDialog;
|
|
569
594
|
|
|
570
595
|
// src/InputFileUpload.tsx
|
|
571
|
-
import { styled as styled2 } from "@mui/material/styles";
|
|
596
|
+
import { alpha as alpha4, styled as styled2 } from "@mui/material/styles";
|
|
572
597
|
import { Button } from "@mui/material";
|
|
573
598
|
import { CloudUpload } from "@mui/icons-material";
|
|
599
|
+
|
|
600
|
+
// src/glassStyles.ts
|
|
601
|
+
import { alpha as alpha3 } from "@mui/material/styles";
|
|
602
|
+
var glassBorder = (theme) => `1px solid ${alpha3(
|
|
603
|
+
"#FFFFFF",
|
|
604
|
+
theme.palette.mode === "dark" ? 0.16 : 0.62
|
|
605
|
+
)}`;
|
|
606
|
+
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%)`,
|
|
608
|
+
border: glassBorder(theme),
|
|
609
|
+
backdropFilter: "blur(18px) saturate(155%)",
|
|
610
|
+
WebkitBackdropFilter: "blur(18px) saturate(155%)",
|
|
611
|
+
boxShadow: theme.palette.mode === "dark" ? "0 16px 40px rgba(0,0,0,0.34)" : "0 14px 34px rgba(15, 23, 42, 0.12)"
|
|
612
|
+
});
|
|
613
|
+
|
|
614
|
+
// src/InputFileUpload.tsx
|
|
574
615
|
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
575
616
|
var VisuallyHiddenInput = styled2("input")({
|
|
576
617
|
clip: "rect(0 0 0 0)",
|
|
@@ -592,6 +633,18 @@ var InputFileUpload = ({ name = "", onChange = () => null, title = "" }) => /* @
|
|
|
592
633
|
variant: "contained",
|
|
593
634
|
tabIndex: -1,
|
|
594
635
|
startIcon: /* @__PURE__ */ jsx6(CloudUpload, { fontSize: "inherit" }),
|
|
636
|
+
sx: {
|
|
637
|
+
...(theme) => glassSurface(theme),
|
|
638
|
+
textTransform: "none",
|
|
639
|
+
borderRadius: 999,
|
|
640
|
+
px: 2.25,
|
|
641
|
+
py: 0.75,
|
|
642
|
+
color: "text.primary",
|
|
643
|
+
borderColor: (theme) => alpha4(theme.palette.primary.main, 0.24),
|
|
644
|
+
"&:hover": {
|
|
645
|
+
borderColor: (theme) => alpha4(theme.palette.primary.main, 0.42)
|
|
646
|
+
}
|
|
647
|
+
},
|
|
595
648
|
children: [
|
|
596
649
|
title,
|
|
597
650
|
/* @__PURE__ */ jsx6(VisuallyHiddenInput, { type: "file", name, onChange })
|
|
@@ -603,7 +656,7 @@ var InputFileUpload_default = InputFileUpload;
|
|
|
603
656
|
// src/ImageUploadAvatar.tsx
|
|
604
657
|
import { useEffect, useRef, useState } from "react";
|
|
605
658
|
import { Box as Box3, IconButton as IconButton3 } from "@mui/material";
|
|
606
|
-
import { styled as styled3 } from "@mui/material/styles";
|
|
659
|
+
import { alpha as alpha5, styled as styled3 } from "@mui/material/styles";
|
|
607
660
|
import { CloudUpload as CloudUpload2, Close as CloseIcon } from "@mui/icons-material";
|
|
608
661
|
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
609
662
|
var HiddenInput = styled3("input")({
|
|
@@ -623,8 +676,8 @@ var Wrapper = styled3(Box3, {
|
|
|
623
676
|
width: size,
|
|
624
677
|
height: size,
|
|
625
678
|
borderRadius: variant === "circular" ? "50%" : variant === "rounded" ? theme.shape.borderRadius * 2 : 0,
|
|
626
|
-
|
|
627
|
-
|
|
679
|
+
...glassSurface(theme),
|
|
680
|
+
border: `1px dashed ${alpha5(theme.palette.primary.main, 0.28)}`,
|
|
628
681
|
overflow: "hidden",
|
|
629
682
|
cursor: "pointer",
|
|
630
683
|
display: "flex",
|
|
@@ -663,9 +716,11 @@ var ClearButton = styled3(IconButton3)(({ theme }) => ({
|
|
|
663
716
|
position: "absolute",
|
|
664
717
|
top: -8,
|
|
665
718
|
right: -8,
|
|
666
|
-
|
|
719
|
+
...glassSurface(theme),
|
|
667
720
|
boxShadow: theme.shadows[2],
|
|
668
|
-
"&:hover": {
|
|
721
|
+
"&:hover": {
|
|
722
|
+
background: alpha5(theme.palette.background.paper, 0.9)
|
|
723
|
+
}
|
|
669
724
|
}));
|
|
670
725
|
var ImageUploadAvatar = ({
|
|
671
726
|
name = "image",
|
|
@@ -748,7 +803,7 @@ import {
|
|
|
748
803
|
Grow,
|
|
749
804
|
IconButton as IconButton4
|
|
750
805
|
} from "@mui/material";
|
|
751
|
-
import { alpha, useTheme as useTheme4 } from "@mui/material/styles";
|
|
806
|
+
import { alpha as alpha6, useTheme as useTheme4 } from "@mui/material/styles";
|
|
752
807
|
import CloseIcon2 from "@mui/icons-material/Close";
|
|
753
808
|
import { constants } from "@verma-consulting/common-library";
|
|
754
809
|
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
@@ -824,7 +879,7 @@ var FormSnackBar = ({
|
|
|
824
879
|
const typeStyles = (severity2) => {
|
|
825
880
|
const baseHex = severity2 === "success" ? DULL_SNACKBAR_COLORS.success : severity2 === "error" ? DULL_SNACKBAR_COLORS.error : severity2 === "warning" ? DULL_SNACKBAR_COLORS.warning : DULL_SNACKBAR_COLORS.info;
|
|
826
881
|
return {
|
|
827
|
-
bg: theme.palette.mode === "dark" ?
|
|
882
|
+
bg: theme.palette.mode === "dark" ? alpha6(baseHex, 0.34) : alpha6(baseHex, 0.24),
|
|
828
883
|
text: theme.palette.mode === "dark" ? "rgba(255,255,255,0.94)" : baseHex,
|
|
829
884
|
icon: baseHex
|
|
830
885
|
};
|
|
@@ -865,7 +920,7 @@ var FormSnackBar = ({
|
|
|
865
920
|
color: colors.text,
|
|
866
921
|
backdropFilter: "blur(14px) saturate(150%)",
|
|
867
922
|
WebkitBackdropFilter: "blur(14px) saturate(150%)",
|
|
868
|
-
border: `1px solid ${
|
|
923
|
+
border: `1px solid ${alpha6("#FFFFFF", theme.palette.mode === "dark" ? 0.16 : 0.55)}`,
|
|
869
924
|
"& .MuiAlert-icon": {
|
|
870
925
|
color: colors.icon
|
|
871
926
|
},
|
|
@@ -898,6 +953,7 @@ var FormSnackBar_default = FormSnackBar;
|
|
|
898
953
|
// src/Loader.tsx
|
|
899
954
|
import { CircularProgress, Backdrop } from "@mui/material";
|
|
900
955
|
import { makeStyles as makeStyles2 } from "@mui/styles";
|
|
956
|
+
import { alpha as alpha7 } from "@mui/material/styles";
|
|
901
957
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
902
958
|
var useStyles2 = makeStyles2({
|
|
903
959
|
"@keyframes pulse": {
|
|
@@ -917,10 +973,24 @@ var Loader = ({ size = 48, color = "primary" }) => {
|
|
|
917
973
|
open: true,
|
|
918
974
|
sx: {
|
|
919
975
|
zIndex: (theme) => theme.zIndex.modal + 1,
|
|
920
|
-
backgroundColor: "
|
|
921
|
-
backdropFilter: "blur(
|
|
976
|
+
backgroundColor: (theme) => theme.palette.mode === "dark" ? alpha7("#020617", 0.48) : alpha7("#E2E8F0", 0.34),
|
|
977
|
+
backdropFilter: "blur(10px) saturate(145%)"
|
|
922
978
|
},
|
|
923
|
-
children: /* @__PURE__ */ jsx9(
|
|
979
|
+
children: /* @__PURE__ */ jsx9(
|
|
980
|
+
CircularProgress,
|
|
981
|
+
{
|
|
982
|
+
size,
|
|
983
|
+
color,
|
|
984
|
+
thickness: 3.4,
|
|
985
|
+
className: classes.progress,
|
|
986
|
+
sx: {
|
|
987
|
+
p: 1,
|
|
988
|
+
borderRadius: "50%",
|
|
989
|
+
backgroundColor: (theme) => alpha7(theme.palette.background.paper, theme.palette.mode === "dark" ? 0.18 : 0.72),
|
|
990
|
+
border: (theme) => `1px solid ${alpha7("#FFFFFF", theme.palette.mode === "dark" ? 0.14 : 0.56)}`
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
)
|
|
924
994
|
}
|
|
925
995
|
);
|
|
926
996
|
};
|
|
@@ -1023,22 +1093,9 @@ var EmptyState = ({ label, m = 8, icon }) => {
|
|
|
1023
1093
|
var EmptyState_default = EmptyState;
|
|
1024
1094
|
|
|
1025
1095
|
// src/Pill.tsx
|
|
1026
|
-
import { Button as Button2, Typography as Typography4, Icon
|
|
1027
|
-
import {
|
|
1096
|
+
import { Button as Button2, Typography as Typography4, Icon } from "@mui/material";
|
|
1097
|
+
import { alpha as alpha8, useTheme as useTheme7 } from "@mui/material/styles";
|
|
1028
1098
|
import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1029
|
-
var useStyles3 = makeStyles3((theme) => ({
|
|
1030
|
-
button: {
|
|
1031
|
-
padding: "4px 8px 4px 8px",
|
|
1032
|
-
color: "black",
|
|
1033
|
-
borderColor: "black",
|
|
1034
|
-
borderStyle: "solid",
|
|
1035
|
-
border: "6px",
|
|
1036
|
-
borderRadius: "24px !important",
|
|
1037
|
-
"&:hover": {
|
|
1038
|
-
color: theme.palette.primary[500]
|
|
1039
|
-
}
|
|
1040
|
-
}
|
|
1041
|
-
}));
|
|
1042
1099
|
var Pill = ({
|
|
1043
1100
|
variant = "filter",
|
|
1044
1101
|
leftIcon = null,
|
|
@@ -1050,18 +1107,26 @@ var Pill = ({
|
|
|
1050
1107
|
disabled = false
|
|
1051
1108
|
}) => {
|
|
1052
1109
|
const theme = useTheme7();
|
|
1053
|
-
const classes = useStyles3();
|
|
1054
1110
|
return /* @__PURE__ */ jsx12(
|
|
1055
1111
|
Button2,
|
|
1056
1112
|
{
|
|
1057
1113
|
variant: isSelected ? "contained" : "outlined",
|
|
1058
1114
|
color: color || "primary",
|
|
1059
1115
|
sx: {
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1116
|
+
...glassSurface(theme),
|
|
1117
|
+
borderRadius: "999px",
|
|
1118
|
+
padding: "8px 16px",
|
|
1119
|
+
minHeight: 38,
|
|
1120
|
+
textTransform: "none",
|
|
1121
|
+
borderColor: isSelected ? alpha8(theme.palette.primary.main, 0.34) : alpha8(theme.palette.text.primary, 0.18),
|
|
1122
|
+
color: isSelected ? "primary.main" : "text.primary",
|
|
1123
|
+
"&:hover": {
|
|
1124
|
+
borderColor: alpha8(theme.palette.primary.main, 0.42),
|
|
1125
|
+
boxShadow: theme.palette.mode === "dark" ? "0 10px 22px rgba(0,0,0,0.34)" : "0 10px 20px rgba(15,23,42,0.14)"
|
|
1126
|
+
}
|
|
1063
1127
|
},
|
|
1064
1128
|
onClick,
|
|
1129
|
+
disabled,
|
|
1065
1130
|
children: /* @__PURE__ */ jsxs7("div", { style: { display: "flex", alignItems: "center" }, children: [
|
|
1066
1131
|
leftIcon && /* @__PURE__ */ jsx12(
|
|
1067
1132
|
Icon,
|
|
@@ -1073,7 +1138,7 @@ var Pill = ({
|
|
|
1073
1138
|
"data-testid": "pill-left-icon"
|
|
1074
1139
|
}
|
|
1075
1140
|
),
|
|
1076
|
-
/* @__PURE__ */ jsx12(Typography4, { variant: "
|
|
1141
|
+
/* @__PURE__ */ jsx12(Typography4, { variant: "subtitle2", color: "inherit", fontWeight: 700, children: label }),
|
|
1077
1142
|
rightIcon && /* @__PURE__ */ jsx12(
|
|
1078
1143
|
Icon,
|
|
1079
1144
|
{
|
|
@@ -1091,7 +1156,7 @@ var Pill = ({
|
|
|
1091
1156
|
var Pill_default = Pill;
|
|
1092
1157
|
|
|
1093
1158
|
// src/IOSSwitch.tsx
|
|
1094
|
-
import { styled as styled4 } from "@mui/material/styles";
|
|
1159
|
+
import { alpha as alpha9, styled as styled4 } from "@mui/material/styles";
|
|
1095
1160
|
import Switch from "@mui/material/Switch";
|
|
1096
1161
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
1097
1162
|
var IOSSwitch = styled4((props) => /* @__PURE__ */ jsx13(Switch, { focusVisibleClassName: ".Mui-focusVisible", disableRipple: true, ...props }))(({ theme }) => ({
|
|
@@ -1106,7 +1171,7 @@ var IOSSwitch = styled4((props) => /* @__PURE__ */ jsx13(Switch, { focusVisibleC
|
|
|
1106
1171
|
transform: "translateX(16px)",
|
|
1107
1172
|
color: "#fff",
|
|
1108
1173
|
"& + .MuiSwitch-track": {
|
|
1109
|
-
|
|
1174
|
+
background: `linear-gradient(120deg, ${alpha9(theme.palette.primary.light, 0.92)} 0%, ${alpha9(theme.palette.primary.main, 0.94)} 100%)`,
|
|
1110
1175
|
opacity: 1,
|
|
1111
1176
|
border: 0
|
|
1112
1177
|
},
|
|
@@ -1128,11 +1193,15 @@ var IOSSwitch = styled4((props) => /* @__PURE__ */ jsx13(Switch, { focusVisibleC
|
|
|
1128
1193
|
"& .MuiSwitch-thumb": {
|
|
1129
1194
|
boxSizing: "border-box",
|
|
1130
1195
|
width: 26,
|
|
1131
|
-
height: 26
|
|
1196
|
+
height: 26,
|
|
1197
|
+
boxShadow: theme.palette.mode === "dark" ? "0 2px 8px rgba(0,0,0,0.38)" : "0 2px 6px rgba(15,23,42,0.24)"
|
|
1132
1198
|
},
|
|
1133
1199
|
"& .MuiSwitch-track": {
|
|
1134
1200
|
borderRadius: 30 / 2,
|
|
1135
|
-
|
|
1201
|
+
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%)",
|
|
1202
|
+
border: `1px solid ${alpha9("#FFFFFF", theme.palette.mode === "dark" ? 0.16 : 0.56)}`,
|
|
1203
|
+
backdropFilter: "blur(10px) saturate(145%)",
|
|
1204
|
+
WebkitBackdropFilter: "blur(10px) saturate(145%)",
|
|
1136
1205
|
opacity: 1,
|
|
1137
1206
|
transition: theme.transitions.create(["background-color"], {
|
|
1138
1207
|
duration: 500
|
|
@@ -1143,6 +1212,7 @@ var IOSSwitch_default = IOSSwitch;
|
|
|
1143
1212
|
|
|
1144
1213
|
// src/StatusPill.tsx
|
|
1145
1214
|
import { Chip } from "@mui/material";
|
|
1215
|
+
import { alpha as alpha10, useTheme as useTheme8 } from "@mui/material/styles";
|
|
1146
1216
|
import { userStatus } from "@verma-consulting/common-library";
|
|
1147
1217
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
1148
1218
|
var statusColorMap = {
|
|
@@ -1151,15 +1221,24 @@ var statusColorMap = {
|
|
|
1151
1221
|
[userStatus.Inactive]: "error",
|
|
1152
1222
|
[userStatus.Invited]: "info"
|
|
1153
1223
|
};
|
|
1154
|
-
var StatusPill = ({ status }) =>
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1224
|
+
var StatusPill = ({ status }) => {
|
|
1225
|
+
const theme = useTheme8();
|
|
1226
|
+
return /* @__PURE__ */ jsx14(
|
|
1227
|
+
Chip,
|
|
1228
|
+
{
|
|
1229
|
+
label: status,
|
|
1230
|
+
color: statusColorMap[status],
|
|
1231
|
+
variant: "filled",
|
|
1232
|
+
sx: {
|
|
1233
|
+
...glassSurface(theme),
|
|
1234
|
+
fontWeight: 700,
|
|
1235
|
+
borderRadius: "999px",
|
|
1236
|
+
px: 1,
|
|
1237
|
+
borderColor: alpha10(theme.palette.text.primary, 0.14)
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
);
|
|
1241
|
+
};
|
|
1163
1242
|
var StatusPill_default = StatusPill;
|
|
1164
1243
|
|
|
1165
1244
|
// src/FormPopover.tsx
|
|
@@ -1222,16 +1301,20 @@ import {
|
|
|
1222
1301
|
FormControl as FormControl2,
|
|
1223
1302
|
IconButton as IconButton6
|
|
1224
1303
|
} from "@mui/material";
|
|
1304
|
+
import { alpha as alpha11 } from "@mui/material/styles";
|
|
1225
1305
|
import { Clear as Clear2 } from "@mui/icons-material";
|
|
1226
|
-
import { makeStyles as
|
|
1306
|
+
import { makeStyles as makeStyles3 } from "@mui/styles";
|
|
1227
1307
|
import { Fragment as Fragment2, jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1228
|
-
var
|
|
1308
|
+
var useStyles3 = makeStyles3(() => ({
|
|
1229
1309
|
defaultMode: {
|
|
1230
1310
|
padding: "14px 8px",
|
|
1231
1311
|
cursor: "pointer",
|
|
1312
|
+
borderRadius: 14,
|
|
1313
|
+
border: "1px solid rgba(255,255,255,0.55)",
|
|
1314
|
+
backdropFilter: "blur(14px) saturate(150%)",
|
|
1315
|
+
background: "linear-gradient(160deg, rgba(255,255,255,0.9), rgba(245,249,255,0.72))",
|
|
1232
1316
|
"&:hover": {
|
|
1233
|
-
|
|
1234
|
-
boxShadow: "rgba(100, 100, 111, 0.2) 0px 7px 29px 0px"
|
|
1317
|
+
boxShadow: "rgba(15, 23, 42, 0.16) 0px 8px 24px"
|
|
1235
1318
|
}
|
|
1236
1319
|
},
|
|
1237
1320
|
formLabel: {
|
|
@@ -1257,7 +1340,7 @@ var SearchableSelect = React8.memo(
|
|
|
1257
1340
|
defaultEditMode = false,
|
|
1258
1341
|
multiple = false
|
|
1259
1342
|
}) => {
|
|
1260
|
-
const classes =
|
|
1343
|
+
const classes = useStyles3();
|
|
1261
1344
|
const wrapperRef = useRef3(null);
|
|
1262
1345
|
const inputRef = useRef3(null);
|
|
1263
1346
|
const [editMode, setEditMode] = useState4(defaultEditMode);
|
|
@@ -1337,7 +1420,7 @@ var SearchableSelect = React8.memo(
|
|
|
1337
1420
|
setOpen(false);
|
|
1338
1421
|
}
|
|
1339
1422
|
},
|
|
1340
|
-
disableClearable:
|
|
1423
|
+
disableClearable: true,
|
|
1341
1424
|
autoHighlight: true,
|
|
1342
1425
|
getOptionLabel: (option) => option.label,
|
|
1343
1426
|
isOptionEqualToValue: (option, val) => option.value === val.value,
|
|
@@ -1351,19 +1434,31 @@ var SearchableSelect = React8.memo(
|
|
|
1351
1434
|
inputRef,
|
|
1352
1435
|
InputProps: {
|
|
1353
1436
|
...params.InputProps,
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
sx: {
|
|
1361
|
-
backgroundColor: "transparent",
|
|
1362
|
-
boxShadow: "none"
|
|
1363
|
-
},
|
|
1364
|
-
children: /* @__PURE__ */ jsx16(Clear2, { fontSize: "inherit" })
|
|
1437
|
+
sx: {
|
|
1438
|
+
borderRadius: 1.75,
|
|
1439
|
+
backdropFilter: "blur(10px)",
|
|
1440
|
+
pr: 1.5,
|
|
1441
|
+
"& .MuiOutlinedInput-notchedOutline": {
|
|
1442
|
+
borderColor: alpha11("#FFFFFF", 0.6)
|
|
1365
1443
|
}
|
|
1366
|
-
|
|
1444
|
+
},
|
|
1445
|
+
endAdornment: /* @__PURE__ */ jsxs9(Fragment2, { children: [
|
|
1446
|
+
!isValueEmpty && /* @__PURE__ */ jsx16(
|
|
1447
|
+
IconButton6,
|
|
1448
|
+
{
|
|
1449
|
+
"aria-label": `clear ${name}`,
|
|
1450
|
+
onClick: handleClear,
|
|
1451
|
+
size: "small",
|
|
1452
|
+
sx: {
|
|
1453
|
+
backgroundColor: "transparent",
|
|
1454
|
+
boxShadow: "none",
|
|
1455
|
+
mr: 0.25
|
|
1456
|
+
},
|
|
1457
|
+
children: /* @__PURE__ */ jsx16(Clear2, { fontSize: "inherit" })
|
|
1458
|
+
}
|
|
1459
|
+
),
|
|
1460
|
+
params.InputProps.endAdornment
|
|
1461
|
+
] })
|
|
1367
1462
|
}
|
|
1368
1463
|
}
|
|
1369
1464
|
),
|
|
@@ -1401,9 +1496,10 @@ import {
|
|
|
1401
1496
|
Box as Box6,
|
|
1402
1497
|
IconButton as IconButton7,
|
|
1403
1498
|
Grid as Grid2,
|
|
1404
|
-
useTheme as
|
|
1499
|
+
useTheme as useTheme9,
|
|
1405
1500
|
useMediaQuery as useMediaQuery3
|
|
1406
1501
|
} from "@mui/material";
|
|
1502
|
+
import { alpha as alpha12 } from "@mui/material/styles";
|
|
1407
1503
|
import { Close as Close2 } from "@mui/icons-material";
|
|
1408
1504
|
import { jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1409
1505
|
var FormDrawer = ({
|
|
@@ -1413,7 +1509,7 @@ var FormDrawer = ({
|
|
|
1413
1509
|
actions,
|
|
1414
1510
|
children
|
|
1415
1511
|
}) => {
|
|
1416
|
-
const theme =
|
|
1512
|
+
const theme = useTheme9();
|
|
1417
1513
|
const mdMatches = useMediaQuery3(theme.breakpoints.down("md"));
|
|
1418
1514
|
return /* @__PURE__ */ jsxs10(
|
|
1419
1515
|
Drawer,
|
|
@@ -1427,37 +1523,47 @@ var FormDrawer = ({
|
|
|
1427
1523
|
height: "100%",
|
|
1428
1524
|
display: "flex",
|
|
1429
1525
|
flexDirection: "column",
|
|
1430
|
-
borderRadius: 0
|
|
1526
|
+
borderRadius: mdMatches ? "24px 24px 0 0" : "24px 0 0 24px"
|
|
1431
1527
|
}
|
|
1432
1528
|
},
|
|
1433
1529
|
children: [
|
|
1434
|
-
/* @__PURE__ */ jsx17(
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
{
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1530
|
+
/* @__PURE__ */ jsx17(
|
|
1531
|
+
Box6,
|
|
1532
|
+
{
|
|
1533
|
+
p: 3,
|
|
1534
|
+
borderBottom: `1px solid ${alpha12(theme.palette.divider, 0.36)}`,
|
|
1535
|
+
children: /* @__PURE__ */ jsxs10(Grid2, { container: true, children: [
|
|
1536
|
+
/* @__PURE__ */ jsx17(Grid2, { item: true, children: title && /* @__PURE__ */ jsx17(Typography6, { variant: "h6", fontWeight: "bold", children: title }) }),
|
|
1537
|
+
/* @__PURE__ */ jsx17(Grid2, { item: true, children: /* @__PURE__ */ jsx17(
|
|
1538
|
+
IconButton7,
|
|
1539
|
+
{
|
|
1540
|
+
size: "medium",
|
|
1541
|
+
onClick: () => setOpen(false),
|
|
1542
|
+
sx: {
|
|
1543
|
+
position: "absolute",
|
|
1544
|
+
top: 8,
|
|
1545
|
+
right: 8,
|
|
1546
|
+
zIndex: 2,
|
|
1547
|
+
backgroundColor: alpha12(theme.palette.background.paper, 0.46)
|
|
1548
|
+
},
|
|
1549
|
+
children: /* @__PURE__ */ jsx17(Close2, { fontSize: "inherit" })
|
|
1550
|
+
}
|
|
1551
|
+
) })
|
|
1552
|
+
] })
|
|
1553
|
+
}
|
|
1554
|
+
),
|
|
1451
1555
|
/* @__PURE__ */ jsx17(Box6, { flex: 1, overflow: "auto", p: 3, children }),
|
|
1452
1556
|
actions && /* @__PURE__ */ jsx17(
|
|
1453
1557
|
Box6,
|
|
1454
1558
|
{
|
|
1455
1559
|
p: 2,
|
|
1456
|
-
borderTop:
|
|
1560
|
+
borderTop: `1px solid ${alpha12(theme.palette.divider, 0.36)}`,
|
|
1457
1561
|
sx: {
|
|
1458
1562
|
position: "sticky",
|
|
1459
1563
|
bottom: 0,
|
|
1460
|
-
zIndex: 1
|
|
1564
|
+
zIndex: 1,
|
|
1565
|
+
backgroundColor: alpha12(theme.palette.background.paper, 0.38),
|
|
1566
|
+
backdropFilter: "blur(10px)"
|
|
1461
1567
|
},
|
|
1462
1568
|
children: actions
|
|
1463
1569
|
}
|
|
@@ -1480,9 +1586,10 @@ import {
|
|
|
1480
1586
|
Stack,
|
|
1481
1587
|
TextField as TextField2,
|
|
1482
1588
|
MenuItem,
|
|
1483
|
-
useTheme as
|
|
1589
|
+
useTheme as useTheme10,
|
|
1484
1590
|
useMediaQuery as useMediaQuery4
|
|
1485
1591
|
} from "@mui/material";
|
|
1592
|
+
import { alpha as alpha13 } from "@mui/material/styles";
|
|
1486
1593
|
import { constants as constants2 } from "@verma-consulting/common-library";
|
|
1487
1594
|
import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1488
1595
|
var PhoneNumberField = ({
|
|
@@ -1495,9 +1602,18 @@ var PhoneNumberField = ({
|
|
|
1495
1602
|
autoFocus = false,
|
|
1496
1603
|
onBlur
|
|
1497
1604
|
}) => {
|
|
1498
|
-
const theme =
|
|
1605
|
+
const theme = useTheme10();
|
|
1499
1606
|
const smMatches = useMediaQuery4(theme.breakpoints.down("sm"));
|
|
1500
1607
|
const countries = constants2.COUNTRIES || [];
|
|
1608
|
+
const glassInputSx = {
|
|
1609
|
+
backdropFilter: "blur(10px) saturate(150%)",
|
|
1610
|
+
"& .MuiOutlinedInput-notchedOutline": {
|
|
1611
|
+
borderColor: alpha13(
|
|
1612
|
+
"#FFFFFF",
|
|
1613
|
+
theme.palette.mode === "dark" ? 0.16 : 0.58
|
|
1614
|
+
)
|
|
1615
|
+
}
|
|
1616
|
+
};
|
|
1501
1617
|
const [country, setCountry] = useState5(defaultCountry);
|
|
1502
1618
|
const [localNumber, setLocalNumber] = useState5("");
|
|
1503
1619
|
const [isFocused, setIsFocused] = useState5(false);
|
|
@@ -1613,7 +1729,8 @@ var PhoneNumberField = ({
|
|
|
1613
1729
|
width: 140,
|
|
1614
1730
|
"& .MuiOutlinedInput-root": {
|
|
1615
1731
|
borderTopRightRadius: 0,
|
|
1616
|
-
borderBottomRightRadius: 0
|
|
1732
|
+
borderBottomRightRadius: 0,
|
|
1733
|
+
...glassInputSx
|
|
1617
1734
|
}
|
|
1618
1735
|
},
|
|
1619
1736
|
SelectProps: {
|
|
@@ -1655,7 +1772,8 @@ var PhoneNumberField = ({
|
|
|
1655
1772
|
sx: {
|
|
1656
1773
|
"& .MuiOutlinedInput-root": {
|
|
1657
1774
|
borderTopLeftRadius: 0,
|
|
1658
|
-
borderBottomLeftRadius: 0
|
|
1775
|
+
borderBottomLeftRadius: 0,
|
|
1776
|
+
...glassInputSx
|
|
1659
1777
|
}
|
|
1660
1778
|
}
|
|
1661
1779
|
}
|
|
@@ -1688,8 +1806,8 @@ export {
|
|
|
1688
1806
|
TablePagination_default as TablePagination,
|
|
1689
1807
|
ThemeProvider,
|
|
1690
1808
|
createTheme,
|
|
1691
|
-
|
|
1809
|
+
makeStyles4 as makeStyles,
|
|
1692
1810
|
styled5 as styled,
|
|
1693
|
-
|
|
1811
|
+
useTheme11 as useTheme
|
|
1694
1812
|
};
|
|
1695
1813
|
//# sourceMappingURL=index.mjs.map
|