@wavelengthusaf/components 1.1.4 → 1.1.6

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 CHANGED
@@ -46,6 +46,26 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
46
46
  mod
47
47
  ));
48
48
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
49
+ var __async = (__this, __arguments, generator) => {
50
+ return new Promise((resolve, reject) => {
51
+ var fulfilled = (value) => {
52
+ try {
53
+ step(generator.next(value));
54
+ } catch (e) {
55
+ reject(e);
56
+ }
57
+ };
58
+ var rejected = (value) => {
59
+ try {
60
+ step(generator.throw(value));
61
+ } catch (e) {
62
+ reject(e);
63
+ }
64
+ };
65
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
66
+ step((generator = generator.apply(__this, __arguments)).next());
67
+ });
68
+ };
49
69
 
50
70
  // node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js
51
71
  var require_react_is_production_min = __commonJS({
@@ -3424,6 +3444,37 @@ var import_InputAdornment = __toESM(require("@mui/material/InputAdornment"));
3424
3444
  var import_IconButton = __toESM(require("@mui/material/IconButton"));
3425
3445
  var import_react13 = require("react");
3426
3446
  var import_ListItem = __toESM(require("@mui/material/ListItem"));
3447
+ var CustomPopper = (props) => {
3448
+ return /* @__PURE__ */ import_react12.default.createElement(
3449
+ import_material5.Popper,
3450
+ __spreadProps(__spreadValues({}, props), {
3451
+ placement: "right-start",
3452
+ disablePortal: false,
3453
+ modifiers: [
3454
+ {
3455
+ name: "flip",
3456
+ enabled: true,
3457
+ options: {
3458
+ altBoundary: true,
3459
+ rootBoundary: "document",
3460
+ padding: 8
3461
+ }
3462
+ },
3463
+ {
3464
+ name: "preventOverflow",
3465
+ enabled: true,
3466
+ options: {
3467
+ altAxis: true,
3468
+ altBoundary: true,
3469
+ tether: false,
3470
+ rootBoundary: "document",
3471
+ padding: 8
3472
+ }
3473
+ }
3474
+ ]
3475
+ })
3476
+ );
3477
+ };
3427
3478
  function WavelengthSearch({
3428
3479
  id,
3429
3480
  mode,
@@ -3451,7 +3502,9 @@ function WavelengthSearch({
3451
3502
  {
3452
3503
  filterOptions: (x) => x,
3453
3504
  loading: true,
3505
+ disableListWrap: true,
3454
3506
  freeSolo: true,
3507
+ disablePortal: true,
3455
3508
  onChange: (e, value) => {
3456
3509
  if (value != null) {
3457
3510
  if (typeof value == "string") {
@@ -3503,15 +3556,16 @@ function WavelengthSearch({
3503
3556
  }
3504
3557
  },
3505
3558
  label,
3506
- onChange: (e) => {
3559
+ onChange: (e) => __async(this, null, function* () {
3507
3560
  if (searchFunction) {
3508
- const response = searchFunction(e.target.value);
3561
+ const response = yield searchFunction(e.target.value);
3509
3562
  console.log(response);
3510
- setResults(response);
3563
+ yield setResults(response);
3511
3564
  }
3512
- }
3565
+ })
3513
3566
  })
3514
- )
3567
+ ),
3568
+ PopperComponent: CustomPopper
3515
3569
  }
3516
3570
  ));
3517
3571
  } else if (mode == "manual") {
@@ -3637,7 +3691,7 @@ var import_react15 = __toESM(require("react"));
3637
3691
  var import_material7 = require("@mui/material");
3638
3692
  var import_icons_material = require("@mui/icons-material");
3639
3693
  var import_react_router_dom = require("react-router-dom");
3640
- function WavelengthSideBar({ sections, txtColor, bgColor, labelColor, arrowColor, marginTop, marginLeft, width: width2 = 243, height: height2 = 300 }) {
3694
+ function WavelengthSideBar({ sections, txtColor, bgColor, labelColor, arrowColor, marginTop, marginLeft, width: width2 = "fit-content", height: height2 = 300 }) {
3641
3695
  const [openSections, setOpenSections] = (0, import_react15.useState)({});
3642
3696
  const navigate = (0, import_react_router_dom.useNavigate)();
3643
3697
  const palette2 = getPalette();
@@ -3660,7 +3714,8 @@ function WavelengthSideBar({ sections, txtColor, bgColor, labelColor, arrowColor
3660
3714
  marginBottom: 5,
3661
3715
  marginTop,
3662
3716
  marginLeft,
3663
- borderRadius: "12px"
3717
+ borderRadius: "12px",
3718
+ position: "relative"
3664
3719
  }
3665
3720
  },
3666
3721
  /* @__PURE__ */ import_react15.default.createElement(import_material7.List, { component: "nav" }, sections.map((section, index) => {