@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.mjs CHANGED
@@ -373,7 +373,7 @@ var TablePagination_default = TablePagination;
373
373
 
374
374
  // src/index.tsx
375
375
  import {
376
- useTheme as useTheme11,
376
+ useTheme as useTheme12,
377
377
  styled as styled5,
378
378
  createTheme,
379
379
  ThemeProvider
@@ -973,7 +973,7 @@ var Loader = ({ size = 48, color = "primary" }) => {
973
973
  open: true,
974
974
  sx: {
975
975
  zIndex: (theme) => theme.zIndex.modal + 1,
976
- backgroundColor: (theme) => theme.palette.mode === "dark" ? alpha7("#020617", 0.48) : alpha7("#E2E8F0", 0.34),
976
+ backgroundColor: "transparent",
977
977
  backdropFilter: "blur(10px) saturate(145%)"
978
978
  },
979
979
  children: /* @__PURE__ */ jsx9(
@@ -986,8 +986,9 @@ var Loader = ({ size = 48, color = "primary" }) => {
986
986
  sx: {
987
987
  p: 1,
988
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)}`
989
+ backgroundColor: "transparent",
990
+ border: (theme) => `1px solid ${alpha7("#FFFFFF", theme.palette.mode === "dark" ? 0.14 : 0.56)}`,
991
+ boxShadow: (theme) => theme.palette.mode === "dark" ? "0 10px 24px rgba(0,0,0,0.32)" : "0 10px 20px rgba(15,23,42,0.14)"
991
992
  }
992
993
  }
993
994
  )
@@ -1301,20 +1302,21 @@ import {
1301
1302
  FormControl as FormControl2,
1302
1303
  IconButton as IconButton6
1303
1304
  } from "@mui/material";
1304
- import { alpha as alpha11 } from "@mui/material/styles";
1305
+ import { alpha as alpha11, useTheme as useTheme9 } from "@mui/material/styles";
1305
1306
  import { Clear as Clear2 } from "@mui/icons-material";
1306
1307
  import { makeStyles as makeStyles3 } from "@mui/styles";
1307
1308
  import { Fragment as Fragment2, jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
1308
- var useStyles3 = makeStyles3(() => ({
1309
+ var useStyles3 = makeStyles3((theme) => ({
1309
1310
  defaultMode: {
1311
+ margin: "4px",
1310
1312
  padding: "14px 8px",
1311
1313
  cursor: "pointer",
1312
1314
  borderRadius: 14,
1313
- border: "1px solid rgba(255,255,255,0.55)",
1315
+ border: `1px solid ${alpha11("#FFFFFF", theme.palette.mode === "dark" ? 0.16 : 0.55)}`,
1314
1316
  backdropFilter: "blur(14px) saturate(150%)",
1315
- background: "linear-gradient(160deg, rgba(255,255,255,0.9), rgba(245,249,255,0.72))",
1317
+ 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))",
1316
1318
  "&:hover": {
1317
- boxShadow: "rgba(15, 23, 42, 0.16) 0px 8px 24px"
1319
+ boxShadow: theme.palette.mode === "dark" ? "rgba(0, 0, 0, 0.34) 0px 10px 26px" : "rgba(15, 23, 42, 0.16) 0px 8px 24px"
1318
1320
  }
1319
1321
  },
1320
1322
  formLabel: {
@@ -1340,11 +1342,13 @@ var SearchableSelect = React8.memo(
1340
1342
  defaultEditMode = false,
1341
1343
  multiple = false
1342
1344
  }) => {
1345
+ const theme = useTheme9();
1343
1346
  const classes = useStyles3();
1344
1347
  const wrapperRef = useRef3(null);
1345
1348
  const inputRef = useRef3(null);
1346
1349
  const [editMode, setEditMode] = useState4(defaultEditMode);
1347
1350
  const [open, setOpen] = useState4(defaultEditMode);
1351
+ 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))";
1348
1352
  useEffect3(() => {
1349
1353
  function handleClickOutside(event) {
1350
1354
  if (wrapperRef.current && !wrapperRef.current.contains(event.target)) {
@@ -1424,6 +1428,56 @@ var SearchableSelect = React8.memo(
1424
1428
  autoHighlight: true,
1425
1429
  getOptionLabel: (option) => option.label,
1426
1430
  isOptionEqualToValue: (option, val) => option.value === val.value,
1431
+ sx: {
1432
+ "& .MuiAutocomplete-inputRoot": {
1433
+ background: glassBackground,
1434
+ color: "text.primary"
1435
+ },
1436
+ "& .MuiAutocomplete-inputRoot.Mui-focused": {
1437
+ background: glassBackground,
1438
+ color: "text.primary"
1439
+ },
1440
+ "& .MuiAutocomplete-inputRoot:hover": {
1441
+ background: glassBackground
1442
+ },
1443
+ "& .MuiAutocomplete-input": {
1444
+ color: "text.primary",
1445
+ WebkitTextFillColor: "currentColor"
1446
+ },
1447
+ "& .MuiInputLabel-root": {
1448
+ color: "text.secondary"
1449
+ },
1450
+ "& .MuiInputLabel-root.Mui-focused": {
1451
+ color: "text.primary"
1452
+ },
1453
+ "& .MuiSvgIcon-root": {
1454
+ color: "text.secondary"
1455
+ }
1456
+ },
1457
+ slotProps: {
1458
+ paper: {
1459
+ sx: {
1460
+ background: glassBackground,
1461
+ backdropFilter: "blur(12px) saturate(150%)",
1462
+ border: `1px solid ${alpha11("#FFFFFF", theme.palette.mode === "dark" ? 0.16 : 0.55)}`,
1463
+ boxShadow: theme.palette.mode === "dark" ? "rgba(0, 0, 0, 0.34) 0px 10px 26px" : "rgba(15, 23, 42, 0.16) 0px 8px 24px",
1464
+ "& .MuiAutocomplete-option": {
1465
+ "&[aria-selected='true']": {
1466
+ backgroundColor: alpha11(
1467
+ theme.palette.primary.main,
1468
+ theme.palette.mode === "dark" ? 0.28 : 0.14
1469
+ )
1470
+ },
1471
+ "&.Mui-focused": {
1472
+ backgroundColor: alpha11(
1473
+ theme.palette.primary.main,
1474
+ theme.palette.mode === "dark" ? 0.2 : 0.1
1475
+ )
1476
+ }
1477
+ }
1478
+ }
1479
+ }
1480
+ },
1427
1481
  renderInput: (params) => /* @__PURE__ */ jsx16(
1428
1482
  TextField,
1429
1483
  {
@@ -1438,8 +1492,23 @@ var SearchableSelect = React8.memo(
1438
1492
  borderRadius: 1.75,
1439
1493
  backdropFilter: "blur(10px)",
1440
1494
  pr: 1.5,
1495
+ background: glassBackground,
1496
+ color: "text.primary",
1497
+ "&.Mui-focused": {
1498
+ background: glassBackground
1499
+ },
1500
+ "&:hover": {
1501
+ background: glassBackground
1502
+ },
1503
+ "& .MuiInputBase-input": {
1504
+ color: "text.primary",
1505
+ WebkitTextFillColor: "currentColor"
1506
+ },
1441
1507
  "& .MuiOutlinedInput-notchedOutline": {
1442
- borderColor: alpha11("#FFFFFF", 0.6)
1508
+ borderColor: alpha11(
1509
+ "#FFFFFF",
1510
+ theme.palette.mode === "dark" ? 0.18 : 0.6
1511
+ )
1443
1512
  }
1444
1513
  },
1445
1514
  endAdornment: /* @__PURE__ */ jsxs9(Fragment2, { children: [
@@ -1480,8 +1549,8 @@ var SearchableSelect = React8.memo(
1480
1549
  className: classes.defaultMode,
1481
1550
  style,
1482
1551
  children: [
1483
- /* @__PURE__ */ jsx16(FormLabel2, { className: classes.formLabel, children: label }),
1484
- /* @__PURE__ */ jsx16(Typography5, { className: classes.formValue, children: displayValue })
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 })
1485
1554
  ]
1486
1555
  }
1487
1556
  );
@@ -1496,7 +1565,7 @@ import {
1496
1565
  Box as Box6,
1497
1566
  IconButton as IconButton7,
1498
1567
  Grid as Grid2,
1499
- useTheme as useTheme9,
1568
+ useTheme as useTheme10,
1500
1569
  useMediaQuery as useMediaQuery3
1501
1570
  } from "@mui/material";
1502
1571
  import { alpha as alpha12 } from "@mui/material/styles";
@@ -1509,7 +1578,7 @@ var FormDrawer = ({
1509
1578
  actions,
1510
1579
  children
1511
1580
  }) => {
1512
- const theme = useTheme9();
1581
+ const theme = useTheme10();
1513
1582
  const mdMatches = useMediaQuery3(theme.breakpoints.down("md"));
1514
1583
  return /* @__PURE__ */ jsxs10(
1515
1584
  Drawer,
@@ -1586,7 +1655,7 @@ import {
1586
1655
  Stack,
1587
1656
  TextField as TextField2,
1588
1657
  MenuItem,
1589
- useTheme as useTheme10,
1658
+ useTheme as useTheme11,
1590
1659
  useMediaQuery as useMediaQuery4
1591
1660
  } from "@mui/material";
1592
1661
  import { alpha as alpha13 } from "@mui/material/styles";
@@ -1602,7 +1671,7 @@ var PhoneNumberField = ({
1602
1671
  autoFocus = false,
1603
1672
  onBlur
1604
1673
  }) => {
1605
- const theme = useTheme10();
1674
+ const theme = useTheme11();
1606
1675
  const smMatches = useMediaQuery4(theme.breakpoints.down("sm"));
1607
1676
  const countries = constants2.COUNTRIES || [];
1608
1677
  const glassInputSx = {
@@ -1808,6 +1877,6 @@ export {
1808
1877
  createTheme,
1809
1878
  makeStyles4 as makeStyles,
1810
1879
  styled5 as styled,
1811
- useTheme11 as useTheme
1880
+ useTheme12 as useTheme
1812
1881
  };
1813
1882
  //# sourceMappingURL=index.mjs.map