@verma-consulting/design-library 0.1.43 → 0.1.44
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 +0 -73
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +0 -73
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1285,39 +1285,6 @@ var useStyles2 = (0, import_styles14.makeStyles)((theme) => ({
|
|
|
1285
1285
|
whiteSpace: "pre-wrap"
|
|
1286
1286
|
}
|
|
1287
1287
|
}));
|
|
1288
|
-
function createSearchableSelectPopperOptions() {
|
|
1289
|
-
return {
|
|
1290
|
-
modifiers: [
|
|
1291
|
-
{
|
|
1292
|
-
name: "searchableSelectViewportMaxHeight",
|
|
1293
|
-
enabled: true,
|
|
1294
|
-
phase: "beforeWrite",
|
|
1295
|
-
requires: ["computeStyles"],
|
|
1296
|
-
fn({ state }) {
|
|
1297
|
-
if (typeof window === "undefined") return;
|
|
1298
|
-
const padding = 12;
|
|
1299
|
-
const vh = window.innerHeight;
|
|
1300
|
-
const ref = state.rects.reference;
|
|
1301
|
-
const refBottom = ref.y + ref.height;
|
|
1302
|
-
const spaceBelow = vh - refBottom - padding;
|
|
1303
|
-
const spaceAbove = ref.y - padding;
|
|
1304
|
-
const placement = state.placement || "bottom-start";
|
|
1305
|
-
const isTop = placement.startsWith("top");
|
|
1306
|
-
const available = Math.max(0, isTop ? spaceAbove : spaceBelow);
|
|
1307
|
-
const maxH = Math.min(available, vh * 0.7);
|
|
1308
|
-
state.styles.popper = state.styles.popper || {};
|
|
1309
|
-
Object.assign(state.styles.popper, {
|
|
1310
|
-
display: "flex",
|
|
1311
|
-
flexDirection: "column",
|
|
1312
|
-
minHeight: 0,
|
|
1313
|
-
maxHeight: `${maxH}px`,
|
|
1314
|
-
overflow: "hidden"
|
|
1315
|
-
});
|
|
1316
|
-
}
|
|
1317
|
-
}
|
|
1318
|
-
]
|
|
1319
|
-
};
|
|
1320
|
-
}
|
|
1321
1288
|
var SearchableSelect = import_react6.default.memo(
|
|
1322
1289
|
({
|
|
1323
1290
|
name,
|
|
@@ -1387,10 +1354,6 @@ var SearchableSelect = import_react6.default.memo(
|
|
|
1387
1354
|
}, [selected, multiple]);
|
|
1388
1355
|
const isValueEmpty = !value.trim();
|
|
1389
1356
|
const showClear = onClear != null;
|
|
1390
|
-
const searchableSelectPopperOptions = (0, import_react6.useMemo)(
|
|
1391
|
-
() => createSearchableSelectPopperOptions(),
|
|
1392
|
-
[]
|
|
1393
|
-
);
|
|
1394
1357
|
return editMode ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_material13.FormControl, { fullWidth: true, style, disabled, size, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1395
1358
|
import_material13.Autocomplete,
|
|
1396
1359
|
{
|
|
@@ -1448,36 +1411,12 @@ var SearchableSelect = import_react6.default.memo(
|
|
|
1448
1411
|
}
|
|
1449
1412
|
},
|
|
1450
1413
|
slotProps: {
|
|
1451
|
-
popper: {
|
|
1452
|
-
// Align with field width; only flip vertically (never left/right like placement "auto").
|
|
1453
|
-
placement: "bottom-start",
|
|
1454
|
-
modifiers: [
|
|
1455
|
-
{
|
|
1456
|
-
name: "flip",
|
|
1457
|
-
options: {
|
|
1458
|
-
fallbackPlacements: [
|
|
1459
|
-
"top-start",
|
|
1460
|
-
"top",
|
|
1461
|
-
"bottom-start",
|
|
1462
|
-
"bottom"
|
|
1463
|
-
]
|
|
1464
|
-
}
|
|
1465
|
-
}
|
|
1466
|
-
],
|
|
1467
|
-
popperOptions: searchableSelectPopperOptions
|
|
1468
|
-
},
|
|
1469
1414
|
paper: {
|
|
1470
1415
|
sx: {
|
|
1471
1416
|
background: glassBackground,
|
|
1472
1417
|
backdropFilter: "blur(12px) saturate(150%)",
|
|
1473
1418
|
border: `1px solid ${(0, import_styles13.alpha)("#FFFFFF", theme.palette.mode === "dark" ? 0.16 : 0.55)}`,
|
|
1474
1419
|
boxShadow: theme.palette.mode === "dark" ? "rgba(0, 0, 0, 0.34) 0px 10px 26px" : "rgba(15, 23, 42, 0.16) 0px 8px 24px",
|
|
1475
|
-
flex: 1,
|
|
1476
|
-
minHeight: 0,
|
|
1477
|
-
maxHeight: "100%",
|
|
1478
|
-
overflow: "hidden",
|
|
1479
|
-
display: "flex",
|
|
1480
|
-
flexDirection: "column",
|
|
1481
1420
|
"& .MuiAutocomplete-option": {
|
|
1482
1421
|
"&[aria-selected='true']": {
|
|
1483
1422
|
backgroundColor: (0, import_styles13.alpha)(
|
|
@@ -1495,18 +1434,6 @@ var SearchableSelect = import_react6.default.memo(
|
|
|
1495
1434
|
}
|
|
1496
1435
|
}
|
|
1497
1436
|
},
|
|
1498
|
-
ListboxProps: {
|
|
1499
|
-
sx: {
|
|
1500
|
-
// Override MUI default maxHeight: 40vh so the panel height comes from the Popper modifier only.
|
|
1501
|
-
maxHeight: "none",
|
|
1502
|
-
flex: "1 1 auto",
|
|
1503
|
-
minHeight: 0,
|
|
1504
|
-
overflowY: "auto",
|
|
1505
|
-
WebkitOverflowScrolling: "touch",
|
|
1506
|
-
overscrollBehavior: "contain",
|
|
1507
|
-
touchAction: "pan-y"
|
|
1508
|
-
}
|
|
1509
|
-
},
|
|
1510
1437
|
renderInput: (params) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1511
1438
|
import_material13.TextField,
|
|
1512
1439
|
{
|