@verma-consulting/design-library 0.1.36 → 0.1.37
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 +79 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +86 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -996,7 +996,7 @@ var Loader = ({ size = 48, color = "primary" }) => {
|
|
|
996
996
|
open: true,
|
|
997
997
|
sx: {
|
|
998
998
|
zIndex: (theme) => theme.zIndex.modal + 1,
|
|
999
|
-
backgroundColor:
|
|
999
|
+
backgroundColor: "transparent",
|
|
1000
1000
|
backdropFilter: "blur(10px) saturate(145%)"
|
|
1001
1001
|
},
|
|
1002
1002
|
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
@@ -1009,8 +1009,9 @@ var Loader = ({ size = 48, color = "primary" }) => {
|
|
|
1009
1009
|
sx: {
|
|
1010
1010
|
p: 1,
|
|
1011
1011
|
borderRadius: "50%",
|
|
1012
|
-
backgroundColor:
|
|
1013
|
-
border: (theme) => `1px solid ${(0, import_styles11.alpha)("#FFFFFF", theme.palette.mode === "dark" ? 0.14 : 0.56)}
|
|
1012
|
+
backgroundColor: "transparent",
|
|
1013
|
+
border: (theme) => `1px solid ${(0, import_styles11.alpha)("#FFFFFF", theme.palette.mode === "dark" ? 0.14 : 0.56)}`,
|
|
1014
|
+
boxShadow: (theme) => theme.palette.mode === "dark" ? "0 10px 24px rgba(0,0,0,0.32)" : "0 10px 20px rgba(15,23,42,0.14)"
|
|
1014
1015
|
}
|
|
1015
1016
|
}
|
|
1016
1017
|
)
|
|
@@ -1321,16 +1322,17 @@ var import_styles15 = require("@mui/material/styles");
|
|
|
1321
1322
|
var import_icons_material7 = require("@mui/icons-material");
|
|
1322
1323
|
var import_styles16 = require("@mui/styles");
|
|
1323
1324
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1324
|
-
var useStyles3 = (0, import_styles16.makeStyles)(() => ({
|
|
1325
|
+
var useStyles3 = (0, import_styles16.makeStyles)((theme) => ({
|
|
1325
1326
|
defaultMode: {
|
|
1327
|
+
margin: "4px",
|
|
1326
1328
|
padding: "14px 8px",
|
|
1327
1329
|
cursor: "pointer",
|
|
1328
1330
|
borderRadius: 14,
|
|
1329
|
-
border:
|
|
1331
|
+
border: `1px solid ${(0, import_styles15.alpha)("#FFFFFF", theme.palette.mode === "dark" ? 0.16 : 0.55)}`,
|
|
1330
1332
|
backdropFilter: "blur(14px) saturate(150%)",
|
|
1331
|
-
background: "linear-gradient(160deg, rgba(255,255,255,0.9), rgba(245,249,255,0.72))",
|
|
1333
|
+
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))",
|
|
1332
1334
|
"&:hover": {
|
|
1333
|
-
boxShadow: "rgba(15, 23, 42, 0.16) 0px 8px 24px"
|
|
1335
|
+
boxShadow: theme.palette.mode === "dark" ? "rgba(0, 0, 0, 0.34) 0px 10px 26px" : "rgba(15, 23, 42, 0.16) 0px 8px 24px"
|
|
1334
1336
|
}
|
|
1335
1337
|
},
|
|
1336
1338
|
formLabel: {
|
|
@@ -1356,11 +1358,13 @@ var SearchableSelect = import_react7.default.memo(
|
|
|
1356
1358
|
defaultEditMode = false,
|
|
1357
1359
|
multiple = false
|
|
1358
1360
|
}) => {
|
|
1361
|
+
const theme = (0, import_styles15.useTheme)();
|
|
1359
1362
|
const classes = useStyles3();
|
|
1360
1363
|
const wrapperRef = (0, import_react7.useRef)(null);
|
|
1361
1364
|
const inputRef = (0, import_react7.useRef)(null);
|
|
1362
1365
|
const [editMode, setEditMode] = (0, import_react7.useState)(defaultEditMode);
|
|
1363
1366
|
const [open, setOpen] = (0, import_react7.useState)(defaultEditMode);
|
|
1367
|
+
const glassBackground = 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))";
|
|
1364
1368
|
(0, import_react7.useEffect)(() => {
|
|
1365
1369
|
function handleClickOutside(event) {
|
|
1366
1370
|
if (wrapperRef.current && !wrapperRef.current.contains(event.target)) {
|
|
@@ -1440,6 +1444,56 @@ var SearchableSelect = import_react7.default.memo(
|
|
|
1440
1444
|
autoHighlight: true,
|
|
1441
1445
|
getOptionLabel: (option) => option.label,
|
|
1442
1446
|
isOptionEqualToValue: (option, val) => option.value === val.value,
|
|
1447
|
+
sx: {
|
|
1448
|
+
"& .MuiAutocomplete-inputRoot": {
|
|
1449
|
+
background: glassBackground,
|
|
1450
|
+
color: "text.primary"
|
|
1451
|
+
},
|
|
1452
|
+
"& .MuiAutocomplete-inputRoot.Mui-focused": {
|
|
1453
|
+
background: glassBackground,
|
|
1454
|
+
color: "text.primary"
|
|
1455
|
+
},
|
|
1456
|
+
"& .MuiAutocomplete-inputRoot:hover": {
|
|
1457
|
+
background: glassBackground
|
|
1458
|
+
},
|
|
1459
|
+
"& .MuiAutocomplete-input": {
|
|
1460
|
+
color: "text.primary",
|
|
1461
|
+
WebkitTextFillColor: "currentColor"
|
|
1462
|
+
},
|
|
1463
|
+
"& .MuiInputLabel-root": {
|
|
1464
|
+
color: "text.secondary"
|
|
1465
|
+
},
|
|
1466
|
+
"& .MuiInputLabel-root.Mui-focused": {
|
|
1467
|
+
color: "text.primary"
|
|
1468
|
+
},
|
|
1469
|
+
"& .MuiSvgIcon-root": {
|
|
1470
|
+
color: "text.secondary"
|
|
1471
|
+
}
|
|
1472
|
+
},
|
|
1473
|
+
slotProps: {
|
|
1474
|
+
paper: {
|
|
1475
|
+
sx: {
|
|
1476
|
+
background: glassBackground,
|
|
1477
|
+
backdropFilter: "blur(12px) saturate(150%)",
|
|
1478
|
+
border: `1px solid ${(0, import_styles15.alpha)("#FFFFFF", theme.palette.mode === "dark" ? 0.16 : 0.55)}`,
|
|
1479
|
+
boxShadow: theme.palette.mode === "dark" ? "rgba(0, 0, 0, 0.34) 0px 10px 26px" : "rgba(15, 23, 42, 0.16) 0px 8px 24px",
|
|
1480
|
+
"& .MuiAutocomplete-option": {
|
|
1481
|
+
"&[aria-selected='true']": {
|
|
1482
|
+
backgroundColor: (0, import_styles15.alpha)(
|
|
1483
|
+
theme.palette.primary.main,
|
|
1484
|
+
theme.palette.mode === "dark" ? 0.28 : 0.14
|
|
1485
|
+
)
|
|
1486
|
+
},
|
|
1487
|
+
"&.Mui-focused": {
|
|
1488
|
+
backgroundColor: (0, import_styles15.alpha)(
|
|
1489
|
+
theme.palette.primary.main,
|
|
1490
|
+
theme.palette.mode === "dark" ? 0.2 : 0.1
|
|
1491
|
+
)
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
}
|
|
1495
|
+
}
|
|
1496
|
+
},
|
|
1443
1497
|
renderInput: (params) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1444
1498
|
import_material14.TextField,
|
|
1445
1499
|
{
|
|
@@ -1454,8 +1508,23 @@ var SearchableSelect = import_react7.default.memo(
|
|
|
1454
1508
|
borderRadius: 1.75,
|
|
1455
1509
|
backdropFilter: "blur(10px)",
|
|
1456
1510
|
pr: 1.5,
|
|
1511
|
+
background: glassBackground,
|
|
1512
|
+
color: "text.primary",
|
|
1513
|
+
"&.Mui-focused": {
|
|
1514
|
+
background: glassBackground
|
|
1515
|
+
},
|
|
1516
|
+
"&:hover": {
|
|
1517
|
+
background: glassBackground
|
|
1518
|
+
},
|
|
1519
|
+
"& .MuiInputBase-input": {
|
|
1520
|
+
color: "text.primary",
|
|
1521
|
+
WebkitTextFillColor: "currentColor"
|
|
1522
|
+
},
|
|
1457
1523
|
"& .MuiOutlinedInput-notchedOutline": {
|
|
1458
|
-
borderColor: (0, import_styles15.alpha)(
|
|
1524
|
+
borderColor: (0, import_styles15.alpha)(
|
|
1525
|
+
"#FFFFFF",
|
|
1526
|
+
theme.palette.mode === "dark" ? 0.18 : 0.6
|
|
1527
|
+
)
|
|
1459
1528
|
}
|
|
1460
1529
|
},
|
|
1461
1530
|
endAdornment: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
@@ -1496,8 +1565,8 @@ var SearchableSelect = import_react7.default.memo(
|
|
|
1496
1565
|
className: classes.defaultMode,
|
|
1497
1566
|
style,
|
|
1498
1567
|
children: [
|
|
1499
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_material14.FormLabel, { className: classes.formLabel, children: label }),
|
|
1500
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_material14.Typography, { className: classes.formValue, children: displayValue })
|
|
1568
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_material14.FormLabel, { className: classes.formLabel, sx: { color: "text.secondary" }, children: label }),
|
|
1569
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_material14.Typography, { className: classes.formValue, sx: { color: "text.primary" }, children: displayValue })
|
|
1501
1570
|
]
|
|
1502
1571
|
}
|
|
1503
1572
|
);
|