@wavelengthusaf/components 1.1.3 → 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.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({
@@ -3449,8 +3469,11 @@ function WavelengthSearch({
3449
3469
  return /* @__PURE__ */ import_react12.default.createElement(import_react12.default.Fragment, null, /* @__PURE__ */ import_react12.default.createElement(
3450
3470
  import_material5.Autocomplete,
3451
3471
  {
3472
+ filterOptions: (x) => x,
3452
3473
  loading: true,
3474
+ disableListWrap: true,
3453
3475
  freeSolo: true,
3476
+ disablePortal: true,
3454
3477
  onChange: (e, value) => {
3455
3478
  if (value != null) {
3456
3479
  if (typeof value == "string") {
@@ -3469,7 +3492,7 @@ function WavelengthSearch({
3469
3492
  sx: { width: width2 },
3470
3493
  renderOption: (props, results2) => (
3471
3494
  // @ts-expect-error boneless chicken
3472
- /* @__PURE__ */ import_react12.default.createElement(import_ListItem.default, __spreadValues({ key: results2.id }, props), /* @__PURE__ */ import_react12.default.createElement(import_material5.ListItemText, { primary: results2.title, secondary: results2.subtitle }))
3495
+ /* @__PURE__ */ import_react12.default.createElement(import_ListItem.default, __spreadProps(__spreadValues({ key: results2.id }, props), { sx: { zIndex: -5 } }), /* @__PURE__ */ import_react12.default.createElement(import_material5.ListItemText, { primary: results2.title, secondary: results2.subtitle }))
3473
3496
  ),
3474
3497
  renderInput: (params) => /* @__PURE__ */ import_react12.default.createElement(
3475
3498
  import_TextField.default,
@@ -3502,13 +3525,13 @@ function WavelengthSearch({
3502
3525
  }
3503
3526
  },
3504
3527
  label,
3505
- onChange: (e) => {
3528
+ onChange: (e) => __async(this, null, function* () {
3506
3529
  if (searchFunction) {
3507
- const response = searchFunction(e.target.value);
3530
+ const response = yield searchFunction(e.target.value);
3508
3531
  console.log(response);
3509
- setResults(response);
3532
+ yield setResults(response);
3510
3533
  }
3511
- }
3534
+ })
3512
3535
  })
3513
3536
  )
3514
3537
  }
@@ -3518,6 +3541,7 @@ function WavelengthSearch({
3518
3541
  return /* @__PURE__ */ import_react12.default.createElement(import_react12.default.Fragment, null, /* @__PURE__ */ import_react12.default.createElement(
3519
3542
  import_material5.Autocomplete,
3520
3543
  {
3544
+ filterOptions: (x) => x,
3521
3545
  loading: true,
3522
3546
  freeSolo: true,
3523
3547
  onChange: (e, value) => {
@@ -3635,7 +3659,7 @@ var import_react15 = __toESM(require("react"));
3635
3659
  var import_material7 = require("@mui/material");
3636
3660
  var import_icons_material = require("@mui/icons-material");
3637
3661
  var import_react_router_dom = require("react-router-dom");
3638
- function WavelengthSideBar({ sections, txtColor, bgColor, labelColor, arrowColor, marginTop, marginLeft, width: width2 = 243, height: height2 = 300 }) {
3662
+ function WavelengthSideBar({ sections, txtColor, bgColor, labelColor, arrowColor, marginTop, marginLeft, width: width2 = "fit-content", height: height2 = 300 }) {
3639
3663
  const [openSections, setOpenSections] = (0, import_react15.useState)({});
3640
3664
  const navigate = (0, import_react_router_dom.useNavigate)();
3641
3665
  const palette2 = getPalette();
@@ -3658,7 +3682,8 @@ function WavelengthSideBar({ sections, txtColor, bgColor, labelColor, arrowColor
3658
3682
  marginBottom: 5,
3659
3683
  marginTop,
3660
3684
  marginLeft,
3661
- borderRadius: "12px"
3685
+ borderRadius: "12px",
3686
+ position: "relative"
3662
3687
  }
3663
3688
  },
3664
3689
  /* @__PURE__ */ import_react15.default.createElement(import_material7.List, { component: "nav" }, sections.map((section, index) => {