@wavelengthusaf/components 1.1.4 → 1.1.5

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
@@ -40,6 +40,26 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
40
40
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
41
41
  mod
42
42
  ));
43
+ var __async = (__this, __arguments, generator) => {
44
+ return new Promise((resolve, reject) => {
45
+ var fulfilled = (value) => {
46
+ try {
47
+ step(generator.next(value));
48
+ } catch (e) {
49
+ reject(e);
50
+ }
51
+ };
52
+ var rejected = (value) => {
53
+ try {
54
+ step(generator.throw(value));
55
+ } catch (e) {
56
+ reject(e);
57
+ }
58
+ };
59
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
60
+ step((generator = generator.apply(__this, __arguments)).next());
61
+ });
62
+ };
43
63
 
44
64
  // node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js
45
65
  var require_react_is_production_min = __commonJS({
@@ -3401,7 +3421,9 @@ function WavelengthSearch({
3401
3421
  {
3402
3422
  filterOptions: (x) => x,
3403
3423
  loading: true,
3424
+ disableListWrap: true,
3404
3425
  freeSolo: true,
3426
+ disablePortal: true,
3405
3427
  onChange: (e, value) => {
3406
3428
  if (value != null) {
3407
3429
  if (typeof value == "string") {
@@ -3420,7 +3442,7 @@ function WavelengthSearch({
3420
3442
  sx: { width: width2 },
3421
3443
  renderOption: (props, results2) => (
3422
3444
  // @ts-expect-error boneless chicken
3423
- /* @__PURE__ */ React9.createElement(ListItem, __spreadValues({ key: results2.id }, props), /* @__PURE__ */ React9.createElement(ListItemText, { primary: results2.title, secondary: results2.subtitle }))
3445
+ /* @__PURE__ */ React9.createElement(ListItem, __spreadProps(__spreadValues({ key: results2.id }, props), { sx: { zIndex: -5 } }), /* @__PURE__ */ React9.createElement(ListItemText, { primary: results2.title, secondary: results2.subtitle }))
3424
3446
  ),
3425
3447
  renderInput: (params) => /* @__PURE__ */ React9.createElement(
3426
3448
  TextField2,
@@ -3453,13 +3475,13 @@ function WavelengthSearch({
3453
3475
  }
3454
3476
  },
3455
3477
  label,
3456
- onChange: (e) => {
3478
+ onChange: (e) => __async(this, null, function* () {
3457
3479
  if (searchFunction) {
3458
- const response = searchFunction(e.target.value);
3480
+ const response = yield searchFunction(e.target.value);
3459
3481
  console.log(response);
3460
- setResults(response);
3482
+ yield setResults(response);
3461
3483
  }
3462
- }
3484
+ })
3463
3485
  })
3464
3486
  )
3465
3487
  }
@@ -3587,7 +3609,7 @@ import React11, { useState as useState3 } from "react";
3587
3609
  import { Box, List, ListItem as ListItem2, Typography, Collapse } from "@mui/material";
3588
3610
  import { KeyboardArrowDownRounded, KeyboardArrowRightRounded } from "@mui/icons-material";
3589
3611
  import { useNavigate } from "react-router-dom";
3590
- function WavelengthSideBar({ sections, txtColor, bgColor, labelColor, arrowColor, marginTop, marginLeft, width: width2 = 243, height: height2 = 300 }) {
3612
+ function WavelengthSideBar({ sections, txtColor, bgColor, labelColor, arrowColor, marginTop, marginLeft, width: width2 = "fit-content", height: height2 = 300 }) {
3591
3613
  const [openSections, setOpenSections] = useState3({});
3592
3614
  const navigate = useNavigate();
3593
3615
  const palette2 = getPalette();
@@ -3610,7 +3632,8 @@ function WavelengthSideBar({ sections, txtColor, bgColor, labelColor, arrowColor
3610
3632
  marginBottom: 5,
3611
3633
  marginTop,
3612
3634
  marginLeft,
3613
- borderRadius: "12px"
3635
+ borderRadius: "12px",
3636
+ position: "relative"
3614
3637
  }
3615
3638
  },
3616
3639
  /* @__PURE__ */ React11.createElement(List, { component: "nav" }, sections.map((section, index) => {