@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.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({
@@ -3399,8 +3419,11 @@ function WavelengthSearch({
3399
3419
  return /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement(
3400
3420
  Autocomplete2,
3401
3421
  {
3422
+ filterOptions: (x) => x,
3402
3423
  loading: true,
3424
+ disableListWrap: true,
3403
3425
  freeSolo: true,
3426
+ disablePortal: true,
3404
3427
  onChange: (e, value) => {
3405
3428
  if (value != null) {
3406
3429
  if (typeof value == "string") {
@@ -3419,7 +3442,7 @@ function WavelengthSearch({
3419
3442
  sx: { width: width2 },
3420
3443
  renderOption: (props, results2) => (
3421
3444
  // @ts-expect-error boneless chicken
3422
- /* @__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 }))
3423
3446
  ),
3424
3447
  renderInput: (params) => /* @__PURE__ */ React9.createElement(
3425
3448
  TextField2,
@@ -3452,13 +3475,13 @@ function WavelengthSearch({
3452
3475
  }
3453
3476
  },
3454
3477
  label,
3455
- onChange: (e) => {
3478
+ onChange: (e) => __async(this, null, function* () {
3456
3479
  if (searchFunction) {
3457
- const response = searchFunction(e.target.value);
3480
+ const response = yield searchFunction(e.target.value);
3458
3481
  console.log(response);
3459
- setResults(response);
3482
+ yield setResults(response);
3460
3483
  }
3461
- }
3484
+ })
3462
3485
  })
3463
3486
  )
3464
3487
  }
@@ -3468,6 +3491,7 @@ function WavelengthSearch({
3468
3491
  return /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement(
3469
3492
  Autocomplete2,
3470
3493
  {
3494
+ filterOptions: (x) => x,
3471
3495
  loading: true,
3472
3496
  freeSolo: true,
3473
3497
  onChange: (e, value) => {
@@ -3585,7 +3609,7 @@ import React11, { useState as useState3 } from "react";
3585
3609
  import { Box, List, ListItem as ListItem2, Typography, Collapse } from "@mui/material";
3586
3610
  import { KeyboardArrowDownRounded, KeyboardArrowRightRounded } from "@mui/icons-material";
3587
3611
  import { useNavigate } from "react-router-dom";
3588
- 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 }) {
3589
3613
  const [openSections, setOpenSections] = useState3({});
3590
3614
  const navigate = useNavigate();
3591
3615
  const palette2 = getPalette();
@@ -3608,7 +3632,8 @@ function WavelengthSideBar({ sections, txtColor, bgColor, labelColor, arrowColor
3608
3632
  marginBottom: 5,
3609
3633
  marginTop,
3610
3634
  marginLeft,
3611
- borderRadius: "12px"
3635
+ borderRadius: "12px",
3636
+ position: "relative"
3612
3637
  }
3613
3638
  },
3614
3639
  /* @__PURE__ */ React11.createElement(List, { component: "nav" }, sections.map((section, index) => {